Commit b02a51da authored by Brian Gerst's avatar Brian Gerst Committed by Jaroslav Kysela

[PATCH] PnP BIOS exception fixes

This fixes two errors in fixup_exception() for PnP BIOS faults:
 - Check for the correct segments used for the BIOS
 - Fix asm constraints so that EIP and ESP are properly reloaded
parent ca21ef31
...@@ -12,7 +12,7 @@ int fixup_exception(struct pt_regs *regs) ...@@ -12,7 +12,7 @@ int fixup_exception(struct pt_regs *regs)
const struct exception_table_entry *fixup; const struct exception_table_entry *fixup;
#ifdef CONFIG_PNPBIOS #ifdef CONFIG_PNPBIOS
if (unlikely((regs->xcs | 8) == 0x88)) /* 0x80 or 0x88 */ if (unlikely((regs->xcs & ~15) == (GDT_ENTRY_PNPBIOS_BASE << 3)))
{ {
extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp; extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
extern u32 pnp_bios_is_utter_crap; extern u32 pnp_bios_is_utter_crap;
...@@ -21,7 +21,7 @@ int fixup_exception(struct pt_regs *regs) ...@@ -21,7 +21,7 @@ int fixup_exception(struct pt_regs *regs)
__asm__ volatile( __asm__ volatile(
"movl %0, %%esp\n\t" "movl %0, %%esp\n\t"
"jmp *%1\n\t" "jmp *%1\n\t"
: "=a" (pnp_bios_fault_esp), "=b" (pnp_bios_fault_eip)); : : "g" (pnp_bios_fault_esp), "g" (pnp_bios_fault_eip));
panic("do_trap: can't hit this"); panic("do_trap: can't hit this");
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment