[SeaBIOS] [RFC PATCH 1/2] serial console, output

Kevin O'Connor kevin at koconnor.net
Mon Jul 4 18:00:06 CEST 2016


On Mon, Jul 04, 2016 at 11:26:48AM -0400, Kevin O'Connor wrote:
> At one point I looked through the sgabios code and was able to
> understand how it did caching.  I'll take another look and see if I
> can describe it.

So, if I read the sgabios code correctly, it allocates a buffer of:

struct { u8 x, y; char c; } logbuf[256];
int logbuf_offset;

Every character sent on the serial port is appended to "logbuf" in
order, wrapping if necessary: logbuf[logbuf_offset++ % 256] = x, y, c.
On a read, it scans backwards from logbuf_offset to find the last
update to that cell.

Interestingly, it doesn't store the attribute with the character -
it's int1008 handler just returns the last attribute used anywhere on
the screen.

The code is only used if it is the sole vga code (as opposed to being
used in addition to an existing vgabios).

Does anyone know where one can find the original svn commit history
for sgabios?  Seems the original google code repo is no longer
present.

-Kevin



More information about the SeaBIOS mailing list