[coreboot] SeaBIOS question and cross compilation fix.

Stefan Reinauer stepan at coresystems.de
Sun Nov 9 20:47:44 CET 2008

Kevin O'Connor wrote:
> On Sat, Nov 08, 2008 at 09:50:34PM +0100, Stefan Reinauer wrote:
>> (gdb) disas 0xfffc0 0xfffd4
>> Dump of assembler code from 0xfffc0 to 0xfffd4:
>> 0x000fffc0:    mov    $0x3f8,%dx
>> 0x000fffc4:    mov    $0x44,%al
>> 0x000fffc6:    out    %al,(%dx)
>> 0x000fffc7:    call   0x1e2617
> Okay - you're running into linker madness resulting from mixing 32bit
> and 16bit code.  The romlayout.S code thinks it is running at offset
> 0x0000 (which is correct for 16bit code because CS adds in 0xf0000).
> You've asked it to do a relative call to 0xf2617, but when you're
> actually running in 32bit mode the code is running at offset 0xf0000,
> and the relative call to 0xf2617 looks like a jump to
> 0xf0000+0xf2617=0x1e2617.
> A simple fix is to write the call as:
>        calll (_code32__init - BUILD_BIOS_ADDR)
> BTW, I think you're going to need to setup SeaBIOS' gdt/idt - see the
> code at "post32" in romlayout.S.

Ok, this got me a whole lot further! For an initial test I let SeaBIOS
scan and execute the VGA option ROM in Qemu.
Unfortunately, it hangs while doing so:

Copied system BIOS, now jumping into it.
Start bios
clearing .bss section
init bda
init pic
init timer
init keyboard
Missing ack (got 0000003b not 000000fa)
keyboard command 000000f4 failed (ret=-1)
init lpt
init serial
init mouse
math cp init
bios_table_addr: 0x000ff0a5 end=0x000ff841
Find memory size
Attempting to find coreboot table
Unable to find coreboot table!
Scan for VGA option rom
Running option rom at 000c0003
fail handle_15XX:308(00000086):
KBD: int09h_handler(): scancode & asciicode are zero?

coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

More information about the coreboot mailing list