diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-04-13 19:11:30 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-04-13 19:11:30 -0700 |
commit | f2ebe30cefa59def4bc590f3ced08465b839430e (patch) | |
tree | 383fb040cd3624aa2d531c8dcd7dfd51579fe16d /core/bcopyxx.inc | |
parent | 3a1bc74b6c26b55a52459d9748375bf3aa15db37 (diff) | |
download | syslinux-f2ebe30cefa59def4bc590f3ced08465b839430e.tar.gz |
shuffler: work around KVM problem with the new shuffler
KVM uses V86 mode to simulate real mode. This causes problems with
the new shuffler. This changes the shuffler handover to be in
16-bit protected mode instead, and requires the stub to do the actual
entry to real mode. For the KVM hack to work, all segments must have:
(seg.base & 0xfff0000f) == 0 && seg.limit == 0xffff
As a result, we have to make sure the real-mode entry stub is
paragraph-aligned, lest we violate the first criterion.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/bcopyxx.inc')
-rw-r--r-- | core/bcopyxx.inc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/core/bcopyxx.inc b/core/bcopyxx.inc index 066499cb..7dc7c157 100644 --- a/core/bcopyxx.inc +++ b/core/bcopyxx.inc @@ -239,10 +239,8 @@ pm_shuffle: ; to real mode... pm_shuffle_real_mode: call .here -.here: pop eax - mov ebx,eax - add eax,.next-.here - mov [ebx-.here+.rm_entry],edi +.here: pop ebx + mov eax,edi mov [ebx-.here+bcopy_gdt.CS16+2],ax shr eax,16 mov [ebx-.here+bcopy_gdt.CS16+4],al @@ -253,16 +251,9 @@ pm_shuffle_real_mode: mov fs,eax mov gs,eax mov ss,eax - jmp PM_CS16:0 - bits 16 -.next: mov eax,cr0 and al,~1 - mov cr0,eax - jmp 0:0 -.rm_entry equ $-4 - - bits 32 + jmp PM_CS16:0 align 16 ; GDT descriptor entry |