diff --git a/util/x86emu/x86_asm.S b/util/x86emu/x86_asm.S index cd64dd5c71..10f5f2f628 100644 --- a/util/x86emu/x86_asm.S +++ b/util/x86emu/x86_asm.S @@ -71,11 +71,6 @@ __run_optionrom = RELOCATED(.) // FIXME: Should this function be called with regparm=0? movl 8(%ebp), %ecx - /* Clear interrupts before making a - * transition to Real Mode - */ - cli - /* Activate the right segment descriptor real mode. */ ljmp $0x28, $RELOCATED(1f) 1: @@ -111,14 +106,11 @@ __run_optionrom = RELOCATED(.) movl $0x1000, %eax movl %eax, %esp - /* Load our 16 it idt */ + /* Load our 16 bit idt */ xor %ax, %ax mov %ax, %ds lidt __realmode_idt - /* All critical work is done, allow interrupts again */ - sti - /* Set all segments to 0x0000, ds to 0x0040 */ mov %ax, %es mov %ax, %fs @@ -133,11 +125,6 @@ __run_optionrom = RELOCATED(.) lcall $0xc000, $0x0003 /* ************************************ */ - /* Clear interrupts before making a - * transition to Protected Mode - */ - cli - /* If we got here, just about done. * Need to get back to protected mode */ @@ -161,9 +148,6 @@ __run_optionrom = RELOCATED(.) /* restore proper idt */ lidt idtarg - /* All critical work is done, allow interrupts again */ - sti - /* and exit */ mov __stack, %esp popal @@ -179,11 +163,6 @@ __run_interrupt = RELOCATED(.) mov %esp, __stack - /* Clear interrupts before making a - * transition to Real Mode - */ - cli - /* This configures CS properly for real mode. */ ljmp $0x28, $RELOCATED(1f) 1: @@ -228,9 +207,6 @@ __run_interrupt = RELOCATED(.) mov %ax, %ds lidt __realmode_idt - /* All critical work is done, allow interrupts again */ - sti - /* Set all segments to 0x0000 */ mov %ax, %ds mov %ax, %es @@ -250,11 +226,6 @@ __run_interrupt = RELOCATED(.) movw $0, %di int $0x10 - /* Clear interrupts before making a - * transition to Protected Mode - */ - cli - /* Ok, the job is done, now go back to protected mode coreboot */ movl %cr0, %eax orl $PE, %eax @@ -274,9 +245,6 @@ __run_interrupt = RELOCATED(.) /* restore coreboot's 32-bit IDT */ lidt idtarg - /* All critical work is done, allow interrupts again */ - sti - /* Exit */ mov __stack, %esp popal @@ -299,11 +267,6 @@ __interrupt_handler_16bit = RELOCATED(.) andl $0xff, %eax pushl %eax /* ... and make it the first parameter */ - /* Clear interrupts before making a - * transition to Protected Mode - */ - cli - /* Switch to protected mode */ movl %cr0, %eax orl $PE, %eax @@ -322,9 +285,6 @@ __interrupt_handler_16bit = RELOCATED(.) lidt idtarg - /* All critical work is done, allow interrupts again */ - sti - /* Call the C interrupt handler */ movl $interrupt_handler, %eax call *%eax @@ -344,11 +304,6 @@ __interrupt_handler_16bit = RELOCATED(.) mov %ax, %gs mov %ax, %ss - /* Clear interrupts before making a - * transition to Real Mode - */ - cli - /* Disable Protected Mode */ movl %cr0, %eax andl $~PE, %eax @@ -366,9 +321,6 @@ __interrupt_handler_16bit = RELOCATED(.) mov %ax, %ds lidt __realmode_idt - /* All critical work is done, allow interrupts again */ - sti - /* Set up our segment registers to segment 0x0000 */ mov %ax, %es mov %ax, %fs