-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello
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 r.marek@assembler.cz
Rudolf
=================================================================== - --- arch/i386/boot/wakeup.S (revision 4106) +++ arch/i386/boot/wakeup.S (working copy) @@ -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
On Tue, Apr 14, 2009 at 12:05:23AM +0200, Rudolf Marek wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello
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 ;)
FYI - "ljmpl" is just ATT syntax for "far jmp".
-Kevin
Rudolf Marek wrote:
The trick is to use 0x66 prefix (done with ljmpl) it will allow to jump in real mode to any EIP addresses ;)
Yep, this is needed. Ah, the pmode and DOS32 days.
Signed-off-by: Rudolf Marek r.marek@assembler.cz
Acked-by: Peter Stuge peter@stuge.se
On Mon, Apr 13, 2009 at 5:42 PM, Peter Stuge peter@stuge.se wrote:
Rudolf Marek wrote:
The trick is to use 0x66 prefix (done with ljmpl) it will allow to jump in real mode to any EIP addresses ;)
Yep, this is needed. Ah, the pmode and DOS32 days.
Signed-off-by: Rudolf Marek r.marek@assembler.cz
Acked-by: Peter Stuge peter@stuge.se
Cool, I didn't know that gcc/gas had an instruction for it!
Marc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ok its in as Committed revision 4124.
R.