summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-01-01 03:11:03 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-01-01 03:11:03 +0000
commit9e482659e527845abb397156e19a1357875c2376 (patch)
tree8aa27bb7de4549a45cc3e7f2c6cf71b706852100 /sys/arch
parent4d2e29d08285c7608c13a3640b608c05eb2b4472 (diff)
gcc 3.3.5 will store zero-initialized variables in bss by default,
move bootdev to data so it doesn't get zapped when bss is cleared. deraadt@ OK
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/autoconf.c4
-rw-r--r--sys/arch/amd64/amd64/locore.S1
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/autoconf.c b/sys/arch/amd64/amd64/autoconf.c
index f8c96978724..9afa20ade52 100644
--- a/sys/arch/amd64/amd64/autoconf.c
+++ b/sys/arch/amd64/amd64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.8 2004/12/25 23:02:23 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.9 2005/01/01 03:11:02 millert Exp $ */
/* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@@ -95,7 +95,7 @@ struct device * parsedisk(char *, int, int, dev_t *);
int cold = 1; /* if 1, still working on cold-start */
struct device *booted_device;
int booted_partition;
-dev_t bootdev = 0;
+extern dev_t bootdev;
#ifdef RAMDISK_HOOKS
static struct device fakerdrootdev = { DV_DISK, {}, NULL, 0, "rd0", NULL };
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S
index 5270eb9df22..6e555fca18e 100644
--- a/sys/arch/amd64/amd64/locore.S
+++ b/sys/arch/amd64/amd64/locore.S
@@ -192,6 +192,7 @@ _C_LABEL(cpu_brand_id): .long 0 # brand ID from 'cpuid' instruction
_C_LABEL(esym): .quad 0 # ptr to end of syms
_C_LABEL(atdevbase): .quad 0 # location of start of iomem in virtual
_C_LABEL(bootapiver): .long 0 # /boot API version
+_C_LABEL(bootdev): .long 0 # device we booted from
_C_LABEL(proc0paddr): .quad 0
_C_LABEL(PTDpaddr): .quad 0 # paddr of PTD, for libkvm
#ifndef REALBASEMEM