summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1993-11-13 02:25:21 +0000
committerdg <dg@FreeBSD.org>1993-11-13 02:25:21 +0000
commitaa3ae6ef2a770093235bb79679c3028e026d5622 (patch)
treeb33fc248f12eae8dd82b98b630cad31e781b9daa /sys/conf
parentec9c017c73df0e3495f05d244eeb3a58328bfdb8 (diff)
downloadFreeBSD-src-aa3ae6ef2a770093235bb79679c3028e026d5622.zip
FreeBSD-src-aa3ae6ef2a770093235bb79679c3028e026d5622.tar.gz
First steps in rewriting locore.s, and making info useful
when the machine panics. i386/i386/locore.s: 1) got rid of most .set directives that were being used like #define's, and replaced them with appropriate #define's in the appropriate header files (accessed via genassym). 2) added comments to header inclusions and global definitions, and global variables 3) replaced some hardcoded constants with cpp defines (such as PDESIZE and others) 4) aligned all comments to the same column to make them easier to read 5) moved macro definitions for ENTRY, ALIGN, NOP, etc. to /sys/i386/include/asmacros.h 6) added #ifdef BDE_DEBUGGER around all of Bruce's debugger code 7) added new global '_KERNend' to store last location+1 of kernel 8) cleaned up zeroing of bss so that only bss is zeroed 9) fix zeroing of page tables so that it really does zero them all - not just if they follow the bss. 10) rewrote page table initialization code so that 1) works correctly and 2) write protects the kernel text by default 11) properly initialize the kernel page directory, upages, p0stack PT, and page tables. The previous scheme was more than a bit screwy. 12) change allocation of virtual area of IO hole so that it is fixed at KERNBASE + 0xa0000. The previous scheme put it right after the kernel page tables and then later expected it to be at KERNBASE +0xa0000 13) change multiple bogus settings of user read/write of various areas of kernel VM - including the IO hole; we should never be accessing the IO hole in user mode through the kernel page tables 14) split kernel support routines such as bcopy, bzero, copyin, copyout, etc. into a seperate file 'support.s' 15) split swtch and related routines into a seperate 'swtch.s' 16) split routines related to traps, syscalls, and interrupts into a seperate file 'exception.s' 17) remove some unused global variables from locore that got inserted by Garrett when he pulled them out of some .h files. i386/isa/icu.s: 1) clean up global variable declarations 2) move in declaration of astpending and netisr i386/i386/pmap.c: 1) fix calculation of virtual_avail. It previously was calculated to be right in the middle of the kernel page tables - not a good place to start allocating kernel VM. 2) properly allocate kernel page dir/tables etc out of kernel map - previously only took out 2 pages. i386/i386/machdep.c: 1) modify boot() to print a warning that the system will reboot in PANIC_REBOOT_WAIT_TIME amount of seconds, and let the user abort with a key on the console. The machine will wait for ever if a key is typed before the reboot. The default is 15 seconds, but can be set to 0 to mean don't wait at all, -1 to mean wait forever, or any positive value to wait for that many seconds. 2) print "Rebooting..." just before doing it. kern/subr_prf.c: 1) remove PANICWAIT as it is deprecated by the change to machdep.c i386/i386/trap.c: 1) add table of trap type strings and use it to print a real trap/ panic message rather than just a number. Lot's of work to be done here, but this is the first step. Symbolic traceback is in the TODO. i386/i386/Makefile.i386: 1) add support in to build support.s, exception.s and swtch.s ...and various changes to various header files to make all of the above happen.
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/Makefile.i38625
-rw-r--r--sys/conf/Makefile.powerpc25
2 files changed, 44 insertions, 6 deletions
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386
index 25bf3e7..b414b93 100644
--- a/sys/conf/Makefile.i386
+++ b/sys/conf/Makefile.i386
@@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.i386,v 1.11 1993/11/07 04:41:11 wollman Exp $
+# $Id: Makefile.i386,v 1.12 1993/11/07 16:46:33 wollman Exp $
#
# Makefile for FreeBSD
#
@@ -43,7 +43,8 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
-SYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o machdep.o
+SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \
+ ioconf.o conf.o machdep.o
SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS}
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
SYSTEM_LD= @${LD} -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS}
@@ -82,10 +83,28 @@ symbols.sort: ${I386}/i386/symbols.raw
locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \
- ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h
+ ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \
+ machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
${AS} ${ASFLAGS} -o locore.o
+exception.o: assym.s ${I386}/i386/exception.s machine/trap.h \
+ ${I386}/isa/vector.s ${I386}/isa/icu.s \
+ $S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \
+ $S/net/netisr.h machine/asmacros.h
+ ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \
+ ${AS} ${ASFLAGS} -o exception.o
+
+swtch.o: assym.s ${I386}/i386/swtch.s \
+ $S/sys/errno.h ${I386}/isa/debug.h machine/asmacros.h
+ ${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \
+ ${AS} ${ASFLAGS} -o swtch.o
+
+support.o: assym.s ${I386}/i386/support.s \
+ $S/sys/errno.h machine/asmacros.h
+ ${CPP} -I. ${COPTS} ${I386}/i386/support.s | \
+ ${AS} ${ASFLAGS} -o support.o
+
machdep.o: ${I386}/i386/machdep.c Makefile
${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index 25bf3e7..b414b93 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.i386,v 1.11 1993/11/07 04:41:11 wollman Exp $
+# $Id: Makefile.i386,v 1.12 1993/11/07 16:46:33 wollman Exp $
#
# Makefile for FreeBSD
#
@@ -43,7 +43,8 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
-SYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o machdep.o
+SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \
+ ioconf.o conf.o machdep.o
SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS}
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
SYSTEM_LD= @${LD} -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS}
@@ -82,10 +83,28 @@ symbols.sort: ${I386}/i386/symbols.raw
locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \
- ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h
+ ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \
+ machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
${AS} ${ASFLAGS} -o locore.o
+exception.o: assym.s ${I386}/i386/exception.s machine/trap.h \
+ ${I386}/isa/vector.s ${I386}/isa/icu.s \
+ $S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \
+ $S/net/netisr.h machine/asmacros.h
+ ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \
+ ${AS} ${ASFLAGS} -o exception.o
+
+swtch.o: assym.s ${I386}/i386/swtch.s \
+ $S/sys/errno.h ${I386}/isa/debug.h machine/asmacros.h
+ ${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \
+ ${AS} ${ASFLAGS} -o swtch.o
+
+support.o: assym.s ${I386}/i386/support.s \
+ $S/sys/errno.h machine/asmacros.h
+ ${CPP} -I. ${COPTS} ${I386}/i386/support.s | \
+ ${AS} ${ASFLAGS} -o support.o
+
machdep.o: ${I386}/i386/machdep.c Makefile
${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
OpenPOWER on IntegriCloud