freebsd-dev/sys/conf/Makefile.i386

208 lines
6.0 KiB
Makefile
Raw Normal View History

1993-06-12 14:58:17 +00:00
# Copyright 1990 W. Jolitz
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.29 1994/08/18 22:34:36 wollman Exp $
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
#
# Makefile for FreeBSD
1993-06-12 14:58:17 +00:00
#
# This makefile is constructed from a machine description:
# config machineid
# Most changes should be made in the machine description
# /sys/i386/conf/``machineid''
# after which you should do
# config machineid
# Generic makefile changes should be made in
# /sys/i386/conf/Makefile.i386
# after which config should be rerun for all machines.
#
# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE INVISIBLE TO MAKEFILE
# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
#
# -DTRACE compile in kernel tracing hooks
# -DQUOTA compile in file system quotas
#
TOUCH= touch -f -c
LD= /usr/bin/ld
CC= cc
CPP= cpp
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
DBSYM= /usr/sbin/dbsym
1993-06-12 14:58:17 +00:00
.if exists(./@/.)
S= ./@
.else
1993-06-12 14:58:17 +00:00
S= ../..
.endif
I386= ${S}/i386
1993-06-12 14:58:17 +00:00
CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
#
# The following flags are next up for working on:
# -Wredundant-decls -Wnested-externs
#
# When working on removing warnings from code, the `-Werror' flag should be
# of material assistance.
#
COPTFLAGS=-O
1993-06-12 14:58:17 +00:00
INCLUDES= -I. -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
ASFLAGS=
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
LOAD_ADDRESS?= F0100000
1993-06-12 14:58:17 +00:00
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
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} $<
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.
1993-11-13 02:25:21 +00:00
SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \
ioconf.o conf.o machdep.o vnode_if.o
SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} libkern.a
1993-06-12 14:58:17 +00:00
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a
1993-06-12 14:58:17 +00:00
SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \
1994-08-06 10:52:15 +00:00
${DBSYM} -fT ${LOAD_ADDRESS} $@; size $@; chmod 755 $@
1993-06-12 14:58:17 +00:00
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and
# the script is identical for either... -- cgd
#
1993-06-12 14:58:17 +00:00
GPROF.EX= /usr/src/lib/csu.i386/gprof.ex
PROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
ed - $*.s < ${GPROF.EX} ; \
1993-06-12 14:58:17 +00:00
${AS} -o $@ $*.s ; \
rm -f $*.s
%OBJS
%CFILES
%LOAD
# This is slightly different from before in that if you define PROF
# to anything, it will assume profiling. Don't do "PROF=" to turn
# profiling off!
.if exists($S/libkern/obj)
LIBKERNP=$S/libkern/obj
.else
LIBKERNP=$S/libkern
.fi
.if defined(PROF)
LIBKERN=${LIBKERNP}/libkern_p.a
.else
LIBKERN=${LIBKERNP}/libkern.a
.fi
libkern.a: ${LIBKERN}
ln -s ${LIBKERN} libkern.a
echo ln -s ${LIBKERN} libkern.a
${LIBKERN}:
@(cd $S/libkern; make)
1993-06-12 14:58:17 +00:00
clean:
rm -f eddep *kernel tags *.o locore.i [a-uw-z]*.s \
errs linterrs makelinks genassym ,assym.s stamp-assym
1993-06-12 14:58:17 +00:00
#lint: /tmp param.c
# @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \
# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \
# grep -v 'struct/union .* never defined' | \
# grep -v 'possible pointer alignment problem'
1993-06-12 14:58:17 +00:00
symbols.sort: ${I386}/i386/symbols.raw
grep -v '^#' ${I386}/i386/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
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 \
New interrupt code from Bruce Evans. In additional to Bruce's attached list of changes, I've made the following additional changes: 1) i386/include/ipl.h renamed to spl.h as the name conflicts with the file of the same name in i386/isa/ipl.h. 2) changed all use of *mask (i.e. netmask, biomask, ttymask, etc) to *_imask (net_imask, etc). 3) changed vestige of splnet use in if_is to splimp. 4) got rid of "impmask" completely (Bruce had gotten rid of netmask), and are now using net_imask instead. 5) dozens of minor cruft to glue in Bruce's changes. These require changes I made to config(8) as well, and thus it must be rebuilt. -DG from Bruce Evans: sio: o No diff is supplied. Remove the define of setsofttty(). I hope that is enough. *.s: o i386/isa/debug.h no longer exists. The event counters became too much trouble to maintain. All function call entry and exception entry counters can be recovered by using profiling kernel (the new profiling supports all entry points; however, it is too slow to leave enabled all the time; it also). Only BDBTRAP() from debug.h is now used. That is moved to exception.s. It might be worth preserving SHOW_BITS() and calling it from _mcount() (if enabled). o T_ASTFLT is now only set just before calling trap(). o All exception handlers set SWI_AST_MASK in cpl as soon as possible after entry and arrange for _doreti to restore it atomically with exiting. It is not possible to set it atomically with entering the kernel, so it must be checked against the user mode bits in the trap frame before committing to using it. There is no place to store the old value of cpl for syscalls or traps, so there are some complications restoring it. Profiling stuff (mostly in *.s): o Changes to kern/subr_mcount.c, gcc and gprof are not supplied yet. o All interesting labels `foo' are renamed `_foo' and all uninteresting labels `_bar' are renamed `bar'. A small change to gprof allows ignoring labels not starting with underscores. o MCOUNT_LABEL() is to provide names for counters for times spent in exception handlers. o FAKE_MCOUNT() is a version of MCOUNT() suitable for exception handlers. Its arg is the pc where the exception occurred. The new mcount() pretends that this was a call from that pc to a suitable MCOUNT_LABEL(). o MEXITCOUNT is to turn off any timer started by MCOUNT(). /usr/src/sys/i386/i386/exception.s: o The non-BDB BPTTRAP() macros were doing a sti even when interrupts were disabled when the trap occurred. The sti (fixed) sti is actually a no-op unless you have my changes to machdep.c that make the debugger trap gates interrupt gates, but fixing that would make the ifdefs messier. ddb seems to be unharmed by both interrupts always disabled and always enabled (I had the branch in the fix back to front for some time :-(). o There is no known pushal bug. o tf_err can be left as garbage for syscalls. /usr/src/sys/i386/i386/locore.s: o Fix and update BDE_DEBUGGER support. o ENTRY(btext) before initialization was dangerous. o Warm boot shot was longer than intended. /usr/src/sys/i386/i386/machdep.c: o DON'T APPLY ALL OF THIS DIFF. It's what I'm using, but may require other changes. Use the following: o Remove aston() and setsoftclock(). Maybe use the following: o No netisr.h. o Spelling fix. o Delay to read the Rebooting message. o Fix for vm system unmapping a reduced area of memory after bounds_check_with_label() reduces the size of a physical i/o for a partition boundary. A similar fix is required in kern_physio.c. o Correct use of __CONCAT. It never worked here for non- ANSI cpp's. Is it time to drop support for non-ANSI? o gdt_segs init. 0xffffffffUL is bogus because ssd_limit is not 32 bits. The replacement may have the same value :-), but is more natural. o physmem was one page too low. Confusing variable names. Don't use the following: o Better numbers of buffers. Each 8K page requires up to 16 buffer headers. On my system, this results in 5576 buffers containing [up to] 2854912 bytes of memory. The usual allocation of about 384 buffers only holds 192K of disk if you use it on an fs with a block size of 512. o gdt changes for bdb. o *TGT -> *IDT changes for bdb. o #ifdefed changes for bdb. /usr/src/sys/i386/i386/microtime.s: o Use the correct asm macros. I think asm.h was copied from Mach just for microtime and isn't used now. It certainly doesn't belong in <sys>. Various macros are also duplicated in sys/i386/boot.h and libc/i386/*.h. o Don't switch to and from the IRR; it is guaranteed to be selected (default after ICU init and explicitly selected in isa.c too, and never changed until the old microtime clobbered it). /usr/src/sys/i386/i386/support.s: o Non-essential changes (none related to spls or profiling). o Removed slow loads of %gs again. The LDT support may require not relying on %gs, but loading it is not the way to fix it! Some places (copyin ...) forgot to load it. Loading it clobbers the user %gs. trap() still loads it after certain types of faults so that fuword() etc can rely on it without loading it explicitly. Exception handlers don't restore it. If we want to preserve the user %gs, then the fastest method is to not touch it except for context switches. Comparing with VM_MAXUSER_ADDRESS and branching takes only 2 or 4 cycles on a 486, while loading %gs takes 9 cycles and using it takes another. o Fixed a signed branch to unsigned. /usr/src/sys/i386/i386/swtch.s: o Move spl0() outside of idle loop. o Remove cli/sti from idle loop. sw1 does a cli, and in the unlikely event of an interrupt occurring and whichqs becoming zero, sw1 will just jump back to _idle. o There's no spl0() function in asm any more, so use splz(). o swtch() doesn't need to be superaligned, at least with the new mcounting. o Fixed a signed branch to unsigned. o Removed astoff(). /usr/src/sys/i386/i386/trap.c: o The decentralized extern decls were inconsistent, of course. o Fixed typo MATH_EMULTATE in comments. */ o Removed unused variables. o Old netmask is now impmask; print it instead. Perhaps we should print some of the new masks. o BTW, trap() should not print anything for normal debugger traps. /usr/src/sys/i386/include/asmacros.h: o DON'T APPLY ALL OF THIS DIFF. Just use some of the null macros as necessary. /usr/src/sys/i386/include/cpu.h: o CLKF_BASEPRI() changes since cpl == SWI_AST_MASK is now normal while the kernel is running. o Don't use var++ to set boolean variables. It fails after a mere 4G times :-) and is slower than storing a constant on [3-4]86s. /usr/src/sys/i386/include/cpufunc.h: o DON'T APPLY ALL OF THIS DIFF. You need mainly the include of <machine/ipl.h>. Unfortunately, <machine/ipl.h> is needed by almost everything for the inlines. /usr/src/sys/i386/include/ipl.h: o New file. Defines spl inlines and SWI macros and declares most variables related to hard and soft interrupt masks. /usr/src/sys/i386/isa/icu.h: o Moved definitions to <machine/ipl.h> /usr/src/sys/i386/isa/icu.s: o Software interrupts (SWIs) and delayed hardware interrupts (HWIs) are now handled uniformally, and dispatching them from splx() is more like dispatching them from _doreti. The dispatcher is essentially *(handler[ffs(ipending & ~cpl)](). o More care (not quite enough) is taken to avoid unbounded nesting of interrupts. o The interface to softclock() is changed so that a trap frame is not required. o Fast interrupt handlers are now handled more uniformally. Configuration is still too early (new handlers would require bits in <machine/ipl.h> and functions to vector.s). o splnnn() and splx() are no longer here; they are inline functions (could be macros for other compilers). splz() is the nontrivial part of the old splx(). /usr/src/sys/i386/isa/ipl.h o New file. Supposed to have only bus-dependent stuff. Perhaps the h/w masks should be declared here. /usr/src/sys/i386/isa/isa.c: o DON'T APPLY ALL OF THIS DIFF. You need only things involving *mask and *MASK and comments about them. netmask is now a pure software mask. It works like the softclock mask. /usr/src/sys/i386/isa/vector.s: o Reorganize AUTO_EOI* macros. o Option FAST_INTR_HANDLER_USERS_ES for people who don't trust fastintr handlers. o fastintr handlers need to metamorphose into ordinary interrupt handlers if their SWI bit has become set. Previously, sio had unintended latency for handling output completions and input of SLIP framing characters because this was not done. /usr/src/sys/net/netisr.h: o The machine-dependent stuff is now imported from <machine/ipl.h>. /usr/src/sys/sys/systm.h o DON'T APPLY ALL OF THIS DIFF. You need mainly the different splx() prototype. The spl*() prototypes are duplicated as inlines in <machine/ipl.h> but they need to be duplicated here in case there are no inlines. I sent systm.h and cpufunc.h to Garrett. We agree that spl0 should be replaced by splnone and not the other way around like I've done. /usr/src/sys/kern/kern_clock.c o splsoftclock() now lowers cpl so the direct call to softclock() works as intended. o softclock() interface changed to avoid passing the whole frame (some machines may need another change for profile_tick()). o profiling renamed _profiling to avoid ANSI namespace pollution. (I had to improve the mcount() interface and may as well fix it.) The GUPROF variant doesn't actually reference profiling here, but the 'U' in GUPROF should mean to select the microtimer mcount() and not change the interface.
1994-04-02 07:00:53 +00:00
$S/sys/errno.h machine/specialreg.h \
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.
1993-11-13 02:25:21 +00:00
${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \
machine/asmacros.h
1993-06-12 14:58:17 +00:00
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
${AS} ${ASFLAGS} -o locore.o
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.
1993-11-13 02:25:21 +00:00
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 \
New interrupt code from Bruce Evans. In additional to Bruce's attached list of changes, I've made the following additional changes: 1) i386/include/ipl.h renamed to spl.h as the name conflicts with the file of the same name in i386/isa/ipl.h. 2) changed all use of *mask (i.e. netmask, biomask, ttymask, etc) to *_imask (net_imask, etc). 3) changed vestige of splnet use in if_is to splimp. 4) got rid of "impmask" completely (Bruce had gotten rid of netmask), and are now using net_imask instead. 5) dozens of minor cruft to glue in Bruce's changes. These require changes I made to config(8) as well, and thus it must be rebuilt. -DG from Bruce Evans: sio: o No diff is supplied. Remove the define of setsofttty(). I hope that is enough. *.s: o i386/isa/debug.h no longer exists. The event counters became too much trouble to maintain. All function call entry and exception entry counters can be recovered by using profiling kernel (the new profiling supports all entry points; however, it is too slow to leave enabled all the time; it also). Only BDBTRAP() from debug.h is now used. That is moved to exception.s. It might be worth preserving SHOW_BITS() and calling it from _mcount() (if enabled). o T_ASTFLT is now only set just before calling trap(). o All exception handlers set SWI_AST_MASK in cpl as soon as possible after entry and arrange for _doreti to restore it atomically with exiting. It is not possible to set it atomically with entering the kernel, so it must be checked against the user mode bits in the trap frame before committing to using it. There is no place to store the old value of cpl for syscalls or traps, so there are some complications restoring it. Profiling stuff (mostly in *.s): o Changes to kern/subr_mcount.c, gcc and gprof are not supplied yet. o All interesting labels `foo' are renamed `_foo' and all uninteresting labels `_bar' are renamed `bar'. A small change to gprof allows ignoring labels not starting with underscores. o MCOUNT_LABEL() is to provide names for counters for times spent in exception handlers. o FAKE_MCOUNT() is a version of MCOUNT() suitable for exception handlers. Its arg is the pc where the exception occurred. The new mcount() pretends that this was a call from that pc to a suitable MCOUNT_LABEL(). o MEXITCOUNT is to turn off any timer started by MCOUNT(). /usr/src/sys/i386/i386/exception.s: o The non-BDB BPTTRAP() macros were doing a sti even when interrupts were disabled when the trap occurred. The sti (fixed) sti is actually a no-op unless you have my changes to machdep.c that make the debugger trap gates interrupt gates, but fixing that would make the ifdefs messier. ddb seems to be unharmed by both interrupts always disabled and always enabled (I had the branch in the fix back to front for some time :-(). o There is no known pushal bug. o tf_err can be left as garbage for syscalls. /usr/src/sys/i386/i386/locore.s: o Fix and update BDE_DEBUGGER support. o ENTRY(btext) before initialization was dangerous. o Warm boot shot was longer than intended. /usr/src/sys/i386/i386/machdep.c: o DON'T APPLY ALL OF THIS DIFF. It's what I'm using, but may require other changes. Use the following: o Remove aston() and setsoftclock(). Maybe use the following: o No netisr.h. o Spelling fix. o Delay to read the Rebooting message. o Fix for vm system unmapping a reduced area of memory after bounds_check_with_label() reduces the size of a physical i/o for a partition boundary. A similar fix is required in kern_physio.c. o Correct use of __CONCAT. It never worked here for non- ANSI cpp's. Is it time to drop support for non-ANSI? o gdt_segs init. 0xffffffffUL is bogus because ssd_limit is not 32 bits. The replacement may have the same value :-), but is more natural. o physmem was one page too low. Confusing variable names. Don't use the following: o Better numbers of buffers. Each 8K page requires up to 16 buffer headers. On my system, this results in 5576 buffers containing [up to] 2854912 bytes of memory. The usual allocation of about 384 buffers only holds 192K of disk if you use it on an fs with a block size of 512. o gdt changes for bdb. o *TGT -> *IDT changes for bdb. o #ifdefed changes for bdb. /usr/src/sys/i386/i386/microtime.s: o Use the correct asm macros. I think asm.h was copied from Mach just for microtime and isn't used now. It certainly doesn't belong in <sys>. Various macros are also duplicated in sys/i386/boot.h and libc/i386/*.h. o Don't switch to and from the IRR; it is guaranteed to be selected (default after ICU init and explicitly selected in isa.c too, and never changed until the old microtime clobbered it). /usr/src/sys/i386/i386/support.s: o Non-essential changes (none related to spls or profiling). o Removed slow loads of %gs again. The LDT support may require not relying on %gs, but loading it is not the way to fix it! Some places (copyin ...) forgot to load it. Loading it clobbers the user %gs. trap() still loads it after certain types of faults so that fuword() etc can rely on it without loading it explicitly. Exception handlers don't restore it. If we want to preserve the user %gs, then the fastest method is to not touch it except for context switches. Comparing with VM_MAXUSER_ADDRESS and branching takes only 2 or 4 cycles on a 486, while loading %gs takes 9 cycles and using it takes another. o Fixed a signed branch to unsigned. /usr/src/sys/i386/i386/swtch.s: o Move spl0() outside of idle loop. o Remove cli/sti from idle loop. sw1 does a cli, and in the unlikely event of an interrupt occurring and whichqs becoming zero, sw1 will just jump back to _idle. o There's no spl0() function in asm any more, so use splz(). o swtch() doesn't need to be superaligned, at least with the new mcounting. o Fixed a signed branch to unsigned. o Removed astoff(). /usr/src/sys/i386/i386/trap.c: o The decentralized extern decls were inconsistent, of course. o Fixed typo MATH_EMULTATE in comments. */ o Removed unused variables. o Old netmask is now impmask; print it instead. Perhaps we should print some of the new masks. o BTW, trap() should not print anything for normal debugger traps. /usr/src/sys/i386/include/asmacros.h: o DON'T APPLY ALL OF THIS DIFF. Just use some of the null macros as necessary. /usr/src/sys/i386/include/cpu.h: o CLKF_BASEPRI() changes since cpl == SWI_AST_MASK is now normal while the kernel is running. o Don't use var++ to set boolean variables. It fails after a mere 4G times :-) and is slower than storing a constant on [3-4]86s. /usr/src/sys/i386/include/cpufunc.h: o DON'T APPLY ALL OF THIS DIFF. You need mainly the include of <machine/ipl.h>. Unfortunately, <machine/ipl.h> is needed by almost everything for the inlines. /usr/src/sys/i386/include/ipl.h: o New file. Defines spl inlines and SWI macros and declares most variables related to hard and soft interrupt masks. /usr/src/sys/i386/isa/icu.h: o Moved definitions to <machine/ipl.h> /usr/src/sys/i386/isa/icu.s: o Software interrupts (SWIs) and delayed hardware interrupts (HWIs) are now handled uniformally, and dispatching them from splx() is more like dispatching them from _doreti. The dispatcher is essentially *(handler[ffs(ipending & ~cpl)](). o More care (not quite enough) is taken to avoid unbounded nesting of interrupts. o The interface to softclock() is changed so that a trap frame is not required. o Fast interrupt handlers are now handled more uniformally. Configuration is still too early (new handlers would require bits in <machine/ipl.h> and functions to vector.s). o splnnn() and splx() are no longer here; they are inline functions (could be macros for other compilers). splz() is the nontrivial part of the old splx(). /usr/src/sys/i386/isa/ipl.h o New file. Supposed to have only bus-dependent stuff. Perhaps the h/w masks should be declared here. /usr/src/sys/i386/isa/isa.c: o DON'T APPLY ALL OF THIS DIFF. You need only things involving *mask and *MASK and comments about them. netmask is now a pure software mask. It works like the softclock mask. /usr/src/sys/i386/isa/vector.s: o Reorganize AUTO_EOI* macros. o Option FAST_INTR_HANDLER_USERS_ES for people who don't trust fastintr handlers. o fastintr handlers need to metamorphose into ordinary interrupt handlers if their SWI bit has become set. Previously, sio had unintended latency for handling output completions and input of SLIP framing characters because this was not done. /usr/src/sys/net/netisr.h: o The machine-dependent stuff is now imported from <machine/ipl.h>. /usr/src/sys/sys/systm.h o DON'T APPLY ALL OF THIS DIFF. You need mainly the different splx() prototype. The spl*() prototypes are duplicated as inlines in <machine/ipl.h> but they need to be duplicated here in case there are no inlines. I sent systm.h and cpufunc.h to Garrett. We agree that spl0 should be replaced by splnone and not the other way around like I've done. /usr/src/sys/kern/kern_clock.c o splsoftclock() now lowers cpl so the direct call to softclock() works as intended. o softclock() interface changed to avoid passing the whole frame (some machines may need another change for profile_tick()). o profiling renamed _profiling to avoid ANSI namespace pollution. (I had to improve the mcount() interface and may as well fix it.) The GUPROF variant doesn't actually reference profiling here, but the 'U' in GUPROF should mean to select the microtimer mcount() and not change the interface.
1994-04-02 07:00:53 +00:00
$S/sys/errno.h machine/asmacros.h
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.
1993-11-13 02:25:21 +00:00
${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
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
machdep.o: ${I386}/i386/machdep.c Makefile
${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
1993-06-12 14:58:17 +00:00
# the following is necessary because autoconf.o depends on #if GENERIC
autoconf.o: Makefile
# depend on network configuration
af.o uipc_proto.o locore.o: Makefile
# depends on KDB (cons.o also depends on GENERIC)
trap.o cons.o: Makefile
assym.s: genassym
./genassym >,assym.s
if cmp -s assym.s ,assym.s; then \
rm -f ,assym.s; \
else \
rm -f assym.s; \
mv ,assym.s assym.s; \
fi
# Some of the defines that genassym outputs may well depend on the
# value of kernel options.
genassym: Makefile
1993-06-12 14:58:17 +00:00
${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
${I386}/i386/genassym.c -static -o genassym
1993-06-12 14:58:17 +00:00
depend: assym.s param.c vnode_if.h
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c
1993-06-12 14:58:17 +00:00
sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
sort -u | comm -23 - dontlink | \
sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
tags:
@echo "see $S/kern/Makefile for tags"
ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
${CC} -c ${CFLAGS} ioconf.c
conf.o: ${I386}/i386/conf.c $S/sys/conf.h
${CC} -c ${CFLAGS} ${I386}/i386/conf.c
1993-06-12 14:58:17 +00:00
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
param.c: $S/conf/param.c
1993-06-12 14:58:17 +00:00
-rm -f param.c
cp $S/conf/param.c .
param.o: param.c Makefile
${CC} -c ${CFLAGS} ${PARAM} param.c
This Makefile is for FreeBSD, not 4.3 BSD-Reno. Moved $Id$. Added STRIP=, DBSYM=, and LOAD_ADDRESS?= Now use LOAD_ADDRESS for linking kernel and for dbsym, added strip -x to cut kernel size. Added machde.o: dependency, this will be needed in the future, and for now it does not hurt anyone. Cleaned out conf.o: dependency, mkdep does the right things. Same for param.c: This is really a Merge in of NetBSD's Makefile.i386, here is the relevant rlog info: ---------------------------- revision 1.27 date: 1993/08/27 23:58:20; author: brezak; state: Exp; lines: +2 -2 Need LOAD_ADDRESS for depend pass. ---------------------------- revision 1.25 date: 1993/07/19 16:52:16; author: mycroft; state: Exp; lines: +3 -3 Add ${DEBUG} to CFLAGS and -f to dbsym. ---------------------------- revision 1.22 date: 1993/07/18 10:08:22; author: mycroft; state: Exp; lines: +5 -6 Change to work with new config stuff for specifying load address. ---------------------------- revision 1.20 date: 1993/07/18 09:47:40; author: mycroft; state: Exp; lines: +6 -5 Use new -T option to dbsym. ---------------------------- revision 1.17 date: 1993/07/11 08:42:22; author: cgd; state: Exp; lines: +2 -2 don't ignore errors from dbsym... it might say that, e.g. there's not enough symbol space! ---------------------------- revision 1.14 date: 1993/06/06 23:29:03; author: cgd; state: Exp; lines: +2 -2 make conf.o actually depend on conf.c... ---------------------------- revision 1.8 date: 1993/04/29 03:27:39; author: cgd; state: Exp; lines: +5 -10 use ed instead of ex. the script to use is identical, and we might want to switch back to using ex when our ex supports -. ---------------------------- revision 1.5 date: 1993/03/24 18:48:57; author: cgd; state: Exp; lines: +1 -1 now use absolute path for dbsym ----------------------------
1993-09-26 19:44:33 +00:00
vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
1993-06-12 14:58:17 +00:00
sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT}
${CC} ${CFLAGS} -c vers.c
vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
1993-06-12 14:58:17 +00:00
%RULES
# DO NOT DELETE THIS LINE -- make depend uses it