History log of /freebsd-10-stable/sys/conf/Makefile.i386
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 250840 21-May-2013 marcel

Add basic support for FDT to i386 & amd64. This change includes:
1. Common headers for fdt.h and ofw_machdep.h under x86/include
with indirections under i386/include and amd64/include.
2. New modinfo for loader provided FDT blob.
3. Common x86_init_fdt() called from hammer_time() on amd64 and
init386() on i386.
4. Split-off FDT specific low-level console functions from FDT
bus methods for the uart(4) driver. The low-level console
logic has been moved to uart_cpu_fdt.c and is used for arm,
mips & powerpc only. The FDT bus methods are shared across
all architectures.
5. Add dev/fdt/fdt_x86.c to hold the fdt_fixup_table[] and the
fdt_pic_table[] arrays. Both are empty right now.

FDT addresses are I/O ports on x86. Since the core FDT code does
not handle different address spaces, adding support for both I/O
ports and memory addresses requires some thought and discussion.
It may be better to use a compile-time option that controls this.

Obtained from: Juniper Networks, Inc.


# 232263 28-Feb-2012 dim

Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang (disables -Werror)
- NO_WCAST_ALIGN.clang (disables -Wcast-align)
- NO_WFORMAT.clang (disables -Wformat and friends)
- CLANG_NO_IAS (disables integrated assembler)
- CLANG_OPT_SMALL (adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf! For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after: 2 weeks


# 218893 20-Feb-2011 dim

Upgrade our copy of llvm/clang to r126079, from upstream's trunk.

This contains many improvements, primarily better C++ support, an
integrated assembler for x86 and support for -pg.


# 169612 16-May-2007 wkoszek

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


# 169515 13-May-2007 wkoszek

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)


# 154975 29-Jan-2006 nyan

Set MACHINE to i386(pc98). This fixes cross-building.


# 152891 28-Nov-2005 imp

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@


# 152862 27-Nov-2005 ru

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


# 152026 04-Nov-2005 imp

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.


# 152018 03-Nov-2005 ru

Implement the "nocpu" directive.

Requested by: rwatson


# 151763 27-Oct-2005 jhb

Bump config(8) version for the DEFAULTS change.


# 145016 13-Apr-2005 imp

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


# 144966 12-Apr-2005 vkashyap

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


# 144510 01-Apr-2005 imp

Update version number for latest config version bump


# 141666 10-Feb-2005 jmg

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

Forgotten by: des


# 134542 30-Aug-2004 peter

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.


# 129075 09-May-2004 cognet

Change required config(8) version.


# 113536 15-Apr-2003 phk

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.


# 111684 28-Feb-2003 ru

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

Submitted by: jake, bde, ru


# 101064 31-Jul-2002 jake

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


# 99923 13-Jul-2002 bde

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.


# 91002 20-Feb-2002 peter

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.


# 89345 14-Jan-2002 nyan

Added 'MACHINE=i386' to MKMODULESENV variable.
This enables to make modules for PC/AT on PC-98 boxes.

MFC after: 3 weeks


# 87860 14-Dec-2001 peter

Proper fix for old config setting maxusers to 8.


# 86275 11-Nov-2001 imp

Move include of kern.post.mk to the last line of the file.

# Forced commit, last commit message was bogus


# 86273 11-Nov-2001 imp

s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharing


# 85909 02-Nov-2001 imp

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@


# 85797 01-Nov-2001 brian

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.


# 85570 26-Oct-2001 des

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


# 85532 26-Oct-2001 ru

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


# 85198 19-Oct-2001 mp

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

Reminded by: obrien


# 85057 17-Oct-2001 brian

Change kern.bootfile when mv'ing the kernel


# 82393 27-Aug-2001 peter

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


# 81660 14-Aug-2001 peter

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


# 81079 02-Aug-2001 peter

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.


# 81031 02-Aug-2001 sheldonh

When building a debugging kernel with modules, build modules with
debugging support as well. Debugging module support is handled
identically to kernel debugging support, right down to poor
choice of make variable names.


# 80419 26-Jul-2001 peter

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


# 79078 02-Jul-2001 imp

Bump config version.


# 79017 30-Jun-2001 imp

The path in the last commit should have been
src/sys/MACHINE/compile/FOO


# 79014 30-Jun-2001 imp

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


# 78161 13-Jun-2001 peter

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


# 78131 12-Jun-2001 peter

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.


