瀏覽代碼

[prefix] Set the "size" bit in the GDT entry for the flat data segment

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>
tags/v1.20.1
Michael Brown 13 年之前
父節點
當前提交
90563f69be
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/arch/i386/prefix/libprefix.S

+ 1
- 1
src/arch/i386/prefix/libprefix.S 查看文件

@@ -332,7 +332,7 @@ process_bytes:
332 332
 
333 333
 	/* Construct GDT on stack (since .prefix may not be writable) */
334 334
 	.equ	PM_DS, 0x18	/* Flat data segment */
335
-	pushl	$0x008f9300
335
+	pushl	$0x00cf9300
336 336
 	pushl	$0x0000ffff
337 337
 	.equ	PM_SS, 0x10	/* Stack segment based at %ss:0000 */
338 338
 	pushl	$0x008f0930

Loading…
取消
儲存