diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2005-03-12 21:52:03 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2005-03-12 21:52:03 +0000 |
commit | ebf3c727135ee7d9c4b1926717308718cbf1622a (patch) | |
tree | c10198f2b0e4ffe92cc86a349ff387d46b3f42a5 /sys | |
parent | c38cf4c5bc5c66dfd4dca5054405173e72e79373 (diff) |
On return from real mode, reload the GDT using a 16-bit pointer rather
than a 32-bit value. Found by Tim Fletcher <tim (at) parrswood (dot)
manchester (dot) sch (dot) uk> using Etherboot; thanks to Tim and the
Etherboot developers who narrowed this down.
Also bump the pxeboot version to 1.01.
ok weingart@, "go ahead" deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/stand/libsa/pxe_call.S | 8 | ||||
-rw-r--r-- | sys/arch/i386/stand/pxeboot/conf.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/i386/stand/libsa/pxe_call.S b/sys/arch/i386/stand/libsa/pxe_call.S index 5085b79b653..c9fb4ff1450 100644 --- a/sys/arch/i386/stand/libsa/pxe_call.S +++ b/sys/arch/i386/stand/libsa/pxe_call.S @@ -1,4 +1,4 @@ -/* $OpenBSD: pxe_call.S,v 1.1 2004/03/19 13:48:18 tom Exp $ */ +/* $OpenBSD: pxe_call.S,v 1.2 2005/03/12 21:52:02 tom Exp $ */ /* $NetBSD: pxe_call.S,v 1.2 2002/03/27 17:24:22 kanaoka Exp $ */ /* @@ -172,9 +172,9 @@ p2r16real: real_to_prot: .code16 - xorw %ax, %ax - movw %ax, %ds /* Load %ds so we can get at Gdtr */ - data32 addr32 lgdt Gdtr /* Load the GDT */ + movw $LINKADDR >> 4, %ax /* We're linked to LINKADDR/16:0000 */ + movw %ax, %ds + addr32 lgdt (Gdtr - LINKADDR) /* Reload the GDT */ movl %cr0, %eax /* Enable protected mode */ orl $CR0_PE, %eax diff --git a/sys/arch/i386/stand/pxeboot/conf.c b/sys/arch/i386/stand/pxeboot/conf.c index d7bb877b6a5..3f078842c0d 100644 --- a/sys/arch/i386/stand/pxeboot/conf.c +++ b/sys/arch/i386/stand/pxeboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.1 2004/03/19 13:48:19 tom Exp $ */ +/* $OpenBSD: conf.c,v 1.2 2005/03/12 21:52:02 tom Exp $ */ /* * Copyright (c) 2004 Tom Cosgrove @@ -46,7 +46,7 @@ #include "pxeboot.h" #include "pxe_net.h" -const char version[] = "1.00"; +const char version[] = "1.01"; int debug = 1; #undef _TEST |