From e4be46b4c39305e4224595f2655c2c9a439bc57c Mon Sep 17 00:00:00 2001 From: Rudolf Marek Date: Thu, 16 Apr 2009 21:09:56 +0000 Subject: 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 Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4124 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/boot/wakeup.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arch/i386/boot/wakeup.S b/src/arch/i386/boot/wakeup.S index 5985c8e1c0..7915fc38c5 100644 --- a/src/arch/i386/boot/wakeup.S +++ b/src/arch/i386/boot/wakeup.S @@ -45,6 +45,8 @@ reload_cs: movl %cr0, %eax andb $0xfe,%al movl %eax, %cr0 + ljmpl $0x0, $cpu_flushed +cpu_flushed: movw $0x0, %ax movw %ax, %ds movw %ax, %es -- cgit v1.2.3