# 77854 07-Jun-2001 jlemon

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


# 77430 29-May-2001 msmith

New files and layout for the ACPI CA 20010518 update.


# 76114 28-Apr-2001 obrien

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.


# 75984 25-Apr-2001 obrien

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@


# 75933 25-Apr-2001 imp

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


# 75082 02-Apr-2001 imp

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.


# 74742 24-Mar-2001 obrien

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


# 74146 12-Mar-2001 kris

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


# 73133 27-Feb-2001 peter

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


# 73018 25-Feb-2001 peter

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)


# 72560 17-Feb-2001 marcel

Revert gensetdefs.pl reversal.


# 72396 12-Feb-2001 obrien

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


# 71751 28-Jan-2001 marcel

Revert previous commit. I messed up my testing.


# 71729 28-Jan-2001 marcel

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


# 71267 19-Jan-2001 jhb

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.


# 71252 19-Jan-2001 peter

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


# 70332 24-Dec-2000 obrien

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.


# 70262 22-Dec-2000 obrien

Use the canonical spelling for the path to sys.


# 70252 21-Dec-2000 obrien

Greatly speed up the module `depend' phase.


# 69784 08-Dec-2000 msmith

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.


# 69135 25-Nov-2000 peter

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


# 68864 17-Nov-2000 obrien

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

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


# 67861 29-Oct-2000 phk

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


# 67762 28-Oct-2000 msmith

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


# 67109 14-Oct-2000 phk

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

Do so for LINT.


# 66601 03-Oct-2000 obrien

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.


# 66600 03-Oct-2000 obrien

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


# 65839 14-Sep-2000 obrien

Install the kernel KLM as "kernel" by default.


# 65561 07-Sep-2000 obrien

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


# 65554 06-Sep-2000 obrien

Remove superfluous `/'s before KODIR.

Acceptability explained by: rgrimes


# 65512 06-Sep-2000 obrien

DESTDIR'ify the device.hints checking code.


# 65511 06-Sep-2000 obrien

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


# 65501 05-Sep-2000 obrien

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


# 65091 25-Aug-2000 peter

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.


# 65089 25-Aug-2000 peter

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.


# 64184 03-Aug-2000 obrien

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


# 64182 03-Aug-2000 sheldonh

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


# 63907 27-Jul-2000 green

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


# 61971 22-Jun-2000 peter

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)


# 61745 17-Jun-2000 obrien

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


# 61744 17-Jun-2000 obrien

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.


# 61723 16-Jun-2000 brian

Fix ``make installkernel''


# 61708 15-Jun-2000 obrien

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

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


# 61640 13-Jun-2000 peter

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


# 61593 12-Jun-2000 peter

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


# 61523 10-Jun-2000 peter

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.


# 61174 02-Jun-2000 bde

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


# 60984 27-May-2000 obrien

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


# 60251 09-May-2000 n_hibma

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.


# 60001 04-May-2000 obrien

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


# 59884 02-May-2000 chuckr

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.


# 59737 29-Apr-2000 peter

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


# 59093 08-Apr-2000 dfr

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


# 59033 05-Apr-2000 dfr

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.


# 58803 29-Mar-2000 peter

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


# 56444 23-Jan-2000 peter

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


# 55669 09-Jan-2000 peter

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.


# 55666 09-Jan-2000 kato

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


# 55636 09-Jan-2000 peter

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.


# 55618 08-Jan-2000 peter

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)


# 55615 08-Jan-2000 peter

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


# 55604 08-Jan-2000 bde

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 "$<".


# 55545 07-Jan-2000 marcel

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


# 55532 07-Jan-2000 peter

Bring the Alpha and x86 Makefiles closer together.


# 55205 29-Dec-1999 peter

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.


# 55128 27-Dec-1999 peter

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


# 55120 26-Dec-1999 bde

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


# 54754 17-Dec-1999 peter

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.


# 54499 12-Dec-1999 peter

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.


# 53595 22-Nov-1999 peter

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.


# 53541 22-Nov-1999 shin

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


# 53368 18-Nov-1999 peter

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.


# 53244 16-Nov-1999 n_hibma

Typo


# 52651 30-Oct-1999 marcel

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.


# 51898 03-Oct-1999 bde

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.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48524 03-Jul-1999 peter

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


# 48440 02-Jul-1999 jkh

Working kernel tags!

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


# 48308 28-Jun-1999 peter

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


# 48300 28-Jun-1999 phk

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


