History log of /freebsd-current/sys/conf/Makefile.powerpc
Revision Date Author Comments
# 29363fb4 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# c227269e 07-Feb-2022 John Baldwin <jhb@FreeBSD.org>

Stop adding -Wredundant-decls to CWARNFLAGS.

clang doesn't implement it, and Linux doesn't enforce it. As a
result, new instances keep cropping up both in FreeBSD's code and in
upstream sources from vendors.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D34144


# fac6dee9 12-May-2020 Eric van Gyzen <vangyzen@FreeBSD.org>

Remove tests for obsolete compilers in the build system

Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree.
Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions
for older compilers.

Reviewed by: imp (earlier version), emaste, jhb
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D24802


# 1207cda9 26-Jan-2020 John Baldwin <jhb@FreeBSD.org>

Compile hack.c with normal CFLAGS + -shared -nostdlib.

Originally, hack.c was compiled into a shard object with just -shared
-nostdlib. This assumed that ${CC} did not require any additional
flags for ABIs, cross-building, etc.

When kern.post.mk was created in r89509 by reducing duplication in
kernel Makefile.<arch> files, the -shared flag was moved into a
HACK_EXTRA_FLAGS variable so that sparc64 could override it with
-Wl,-shared. The sparc64 hack was removed in r111650, but
HACK_EXTRA_FLAGS was left in place. Over time, we have started
support toolchains that require flags to support alternate ABIs on
MIPS and PowerPC and started (ab)using HACK_EXTRA_FLAGS to set only
those flags.

I need to fix risc-v to pass -mno-relax to the hack.c build for lld in
llvm 10, and the patches to support cross-build from non-FreeBSD hosts
need to include -target for clang in CFLAGS for hack.c. Rather than
adding more hacks into HACK_EXTRA_FLAGS, just use the full set of
CFLAGS with hack.c.

Reviewed by: kib, arichardson
MFC after: 1 month
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23362


# e99c4e4d 26-Dec-2019 Brandon Bergren <bdragon@FreeBSD.org>

[PowerPC] Clang powerpcspe build fixes

* Fix a couple of format errors.
* Add some extra compiler flags needed to force clang to build SPE code.
(These are temporary until the target triple is fixed)


# ab3f2a38 02-Nov-2019 Brandon Bergren <bdragon@FreeBSD.org>

Add support for building Book-E kernels with clang/lld.

This involved several changes:

* Since lld does not like text relocations, replace SMP boot page text relocs
in booke/locore.S with position-independent math, and track the virtual base
in the SMP boot page header.

* As some SPRs are interpreted differently on clang due to the way it handles
platform-specific SPRs, switch m*dear and m*esr mnemonics out for regular
m*spr. Add both forms of SPR_DEAR to spr.h so the correct encoding is selected.

* Change some hardcoded 32 bit things in the boot page to be pointer-sized, and
fix alignment.

* Fix 64-bit build of booke/pmap.c when enabling pmap debugging.

Additionally, I took the opportunity to document how the SMP boot page works.

Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D21999


# e47edf50 17-Jul-2018 Kyle Evans <kevans@FreeBSD.org>

Revert r336353 completely based on protest; compatibility shims incoming


# 59996cb2 16-Jul-2018 Kyle Evans <kevans@FreeBSD.org>

Revert 336358 and step away fron machine for the day...

VERSREQ < 7.+ physically will not work with new config(8) due to major bump,
which is why I bumped it in the first place... Back to the original version


# 78a25cc7 16-Jul-2018 Kyle Evans <kevans@FreeBSD.org>

