Skip to content

Commit

Permalink
[prefix] Set the "size" bit in the GDT entry for the flat data segment
Browse files Browse the repository at this point in the history
The "size" bit (aka the D/B) bit should (as far as I can tell) be
irrelevant for accesses to a non-code, non-stack, expand-upwards
segment.  However, VirtualBox fails on some accesses via this segment
if this bit is not set.

This change allows iPXE to boot under VirtualBox without having to
disable VT-x/AMD-V support.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 1, 2011
1 parent 17ef284 commit 90563f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/i386/prefix/libprefix.S
Expand Up @@ -332,7 +332,7 @@ process_bytes:

/* Construct GDT on stack (since .prefix may not be writable) */
.equ PM_DS, 0x18 /* Flat data segment */
pushl $0x008f9300
pushl $0x00cf9300
pushl $0x0000ffff
.equ PM_SS, 0x10 /* Stack segment based at %ss:0000 */
pushl $0x008f0930
Expand Down

0 comments on commit 90563f6

Please sign in to comment.