Commit Graph

71 Commits

Author SHA1 Message Date
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Peter Wemm
0f459420f8 Reserve a placeholder for 4 SMP ipi interrupts in the same way that
it's done for pci.  This is so that systat and vmstat can get at the
interrupt counts for the Inter-Processor Interrupts when running a smp
kernel.  This doesn't affect the normal kernel, but makes life easier for
the smp people who don't have to track two versions of config.
1997-03-29 12:04:51 +00:00
Andrey A. Chernov
659d2a2071 Remove support for "port none" and "port auto", it gains nothing,
non-standard and not used. "port auto" is equal to "port?" or missing "port"
keyword now. "port none" is really probe routine task (return -1 for
no ports).
1997-03-28 00:56:11 +00:00
Andrey A. Chernov
1d29927ce6 Add #define's for port "none" and "auto"
Now port ommiting is equal to port "none" not to port 0
1997-03-26 15:19:55 +00:00
Andrey A. Chernov
aab4ac4dad Print negative values only for two cases used
in config for iobase: -1 (auto) and -2 (none)
Other values are printed as big port numbers
1997-03-25 02:54:34 +00:00
Andrey A. Chernov
3be1497f41 Fix iobase printing for autodetect and none cases
(negative numbers was printed as very big ports)
1997-03-25 02:35:12 +00:00
Alexander Langer
8abdc2eb40 Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate
    failure (required by POSIX).
  - Removed flag arguments of '0' (required by POSIX).
  - Fixed code which expected an error return of 0.
  - Fixed code which thought any address with the high bit set
    was an error.
  - Check for failure where no checks were present.

Discussed with:	bde
1997-01-16 21:58:40 +00:00
Peter Wemm
d7b025c3ae Tidy up the generated config.c file. Use #include "opt_config.h", comment
out text after #endif line, add missing \n at end of file, only install new
config.c if it's different to the last one which preserves the timestamp.
1996-12-26 23:40:32 +00:00
Joerg Wunsch
5bd7b80934 Part #2 of the config cleanup. More aggressive, replaced an NIH
version of strdup() by a macro, killed many calls to strdup(), thus
potentially wasting less malloc'ed space (their args were never be
free()ed desptie despite of being malloc'ed).  Probably still a huge
memory leak at all...  Also killed two totally useless variables.

I've tested it as i could, but wouldn't be surprised if unexpected
problems showed up.  So watch out this space!
1996-12-14 19:53:49 +00:00
Joerg Wunsch
f0b48d9876 Round #1 of cleaning up the config(8) mess. This is only the more
conservative part of the tidyup, like fixing potential buffer overflow
conditions.  It is believed to be safe to go into 2.2.

Pointed out by:	lozenko@cc.acnit.ac.ru (Evgeny A. Lozenko)
1996-12-14 19:44:13 +00:00
Bruce Evans
c08d58eade 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.
1996-12-13 12:46:28 +00:00
Andrey A. Chernov
17c2b3452d Bugfix: all device counts >= 256 was broken, they truncated by % 255
because of u_char count field size. It hits when device
header file already present.
1996-08-21 17:00:54 +00:00
Jordan K. Hubbard
43b74d6191 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>
1996-06-08 23:27:16 +00:00
Poul-Henning Kamp
1d95dc910b Backout yacc changes. 1996-06-02 17:22:01 +00:00
Poul-Henning Kamp
829bde8e5b yacc rule changes. 1996-05-30 23:16:31 +00:00
Bruce Evans
227941d5de Implemented a new keyword `disable'. This should be useful for controlling
dangerous drivers in GENERIC.

Removed non-comments on #endifs in config.y.

Improved output formatting in mkioconf.c.
1996-04-13 19:57:38 +00:00
Bruce Evans
b7a7f2d19d Count PCI irqs in up to 4 ISAish counters named `pci irqnn' instead of
in the clk0 counter.

Reviewed by:	se
1996-03-29 15:04:14 +00:00
Peter Wemm
d8f19d9417 Make a little more effort to avoid touching certain generated files if
they were not changed.  This makes 'make depend' more useful.
1996-01-12 08:57:10 +00:00
David Greenman
c418fae48f Changed the default/min/max number of users to 8/2/512 for all machine
types. This is closer to the reality of reasonable values.
1995-12-29 18:24:43 +00:00
Bruce Evans
912e603778 Implemented non-statistical kernel profiling. This is based on
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches.  The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.

gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes.  Does anyone
disagree?

gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header.  This
hack will do until then.  (Use gprof4 -u to examine the results
of non-statistical profiling.)

config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.

kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'.  `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.
1995-12-29 15:30:05 +00:00
Peter Wemm
6d41b96fd7 Implement support for conf/options and i386/conf/options.i386
Note that this code is dormant unless the options files exist.
Also, parsing of quoted options in the config files is improved.

What this allows, is all the options in LINT to be specified to be
configured as #defines in a file rather than on the CC command line at
kernel build time.  This means that 'make depend' will catch dependencies
on actual *options*, meaning that you can run 'config' and 'make depend'
in complete safety WITHOUT removing the compile directory each time.

Unfortunately, this requires a pass over the source to get the individual
files to #include the new .h files that would be generated by config.
This has a small compile time penalty (appears up to about 2% slower)
from a "fresh" build.  Of course, you should not be needing to do complete
rebuilds very often once this was completed, so it would be an overall
win for most people.

Since this code is dormant and we've got a lot of other things happening
on the kernel tree at the moment (prototypes, devfs, static declarations
etc) I am not planning on doing any changes to activate this feature just
yet.
1995-12-11 10:52:34 +00:00
Garrett Wollman
8e7fbe0241 If CONFIG_NO_CLOBBER_EVER is defined (e.g., in /etc/make.conf), don't make
it possible for config to ever blow away a work directory.  Default behavior
remains broken.
1995-11-28 20:29:58 +00:00
Joerg Wunsch
4c81de0a11 Support the configuration of "od" devices.
Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1995-10-31 17:31:35 +00:00
David Greenman
4ceefc48d5 Added support for a %SFILES token to auto-generate a SFILES= file list in
the same way that is done for CFILES. Files ending in .s or .S that match
the option criteria will be included in this list.
1995-10-29 11:07:17 +00:00
David Greenman
b497f11592 Don't pre-processor define 'ident'. This has subtle consequences for people
who don't carefully consider their choice for the machine name. The same
functionality can still be had with an "option", so nothing is lost.
1995-10-23 10:29:11 +00:00
Bruce Evans
8f160768d6 Fix CLEANFILES. Some temporary files were missing. 1995-09-28 18:24:54 +00:00
Bruce Evans
0b73305bdd Put declarations in a header file ("ioconf.h")
Generate prototypes for SCSI functions and function pointers.

Fix redundant declarations of interrupt handlers.

Generate 4.4-style includes (<> instead of "").

Clean up formatting of both the source and the output a bit.
1995-09-19 16:37:34 +00:00
Justin T. Gibbs
f7ad28d790 Add missing quote to yyerror call. 1995-07-18 06:11:34 +00:00
Justin T. Gibbs
31acd246c0 Allow the specification of the controller bus when wiring down scsi buses.
This is performed by using a line similar to:

controller scbus0 at ahc0 bus 1

to wire scbus0 to the second bus on an adaptec 2742T controller.

Reviewed by: Peter Dufault(dufault@hda.com), Rod Grimes(rgrimes@FreeBSD.org)
1995-07-17 23:38:16 +00:00
David Greenman
975f4abc69 Killed TIMEZONE, DST, and HZ keywords. They have generated a config error
for more than a year now. They've been replaced with userland methods for
changing (see adjkerntz).
1995-06-29 07:19:19 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Rodney W. Grimes
e602d31e02 Fix 3 printf's that had the wrong number of arguments.
Submitted by:	gibbs
1995-05-14 19:19:55 +00:00
David Greenman
bd7917b1a7 Updated to work with Poul-Henning's recent kernel changes in the swap
device table layout...basically, don't output the cruft anymore - it
is now dynamic.

