summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2005-03-13 22:14:55 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2005-03-13 22:14:55 +0000
commit9010bfbe7f5b924e65ba626939d0888f4634c19f (patch)
treecb602bd201c79a7483dc2c8d9779a9e2cf706b10 /sys/arch
parentd94ef2b74c348f009c17d631e2517b50c19d51c2 (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. Tested by Okan Demirmen <okan (at) demirmen (dot) com> and krw@: thanks guys. "get these changes into the amd64" deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/stand/libsa/pxe_call.S8
-rw-r--r--sys/arch/amd64/stand/pxeboot/conf.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/amd64/stand/libsa/pxe_call.S b/sys/arch/amd64/stand/libsa/pxe_call.S
index 81247ebe423..25b13a52820 100644
--- a/sys/arch/amd64/stand/libsa/pxe_call.S
+++ b/sys/arch/amd64/stand/libsa/pxe_call.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxe_call.S,v 1.1 2004/03/21 21:37:41 tom Exp $ */
+/* $OpenBSD: pxe_call.S,v 1.2 2005/03/13 22:14:54 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/amd64/stand/pxeboot/conf.c b/sys/arch/amd64/stand/pxeboot/conf.c
index 4344babdf2a..ed9fdd6852e 100644
--- a/sys/arch/amd64/stand/pxeboot/conf.c
+++ b/sys/arch/amd64/stand/pxeboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.1 2004/03/21 21:37:41 tom Exp $ */
+/* $OpenBSD: conf.c,v 1.2 2005/03/13 22:14:54 tom Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -45,7 +45,7 @@
#include "pxeboot.h"
#include "pxe_net.h"
-const char version[] = "1.00";
+const char version[] = "1.01";
int debug = 0;
#undef _TEST