[SeaBIOS] [RFC PATCH] Add support for Intel Quark UART.

Kevin O'Connor kevin at koconnor.net
Mon May 19 17:20:35 CEST 2014


On Mon, May 19, 2014 at 02:27:38PM +0100, David Woodhouse wrote:
> On Fri, 2013-11-29 at 12:44 -0500, Kevin O'Connor wrote:
> > > > Do you need debug output from 16bit mode or 32bit segmented mode?  The
> > > > post and boot phases are all 32bit code so typical boot time debugging
> > > > shouldn't be impacted.  Gerd's cbmem debugging code uses this
> > > > approach.
> 
> I don't need debug output. But an INT 10h implementation like sgabios¹
> would be really useful on Quark, because there's normally no real VGA
> output (unless you can connect mini-PCI one, which is what I've done so
> far).

Yes, a serial console using mmio serial ports would be a good reason
to integrate sgabios functionality into seabios.

A couple of months back I looked through the sgabios assembler.  It
looks mostly straight-forward.  The only thing that was marginally
complex was its ability to keep a cache of background attributes.

> However, I note that sgabios already talks about having support for SMM
> traps to talk to an EFI console, so perhaps that's the way forward.

I wasn't aware of that.  Do you have a link?

>The
> SMM side can be provided either by UEFI in the CONFIG_CSM case, or by
> SeaBIOS itself when it's native. You've already been looking at
> something very similar to this anyway, right?

Yes - I have a testing branch at:
https://github.com/KevinOConnor/seabios/tree/testing-32bit-drivers

However, I don't know of a protocol for informing sgabios how to use a
SeaBIOS SMM handler.

> > > I can live with that. Perhaps I should make it work in 16-bit mode but
> > > *only* if the appropriate BAR has been put in a memory hole below 1MiB.
> > 
> > That should be okay, but would it ever actually be mapped below 1Meg?
> > Where would it be mapped to: 0xa0000-0xc0000?
> 
> Hm, I suspect we *could* set up the A and B segments to map to MMIO
> space and then set the BAR for the appropriate UART to be there.

Maybe, but I'd guess it isn't worth it.

>But an
> sgabios implementation is going to need *memory* in the A segment, and
> play tricks to spot when the application/OS has written there and output
> the appropriate changes to the serial port. So I'm not sure it's
> stunningly useful to do so.

sgabios doesn't do anything like that today.  Most apps that anyone
cares about (ie, modern bootloaders) are well behaving - they output
their vga text using the int 10h bios interrupts.  Sgabios hooks these
interrupts to provide service.

In my tests, the only thing I've found which does direct text writes
to the 0xa0000-0xc0000 framebuffer are really old dos programs.  Even
freedos uses the standard bios interface.

-Kevin



More information about the SeaBIOS mailing list