[coreboot] [RFC] port bochs-bios to gcc
kevin at koconnor.net
Tue Feb 26 01:51:07 CET 2008
On Mon, Feb 25, 2008 at 10:44:55AM +0100, Stefan Reinauer wrote:
> Maybe we could even use the VSA loader to run bochs bios, instead of ADLO?
> It's all 16bit lumber ;)
ADLO is a fork of the bochs bios - so, they're really the same thing.
There are some new things added to bochs-bios (for example, acpi table
creation), so I've decided to start with it.
I plan to have a 32-bit entry point for the code, so I don't think any
special loader is needed. Just load it in ram and jump to it.
> ADLO is so fragile because it was written in assembler (so no stack is
> needed?!?), reimplementing all the things we have in coreboot in C. So
> recognizing that it just another loader would simplify and stabilize things
> quite a bit.
ADLO (and the bochs bios) is using the bcc compiler. The code itself
is a mix of C and 16bit assembler. The code uses the stack liberally
so that's not a reason for using assembler.
Also, I don't really see a lot of overlap between coreboot and
bochs-bios. The former seems more interested in initializing
hardware, while the latter is primarily implementing real-mode
callbacks. I see more overlap between filo and bochs-bios.
> Someone might say we can do this with libpayload or by adding a lot of
> chipset specific code to ADLO and rewrite it from scratch. Then we're at
> 2500 lines of code instead of 25 and we have a nasty multi-staging.
I don't see a 16bit bios needing a lot of chipset specific code.
Sure, the bios needs to access the harddrives, keyboard, rtc, etc..
However, it only needs to implement basic PIO support, and most
hardware vendors implement a backwards compatibility mode for these
More information about the coreboot