[gPXE] Fwd: interrupt and serial

Luca lucarx76 at gmail.com
Tue Feb 9 12:11:32 EST 2010


On Tue, Feb 9, 2010 at 8:17 AM, Stefan Hajnoczi <stefanha at gmail.com> wrote:

> On Tue, Feb 9, 2010 at 3:05 PM, Luca <lucarx76 at gmail.com> wrote:
> > If I had interrupts, I could stop anything I'm doing every time I get a
> new
> > character and put it into a buffer and then go back to what I'm doing. So
> I
> > shouldn't miss any character.
> > If I use polling, even if the loop is tight, if I get more characters
> while
> > I'm in the loop, I might miss something (when I poll the serial might be
> too
> > late).
> > But I might be wrong so having the interrupts would not change the
> > situation.
>
> When I say a tight receive loop, I mean a loop that reads characters
> from serial into memory.  The loop terminates once all data has been
> received.  Execution of gPXE is blocked while this loop runs and
> step() is not being called.
>
> Have you implemented the serial code using a process - a step()
> function that polls the serial port?  In this case I can imagine it
> dropping characters.
>
>
I could use loop if all messages have same size. But even if I'm in that
case, if I just use a loop and for any reason I miss a character (not
because of gPXE) then I would never exit the loop.
For instance if I'm in a loop waiting for 40 characters but I miss 1, then
gPXE will wait forever for the last one (without exiting the loop because I
cannot implement a timeout mechanism).


> Stefan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe/attachments/20100209/93e414d9/attachment.html 


More information about the gPXE mailing list