This patch fixes the option rom code that was buggy when it switched
segment registers before restoring register values. This was breaking the Geode VSA, and probably would have hurt other option roms as well. Signed-off-by: Edwin Beasant <edwin_beasant@virtensys.com> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Nils Jacobs <njacobs8@hetnet.nl> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5612 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
29a6a19715
commit
0c47c4d02d
|
@ -141,13 +141,6 @@ __realmode_call = RELOCATED(.)
|
|||
mov %ax, %ds
|
||||
lidt __realmode_idt
|
||||
|
||||
/* Set all segments to 0x0000, ds to 0x0040 */
|
||||
mov %ax, %es
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
mov $0x40, %ax
|
||||
mov %ax, %ds
|
||||
|
||||
/* initialize registers for option rom lcall */
|
||||
movl __registers + 0, %eax
|
||||
movl __registers + 4, %ebx
|
||||
|
@ -156,6 +149,16 @@ __realmode_call = RELOCATED(.)
|
|||
movl __registers + 16, %esi
|
||||
movl __registers + 20, %edi
|
||||
|
||||
/* Set all segments to 0x0000, ds to 0x0040 */
|
||||
push %ax
|
||||
xor %ax, %ax
|
||||
mov %ax, %es
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
mov $0x40, %ax
|
||||
mov %ax, %ds
|
||||
pop %ax
|
||||
|
||||
/* ************************************ */
|
||||
__lcall_instr = RELOCATED(.)
|
||||
.byte 0x9a
|
||||
|
@ -262,12 +265,6 @@ __realmode_interrupt = RELOCATED(.)
|
|||
mov %ax, %ds
|
||||
lidt __realmode_idt
|
||||
|
||||
/* Set all segments to 0x0000 */
|
||||
mov %ax, %ds
|
||||
mov %ax, %es
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
|
||||
/* initialize registers for intXX call */
|
||||
movl __registers + 0, %eax
|
||||
movl __registers + 4, %ebx
|
||||
|
@ -276,6 +273,15 @@ __realmode_interrupt = RELOCATED(.)
|
|||
movl __registers + 16, %esi
|
||||
movl __registers + 20, %edi
|
||||
|
||||
/* Set all segments to 0x0000 */
|
||||
push %ax
|
||||
xor %ax, %ax
|
||||
mov %ax, %ds
|
||||
mov %ax, %es
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
pop %ax
|
||||
|
||||
__intXX_instr = RELOCATED(.)
|
||||
.byte 0xcd, 0x00 /* This becomes intXX */
|
||||
|
||||
|
@ -376,7 +382,7 @@ __interrupt_handler_16bit = RELOCATED(.)
|
|||
mov %ax, %ds
|
||||
lidt __realmode_idt
|
||||
|
||||
/* Set up segment registers to segment 0x0000 */
|
||||
/* Set up segment registers to segment 0x0000 and ds to 0x040 */
|
||||
mov %ax, %es
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
|
|
Loading…
Reference in New Issue