Author: ruik
Date: 2009-04-16 23:09:56 +0200 (Thu, 16 Apr 2009)
New Revision: 4124

Modified:
   trunk/coreboot-v2/src/arch/i386/boot/wakeup.S
Log:
Following patch flushes the instruction queue when we set PE=0. This is normally
done by FAR JMP, but here it is more tricky because we run at EIP>1MB. Many
thanks to Marc and Kevin to tell me how to fix it

The trick is to use 0x66 prefix (done with ljmpl) it will allow to jump in real
mode to any EIP addresses  ;) 

Signed-off-by: Rudolf Marek <[email protected]>
Acked-by: Peter Stuge <[email protected]>



Modified: trunk/coreboot-v2/src/arch/i386/boot/wakeup.S
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/wakeup.S       2009-04-16 16:42:05 UTC 
(rev 4123)
+++ trunk/coreboot-v2/src/arch/i386/boot/wakeup.S       2009-04-16 21:09:56 UTC 
(rev 4124)
@@ -45,6 +45,8 @@
        movl    %cr0, %eax
        andb    $0xfe,%al
        movl    %eax, %cr0
+       ljmpl $0x0, $cpu_flushed
+cpu_flushed:
        movw    $0x0, %ax
        movw    %ax, %ds
        movw    %ax, %es


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to