[coreboot] How can I call the interrupt of SeaBIOS in coreboot?

Zhang Rui zrfail at gmail.com
Tue Jul 15 17:21:38 CEST 2008

Hello Kevin,

I can use SeaBIOS to initialize vga and return to coreboot now.

But when I returned to coreboot and call int19, nothing happens.
It can boot correctly when call int19 in SeaBIOS.
Maybe it has something to do with the stack?
How can I call the interrupt of SeaBIOS in coreboot?

2008/7/14, Zhang Rui <zrfail at gmail.com>:
> 2008/7/14, Kevin O'Connor <kevin at koconnor.net>:
> >[...]
> > Right - seabios needs to be using its stack in order to call 16bit
> > functions.  You probably need to save and restore the stack.
> [...]
> I used this:
>    "movl %esp, %esi\n"
>    "movl $" __stringify(BUILD_STACK_ADDR) ", %esp\n"
>    "ljmp $0x10, $post_coreboot\n"
> and added this at the end of post_coreboot() function:
>    asm(
>        "movl %esi, %esp\n"
>        "retl"
>    );
> Then it can return to coreboot correctly. Till the payload(I used no
> payload here)

> But pci_dev_init() is executed more than one time so vga is
> initialized more than one time in SeaBIOS. A flag variable would be
> used to run SeaBIOS only once.
This is fixed now.

> >
> > However, note that the above wont save/restore the idt/gdt.  And
> > again, I'm not sure if coreboot puts its stack/idt/gdt somewhere where
> > seabios may overwrite it.
> And I want to know where will SeaBIOS write in the memory. Such as the
> range of bda and ebda?


Best regards.
Zhang Rui

More information about the coreboot mailing list