Reviewed by:	John Dyson and David Greenman
Submitted by:	Poul-Henning Kamp
1995-05-14 03:10:58 +00:00
Garrett Wollman
5e7d9e89ba Don't automatically default dumps to be on a swap device; if the user
wants dumps, he can either configure it explicitly (`dumps on' whatever) or
use the dumpon(8) utility.
1995-05-12 19:12:44 +00:00
Jordan K. Hubbard
a9d7ec4113 Revise this to actually print all the various isa_device field values
it really should have been printing all this time.  Also fix my rather
bogus handling of the id_conflicts value by moving it to the end of
isa_device and dealing with that correctly now.
1995-05-11 07:54:41 +00:00
Jordan K. Hubbard
babb4e927f Add a new `conflicts' flag for telling when a device is in conflict with
others.  The flag can be put in descriptive locations, e.g.:

device sb0      at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr
or
device psm0	at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr

But is nonetheless boolean only.  You can't turn conflict checking off for
only a given type of conflict.  I didn't deem it worth the trouble at this
stage, and it's far better than the ALLOW_CONFLICT_* that preceeded it.
1995-05-11 02:21:34 +00:00
Jordan K. Hubbard
786a5cad11 Change the perennially annoying reminder to "make depend" (which may or
may not be desired if you're just going to blow the kernel away again later)
and substitute one that tells the user where the new kernel build
directory actually IS, which can at least be argued to be useful information
in all cases.
Reviewed by:	davidg
1995-05-03 20:16:57 +00:00
Peter Dufault
84d84db480 Change warning message for when a device is wired to a floating
host adapter to something hopefully clearer.  Take into account
that "wnum()" writes into a static buffer in the warning.
1995-03-07 11:03:42 +00:00
Peter Dufault
f88f624943 Fixed bug with wiring down given SCSI bus. 1995-03-03 19:00:39 +00:00
Peter Dufault
c30c84ed1f Added configuration for SCSI devices wired in place. The documentation
is in "man 4 scsi".
1995-03-01 22:34:05 +00:00
Justin T. Gibbs
ce584e16e7 Implement "clean" entries for device config entries.
Submitted by: Pointed out by Bruce Evans <bde@zeta.org.au>
1995-03-01 10:09:03 +00:00
Jordan K. Hubbard
b5909509ee Make good on my promise to finally clean up the config clobbering.
If you invoke config with the `-n' flag or have NO_CONFIG_CLOBBER in
your environment, config will behave the same way it used to.  This is
now _documented_ as well.  Rip out all the CONFIG_DONT_CLOBBER cruft;
some of it wasn't even correct anyway.
1995-02-22 15:37:32 +00:00
Bruce Evans
51bcc40b35 Write setconf() in KNF, in K&R C, and in Standard C.Standard C. 1995-02-18 21:32:19 +00:00
Bill Paul
188291d20f Do away with 'options SWAP_GENERIC' once and for all: I get ill
just thinking about it.

Two changes need to be made to allow 'config kernel swap generic' to
work properly without requiring any compile-time flags:

/usr/src/usr.sbin/config/mkswapconf.c: we need to define a dummy stub
for the setconf() function to replace the one in swapgeneric.c that
isn't available in non-generic configurations.

/usr/src/sys/i386/i386/autoconf.c: the -a boot flag causes setroot()
to be skipped and lets setconf() prompt the user for a root device.
If you skip setroot() in a non-generic kernel, you could get severely
hosed. To avoid this, we silently ignore the -a flag if rootdev != NODEV.
(rootdev is always initialized to NODEV in swapgeneric.c, so if
we find that rootdev is something other than NODEV, we know we're
not using a generic configuration.)
1995-02-18 18:05:35 +00:00
Bruce Evans
da12c6d2aa config.y:
Support slice numbers in device names.  The syntax is `<driver name>
[<unit number>] ['s' <slice number>] [<partition letter>]'.  Only
`['s' <slice number>]' is new here.  The slice number defaults to 0
so that there is no change in the output from config if this new
feature is not used.

Replace some magic disk numbers by `dk' slice and label macros.

mkswapconf.c:
Improve the output formatting:
Generate <> style includes.
Print minor numbers in hex so that slice numbers are easy to see and edit.
Print the rootdev and dumpdev names in comments like the swapdev names.
1995-02-16 12:17:30 +00:00
Bruce Evans
5cea80f170 Always return null-terminated identifiers from yylex(). 1995-02-16 11:52:11 +00:00
Bruce Evans
0c47d7b5e0 Restore the field widths that were clobbered by the previous commit so that
the columns in ioconf.c line up if there are no long names.
1995-02-08 18:42:58 +00:00
Poul-Henning Kamp
c807f32c6b Removed the name length limitations on the device-driver names entirely.
Now device-names can be more than 3 chars.
1995-02-05 21:15:21 +00:00
Garrett Wollman
5ddd6b6a1a Fix Sharnoff complaint #121 (cross-reference to config.new which does not
exist on the i386 platform).
1995-01-14 20:25:02 +00:00
Justin T. Gibbs
528486881b Allow config to fully handle the aic7770 driver dependancies. 1994-12-31 19:23:10 +00:00