# 48299 28-Jun-1999 phk

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


# 48298 28-Jun-1999 phk

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


# 46842 09-May-1999 peter

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.


# 46822 09-May-1999 peter

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


# 46806 09-May-1999 phk

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.


# 46726 08-May-1999 peter

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.


# 46036 24-Apr-1999 peter

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


# 45821 19-Apr-1999 peter

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.


# 45720 16-Apr-1999 peter

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


# 45703 15-Apr-1999 bde

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.


# 45661 13-Apr-1999 peter

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


# 45579 11-Apr-1999 grog

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.


# 45424 07-Apr-1999 grog

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.


# 44670 11-Mar-1999 dg

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.


# 44367 01-Mar-1999 dt

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


# 43994 14-Feb-1999 des

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


# 43209 26-Jan-1999 julian

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>


# 43174 25-Jan-1999 peter

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.


# 42839 19-Jan-1999 peter

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


# 42771 17-Jan-1999 peter

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.


# 42450 09-Jan-1999 jdp

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.


# 42368 07-Jan-1999 peter

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.


# 41976 21-Dec-1998 msmith

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.


# 41959 20-Dec-1998 bde

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.


# 41592 07-Dec-1998 imp

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


# 41176 15-Nov-1998 dfr

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


# 40907 04-Nov-1998 peter

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


# 40614 23-Oct-1998 bde

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.


# 40161 09-Oct-1998 peter

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


# 39818 30-Sep-1998 peter

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.


# 39537 21-Sep-1998 bde

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


# 39305 15-Sep-1998 gibbs

Bump config version.


# 39169 14-Sep-1998 jkh

Decouple genassym flags from CFLAGS.
Submitted by: jhay


# 38778 03-Sep-1998 nsouch

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


# 38714 31-Aug-1998 jb

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!


# 38680 31-Aug-1998 jb

Force OBJFORMAT=aout.


# 38511 24-Aug-1998 bde

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


# 37581 12-Jul-1998 bde

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.


# 37580 12-Jul-1998 bde

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.


# 37140 24-Jun-1998 eivind

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

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


# 37035 17-Jun-1998 bde

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.


# 36283 21-May-1998 eivind

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.


# 36261 20-May-1998 eivind

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


# 36260 20-May-1998 eivind

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

Approved by: -current


# 35514 29-Apr-1998 imp

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


# 35244 17-Apr-1998 dima

Undo my last change.


# 35212 15-Apr-1998 dima

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

Reviewed by: freebsd-security


# 32924 31-Jan-1998 eivind

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


# 31846 18-Dec-1997 bde

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


# 30977 06-Nov-1997 msmith

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


# 30912 03-Nov-1997 guido

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


# 30640 21-Oct-1997 peter

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.


# 30265 10-Oct-1997 peter

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.


# 27674 25-Jul-1997 phk

Add option for compiling in a 8x16 font.


# 27065 29-Jun-1997 bde

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.


# 26323 31-May-1997 peter

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


# 26307 31-May-1997 peter

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


# 25985 21-May-1997 jdp

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.


# 25537 07-May-1997 dfr

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.


# 25202 27-Apr-1997 peter

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


# 25083 22-Apr-1997 jdp

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.


# 22975 22-Feb-1997 peter

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


# 21673 14-Jan-1997 jkh

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.


# 20395 13-Dec-1996 bde

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.


# 19461 06-Nov-1996 bde

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.


# 18820 08-Oct-1996 bde

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


# 18518 27-Sep-1996 bde

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.


# 17971 31-Aug-1996 bde

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


# 17742 21-Aug-1996 ache

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


# 16323 12-Jun-1996 gpalmer

Add -Wunused to try and catch any future offenders

Reviewed by: bde


# 16239 08-Jun-1996 jkh

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>


# 16028 30-May-1996 peter

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)


# 15679 07-May-1996 wosch

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


# 15558 02-May-1996 joerg

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

Submitted by: peter


# 15543 02-May-1996 phk

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

Major macro cleanup.


# 15412 27-Apr-1996 joerg

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


# 14924 30-Mar-1996 peter

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


# 14915 29-Mar-1996 bde

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


# 14331 02-Mar-1996 peter

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.


# 13330 08-Jan-1996 peter

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.


# 13321 07-Jan-1996 phk

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


# 13259 05-Jan-1996 wollman

Delete a couple of unnecessary dependencies on Makefile.


# 13031 26-Dec-1995 bde

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.


