|author||H. Peter Anvin <email@example.com>||2009-04-13 19:11:30 -0700|
|committer||H. Peter Anvin <firstname.lastname@example.org>||2009-04-13 19:11:30 -0700|
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 <email@example.com>
Diffstat (limited to 'doc')
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/comboot.txt b/doc/comboot.txt
index b1334511..9c81c489 100644
@@ -937,13 +937,18 @@ AX=0024h [3.80] Cleanup, shuffle and boot, raw version
entry, the destination is used as an entry point, and the
source represents the type of entry point:
- 0 Real mode (dst is CS:IP)
+ 0 16-bit protected mode (dst is CS.base)
1 Flat 32-bit protected mode (dst is EIP)
- This routine does not set up any register state whatsoever,
- including stack. It is the responsibility of the caller to
- make sure the entry point provided sets up any registers
- needed. This is particularly important that a real mode entry
- point reloads all data segment registers at the earliest
- possible point.
+ This routine does not set up any GPR register state
+ whatsoever, including stack. It is the responsibility of the
+ caller to make sure the entry point provided sets up any
+ registers needed.
+ For mode 0 (16-bit real mode), EAX will contain CR0 with bit 0
+ masked out, suitable for loading into CR0 to immediately enter
+ real mode.
+ In both mode 0 and mode 1, the data segments will be loaded
+ with base-zero read/write segments. For mode 0, B=0 and the
+ limits will be 64K, for mode 1, B=1 and the limits will be 4 GB.