On Sun, Nov 09, 2008 at 07:50:50PM -0500, Kevin O'Connor wrote:
On Mon, Nov 10, 2008 at 01:07:27AM +0100, Stefan Reinauer wrote:
I worked on unifying the GDTs used in coreboot-v3, coreboot-v3 real-mode and SeaBIOS, so I don't load a GDT in SeaBIOS, but I do load the SeaBIOS IDT. See both attached patches.
Hrmm. Where is the stack actually located when using coreboot?
Maybe something like this would work (totally untested):
cli cld lidtl (BUILD_BIOS_ADDR + pmode_IDT_info) lgdtl (BUILD_BIOS_ADDR + rombios32_gdt_48) ljmpl $PROTECTED_MODE_CS, $1f 1: pushl %ebp movl %esp, %ebp movl $BUILD_STACK_ADDR, %esp calll (_code32__init - BUILD_BIOS_ADDR) movl %ebp, %esp popl %ebp retl
Of course, this would return to coreboot using the SeaBIOS gdt/idt, but coreboot could probably restore it's gdt/idt fairly easily (if it cared at all).
-Kevin