# 12880 15-Dec-1995 bde

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.


# 12400 19-Nov-1995 dg

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.


# 11999 01-Nov-1995 peter

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


# 11945 30-Oct-1995 guido

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.


# 11918 29-Oct-1995 dg

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

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


# 10079 16-Aug-1995 bde

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


# 9647 22-Jul-1995 bde

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


# 8876 30-May-1995 rgrimes

Remove trailing whitespace.


# 8457 11-May-1995 wollman

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


# 7627 05-Apr-1995 nate

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>


# 7604 02-Apr-1995 nate

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


# 7432 28-Mar-1995 bde

CVS:

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


# 7376 25-Mar-1995 bde

Reviewed by:
Submitted by:
Obtained from:

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


# 7367 25-Mar-1995 bde

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


# 6875 04-Mar-1995 dg

Removed obsolete vtrace() remnants.


# 6802 01-Mar-1995 gibbs

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>


# 6733 26-Feb-1995 bde

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


# 6018 29-Jan-1995 phk

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


# 5908 25-Jan-1995 bde

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.


# 5327 31-Dec-1994 gibbs

Handle the aic7770 driver's dependancies correctly.

YOU MUST REBUILD CONFIG.


# 4836 27-Nov-1994 dg

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


# 4795 24-Nov-1994 dg

Changed optimization level to -O2.


# 4508 15-Nov-1994 bde

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


# 3863 25-Oct-1994 bde

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.


# 3743 20-Oct-1994 wollman

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


# 3698 18-Oct-1994 wollman

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


# 3343 03-Oct-1994 rgrimes

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


# 3340 03-Oct-1994 phk

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


# 3320 02-Oct-1994 rgrimes

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


# 3319 02-Oct-1994 phk

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


# 3281 01-Oct-1994 rgrimes

genassym: depends on the source code too.


# 3258 01-Oct-1994 dg

Laptop Advanced Power Management support by HOSOKAWA Tatsumi.

Submitted by: HOSOKAWA Tatsumi


# 3200 29-Sep-1994 csgr

Do strip -x of kernel
Obtained from:1.1.5.1


# 3022 23-Sep-1994 phk

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


# 2823 16-Sep-1994 jkh

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.


# 2627 09-Sep-1994 wollman

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:


# 2515 05-Sep-1994 jkh

Get rid of a superfluous echo.
Submitted by: jkh


# 2514 05-Sep-1994 jkh

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


# 2464 02-Sep-1994 bde

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


# 2408 30-Aug-1994 bde

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.


# 2239 23-Aug-1994 jkh

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


# 2232 23-Aug-1994 jkh

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


# 2112 18-Aug-1994 wollman

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.


# 2056 13-Aug-1994 wollman

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


# 1891 06-Aug-1994 dg

Don't strip the kernel.


# 1569 26-May-1994 rgrimes

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.


# 1549 25-May-1994 rgrimes

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

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


# 1321 02-Apr-1994 dg

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.


# 1293 21-Mar-1994 ats

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.


# 1169 17-Feb-1994 rgrimes

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__


# 1152 13-Feb-1994 jkh

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.


# 1030 27-Jan-1994 nate

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


# 974 14-Jan-1994 dg

"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).


# 879 18-Dec-1993 wollman

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.


# 849 12-Dec-1993 dg

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.


# 798 24-Nov-1993 wollman

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


# 770 15-Nov-1993 paul

Changed -Z back to -z.

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


# 768 15-Nov-1993 paul

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


# 757 13-Nov-1993 dg

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.


# 715 07-Nov-1993 wollman

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.


# 712 07-Nov-1993 wollman

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


# 649 23-Oct-1993 nate

Removed un-necessary dependencies for assym.s


# 648 23-Oct-1993 nate

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)


# 603 14-Oct-1993 rgrimes

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!


# 554 08-Oct-1993 rgrimes

>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


# 544 06-Oct-1993 rgrimes

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.


# 509 26-Sep-1993 rgrimes

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


# 315 21-Aug-1993 rgrimes

Added Id: string


# 267 09-Aug-1993 rgrimes

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


# 241 04-Aug-1993 nate

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


# 5 12-Jun-1993 rgrimes

This commit was generated by cvs2svn to compensate for changes in r4,
which included commits to RCS files with non-trunk default branches.


# 4 12-Jun-1993 rgrimes

Initial import, 0.1 + pk 0.2.4-B1