Partially revert r336353: sys/conf/* %VERSREQ bumps

The changes made in r335998 don't strictly require a newer config(8),
though it is advised. The %VERSREQ bumps were premature.


# 2df45ae0 16-Jul-2018 Kyle Evans <kevans@FreeBSD.org>

config(8): Bump major version after r335998

config-generated hints.c/env.c from r335998 and later are incompatible with
earlier kernels due to no longer setting envmode/hintmode. A minor bump for
this is insufficient, as matching major version with a later minor version
is still viewed as backwards-compatible.

This was an MI kernel change, soo all VERSREQ's are bumped.


# 0b58112f 21-Jan-2017 Justin Hibbits <jhibbits@FreeBSD.org>

Don't pass -Wa,-many through clang, the integrated as doesn't support it.

Our base binutils sets -many by default anyway, but external gcc may not do
this.

PR: kern/215948
Submitted by: Mark Millard <markmi AT dsl-only DOT net>
Reported by: Mark Millard
MFC after: 2 weeks


# dc9b124d 21-Oct-2016 Justin Hibbits <jhibbits@FreeBSD.org>

Create a new MACHINE_ARCH for Freescale PowerPC e500v2

Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU. The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive. Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement. setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used. However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI. Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By: bdrewery, imp
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D5683


# 5c845fde 07-Mar-2015 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Make 32-bit PowerPC kernels, like 64-bit PowerPC kernels, position-independent
executables. The goal here, not yet accomplished, is to let the e500 kernel
run under QEMU by setting KERNBASE to something that fits in low memory and
then having the kernel relocate itself at runtime.


# 0fa22505 31-Jan-2015 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Build the powerpc64 kernel as a position-independent executable. At startup,
it processes its own ELF relocations and can be loaded and run in place at
any physical/virtual address.

NB: This requires an updated loader to boot!

Relnotes: yes


# ab2de2d7 04-Feb-2014 Warner Losh <imp@FreeBSD.org>

Bump the version of config to the latest (3 year old, so upgrade
worries are long past). Also remove redundant MACHINE= declarations
and passing MACHINE/MACHINE_ARCH to module builds. That's now done in
common code.


# 43bb1a21 12-Sep-2012 David E. O'Brien <obrien@FreeBSD.org>

Remove duplication and centralize testing of various config(8)ed features.


# c475a3ea 12-Sep-2012 David E. O'Brien <obrien@FreeBSD.org>

Not all Pmake derived makes quietly tolerate assignment from shell commands
with no output. Add "echo" at the end these shell commands whose output is
assigned to a variable's value to ensure there is some output.

Submitted by: John Van Horne <jvanhorne@juniper.net>


# b9856e92 09-Jun-2011 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Add -Wa,-many to CFLAGS on PowerPC. This aids in building a kernel using
clang, which would otherwise complain about some 64-bit bridge mode
instructions.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# c3e289e1 12-Jul-2010 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

MFppc64:

Kernel sources for 64-bit PowerPC, along with build-system changes to keep
32-bit kernels compiling (build system changes for 64-bit kernels are
coming later). Existing 32-bit PowerPC kernel configurations must be
updated after this change to specify their architecture.


# d1d3233e 11-Jul-2010 Rafal Jaworowski <raj@FreeBSD.org>

Convert Freescale PowerPC platforms to FDT convention.

The following systems are affected:

- MPC8555CDS
- MPC8572DS

This overhaul covers the following major changes:

- All integrated peripherals drivers for Freescale MPC85XX SoC, which are
currently in the FreeBSD source tree are reworked and adjusted so they
derive config data out of the device tree blob (instead of hard coded /
tabelarized values).

- This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC,
QUICC, UART, CFI.

- Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire
ocpbus(4) driver, which was based on hard-coded config data.

Note that world for these platforms has to be built WITH_FDT.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 332fd25c 16-May-2007 Wojciech A. Koszek <wkoszek@FreeBSD.org>

Revert config(8) version bump. It brings major pain for people working on
different versions of FreeBSD source tree.

Old config(8) can now be used unless you want to use INCLUDE_CONFIG_FILE
option.

Approved by: imp
Reviewed by: imp


# 9e2f7513 12-May-2007 Wojciech A. Koszek <wkoszek@FreeBSD.org>

Bump config(8) version and build requirement for config(8) to 600006. This
is caused by my latest changes to config(8). You're supposed to install new
config(8) in order to prevent yourself from seeing a warning about old
version of that tool.

You should configure the kernel with a new config(8) then.

Oked by: rwatson, cognet (mentor)


# 9fe342e7 28-Nov-2005 Warner Losh <imp@FreeBSD.org>

Version 600004 is better than 700000 given other changes that are in
the pipeline. We had to bump the version for 600004 because the old
parser got confused and generated bogus output.

Approved by: ru@


# a8e06f2a 27-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Make config(8) understand ORed dependecies in "files*" and
improve tracking of known devices. Bump config(8) version.


# 05b5ca73 03-Nov-2005 Warner Losh <imp@FreeBSD.org>

We don't bump the config version for additions to config that aren't
used in the base system. This has been much discussed in the past
(typically people giving me a hard time for it). Since all that was
added to config was nocpu, and since we don't use it, we don't need to
bump the version.


# acd58322 03-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Implement the "nocpu" directive.

Requested by: rwatson


# b34b3c19 27-Oct-2005 John Baldwin <jhb@FreeBSD.org>

Bump config(8) version for the DEFAULTS change.


# a7d30e5f 07-Sep-2005 David E. O'Brien <obrien@FreeBSD.org>

Use the more readable empty() syntax.


# 23804f1a 13-Apr-2005 Warner Losh <imp@FreeBSD.org>

Never hardcode /sys into these Makefiles. The proper way to spell it is $S.

Also, move the -I stuff to the centralized kern.pre.mk. However, it
might be better to add these flags to files.conf. This is a short
term fix to fix the broken builds on my machine (I don't have a valid
/sys link).


# f0c1dee2 12-Apr-2005 Vinod Kashyap <vkashyap@FreeBSD.org>

The latest release of the FreeBSD driver (twa) for
3ware's 9xxx series controllers. This corresponds to
the 9.2 release (for FreeBSD 5.2.1) on the 3ware website.

Highlights of this release are:

1. The driver has been re-architected to use a "Common Layer"
(all tw_cl* files), which is a consolidation of all OS-independent
parts of the driver. The FreeBSD OS specific portions of the
driver go into an "OS Layer" (all tw_osl* files).
This re-architecture is to achieve better maintainability, consistency
of behavior across OS's, and better portability to new OS's (drivers
for new OS's can be written by just adding an OS Layer that's specific
to the OS, by complying to a "Common Layer Programming Interface" API.

2. The driver takes advantage of multiple processors.

3. The driver has a new firmware image bundled, the new features of which
include Online Capacity Expansion and multi-lun support, among others.
More details about 3ware's 9.2 release can be found here:
http://www.3ware.com/download/Escalade9000Series/9.2/9.2_Release_Notes_Web.pdf

Since the Common Layer is used across OS's, the FreeBSD specific include
path for header files (/sys/dev/twa) is not part of the #include pre-processor
directive in any of the source files. For being able to integrate twa into
the kernel despite this, Makefile.<arch> has been changed to add the include
path to CFLAGS.

Reviewed by: scottl


# 5abe8537 01-Apr-2005 Warner Losh <imp@FreeBSD.org>

Update version number for latest config version bump


# f80d2828 10-Feb-2005 John-Mark Gurney <jmg@FreeBSD.org>

bump the Makefile config versions now that config is 600001...

Forgotten by: des


# bd985cab 02-Feb-2005 Peter Grehan <grehan@FreeBSD.org>

- remove NO_MODULES since they've been working for some time
- add -fno-omit-framepointer to CFLAGS if DDB is enabled so
backtraces will still work when optimization is enabled.
Stolen from Makefile.amd64.


# a35d8893 24-Oct-2004 Ruslan Ermilov <ru@FreeBSD.org>

For variables that are only checked with defined(), don't provide
any fake value.


# f37a929c 30-Aug-2004 Peter Wemm <peter@FreeBSD.org>

Kill count device support from config. I've changed the last few
remaining consumers to have the count passed as an option. This is
i4b, pc98/wdc, and coda.

Bump configvers.h from 500013 to 600000.

Remove heuristics that tried to parse "device ed5" as 5 units of the ed
device. This broke things like the snd_emu10k1 device, which required
quotes to make it parse right. The no-longer-needed quotes have been
removed from NOTES, GENERIC etc. eg, I've removed the quotes from:
device snd_maestro
device "snd_maestro3"
device snd_mss

I believe everything will still compile and work after this.


# 48aea4da 13-Aug-2004 Ruslan Ermilov <ru@FreeBSD.org>

Removed COPTS support from kmod.mk and kern.pre.mk.
COPTS support in bsd.prog.mk is preserved but discouraged.


# 5090c987 09-May-2004 Olivier Houchard <cognet@FreeBSD.org>

Change required config(8) version.


# 721bdb8d 09-Dec-2003 Andrew Gallatin <gallatin@FreeBSD.org>

Remove duplicate script for locore.o


# 18b492fc 15-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Bump the config version to force people to upgrade their config(8)
so the fix for emitting multiple instances of .o files will prevent
link errors on LINT.


# 5d1b6a85 28-Feb-2003 Ruslan Ermilov <ru@FreeBSD.org>

Standardize handling of locore.[sS] etc. files.

Submitted by: jake, bde, ru


# 731df247 21-Jan-2003 Peter Grehan <grehan@FreeBSD.org>

- remove dead conditional CFLAG setting
- switch locore .s -> .S

Approved by: benno


# 66422f5b 16-Sep-2002 Peter Wemm <peter@FreeBSD.org>

Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha


# ba37958b 31-Jul-2002 Jake Burkholder <jake@FreeBSD.org>

Moved the rule for locore.o from kern.post.mk to Makefile.$ARCH.


# 83655698 13-Jul-2002 Bruce Evans <bde@FreeBSD.org>

Moved the setting of all profiling-related variables except the key one
(PROFLEVEL) to kern.pre.mk so that it is easier to manage. Bumped config
version to match.

Moved the check for cputype being configured to a less bogus place in
mkmakefile.c.


# 25a157bc 24-Mar-2002 David E. O'Brien <obrien@FreeBSD.org>

Remove the setting of 'FMT'. We now do ELF by default, so only bother
to increase the lenght of the command line if needed. The setting of FMT
also gets in the cross bootstrapping way for new platforms.


# 7a2eb19d 20-Feb-2002 Peter Wemm <peter@FreeBSD.org>

Commit some infrastructure for turning on -Werror for kernel compiles.
It doesn't actually do it yet though. This adds a flag to config so
that we can exclude certain vendor files from this even when the rest
of the kernel has it on. make -DNO_WERROR would also bypass all of it.


# f6916f66 14-Dec-2001 Peter Wemm <peter@FreeBSD.org>

Proper fix for old config setting maxusers to 8.


# 2c6c8840 12-Nov-2001 Benno Rice <benno@FreeBSD.org>

-msoft-float must always be turned on when compiling the PowerPC kernel.


# 3dfff24a 11-Nov-2001 Warner Losh <imp@FreeBSD.org>

Move kern.post.mk to last line, now that it appears safe


# 41c8eb30 02-Nov-2001 Warner Losh <imp@FreeBSD.org>

Factor the common parts of the Makefile.foo files. This introduces two
new files: kern.pre.mk, which contains most of the definitions, and
kern.post.mk, which contains most of the rules.

I've tested this on i386 and pc98. I have had feedback on the sparc64
port, but no reports from anybody on alpha, ia64 or powerpc. I
appologize in advance if I've broken you.

Reviewed by: jake, jhb, arch@


# 143281f4 31-Oct-2001 Brian Somers <brian@FreeBSD.org>

Only overwrite ${DESTDIR}${KODIR}.old/${KERNEL_KO} if we haven't
booted from it when doing an installkernel.

Only change kern.bootfile from ${DESTDIR}${KODIR}/${KERNEL_KO}
to ${DESTDIR}${KODIR}.old/${KERNEL_KO}, and only when we're renaming
a booted ${DESTDIR}${KODIR}/${KERNEL_KO} kernel.


# a4c00586 26-Oct-2001 Dag-Erling Smørgrav <des@FreeBSD.org>

Support the "install.debug" and "reinstall.debug" targets for kernel modules.
Small tweaks to kldxref may be necessary to avoid the surprising (but harm-
less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if
it is present in the kernel directory.

Approved by: a week of silence on -arch
MFC after: 2 weeks


# 0df659af 26-Oct-2001 Ruslan Ermilov <ru@FreeBSD.org>

Finish the asbestos suited move of $mach/conf/*.$mach to conf/*.$mach.
Fix some more typos.


# 43aba0ea 19-Oct-2001 Mark Peek <mp@FreeBSD.org>

Make override of nm consistent across all platforms and sort the overrides.

Reminded by: obrien


# acd26a4b 18-Oct-2001 Mark Peek <mp@FreeBSD.org>

Use normal CWARNFLAGS and defines when compiling on FreeBSD.


# 90822641 17-Oct-2001 Brian Somers <brian@FreeBSD.org>

Change kern.bootfile when mv'ing the kernel

Not tested by: brian


# 7947a339 14-Oct-2001 Benno Rice <benno@FreeBSD.org>

Remove another unneeded instance of -elf.


# c538331d 13-Oct-2001 Mark Peek <mp@FreeBSD.org>

Changes for both compilation on NetBSD (PPC) and cross-compilation on FreeBSD.
- Hardcode and trim warning flags down to compatible subset.
- Remove -elf FMT flag.
- Allow for NM commandline override.


# 76cb0cad 26-Aug-2001 Peter Wemm <peter@FreeBSD.org>

Enable hardwiring of things like tunables from embedded enironments
that do not start from loader(8).


# dd84e965 14-Aug-2001 Peter Wemm <peter@FreeBSD.org>

In order to bring about the end of the universe, delete the lines:
# DO NOT DELETE THIS LINE -- make depend uses it


# 5635f2a5 02-Aug-2001 Peter Wemm <peter@FreeBSD.org>

Further Makefile.* sync (from Makefile.ia64). The lint target has been
commented out in the entire life of the 2.x+ branch and given the amount
of gcc-specific code we have and the warning checks that gcc does I'm not
sure that it is going to get us much for some time.


# 2cc33d79 02-Aug-2001 Sheldon Hearn <sheldonh@FreeBSD.org>

When building a debugging kernel with modules, build modules with
debugging support as well.

This relies on support added in rev 1.105 to kmod.mk.

Requested by: peter


# 18ec8d76 26-Jul-2001 Peter Wemm <peter@FreeBSD.org>

param.c no longer gets special treatment. Use the source tree version.


# ab11128f 01-Jul-2001 Warner Losh <imp@FreeBSD.org>

Bump config version.


# 7ef33e2e 30-Jun-2001 Warner Losh <imp@FreeBSD.org>

Move kernel compile directory from sys/compile/FOO to
sys/compile/${MACHINE}/FOO.

Reviewed by: arch, obrien, peter and
the USENIX terminal room secret kernel cabal


# 00267919 26-Jun-2001 Benno Rice <benno@FreeBSD.org>

Add -msoft-float to COPTS to stop GCC attempting to be "smart" and using
floating point registers for various optimisation tweaks.


# c585bae1 17-Jun-2001 Benno Rice <benno@FreeBSD.org>

The final commit for the first phase of PowerPC support.

This adds the config stuff needed to build kernels.

Reviewed by: obrien


# f41325db 13-Jun-2001 Peter Wemm <peter@FreeBSD.org>

With this commit, I hereby pronounce gensetdefs past its use-by date.

Replace the a.out emulation of 'struct linker_set' with something
a little more flexible. <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set. They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated. This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by: eivind


# 6697e351 12-Jun-2001 Peter Wemm <peter@FreeBSD.org>

Move the -I../../../include or -I/usr/include to the last entry on the
cc arguments. Otherwise ipfilter's bogus #include lines will compile
reference /usr/include/netinet/ip_frag.h etc.


# 88d74af5 06-Jun-2001 Jonathan Lemon <jlemon@FreeBSD.org>

Relocate IPFilter from sys/netinet to sys/contrib/ipfilter.


# 71cb0ea9 29-May-2001 Mike Smith <msmith@FreeBSD.org>

New files and layout for the ACPI CA 20010518 update.


# d856af0b 28-Apr-2001 David E. O'Brien <obrien@FreeBSD.org>

Add back in the bits to remove any existing "schg" flags as we have
kernel's out in wild that still have these flags set.


# ea87b3cb 25-Apr-2001 David E. O'Brien <obrien@FreeBSD.org>

Don't install KO's with the "schg" flag.
We are way too inconsistent with our setting of the "schg" flag, and in
our default install, it doesn't really offer any additional security.

Reviewed by: arch@


# 40afc104 25-Apr-2001 Warner Losh <imp@FreeBSD.org>

Ignore chflags errors. This makes installing to nfs mounted target
directories work.


# 581a68a2 02-Apr-2001 Warner Losh <imp@FreeBSD.org>

Add support for MODULES_OVERRIDE. This is a list of modules to build
instead of all of them. You can put this in /etc/make.conf or in
makeoptions.

Reviewed by: arch@

# docs to follow.


# 483cbcc1 24-Mar-2001 David E. O'Brien <obrien@FreeBSD.org>

Restore the careful preservation of .depend (rev 1.78 of Makefile.i386)
that I removed in my last commit dealing with `make depend' bogons.
This commit has some races, but hopefully they are too short to matter.
Unfortuneatly, neither .newdep nor .olddep is removed by `make clean'.

Submitted by: bde


# 5ca7924a 12-Mar-2001 Kris Kennaway <kris@FreeBSD.org>

Use CPUTYPE to add appropriate compiler flags to COPTFLAGS for kernel
builds. This may be disabled using the NO_CPU_COPTFLAGS variable.

Reviewed by: arch


# b1fe9741 27-Feb-2001 Peter Wemm <peter@FreeBSD.org>

Add a 'clobber' target.. Like 'clean' but it takes out even the config
generated stuff, leaving only 'version' in the build dir.


# 29604605 25-Feb-2001 Peter Wemm <peter@FreeBSD.org>

genassym.sh does not work with a.out because the sizes are rounded up
by the compiler. ie: char foo[0] comes out as 4 bytes on a.out, and
we depended on it coming out as 0 for the script version. :-(

Make double sure that genassym.o is built and nm'ed in elf mode.

(ia64 skipped since it is stuck on the linux toolchain and doesn't
understand the -elf switches)


# 8e739d9f 17-Feb-2001 Marcel Moolenaar <marcel@FreeBSD.org>

Revert gensetdefs.pl reversal.


# f1a87e83 11-Feb-2001 David E. O'Brien <obrien@FreeBSD.org>

Fix `make depend' => `make kernel-depend'. Using the dependancy file
when rebuilding it is just Wrong.


# 8e8cae2b 28-Jan-2001 Marcel Moolenaar <marcel@FreeBSD.org>

Revert previous commit. I messed up my testing.


# 136345c0 27-Jan-2001 Marcel Moolenaar <marcel@FreeBSD.org>

Improve kernel bootstrapping:
o Use objdump instead of gensetdefs(1) to build the linker sets.
o Allow overriding of nm and objdump in resp. genassym.sh and
gensetdefs.pl for non-native toolchains.

Reviewed by: arch
Perl improvements: Jos Backus <josb@cncdsl.com>, benno


# dfea516d 19-Jan-2001 John Baldwin <jhb@FreeBSD.org>

Change the reinstall.debug target to depend on
{kernel,modules}-reinstall.debug rather than {kernel,modules}-reinstall.
Otherwise, the '.debug' portion of the target is lost, and you end up
reinstalling the non debug version instead of the debug version.


# 5ae7f4d7 18-Jan-2001 Peter Wemm <peter@FreeBSD.org>

Corresponding version bump for config with the DEV_FOO replacement for
the NFOO count option.


# 1bc9ef16 24-Dec-2000 David E. O'Brien <obrien@FreeBSD.org>

Back out the modules `make obj' speedup.
I cannot find a way to do this with the more esoteric source dir schemes
I thought of.


# c59a148d 22-Dec-2000 David E. O'Brien <obrien@FreeBSD.org>

Use the canonical spelling for the path to sys.


# ded454a1 21-Dec-2000 David E. O'Brien <obrien@FreeBSD.org>

Greatly speed up the module `depend' phase.


# 7e820aaa 08-Dec-2000 Mike Smith <msmith@FreeBSD.org>

Next-phase PCI system update; move PCI core code to sys/dev and update
header include path to include sys/dev to avoid massive #include updates.


# 3f964411 24-Nov-2000 Peter Wemm <peter@FreeBSD.org>

Make the xxxFILES= list generation generic. This makes it easier to add
things like MFILES= or CONFFILES= without having to modify config code.


# 363ea5ea 17-Nov-2000 David E. O'Brien <obrien@FreeBSD.org>

Fix the `make -jX' (X>1) breakage.

Based on patch submitted by: Makoto MATSUSHITA <matusita@jp.freebsd.org>
Reviewed by: marcel, bde


# 26dac111 29-Oct-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Add a hook for doing #include magic (for src/tools/tools/kerninclude).


# a06f3df8 28-Oct-2000 Mike Smith <msmith@FreeBSD.org>

Connect the new ACPICA code to the 'acpica' device.


# 41291607 14-Oct-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Make it possible to specify profiling in the kernel config file.

Do so for LINT.


# 32002b34 03-Oct-2000 David E. O'Brien <obrien@FreeBSD.org>

Blah rev 1.208 got bits of the proposed "I want the file /kernel to be
the kernel" patch.

This commit is only the "Do not prepend `DESTDIR' to `KMODDIR' as
sys/conf/kmod.mk already does that for us" change.


# e48c56ae 03-Oct-2000 David E. O'Brien <obrien@FreeBSD.org>

Do not prepend `DESTDIR' to `KMODDIR' as sys/conf/kmod.mk already does
that for us.


# 6c5d6441 14-Sep-2000 David E. O'Brien <obrien@FreeBSD.org>

Install the kernel KLM as "kernel" by default.


# ecf92803 06-Sep-2000 David E. O'Brien <obrien@FreeBSD.org>

Create an "expert" mode where the device hints are not checked during
installation. This is need for the release build.


# 39f7b60e 06-Sep-2000 David E. O'Brien <obrien@FreeBSD.org>

Remove superfluous `/'s before KODIR.

Acceptability explained by: rgrimes


# 8a97d931 06-Sep-2000 David E. O'Brien <obrien@FreeBSD.org>

DESTDIR'ify the device.hints checking code.


# 3be254e2 06-Sep-2000 David E. O'Brien <obrien@FreeBSD.org>

I forgot the leading `DESTDIR' before the kernel directory.


# 3bdfa9e5 05-Sep-2000 David E. O'Brien <obrien@FreeBSD.org>

The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.


# 596feda5 25-Aug-2000 Peter Wemm <peter@FreeBSD.org>

If a ${KERNEL}.hints file exists, and no hints are specified explicitly,
then include the hints with a marker indicating that it is a fallback.
The kernel side of this is to come shortly.


# 6c243dd1 25-Aug-2000 Peter Wemm <peter@FreeBSD.org>

Add some anti-foot-shooting protection to the kernel install target.
Do not install a kernel unless a device.hints exists. Yes, you can
create an empty hints file if you refuse to use them.


# 92a4949b 03-Aug-2000 David E. O'Brien <obrien@FreeBSD.org>

* Create entire directory path for modules.
* Don't ignore error returns.


# 1445fdb0 03-Aug-2000 Sheldon Hearn <sheldonh@FreeBSD.org>

Don't bitch when trying to create a ${DESTDIR}/modules which already
exists.


# f623957f 26-Jul-2000 Brian Feldman <green@FreeBSD.org>

-mkdir the ${DESTDIR}/modules directory upon modules-install in case it
doesn't exist. This could bite you by allowing you merrily install your
modules one on top of the other as the regular file ${DESTDIR}/modules
and think it completed properly...


# 02def504 22-Jun-2000 Peter Wemm <peter@FreeBSD.org>

Make the generated set headers depend on Makefile as well (that is where
the list of .o files comes from - if we change the list of files that
are built, we need to rescan the files)

Obtained from: bde (indirectly)


# 7684b08b 17-Jun-2000 David E. O'Brien <obrien@FreeBSD.org>

Add back "NO_MODULES" as using ``make -DMODULES_WITH_WORLD'' in the
kernel build dir doesn't really say what your intentions are.


# f94a3783 17-Jun-2000 David E. O'Brien <obrien@FreeBSD.org>

If "MODULES_WITH_WORLD" is defined, sys/modules will be built with the
world as was our old way, rather than when building a kernel.

Some people do not like the new way, and the release building still assumes
modules are built with the world.


# 57b10272 16-Jun-2000 Brian Somers <brian@FreeBSD.org>

Fix ``make installkernel''


# d78c2e65 15-Jun-2000 David E. O'Brien <obrien@FreeBSD.org>

Only copy /modules to /modules.old if /modules exists and is populated.

Submitted by: John DeBoskey <jwd@FreeBSD.org>


# f71c01cc 13-Jun-2000 Peter Wemm <peter@FreeBSD.org>

Borrow phk's axe and apply the next stage of config(8)'s evolution.

Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel. You can reconfigure your
isa devices with the likes of this at loader(8) time:
set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8). See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8). There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file. If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you. You can also compile in the
hints directly with: hints "device.hints" as well.

There are a few things that I'm not too happy with yet. Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it. However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built. A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated. eg: 'device fe 4' will compile the fe driver with NFE set
to 4. You can then set hints for 4 units (0 - 3). Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this. This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others


# d2c48a27 12-Jun-2000 Peter Wemm <peter@FreeBSD.org>

Use objcopy to strip the gcc2_compiled. symbol from kernels.
ld(1) doesn't seem to have the ability to delete an arbitary symbol.


# 3f664fc6 10-Jun-2000 Peter Wemm <peter@FreeBSD.org>

A checkpoint of a part of a work-in-progress. Some more cleanups for
config(8). This commit allows control of the creation of the
#include "foo.h" files. We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices. eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.


# f47f0edd 02-Jun-2000 Bruce Evans <bde@FreeBSD.org>

Use "nm | awk ..." instead of genassym(1) to generate symbol value headers.
Symbol values are now represented using array sizes (4 arrays per symbol
so that 16-bit machines can represent 64-bit values) instead of being raw
binary values.

Reviewed by: marcel


# fe449a53 27-May-2000 David E. O'Brien <obrien@FreeBSD.org>

MFA: Add {kernel,module}-{depend,clean,cleandepend,tags,install,reinstall}
targets. The {depend,clean,cleandepend,tags,install,reinstall} targets
are composits of the {kernel,module}-* targets (based on NO_MODULES).


# 8760f39d 09-May-2000 Nick Hibma <n_hibma@FreeBSD.org>

Create a separate target for the 'modules'. Without this the modules
are only rebuilt if the kernel has changed as well.

While there make 'all' and 'modules' a PHONY target.


# 6a5e9a6a 04-May-2000 David E. O'Brien <obrien@FreeBSD.org>

Set MAKEOBJDIRPREFIX to modules/ in the current directory and build modules
there.


# 10ae1068 01-May-2000 Chuck Robey <chuckr@FreeBSD.org>

Cause modules to build with the kernel build. Modules are removed
from the sys Makefile's SUBDIRs. This is conditioned in make.conf by the
NO_MODULES variable and the existence of the modules directory. The
actual location of the modules is not modified. Changes in Makefiles
only, this does not affect Peter's recent changes.

Reviewed by: Peter Wemm, who warned me I would get some flack, and
he had the good idea for the NO_MODULES variable.


# 02d06d30 29-Apr-2000 Peter Wemm <peter@FreeBSD.org>

LOAD_ADDRESS is not used here. See conf/ldscript.* for the link base
address.


# f7b77691 08-Apr-2000 Doug Rabson <dfr@FreeBSD.org>

* Factor out the object system from new-bus so that it can be used by
non-device code.
* Re-implement the method dispatch to improve efficiency. The new system
takes about 40ns for a method dispatch on a 300Mhz PII which is only
10ns slower than a direct function call on the same hardware.

This changes the new-bus ABI slightly so make sure you re-compile any
driver modules which you use.


# d7a599a6 05-Apr-2000 Doug Rabson <dfr@FreeBSD.org>

Make it possible to include a device interface description by a single
line in files or files.${arch} instead of 13 lines of code.

This is a small chance that this will break the alpha kernel build - I'll
fix it this evening if it does.


# 2af66d23 29-Mar-2000 Peter Wemm <peter@FreeBSD.org>

Include param.o in the list of files that we scan for linker sets.
Without this, we cannot put sysctl nodes in there.


# 18ecdacc 22-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Bump configvers.h as a precaution. Although existing config files will
work unmodified still, new config files won't work on the old ones.


# d2b1bc73 09-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Put on my asbestos suit and move $mach/conf/*.$mach to conf/*.$mach as
hinted at in the previous config(8) commits. I've spoken about this with
a few people and after the initial suprise wore off they thought it wasn't
a bad idea. The upshot of it is that all the files*, Makefile*, options*
files are all right next to each other in the hope that people making
changes to one set will remember the others.

Note, config(8) looks to sys/conf first, and falls back to sys/$mach/conf
still, so this doesn't stop people working in subdirs for new platforms.
But once it's in the tree it can be moved next to the other files so that
the non-i386 platforms are (hopefully) treated a little better than as if
they were "second class" ports.

This does not change any user editable files. the config program is
still run in the same directory as before, the per-platform files
(GENERIC, LINT etc) are still in the same place.


# 070e9ce6 09-Jan-2000 KATO Takenori <kato@FreeBSD.org>

Changed MACHINE -> MACHINE_ARCH to make the i386-kernel be able to
compiled on PC98.


# 58fa7951 09-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Bump configversion. The controller/device changes are upwards but not
downwards compatable. If you try and config a s/controller/device/ kernel
with an old config(8), the results will be less than satisfactory.


# f31f62f8 08-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Further sync Alpha and i386 Makefiles. Remove KERNFORMAT = elf stuff as
it's always true on these platforms (and is likely to be on others as
well since loader is the one that is configured for whatever the boot
requirements are)


# 09093973 08-Jan-2000 Peter Wemm <peter@FreeBSD.org>

genassym is ELF-only, therefore the kernel is now ELF-only as well.


# c453bba7 08-Jan-2000 Bruce Evans <bde@FreeBSD.org>

Compile genassym.c with ordinary ${CFLAGS}. The (small) needs for
${GEN_CFLAGS} and -U_KERNEL became negative when all all the
genassym.c's were converted to be cross-built.

Makefile.*:
- Cleanups associated with the old genassym.
- Fixed deprecated spelling of ${.IMPSRC} as "$<".


# 3abe5082 07-Jan-2000 Marcel Moolenaar <marcel@FreeBSD.org>

Use genassym(1). The definitions of NKPDE and NKPT have been removed
because they are already defined in pmap.h, resulting in duplicate
definitions.

Reviewed by: bde


# 31f723c7 06-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Bring the Alpha and x86 Makefiles closer together.


# 664a31e4 28-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.


# e1f75a9f 27-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Zap kvm_kernel.db stuff now that libkvm gets it directly from the running
kernel.


# 22ddeb4b 26-Dec-1999 Bruce Evans <bde@FreeBSD.org>

Fixed stripping of aout debugging kernels.
Fixed some style bugs (always use precisely 1 space after `:' in
dependency specifications).
Removed bogus dependency of ${FULLKERNEL} on ${BEFORE_DEPEND}.


# 574b36f9 17-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Be more consistant in using perl vs. perl5. We were using perl5 in the
kernel builds so as not to confuse with perl4 when bootstrapping from old
systems. I don't know if this is still applicable but it shouldn't hurt
to be consistant at least.

Also copy vnode_if.sh to vnode_if.pl. Doing a 'sh vnode_if.sh' when it
was a perl script was kinda silly.


# 6f77b2de 12-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Use a seperate -c and -h mode. The vnode_if.c file is compiled only into
the kernel while the vnode_if.h header is a bunch of inlines to call the
code that is in the kernel. Generating the .h file on the fly is kinda
bogus because it has to match the one compiled into the kernel.

IMHO we should have kern/vnode_if.c and sys/vnode_if.h committed in the
tree but that's another battle.


# 9565e721 22-Nov-1999 Peter Wemm <peter@FreeBSD.org>

Update the Alpha makefile to be more in line with the x86 version. It
was getting quite dated. Attempt to minimize diffs between the two so
it's not as painful to do this next time.


# 82cd038d 21-Nov-1999 Yoshinobu Inoue <shin@FreeBSD.org>

KAME netinet6 basic part(no IPsec,no V6 Multicast Forwarding, no UDP/TCP
for IPv6 yet)

With this patch, you can assigne IPv6 addr automatically, and can reply to
IPv6 ping.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


# 4add5931 18-Nov-1999 Peter Wemm <peter@FreeBSD.org>

Hack: comment out the pull-in of src/sys/../share/mk/bsd.kern.mk as
that breaks if you try and compile a kernel before building world, as
is presently required to get past the signal changes. I don't
particularly like doing this, but at least it will mean that a 'make world'
will activate the gcc 2.95.2-specific option in bsd.kern.mk.


# 7c74d268 16-Nov-1999 Nick Hibma <n_hibma@FreeBSD.org>

Typo


# 7621bfff 30-Oct-1999 Marcel Moolenaar <marcel@FreeBSD.org>

Allow the source root `S' to be overridden by defining it only when
it isn't already defined. It enables config(8) to create the kernel
build directory where it wants.


# 503e6666 03-Oct-1999 Bruce Evans <bde@FreeBSD.org>

Fixed "misspelling" of bcmp as memcmp. memcmp doesn't exist in the
kernel, but gcc provides a pessimal builtin for it.

Makefile.i386:
Added a variable (CONF_CFLAGS) for configuration-specific compiler flags.

LINT:
Use CONF_CFLAGS to inhibit use of gcc builtins.


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 6c205e59 03-Jul-1999 Peter Wemm <peter@FreeBSD.org>

Delete the 'device-driver' suffix. It's been meaningless for a long time.
On the VAX, it used to be used for special compilation to avoid the
optimizer which would mess with memory mapped devices etc. These days
we use 'volatile'.


# 93740fb9 01-Jul-1999 Jordan K. Hubbard <jkh@FreeBSD.org>

Working kernel tags!

Submitted by: Craig Leres <leres@ee.lbl.gov>
PR: 2806


# 320138da 28-Jun-1999 Peter Wemm <peter@FreeBSD.org>

Use the same -UKERNEL strategy as the alpha to avoid the inlines etc.


# 46d2febf 28-Jun-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Hmm, might as well make all of BEFORE_DEPEND first in case make depend
wasn't run.


# d86578de 28-Jun-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Also make pci_if.h early if make depend wasn't run.


# 85a96bc6 28-Jun-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Make bus_if.h and device_if.h as early as possible if make depend hasn't
been run.


# a127a704 09-May-1999 Peter Wemm <peter@FreeBSD.org>

Move KERNEL?=kernel to top of the file where it's more obvious and add
a pointer to 'makeoptions' and /etc/make.conf.
Catch a few stray "kernel" hardcoded references.
Move the kernel.debug and related kernel build rules together.


# 37558b01 09-May-1999 Peter Wemm <peter@FreeBSD.org>

Move a couple of bits of (now) static content from config(8) (ie: %LOAD)
directly into the Makefile. Remove references to swapkernel.c, it's
not generated by config(8) now. (The previous config commits had
generated it, but they had an unused 'char *' in them).


# b307e58f 09-May-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Major lobotomy of config(8). The

config kernel mumble mumble

line has been obsoleted and removed and with it went all knowledge of
devices on the part of config.

You can still configure a root device (which is used if you give
the "-r" flag) but now with an option:

options ROOTDEVNAME=\"da0s2e\"

The string is parsed by the same code as at the "boot -a" prompt.

At the same time, make the "boot -a" prompt both more able and more
informative.

ALPHA/PC98 people: You will have to adapt a few simple changes
(defining rootdev and dumpdev somewhere else) before config works
for you again, sorry, but it's all in the name of progress.


# 6d04a6cb 08-May-1999 Peter Wemm <peter@FreeBSD.org>

I'm sick of the automatic rename of /kernel to /kernel.old while doing
development that leads to lots of crashes during boot.

I have made a 'reinstall' target (like in ports, and reinstall.debug)
This is most useful if you want to keep /kernel.old as a known bootable
kernel. If you test a new kernel and have to reboot for a fix, a
'make reinstall' will install the new kernel over the top of the old
non-viable one, leaving the old one untouched. This is mainly meant
for development, not general users.


# 061eb3ab 24-Apr-1999 Peter Wemm <peter@FreeBSD.org>

Bump configvers; when the updates to generic/lint get committed, the old
config has severe indigestion.


# db42d908 19-Apr-1999 Peter Wemm <peter@FreeBSD.org>

unifdef -DVM_STACK - it's been on for a while for x86 and was checked
and appeared to be working for the Alpha some time ago.


# 6182fdbd 16-Apr-1999 Peter Wemm <peter@FreeBSD.org>

Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition. eisa, isapnp and pccard* are
not yet using the new resource manager. Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
ATA driver to the Alpha. Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by: core


# e05da2e9 15-Apr-1999 Bruce Evans <bde@FreeBSD.org>

Made booting with -a work for all configurations. Previously it
only worked for configurations with "swap on generic".

usr.sbin/config/config.y:
- ignore all "swap [on] device ...' specifications except for
warning about them. They haven't done anything related to swap
for almost 4 years, and were previously silently ignored,
except for "swap on generic" which stopped swap${KERNEL}.c
from being generated. Code to support swapping is now deader
than before.

usr.sbin/config/mkswapconf.c:
- don't generate a dummy setconf() function in swap${KERNEL}.c.

sys/i386/conf/files.i386:
- swapgeneric.c is now standard. It should be merged into autoconf.c
so that it doesn't conflict with swap${KERNEL}.c for kernels named
"generic".

sys/i386/i386/autoconf.c:
- don't call setroot() for mfs roots. Since setroot() doesn't do anything
harmful, this was just a waste of time, except possibly for booting with
-a it may have helped prevent an undesireable call to setconf() by
finding a bogus rootdev.
- honor -a for ffs roots. -a now overrides all other ways of specifying
the root device. Previously, -r had precedence over -a, and the -a
handling was usually a no-op.
- don't honor -a for non-ffs roots, since it would currently just get in
the way of a clean panic.

sys/i386/i386/swapgeneric.c:
- don't declare things that are now always declared in swap${KERNEL}.c.
Don't decide things that are now decided in autoconf.c. Code to
support the "generic" case is now dead instead of useless.


# 4e8691dc 13-Apr-1999 Peter Wemm <peter@FreeBSD.org>

Clean up the kernel/kernel.debug/install.debug etc stuff.
Sense ${DEBUG} to decide on building kernel.debug or not.
Use a common install and install.debug target to minimize duplication.
(I deleted the ELF transition kernel warning, it was getting dated..)


# 4357ca88 10-Apr-1999 Greg Lehey <grog@FreeBSD.org>

Back out default debug kernel. The flags revert to historical behaviour.

Requested-by: ache
bde
dg

Modify targets for debug kernels: when -g was specified, make will
now build a debug kernel called kernel.debug, and create a stripped
version called kernel at the same time. The two targets install and
install.debug are otherwise unchanged.

Requested-by: dillon

Update man page accordingly.


# 2005b07a 07-Apr-1999 Greg Lehey <grog@FreeBSD.org>

1. Modify config to issue different code for debugging.
2. Config complains if you use -g:

Debugging is enabled by default, there is no ned to specify the -g option

3. Config warns you if you don't use -s:

Building kernel with full debugging symbols. Do
"config -s BSD" for historic partial symbolic support.
To install the debugging kernel, do make install.debug

(BSD was the name of the config file I used; I print out the same
name).

4. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
work if a kernel name other than 'kernel' is specified. This is
not absolutely necessary, but useful, and it was relatively easy.
I now have a kernel called /crapshit :-)

5. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
to remove both the debug and normal kernel.

6. Modify all to install the stripped kernel by default and the debug
kernel if you enter "make install.debug".

7. Update version number of Makefiles and config.


# 8681b974 11-Mar-1999 David Greenman <dg@FreeBSD.org>

Increased kernel virtual address space to 1GB. NOTE: You MUST have fixed
bootblocks in order to boot the kernel after this! Also note that this
change breaks BSDI BSD/OS compatibility.
Also increased default NKPT to 17 so that FreeBSD can boot on machines
with >=2GB of RAM. Booting on machines with exactly 4GB requires other
patches, not included.


# bb4b3fa5 01-Mar-1999 Dmitrij Tejblum <dt@FreeBSD.org>

Ensure that vnode_if.h build before object files, if make depend has not
been run.


# ad5ebf3f 14-Feb-1999 Dag-Erling Smørgrav <des@FreeBSD.org>

Ignore errors from chflags. This makes it possible to make installworld
with DESTDIR set to an NFS-mounted file system.


# 2907af2a 25-Jan-1999 Julian Elischer <julian@FreeBSD.org>

Mostly remove the VM_STACK OPTION.
This changes the definitions of a few items so that structures are the
same whether or not the option itself is enabled. This allows
people to enable and disable the option without recompilng the world.

As the author says:

|I ran into a problem pulling out the VM_STACK option. I was aware of this
|when I first did the work, but then forgot about it. The VM_STACK stuff
|has some code changes in the i386 branch. There need to be corresponding
|changes in the alpha branch before it can come out completely.

what is done:
|
|1) Pull the VM_STACK option out of the header files it appears in. This
|really shouldn't affect anything that executes with or without the rest
|of the VM_STACK patches. The vm_map_entry will then always have one
|extra element (avail_ssize). It just won't be used if the VM_STACK
|option is not turned on.
|
|I've also pulled the option out of vm_map.c. This shouldn't harm anything,
|since the routines that are enabled as a result are not called unless
|the VM_STACK option is enabled elsewhere.
|
|2) Add what appears to be appropriate code the the alpha branch, still
|protected behind the VM_STACK switch. I don't have an alpha machine,
|so we would need to get some testers with alpha machines to try it out.
|
|Once there is some testing, we can consider making the change permanent
|for both i386 and alpha.
|
[..]
|
|Once the alpha code is adequately tested, we can pull VM_STACK out
|everywhere.
|

Submitted by: "Richard Seaman, Jr." <dick@tar.com>


# 43482c40 24-Jan-1999 Peter Wemm <peter@FreeBSD.org>

Force the order of the setdefs* so that make -jN doesn't build the
setdefs* multiple times at the same time that it's compiling setdefs[0].c.
I think this was leading to unterminated linker sets etc.


# dcddc353 19-Jan-1999 Peter Wemm <peter@FreeBSD.org>

Hide the gensetdefs run the same way we hide the final ld command.


# f7dd86c1 17-Jan-1999 Peter Wemm <peter@FreeBSD.org>

Use the gensetdefs that is now in /usr/bin, it's a superset of the
one in the kernel source, and that one is already used for modules.

I don't _think_ this will hurt releases, aout-to-elf, etc, but it is
possible. In all the cases I've looked at, config(8) has been
generated straight after a make world, so if /usr/sbin/config exists and
is the right version for the kernel, then we can pretty much count on
/usr/bin/gensetdefs being there too.


# f92bdbd0 09-Jan-1999 John Polstra <jdp@FreeBSD.org>

Switch to using ".So" as the extension for PIC object files rather
than ".so". The old extension conflicted with well-established
naming conventions for dynamically loadable modules.

The "clean" targets continue to remove ".so" files too, to deal with
old systems.


# c30fe42c 06-Jan-1999 Peter Wemm <peter@FreeBSD.org>

Flip the kernel default to ELF.. Add a test to try and warn people
that they might be about to blow their feet off if they have not been
reading their mail. I don't know if or how well this will work, but it's
worth a try.


# 3d89c2cd 21-Dec-1998 Mike Smith <msmith@FreeBSD.org>

Regrettably, you can't take setdef0.c out of order, or, surprise,
linker sets don't work and thus neither does the kernel.

This should stop being a problem with an improved linker set mechanism in
the pipeline (see the bootloader) but for now this has to stay like this.


# 3d2ffe21 20-Dec-1998 Bruce Evans <bde@FreeBSD.org>

Fixed building elf kernels without a `make depend' step. The magic
ordering in rev.1.38 was broken by putting setdef0.o before vnode_if.o
in SYSTEM_OBJS.


# f7c9e34b 07-Dec-1998 Warner Losh <imp@FreeBSD.org>

If there is no .depends file, use the standard ad-hoc way of ensuring
that the generated files are generated before any of the object files.
Also minor cleanup of dependencies in conf/files that I bogusly added
before.

This should fix the requirement that make depend be done starting from
a clean config directory. If you don't have a clean directory, make
depend is still required if you want the proper .o's to be recompiled.

Reviewed by: bde


# 2f2dcad4 15-Nov-1998 Doug Rabson <dfr@FreeBSD.org>

* Change 'struct resource' to 'struct config_resource'.
* Bump config version.


# 3187d896 04-Nov-1998 Peter Wemm <peter@FreeBSD.org>

Make a.out kernels kld compatable by default...


# 4af4007d 23-Oct-1998 Bruce Evans <bde@FreeBSD.org>

Ignore `vector xxxintr' specifications except for checking their syntax.
Interrupt handlers are now configured in drivers.

Didn't update config/SMM.doc. It doesn't have any i386 examples (not
even `isa').

Bumped CONFIGVERS. This is not necessary for -current yet, but using
the new config with old system sources gives null pointers for all
vectors.


# b24d73e1 09-Oct-1998 Peter Wemm <peter@FreeBSD.org>

rm *.so and *.ko in clean as well.


# 6b7a14ce 29-Sep-1998 Peter Wemm <peter@FreeBSD.org>

Make the ELF kernel build produce a dynamic executable (!). This enables
the in-kernel linker to access the _DYNAMIC data for doing loadable elf
modules. The alpha kernel is already done this way, I've borrowed some of
the hacks from there.

This is primarily aimed at the 3-stage boot process which is intended to
be able to do pre-loading of kernel modules.

Note that the entry point isn't 0xf0100000 any more, it'll be a little
further on - but this value is stored in the headers. I don't think this
will be a problem, but I'm sure somebody will tell me if it is. :-)

I'm not sure if btxboot is going to like this, it doesn't do proper ELF
header checking and assumes that there are exactly two program header
entries and that they are both PT_LOAD entries - a bad assumption.


# 5b036e2b 21-Sep-1998 Bruce Evans <bde@FreeBSD.org>

Fixed missing dependencies of genassym.o, gensetdefs.o and vers.o
on opt_global.h. This actually matters for genassym.o (it depends
on at least SMP).

Don't undefine KERNEL for compiling genassym.c. genassym.o really
depends on KERNEL, and the prototype mismatches that required
undefining KERNEL in rev.1.49 no longer exist.

Compile gensetdefs* with the same flags as genassym*. External
`gen' programs such linux_genassym should also use these flags
(${GEN_CFLAGS}).

Fixed missing dependency generation for gensetdefs.o. C sources
for external `gen' programs should be added to GEN_CFILES to get
their dependencies generated.

Cleaned up flags definitions and use. All of ${CFLAGS} is now
passed to mkdep and the assembler (both are actually variants of
${CC} and will ignore the irrelevant flags).


# 79dadba2 15-Sep-1998 Justin T. Gibbs <gibbs@FreeBSD.org>

Bump config version.


# ac80870e 14-Sep-1998 Jordan K. Hubbard <jkh@FreeBSD.org>

Decouple genassym flags from CFLAGS.
Submitted by: jhay


# 8afa373c 03-Sep-1998 Nicolas Souchu <nsouch@FreeBSD.org>

Reviewed by: Doug Rabson
Submitted by: nsouch
Adding I2C and SMB entries to LINT, CONFIGVERS modified in Makefile.i386


# c155091c 31-Aug-1998 John Birrell <jb@FreeBSD.org>

Change BINFORMAT to KERNFORMAT and add -aout or -elf to the tool
arguments as appropriate. This is necessary because setting OBJFORMAT=aout
in the makefile doesn't get exported to the environment. I wish our
make could do that!


# 0cdd2a27 31-Aug-1998 John Birrell <jb@FreeBSD.org>

Force OBJFORMAT=aout.


# 9478de47 24-Aug-1998 Bruce Evans <bde@FreeBSD.org>

Use a relative path to bsd.kern.mk if the relative mk directory exists.


# a872b9bd 12-Jul-1998 Bruce Evans <bde@FreeBSD.org>

Removed historical dependencies on `Makefile'. They had rotted to being
mostly for objects that have the fewest dependencies on `Makefile'
(since they were mostly for utilities and objects generated from *.s
and these don't depend on profiling flags).

Give an explicit rule for building vnode_if.o. This fixes building
it without ${PROF}.

Use .ORDER instead of a stamp file to avoid building vnode_if.[ch]
concurrently.

Removed explicit dependencies that will be generated by `make' (.c.o)
or will be generated by mkdep.

Added missing dependencies of special objects on opt_global.h.

Use ${NORMAL_C} instead of special rules for special objects where
possible.

FIxed dependencies of vers.o.


# 784c3c34 12-Jul-1998 Bruce Evans <bde@FreeBSD.org>

Removed all traces of PARAM in Makefile.i386. Incremented CONFIGVERS
to reflect the dependency of Makefile.i386 on nothing being put in
PARAM.

Config versioning is too closely coupled with the Makefile.i386.


# 1fcddf2e 24-Jun-1998 Eivind Eklund <eivind@FreeBSD.org>

Fix race condition for creation of vnode_if.c and vnode_if.h.

Exact problem pointed out by: Cyrus Rahman <cr@jcmax.com>


# afafca8b 17-Jun-1998 Bruce Evans <bde@FreeBSD.org>

Don't generate declarations for isa device structs in "ioconf.h".

Don't generate declarations for isa interrupt handlers at all.
Isa interrupt handlers are now declared in <i386/isa/isa_device.h>
but should be converted take a `void *' arg and staticized as
soon as possible.

Updated CONFIGVERS. New configs are very incompatible with
previous versions.


# 3933c622 21-May-1998 Eivind Eklund <eivind@FreeBSD.org>

Move __FreeBSD_version from src/sys/conf/newvers.sh to
src/sys/sys/param.h, to facilitate access from the kernel. This make
it possible to do outside kernel development and have it actually work
properly.


# 94610ec4 20-May-1998 Eivind Eklund <eivind@FreeBSD.org>

Back out previous commit - it breaks when called from 'buildworld' :-(
(Damn, I wanted that in the -snap).


# a5eed7b8 20-May-1998 Eivind Eklund <eivind@FreeBSD.org>

Move __FreeBSD_version into <sys/param.h> (with automated duplication
to <osreldate.h>). This allow kernel drivers access to it.

Approved by: -current


# 3f6c4fc3 29-Apr-1998 Warner Losh <imp@FreeBSD.org>

Use ${.TARGET} rather than $@. i386 tested, pc98 untested because config
on my box doesn't grok machine type pc98.
PR: 3272
Submitted by: jhs


# 8b78465c 17-Apr-1998 Dima Ruban <dima@FreeBSD.org>

Undo my last change.


# d3b8e367 15-Apr-1998 Dima Ruban <dima@FreeBSD.org>

Use 0440 root.kmem kermissions on kernel instead of
0555 root.wheel.

Reviewed by: freebsd-security


# c6b60f62 30-Jan-1998 Eivind Eklund <eivind@FreeBSD.org>

Add support for cleandepend, ${DESTDIR}, and there not being a file named
${DESTDIR}/kernel.


# 8cd077a7 18-Dec-1997 Bruce Evans <bde@FreeBSD.org>

Augment $PATH to ensure searching of /sbin and /usr/sbin for sysctl
instead of using an absolute path to sysctl.
Problem reported by: ache


# 41631559 05-Nov-1997 Mike Smith <msmith@FreeBSD.org>

Bump configvers to 300003 to account for the crd->card (and related)
namespace changes.


# 03486e0a 03-Nov-1997 Guido van Rooij <guido@FreeBSD.org>

Test if kvm_kernel.db exists before moving it. Otherwise installing
a kernel, booting single user and reinstalling a kernel fails.


# 48b29459 21-Oct-1997 Peter Wemm <peter@FreeBSD.org>

Put in an initial %VERSREQ field. This will cause existing config(8)'s
to give a non-fatal warning about unknown directives, so there is no
hurry to rebuild config(8) yet, apart from shutting up the warning.


# 98823b23 10-Oct-1997 Peter Wemm <peter@FreeBSD.org>

Convert the VM86 option from a global option to an option only depended
on by the files that use it. Changing the VM86 option now only causes
a recompile of a dozen files or so rather than the entire kernel.


# 38d8a113 25-Jul-1997 Poul-Henning Kamp <phk@FreeBSD.org>

Add option for compiling in a 8x16 font.


# 1013a13d 29-Jun-1997 Bruce Evans <bde@FreeBSD.org>

Fixed the fix for not using -fomit-frame-pointer with -pg. The previous
fix stopped it being used in all cases, because substitution on unset
variables does not work.

When profiling, put -malign-functions=4 in CFLAGS instead of in PROF.
This fixes the histogram counts for profiling support functions. It
gives bogus but harmless extra alignment for genassym etc.


# d8897edc 31-May-1997 Peter Wemm <peter@FreeBSD.org>

Revert previous change, use "compile-with" in files.i386 instead.


# 752bbf7a 31-May-1997 Peter Wemm <peter@FreeBSD.org>

compile ipl_funcs.c with -fomit-frame-pointer, as suggested by Bruce. This
cuts the cost of a function call instead of an inline.


# 61b00529 21-May-1997 John Polstra <jdp@FreeBSD.org>

This commit affects ELF kernels only.

Remove "setdefs.h" and arrange to generate it automatically at
ELF kernel build time.

"gensetdefs.c" is a utility which scans a set of ELF object files
and outputs a line ``DEFINE_SET(name, length);'' for each linker
set that it finds. When generating an ELF kernel, this is run just
before the final link to generate "setdefs.h".

Remove the init_sets() function from "setdef0.c", and its call from
"machdep.c". Since "gensetdefs.c" calculates the length of each
set, it is no longer necessary in an ELF kernel to count the set
elements at kernel initialization time. Also remove "set_of_sets"
which was used for this purpose.

Link "setdef0" and "setdef1" into the kernel only if building for
ELF. Since init_sets() is no longer used, there is no need to link
them into an a.out kernel.


# cea6c86c 07-May-1997 Doug Rabson <dfr@FreeBSD.org>

This is the kernel linker. To use it, you will first need to apply
the patches in freefall:/home/dfr/ld.diffs to your ld sources and set
BINFORMAT to aoutkld when linking the kernel.

Library changes and userland utilities will appear in a later commit.


# d061973c 27-Apr-1997 Peter Wemm <peter@FreeBSD.org>

Create a special option file "opt_global.h" which is included by all
source files via a 'cc -include opt_global.h ...' type arrangement.
This means we can untangle certain header files.

options.i386 has a placeholder until it has a real member so we can avoid
having to teach config about it just yet.

Reviewed by: bde


# 9081eec1 22-Apr-1997 John Polstra <jdp@FreeBSD.org>

Make the necessary changes so that an ELF kernel can be built. I
have successfully built, booted, and run a number of different ELF
kernel configurations, including GENERIC. LINT also builds and
links cleanly, though I have not tried to boot it.

The impact on developers is virtually nil, except for two things.
All linker sets that might possibly be present in the kernel must be
listed in "sys/i386/i386/setdefs.h". And all C symbols that are
also referenced from assembly language code must be listed in
"sys/i386/include/asnames.h". It so happens that failure to do
these things will have no impact on the a.out kernel. But it will
break the build of the ELF kernel.

The ELF bootloader works, but it is not ready to commit quite yet.


# 6875d254 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# c08d58ea 12-Dec-1996 Bruce Evans <bde@FreeBSD.org>

Moved nonstandard compiler profiling options out of config. Just print
the profiling level in config and decide what to do in makefiles.

Makefile.i386:
Align functions to 16-byte boundaries if profiling is enabled. This
will allow a fourfold reduction in the size of the profiling buffers.


# f5227a83 06-Nov-1996 Bruce Evans <bde@FreeBSD.org>

Compile genassym without -static (undo rev.1.20). The default can be
depended on now, and linux_genassym has depended on it for a long time.


# 9e72552f 08-Oct-1996 Bruce Evans <bde@FreeBSD.org>

Centralized the definition of CWARNFLAGS into bsd.kern.mk.


# e2e0d560 27-Sep-1996 Bruce Evans <bde@FreeBSD.org>

Added -I- to ${INCLUDES}. This makes 4.4Lite's (mis?)use of "foo.h"
for headers in the compile directory work unsurprisingly. Without
-I-, the search for "foo.h" begins in the directory of the file
that includes it, and the compile directory is only searched because
`-I.' is in ${INCLUDES}.

Removed -I$S/sys from ${INCLUDES}. It was once necessary to find
things like "param.h" in $S/sys. Now <sys/param.h> is found in $S.


# 09a8dfa2 31-Aug-1996 Bruce Evans <bde@FreeBSD.org>

Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'. Warn about this in future.


# d17e5f0b 21-Aug-1996 Andrey A. Chernov <ache@FreeBSD.org>

Add /usr/sbin to sysctl because /usr/sbin not in standard path


# a01e62f0 11-Jun-1996 Gary Palmer <gpalmer@FreeBSD.org>

Add -Wunused to try and catch any future offenders

Reviewed by: bde


# 43b74d61 08-Jun-1996 Jordan K. Hubbard <jkh@FreeBSD.org>

Bring back the `config file in the kernel' feature from the 1.x days. This
is conditionalized by the INCLUDE_CONFIG_FILE option in your kernel config
file and is not turned on by default.

Submitted-By: Bill Pechter <pechter@shell.monmouth.com>


# fd54183b 30-May-1996 Peter Wemm <peter@FreeBSD.org>

Instead of: cpp blah file.s | as -o file.o, use instead:
cc -c -x assembler-with-cpp -o file.o file.s.

This means that any cpp fatal errors will now be detected, as well as
running *.s files through an ansi cpp instead of a traditional cpp.

(fixes to allow *.s to compile under both ansi and traditional to follow)


# 9fb93307 07-May-1996 Wolfram Schneider <wosch@FreeBSD.org>

``mv'' -> ``mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root


# 1c393ef6 02-May-1996 Joerg Wunsch <joerg@FreeBSD.org>

Replace the dependency of `install' from `kernel' by a test for the
existance fo `kernel'.

Submitted by: peter


# e911eafc 02-May-1996 Poul-Henning Kamp <phk@FreeBSD.org>

removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
NPDEPG

Major macro cleanup.


# d5d76482 27-Apr-1996 Joerg Wunsch <joerg@FreeBSD.org>

Make `install' depend on `kernel'. Some idiot tried to install a
non-built kernel and complained in Usenet... :-)


# 6386a7e0 30-Mar-1996 Peter Wemm <peter@FreeBSD.org>

When doing a 'make depend', dont blow away the existing .depend until
the generation of a new one is complete.


# 1d4bbd7d 29-Mar-1996 Bruce Evans <bde@FreeBSD.org>

Added necessary quotes (${CPP} might have spaces in it). Removed
unnecessary quotes.


# d66a5066 02-Mar-1996 Peter Wemm <peter@FreeBSD.org>

Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)

I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.

The main changes:

COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".

A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.

linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.

Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.

The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.

Supporting changes elsewhere in the kernel:

The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.

The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.

makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)

At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.


# 0f7183ad 07-Jan-1996 Peter Wemm <peter@FreeBSD.org>

Also move /var/db/kvm_kernel.db to /var/db/kvm_kernel.old.db IF we change
sysctl kern.bootfile - since libkvm expects it there.


# 3b3f55c7 07-Jan-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Only change the sysctl variable if it presently points to /kernel.


# b6794438 05-Jan-1996 Garrett Wollman <wollman@FreeBSD.org>

Delete a couple of unnecessary dependencies on Makefile.


# 62394a63 26-Dec-1995 Bruce Evans <bde@FreeBSD.org>

Removed almost all traces of libkern.a. The objects that were in
libkern.a are now specified by listing their source files in
files.${MACHINE}. The list is machine-dependent to save space.
All the necessary object for each machine must be linked into the
kernel in case an lkm wants one.


# a5db65d3 15-Dec-1995 Bruce Evans <bde@FreeBSD.org>

Added `-Wstrict-prototypes -Wmissing-prototypes' to CWARNFLAGS so that
prototypes don't go missing again. Also added -Winline so that some
doubtful (non-)inlines get fixed.

bsd.kmod.mk:
Also added `-Wreturn-type -Wimplicit -Wnested-externs' to catch up
with the kernel.


# 82faa987 19-Nov-1995 David Greenman <dg@FreeBSD.org>

i386 is defined by the compiler, so don't define it here. LOAD_ADDRESS
is only used in the Makefile, so don't define it in CFLAGS.


# 30a4b938 01-Nov-1995 Peter Wemm <peter@FreeBSD.org>

Add a DRIVER_S= definition that config wants to use for assembler
source. This was copied from NORMAL_S..


# 026d3dc8 30-Oct-1995 Guido van Rooij <guido@FreeBSD.org>

When moving kernel to kernel.old, also change kern.bootfile.to
kernel.old. This is a solution for only the first install
on a running system, but it's better than it is now.


# c91d636e 29-Oct-1995 David Greenman <dg@FreeBSD.org>

Use the new config(8) %SFILES token to auto-generate the SFILES list.

Note: THIS REQUIRES THAT YOU REBUILD CONFIG(8)!!!


# 8c13738f 16-Aug-1995 Bruce Evans <bde@FreeBSD.org>

Make everything except the unsupported network sources compile cleanly
with -Wnested-extern.


# 5542b158 22-Jul-1995 Bruce Evans <bde@FreeBSD.org>

Fix clean rule to remove remove everything that isn't created by config
except .depend and `version'.


# 9b2e5354 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 1d86aba6 11-May-1995 Garrett Wollman <wollman@FreeBSD.org>

Make `make links' work by leaving swapkernel.c off out of the links processing
(it is never generic).


# 070e3ec1 04-Apr-1995 Nate Williams <nate@FreeBSD.org>

Modify behavior of INCLUDES to never look in /usr/include unless we
can't find the src/include directory.

Reviewed by: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
Submitted by: Mike Pritchard <pritc003@maroon.tc.umn.edu>


# 146e7166 02-Apr-1995 Nate Williams <nate@FreeBSD.org>

Added -I/usrinclude to the tail end of the INCLUDES line. This hack
will cause kernel compiles to work even if the src/includes directory
doesn't exist but still do the 'Right Thing' and pull files from the
source tree if it does exist.

Reviewed by: Bruce Evans


# ce7c8b00 28-Mar-1995 Bruce Evans <bde@FreeBSD.org>

CVS:

Enable -Wimplicit again.
bash: /src/z1: No such file or directory


# 8e4150e9 25-Mar-1995 Bruce Evans <bde@FreeBSD.org>

Reviewed by:
Submitted by:
Obtained from:

Disable previous change. I missed a lot of implicit declarations.


# feae7fb7 25-Mar-1995 Bruce Evans <bde@FreeBSD.org>

Add -Wimplicit to ${CWARNFLAGS} so that implicitly declared functions
don't come back. There are still a few for unsupported network protocols.


# 403ef252 03-Mar-1995 David Greenman <dg@FreeBSD.org>

Removed obsolete vtrace() remnants.


# 0bf316f5 01-Mar-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Fix "dependency" spelling error. Implement "clean" entries for device
config entries. Add clean rules to aic7xxx and aic7xxx_seq.h.

Submitted by: Pointed out by Bruce Evans <bde@zeta.org.au>


# c5489d90 25-Feb-1995 Bruce Evans <bde@FreeBSD.org>

Use relative include path and -nostdinc avoid getting anything from
/usr/include.


# 50bd4cab 29-Jan-1995 Poul-Henning Kamp <phk@FreeBSD.org>

Pass '-m' to symorder. Kernels without INET will fail otherwise.


# b5d89ca8 25-Jan-1995 Bruce Evans <bde@FreeBSD.org>

Load the kernel symbol table in the boot loader and not at compile time.
(Boot with the -D flag if you want symbols.)

Make it easier to extend `struct bootinfo' without losing either forwards
or backwards compatibility.

ddb_aout.c:
Get the symbol table from wherever the loader put it.
Nuke db_symtab[SYMTAB_SPACE].

boot.c:
Enable loading of symbols. Align them on a page boundary. Add printfs
about the symbol table sizes.
Pass the memory sizes to the kernel.
Fix initialization of `unit' (it got moved out of the loop).
Fix adding the bss size (it got moved inside an ifdef).
Initialize serial port when RB_SERIAL is toggled on.
Fix comments.
Clean up formatting of recently added code.

io.c:
Clean up formatting of recently added code.

netboot/main.c, machdep.c, wd.c:
Change names of bootinfo fields.

LINT:
Nuke SYMTAB_SPACE.
Fix comment about DODUMP.

Makefile.i386:
Nuke use of dbsym.
Exclude gcc symbols from kernel unless compiling with -g.
Remove unused macro.
Fix comments and formatting.

genassym.c:
Generate defines for some new bootinfo fields. Change names of old ones.

locore.s:
Copy only the valid part of the `struct bootinfo' passed by the loader.
Reserve space for symbol table, if any.

machdep.c:
Check the memory sizes passed by the loader, if any. Don't use them yet.

bootinfo.h:
Add a size field so that we can resolve some mismatches between the loader
bootinfo and the kernel boot info. The version number is not so good for
this because of historical botches and because it's harder to maintain.
Add memory size and symbol table fields. Change the names of everything.

Hacks to save a few bytes:

asm.S, boot.c, boot2.S:
Replace `ouraddr' by `(BOOTSEG << 4)'.

boot.c:
Don't statically initialize `loadflags' to 0. Disable the "REDUNDANT"
code that skips the BIOS variables. Eliminate `total'. Combine some
more printfs.

boot.h, disk.c, io.c, table.c:
Move all statically initialzed data to table.c.

io.c:
Don't put the A20 gate bits in a variable.


# 58e4304e 31-Dec-1994 Justin T. Gibbs <gibbs@FreeBSD.org>

Handle the aic7770 driver's dependancies correctly.

YOU MUST REBUILD CONFIG.


# 150f9c68 27-Nov-1994 David Greenman <dg@FreeBSD.org>

Go back to -O optimization...Bruce's arguments against -O2 are convincing
enough for me.


# 63281ad7 24-Nov-1994 David Greenman <dg@FreeBSD.org>

Changed optimization level to -O2.


# d0c8f505 15-Nov-1994 Bruce Evans <bde@FreeBSD.org>

Don't define KERNEL for compiling genassym. The prototype for the system
printf() is inconsistent with the prototype for the library printf() and
gets declared if DIAGNOSTIC is defined because <vm/vm_page.h> includes
<sys/systm.h>.


# 40974c74 25-Oct-1994 Bruce Evans <bde@FreeBSD.org>

Never strip the kernel.

Recommend -Wimplicit in CWARNFLAGS next. There are still a few hundred
potential arg mismatches because no function declaration is in scope.

Don't duplicate option `-I.'.

Remove null editing of the assembler source for all profiled objects.
The required magic has been done since prehistoric times by an
asm("mcount") declaration.

Simplify the clean rule.

Don't try to be clever about timestamps involving genassym. genassym's
timestamp usually got ahead of assym.s's timestamp, so `make' almost
always had to run genassym and compare *assym.s to decide that nothing
needed to be done. The cost is reassembling a few files whenever
genassym is rebuilt. Assembling is almost as fast as comparing.

Always go through genassym.o to build genassym. This would have avoided
numerous bugs involving mkdep -p. Now it just stops genassym from
depending on the name of the temporary object file.

Use ${CFLAGS} for building genassym. Mainly ${CWARNFLAGS} were missing.


# 6a8d6623 20-Oct-1994 Garrett Wollman <wollman@FreeBSD.org>

LINT: vastly restructured so that it's actually useful for something
Makefile.i386: make definition of STRIP unconditional.


# 2a07a4c9 18-Oct-1994 Garrett Wollman <wollman@FreeBSD.org>

Conditionally define CC, CWARNOPTS, etc., so that `makeoptions' in
config files actually does something useful.


# def3ff8d 03-Oct-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

Put genassym: back how it was originally, the real bug was in mkdep.


# cabc837c 03-Oct-1994 Poul-Henning Kamp <phk@FreeBSD.org>

dependency for genassym was wrong, there is never made a genassym.o file.
made i depend on the src.


# 07049f23 02-Oct-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

genassym: depends on Makefile and genassym.o, genassym.o dependicies are
picked up from .depend.


# 0ff3ad4e 02-Oct-1994 Poul-Henning Kamp <phk@FreeBSD.org>

In case CWARNFLAGS and COPTFLAGS are already defined (from /etc/make.conf
for instance), don't nuke them.


# 470d929e 01-Oct-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

genassym: depends on the source code too.


# 22414e53 30-Sep-1994 David Greenman <dg@FreeBSD.org>

Laptop Advanced Power Management support by HOSOKAWA Tatsumi.

Submitted by: HOSOKAWA Tatsumi


# 27476ec8 29-Sep-1994 Geoff Rehmet <csgr@FreeBSD.org>

Do strip -x of kernel
Obtained from:1.1.5.1


# 905d9e84 23-Sep-1994 Poul-Henning Kamp <phk@FreeBSD.org>

Fixed the problem where "make depend" was mandatory for building kernel.
moved vnode_if.o up before ${OBJS} in the SYSTEM_OBJS list.


# 12cada71 16-Sep-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Add SYSV shm stuff back to LINT.
chflags noschg /kernel in Makefile.i386 so if our previous kernel
was installed by make install, the second won't fall over.


# 6bf5b247 09-Sep-1994 Garrett Wollman <wollman@FreeBSD.org>

Don't include options MULTICAST or MROUTING in generic kernels. MULTICAST
has no effect now, and MROUTING should never be defined by default.
(Eventually the code should be dynamically loadable.)

Also, allow for Pentium CPUs in GENERICBT kernels.

Add an `install' rule to Makefile.i386, which looks like this:
mv /kernel /kernel.old
install -c -m 555 -o root -g root -fschg kernel /
I'd like comments on whether or not you think it's a good idea to have
the kernel be immutable by default; I'm happy either way.
CVS:


# 7d5a70fc 05-Sep-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Get rid of a superfluous echo.
Submitted by: jkh


# 82e08a73 05-Sep-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Remove symlink before remaking it for libkern.a
Reviewed by: jkh
Submitted by: dima


# 86a8648e 02-Sep-1994 Bruce Evans <bde@FreeBSD.org>

Restore some explicit dependencies for locore.s so that "make clean; make"
works even if .depend doesn't exist.


# 0611064b 30-Aug-1994 Bruce Evans <bde@FreeBSD.org>

Remove exception.o, swtch.o, support.o, conf.o and machdep.o from
SYSTEM_OBS. They are now normal objects.

Remove stale dependencies for the above now-normal objects and for
locore.o and generate dependencies using mkdep. Config doesn't
generate lists of assembler source files so the lists to be mkdep'ed
have to be given explictly. Only the standard *.s files are given,
so the dependencies for gnu/fpemul/*.s are incomplete. *.S files
would be handled right if config put them in CFILES.

Don't define NPX. It was replaced by NNPX > 0 years ago.

Define LOAD_ADDRESS in COPTS so that compiling machdep.c isn't a special
case.

Moving around the dependencies exposed a bug in make. It doesn't
know that assym.s and ./assym.s are the same. Add a rule tell it.


# d42826b4 23-Aug-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

I was in bourne-shell mode when I wrote this.. *blush*.
Submitted by: jkh


# 84fb67c9 22-Aug-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Fix the libkern references to hopefully DTRT. See comments regarding
a slight change in how profiled version is selected - may need to adjust
some .mk macros if PROF is foolishly initialized anywhere to a null value.
Submitted by: jkh


# f23b4c91 18-Aug-1994 Garrett Wollman <wollman@FreeBSD.org>

Fix up some sloppy coding practices:

- Delete redundant declarations.
- Add -Wredundant-declarations to Makefile.i386 so they don't come back.
- Delete sloppy COMMON-style declarations of uninitialized data in
header files.
- Add a few prototypes.
- Clean up warnings resulting from the above.

NB: ioconf.c will still generate a redundant-declaration warning, which
is unavoidable unless somebody volunteers to make `config' smarter.


# f540b106 12-Aug-1994 Garrett Wollman <wollman@FreeBSD.org>

Change all #includes to follow the current Berkeley style. Some of these
``changes'' are actually not changes at all, but CVS sometimes has trouble
telling the difference.

This also includes support for second-directory compiles. This is not
quite complete yet, as `config' doesn't yet do the right thing. You can
still make it work trivially, however, by doing the following:

rm /sys/compile
mkdir /usr/obj/sys/compile
ln -s M-. /sys/compile
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
ln -s /sys @
rm machine
ln -s @/i386/include machine
make depend
make


# 539d9ba0 06-Aug-1994 David Greenman <dg@FreeBSD.org>

Don't strip the kernel.


# c7cb9b96 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

SYSCONS is no longer needed since pccons has been removed.

Update the GENERIC* to have the new file system options and the new kernel
name.

Fix the clean target in Makefile.i386 to rm kernel instead of 386bsd.


# 26f9a767 25-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman


# d2306226 02-Apr-1994 David Greenman <dg@FreeBSD.org>

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.


# 16a6a708 21-Mar-1994 Andreas Schulz <ats@FreeBSD.org>

Makefile.i386:
put vers.o at the end of the loader line. We are simply jumping in the
moment into the first location of the text segment in 386bsd. So the
linking order is very important :-). With the addition of the const
types in newvers.sh we jumped into them. I have experimented with an
entry point specification, but was unsuccessfull. Someone else should
look at this.
devices.i386:
files.i386:
Added entries for a Sony cdrom driver.


# dbd8393f 16-Feb-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

I don't want to read about all the people that forgot this due to syscons
changes, so I am adding it here until AFTER the 1.1 release:
+ COPTFLAGS+=-D__FreeBSD__


# 8d5a4c1f 13-Feb-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Use -Z instead of -z to build kernels. This is consistent with NetBSD's
usage of the -[Zz] flags (we're now in sync). Part of the ld update
changes.


# f657493c 27-Jan-1994 Nate Williams <nate@FreeBSD.org>

Added -static declartion to genassym compile so a kernel doesn't require
working shlibs.


# 7f8cb368 14-Jan-1994 David Greenman <dg@FreeBSD.org>

"New" VM system from John Dyson & myself. For a run-down of the
major changes, see the log of any effected file in the sys/vm
directory (swap_pager.c for instance).


# aaf08d94 18-Dec-1993 Garrett Wollman <wollman@FreeBSD.org>

Make everything compile with -Wtraditional. Make it easier to distribute
a binary link-kit. Make all non-optional options (pagers, procfs) standard,
and update LINT to reflect new symtab requirements.

NB: -Wtraditional will henceforth be forgotten. This editing pass was
primarily intended to detect any constructions where the old code might
have been relying on traditional C semantics or syntax. These were all
fixed, and the result of fixing some of them means that -Wall is now a
realistic possibility within a few weeks.


# 6d01f02e 11-Dec-1993 David Greenman <dg@FreeBSD.org>

1) Added proc file system from Paul Kranenburg with changes from
John Dyson to make it reliably work under FreeBSD.
2) Added and enabled PROCFS in the GENERICxx and LINT kernels.
3) New execve() from me. Still work to be done here, but this version
works well and is needed before other changes can be made. For
a description of the design behind this, see freebsd-arch or
ask me.
4) Rewrote stack fault code; made user stack VM grow as needed rather
than all up front; improves performance a little and reduces
process memory requirements.
5) Incorporated fix from Gene Stark to fault/wire a user page table
page to fix a problem in copyout. This is a temporary fix and
is not appropriate for pageable page tables. For a description
of the problem, see Gene's post to the freebsd-hackers mailing
list.
6) Tighten up vm_page struct to reduce memory requirements for it. ifdef
pager page lock code as it's not being used currently.
7) Introduced new element to vmspace struct - vm_minsaddr; initial
(minimum) stack address. Compliment to vm_maxsaddr.
8) Added a panic if the allocation for process u-pages fails.
9) Improve performance and accuracy of kernel profiling by putting in
a little inline assembly instead of spl().
10) Made serial console with sio driver work. Still has problems with
serial input, but is almost useable.
11) Added -Bstatic to SYSTEM_LD in Makefile.i386 so that kernels will
build properly with the new ld.


# 381fe1aa 24-Nov-1993 Garrett Wollman <wollman@FreeBSD.org>

Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and
add same (sans -Werror) to Makefile for future compilations.


# cf0f1d20 15-Nov-1993 Paul Richards <paul@FreeBSD.org>

Changed -Z back to -z.

In line with all other ld's -z is now the "standard" ZMAGIC format.


# f4165dc3 15-Nov-1993 Paul Richards <paul@FreeBSD.org>

Changed -z to -Z so we create old-style ZMAGIC kernels.


# 0967373e 12-Nov-1993 David Greenman <dg@FreeBSD.org>

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.


# 02425318 07-Nov-1993 Garrett Wollman <wollman@FreeBSD.org>

Try to be a little smarter about touching the date on assym.s, so that
if something changes which doesn't affect it, locore doesn't have to get
rebuilt. This is at the cost of a genassym and a cmp in every compile,
until someone can figure out how to make `make' smarter itself.


# 70176e63 06-Nov-1993 Garrett Wollman <wollman@FreeBSD.org>

Added CWARNFLAGS and COPTFLAGS defines to Makefile so that we can easily
test various warning and optimization compiler flags without modifying the
Makefile. (From my patch set.)


# 85c856e7 23-Oct-1993 Nate Williams <nate@FreeBSD.org>

Removed un-necessary dependencies for assym.s


# b0da3347 23-Oct-1993 Nate Williams <nate@FreeBSD.org>

Reverted back to older version of ./genassym, instead of ./genassym.o
since make depend wasn't picking up any new dependencies. However, due
to a bug in the old code, the original dependencies weren't being used, so
this version is better than the original and the lastest version.
(And is more readable as well)


# 9a91485c 14-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove machdep.c from files.i386 and put machdep.o in the SYSTEM_OBJS
line of Makefile.i386. Fixes the extra rule that gmake complains about
for machdep.o. This fix is from Joans 0lsson.

Rework the depends and rules for assym.s and genassym so that we now use
the .depend rule for genassym.o such that if you change any header files
that are included by genassym.c the right things happen. This is probably
what has caused more bad kernel builds than any other thing in the
Makefile.i386!


# f87a3269 08-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

>From NetBSD
Change the cpu "i386" line to 2 lines:
cpu "I386_CPU"
cpu "I486_CPU"
This is so we can do real CPU classification of code.

Fix missing depend for assym.s which does depend on genassym.c


# dd06619c 06-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

From ljo:

machdep.o is a defined to be a target in 2 places. This was caused by
the addition of the LOAD_ADDRESS stuff. Removed the extranious target
of machdep.o.


# 2d717e4a 26-Sep-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

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
----------------------------


# a62a649d 21-Aug-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Added Id: string


# a08d4ed3 09-Aug-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Finish removal of reminents of as.c Adaptec scsi driver.


# 4ff3cd9d 04-Aug-1993 Nate Williams <nate@FreeBSD.org>

Fix the problem where newvers gets called every time make is run on
the kernel.


# 5b81b6b3 12-Jun-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Initial import, 0.1 + pk 0.2.4-B1