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.
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.
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.
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)
${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 "$<".
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.
Fixed some style bugs (always use precisely 1 space after `:' in
dependency specifications).
Removed bogus dependency of ${FULLKERNEL} on ${BEFORE_DEPEND}.
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.
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.
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
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.
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.
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'.
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.
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).
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.
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.
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
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.
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..)
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.
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.
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.
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>
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.
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.
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.
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.
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
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.
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.
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).
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!
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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>