qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 1/2] serial console, output


From: Kevin O'Connor
Subject: Re: [Qemu-devel] [RFC PATCH 1/2] serial console, output
Date: Mon, 4 Jul 2016 12:00:06 -0400
User-agent: Mutt/1.6.1 (2016-04-27)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]