From e660cdec3bf575f5a945b92b3ae48f3dd762f987 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 1 Jan 2005 02:57:37 +0000 Subject: Move the declaration of bootdev from autoconf.c to locore.s. gcc 3.3.5 was placing bootdev into bss and its value was getting zeroed when bss is cleared. Apparently we lucked out before and gcc 2.9.5 put it in .data; now it is explicit. OK deraadt@ --- sys/arch/i386/i386/autoconf.c | 4 ++-- sys/arch/i386/i386/locore.s | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c index 9224ef984b5..e575085af43 100644 --- a/sys/arch/i386/i386/autoconf.c +++ b/sys/arch/i386/i386/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.54 2004/06/15 23:36:55 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.55 2005/01/01 02:57:36 millert Exp $ */ /* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */ /*- @@ -80,7 +80,7 @@ void diskconf(void); * the configuration process, and are used in initializing * the machine. */ -dev_t bootdev = 0; /* bootdevice, initialized in locore.s */ +extern dev_t bootdev; /* Support for VIA C3 RNG */ #ifdef I686_CPU diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 86825296228..b705b8c4a39 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.80 2004/07/20 20:16:44 art Exp $ */ +/* $OpenBSD: locore.s,v 1.81 2005/01/01 02:57:36 millert Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -261,6 +261,7 @@ _C_LABEL(atdevbase): .long 0 # location of start of iomem in virtual _C_LABEL(bootapiver): .long 0 # /boot API version _C_LABEL(bootargc): .long 0 # /boot argc _C_LABEL(bootargv): .long 0 # /boot argv +_C_LABEL(bootdev): .long 0 # device we booted from _C_LABEL(proc0paddr): .long 0 _C_LABEL(PTDpaddr): .long 0 # paddr of PTD, for libkvm -- cgit v1.2.3