[coreboot] [PATCH] Good bye vm86, hello x86 real mode ;-)
Peter Stuge
peter at stuge.se
Thu May 28 04:12:09 CEST 2009
Stefan Reinauer wrote:
> drop most of the crappy vm86 code and replace it with a rewritten
> version that has all assembler in a .S file and all C code in a .c
> file. Also, remove requirement to move around between GDTs.
>
> Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
> +++ util/x86emu/x86_asm.S (revision 0)
..
> + movl %cr0, %eax
> + andl $0xFFFFFFFE, %eax
> + movl %eax, %cr0
> + movl %cr0, %eax
> + orl $0x0000001, %eax /* PE = 1 */
> + movl %eax, %cr0
> + movl %cr0, %eax
> + andl $~1, %eax
> + movl %eax, %cr0
> + movl %cr0, %eax
> + orl $(1 << 0), %eax
> + movl %eax, %cr0
> + movl %cr0, %eax
> + orl $(1 << 0), %eax
> + movl %eax, %cr0
> + movl %cr0, %eax
> + andl $~(1 << 0), %eax
> + movl %eax, %cr0
It would be neat if these different ways of changing PE could be
streamlined a little.
And could it be good to cli/sti around the PE changes?
If not;
Acked-by: Peter Stuge <peter at stuge.se>
More information about the coreboot
mailing list