Commit Graph

1009 Commits

Author SHA1 Message Date
thorpej dfc3ead10a MBR partition table support for wedges, enabled by the DKWEDGE_METHOD_MBR
option.
2004-10-23 17:25:14 +00:00
yamt 1c2a2dcad3 move i/o schedulers to their own files.
namely, from kern/subr_disk.c to kern/bufq_{fcfs,disksort,readprio,priocscan}.c.
2004-10-14 05:12:28 +00:00
thorpej 563a66a36f Add a parsing module for 4.4BSD/NetBSD disklabels. This module supports
disklabels nested inside an MBR "NetBSD" or "386BSD" partition (first
one found is considered authoritative for the disk), or in one of several
known locations for various NetBSD platforms.  It can read native or other-
endian disklabels (code is there, but not tested).

If you want to play with this, exercise caution; you can't currently
mountroot on a wedge (setroot() needs some work).  Enabled by the
DKWEDGE_METHOD_BSDLABEL kernel option.
2004-10-04 01:16:39 +00:00
thorpej 40f14b0328 Remove something mistakenly committed in last. 2004-10-04 01:07:57 +00:00
thorpej 3cb291f243 Move wedge code to a subdirectory, as suggested by Christos. 2004-10-04 01:07:25 +00:00
thorpej 27f0170634 Break out the wedge discovery methods into true modules, and add some
infrastructure that allows new ones to be added.  The discovery methods
are prioritized, and only one can exist at a given priority.

The DKWEDGE_METHOD_GPT option causes GPT support to be included.  GPT is
at priority 0; we prefer GPT above all others.
2004-10-01 05:16:04 +00:00
christos d7f20abdc1 Disable autonicetime. As discusses in tech-kern. 2004-09-27 14:08:13 +00:00
dyoung f5fc723f2b Add rtw(4). 2004-09-26 03:03:17 +00:00
thorpej baefaf4422 Work-in-progress implementation of "wedges", a new way to represent
partitions in the NetBSD kernel.  See discussion on tech-kern for details.
2004-09-25 03:30:44 +00:00
thorpej 11afd11faa Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made.  Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP.  Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
  set.  Some file systems (e.g. specfs) don't even bother with vnode
  locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
  vnode locking problems, not the least of which is the "use SHARED for
  VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.
2004-09-21 03:10:35 +00:00
jdolecek 120bb37404 remove COMPAT_AOUT 2004-09-14 16:57:31 +00:00
simonb 553aeff41f Remove the remains of an old comment that doesn't apply any more. 2004-09-14 15:19:35 +00:00
chs cbc396ce30 work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
2004-09-13 09:39:40 +00:00
jkunz 1035c6af08 Import STI wscons(4) driver from OpenBSD and add new driver for PS/2
keyboard / mouse pots of LASI.
2004-08-26 16:48:06 +00:00
itohy 1d4f1abb08 Workbit NinjaSCSI-32 PCI/CardBus SCSI driver (njs) 2004-08-26 14:13:46 +00:00
drochner 4157766364 add a "drvctl" pseudo-device as userland interface to the autoconf
rescan() and detach() functions
2004-08-18 12:19:29 +00:00
thorpej 77cc762658 Don't assume wdc-specific ATA / ATAPI code should be brought in if atabus
or atapibus are configured; use a separate wdc_common attribute to indicate
that the shared wdc code is also present.
2004-08-12 04:23:02 +00:00
bouyer 011181ac3e Implement an atabus control device, and define some ATA bus control
IOCTLS. Implement ATABUSIORESET, which will reset the given ATA bus.
2004-08-01 21:40:41 +00:00
lukem 66ff0c053c Rename LIBCOMPAT* -> SYSLIBCOMPAT*, now that <bsd.own.mk> provides LIBCOMPAT.
Fixes kernel link problem noted by Sebastien Erard.
2004-07-31 00:55:51 +00:00
atatat 1ce3b064a0 Make uudecode into a tool that can be used to build a kernel and redo
the athhal-elf.o handling to take advantage of it.  This means that
bsd.files.mk is no longer included by Makefile.i386 so CFLAGS won't be
duplicated.
2004-07-15 03:35:20 +00:00
uebayasi 2909021c43 Narrow a sed(1) RE handling a file/directory name so that build under a
directory named like 'xxx.cxxx/' succeeds.
2004-07-13 09:07:54 +00:00
mycroft 0230f9fefd Move spc into the MI area. 2004-07-07 08:41:34 +00:00
yamt 34ed9bd392 avoid divide-by-zero in adjtime1() in the case of HZ > 6000. 2004-07-01 12:57:37 +00:00
yamt 3998262d5e defparam HZ. 2004-07-01 12:44:26 +00:00
itojun bfcdaa5766 PF from openbsd 3.5. missing features:
- pfsync (due to protocol # assignment issues)
- carp (not really a PF portion, but thought important to mention)
- PF and ALTQ are mutually-exclusive.  this will be sorted out when
  kjc@csl.sony.co.jp updates ALTQ and PF (and API inbetween)

reviewed by matt, christos, perry

torture-test is very welcomed.
2004-06-22 14:17:07 +00:00
christos c22e4ed8cd ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM 2004-06-18 15:02:29 +00:00
sekiya dabf5a69e2 Link rtl81x9.c when re* is defined (hi, Toshi!) 2004-05-29 12:12:28 +00:00
thorpej f2da431235 Add common routines for SATA controllers. Right now, we have sata_speed(),
which reports the speed encoded in the SStatus register.
2004-05-28 23:26:27 +00:00
toshii 4ee3a39f89 Add re(4) RealTek 8139C+/8169/8169S/8110S PCI ethernet adapter driver,
from FreeBSD.
I haven't tested this code very well, but it seems to work fairly well
for me.
2004-05-28 15:35:41 +00:00
christos 917cdbbd9e Unix 98 pty multiplexor device; original code from OpenBSD. 2004-05-27 02:56:38 +00:00
christos 983359fdd3 put back the notyet around the note section; the bfd fix is non-trivial. 2004-05-23 21:11:01 +00:00
christos 28fc1ac65d Enable notes section now that we added header space on the i386. Other
platforms might want to do the same.
2004-05-22 22:07:33 +00:00
petrov 1ac4411c10 Revert default uvm counters, rename UVMMAP_COUNTERS to UVMMAP_NOCOUNTERS. 2004-05-03 20:10:35 +00:00
petrov 5f4709f782 Replace uvm counters with evcnt, initialize them through __link_set (from Matt Thomas),
disable counters by default and add configuration option UVMMAP_COUNTERS.
2004-05-01 19:40:39 +00:00
thorpej c3d8434559 defflag COM_PXA2X0. 2004-05-01 19:06:24 +00:00
thorpej cdac01064e Rename the COM16650 option to COM_16650, for consistency with other
com variant options.
2004-05-01 19:03:59 +00:00
matt 08381af38e -fno-zero-initialized-in-bss only to gcc3, not gcc2.95 2004-04-25 04:24:06 +00:00
pk 3c83ebd4ab Force zero-initialised variables into the .data segment. 2004-04-24 22:07:15 +00:00
drochner 3874dc0ca9 defopt COMPAT_20 2004-04-21 12:44:13 +00:00
cl 9a39f88e1e add block device driver 2004-04-17 12:56:26 +00:00
atatat ce5e5c045e s/SYSCTL_USE_DESCR/SYSCTL_INCLUDE_DESCR/g since the latter name seems
more popular.  Or at least, less unpopular.
2004-04-09 19:01:38 +00:00
atatat 9b2972c08e Invert the meaning of SYSCTL_NO_DESCR by calling it SYSCTL_USE_DESCR
instead.  This makes it an option to include the descriptions, as
opposed to an option to *exclude* them.
2004-04-09 18:13:36 +00:00
atatat 1e239fdec9 Create opt_sysctl.h which will hold sysctl related options. I suspect
most of these won't be used (well, the description related one will
be), but it's good to formalize things.
2004-04-08 03:43:38 +00:00
matt b173c9d332 Make kernel continuations optional for now. 2004-03-28 22:43:56 +00:00
jonathan 8e3ebdd449 Pull in sys/kern_kcont. Size is 1.4k, hardly worth making an option
(though it could be made so, if something breaks on platforms without
generic soft-ints).
2004-03-20 03:12:47 +00:00
bjh21 e972d70350 pckbc_machdep_cnattach has been replaced by pckbport_machdep_cnattach, so the
former attribute can be removed.
2004-03-14 13:52:12 +00:00
bjh21 95cdc0362c Add pckbport attribute, and apply it to pckbc. Somehow I missed this file
in the main commit of pckbport.  *blush*
2004-03-13 22:45:23 +00:00
jkunz 17e4dce36a Import MI part of new Intel i82596 Ethernet driver. 2004-03-12 11:37:17 +00:00
rtr 8845b1e975 split off the evcnt code (which is unrelated to autoconfiguration)
into a separate file

approved by simonb@
2004-02-17 05:03:15 +00:00
junyoung 4d4de5b780 device<tab>
attach<tab>
file<tab>
2004-02-14 16:35:58 +00:00
bjh21 5aca86918f Add a new MI attribute, pckbc_machdep_cnattach, and change pckbc_cnattach()
to only call pckbc_machdep_cnattach() if this is present.  This allows
pckbc_machdep_cnattach() to be omitted entirely on most ports, where it only
returns ENXIO anyway.

The devices with this attribute at the moment are pc(4) on i386 and bebox, and
pckbc on sparc, where pckbc_machdep_cnattach() mysteriously returns 0 rather
than ENXIO.
2004-02-14 14:33:28 +00:00
wiz f5b32c1e69 RealTek -> Realtek. 2004-02-13 10:00:54 +00:00
tsarna df3466a71d an(4) needs wlan support 2004-02-03 19:46:18 +00:00
tsarna 72489e1ea0 uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in
PR#23470, with minor updates by me. This is only the syscall support
from that PR, for now.

Changes: port over fix from FreeBSD for multicast address generation.
Changed bcopy to memcpy.  For now, #ifdef notyet the portions of
kern_uuid.c that are meant to be used by (currently nonexistent) other
things in the kernel.  Added syscall to COMPAT_FREEBSD as well, though
that's currently not useful, as any program new enough to use this call
also uses other syscalls we don't (yet) emulate.
2004-01-29 02:00:02 +00:00
drochner df39e51fa9 add pps device 2004-01-28 17:27:57 +00:00
jdolecek 6c14651ea0 cleanup old lpt(4) attachment, and glue ppbus in so that they can coexist:
* lpt device is defined in MI place (dev/ppbus/files.ppbus), dev/ic/lpt.c
  is included there too; dev/ic/lpt.c is not included if ppbus is
  configured or if there is alternative platform lpt (like for pc532)
* g/c MD lpt definitions and custom puc/upc attachments,
  glue moved to conf/files and dev/pci/files.pci respectively; remove
  device lpt definition from dev/isa/files.isa
* add ppbus parport attribute, atppc device attachments, adjust plip and lpt
  glue
2004-01-20 19:58:00 +00:00
bjh21 9556e4209d Simple code to provide a console bell through a generic audio device, for
systems that don't have a dedicated feeper.  It's up to MD code to enable
this by having the "audiobell" attribute and calling audiobell() at the
appropriate moment.

Code for making noise in the kernel from Richard Earnshaw.  Simple synthesizer
design from the RISC OS Programmer's Reference manual.
2004-01-17 20:55:59 +00:00
lukem 7bb9d6c875 Store the copyright text in conf/copyright, and use conf/newvers.sh
to generate the appropriate  const char copyright[] = "...";
statement instead of hard coding it into kern/init_main.c.
Idea from Simon Burge.
2004-01-05 03:33:06 +00:00
jonathan 01c51dab61 Split opencrypto configuration into an attribute, usable by inkernel
clients, and a pseudo-device for userspace access.

The attribute is named `opencrypto'. The pseudo-device is renamed to
"crypto", which has a dependency on "opencrypto". The sys/conf/majors
entry and pseudo-device attach entrypoint are updated to match the
new pseudo-device name.

Fast IPsec (sys/netipsec/files.ipsec) now lists a dependency on the
"opencrypto" attribute.  Drivers for crypto accelerators (ubsec,
hifn775x) also pull in opencrypto, as providers of opencrypto transforms.
2003-12-31 16:44:26 +00:00
martin 63095bc32c s/NBPG/PAGE_SIZE/ in a comment.
From Jeff Ito in PR kern/23935.
2003-12-31 12:34:22 +00:00
pk 70f20a1217 Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
2003-12-30 12:33:13 +00:00
scw 1cbe65fa6a Pull in netinet/ip_ecn.c if FAST_IPSEC is defined. 2003-12-12 20:54:30 +00:00
hannken fbae381aaa The file system snapshot pseudo driver.
Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>
2003-12-10 11:40:11 +00:00
dyoung 97ea67538a Add the RSSI-based rate-adaptation library to the build. 2003-12-07 05:30:22 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
lukem 4404046b3f fix the MAKEVERBOSE messages to be consistent with the standard ones 2003-12-04 02:33:41 +00:00
lukem 4ca8399eb2 prefix ${.TARGET} with "${.CURDIR:T}/" in various _MKSHMSG macros;
per similar change to <bsd.own.mk>
2003-12-01 01:12:58 +00:00
pk f7eea59188 Change default verbosity level to `traditional'. 2003-11-25 09:15:50 +00:00
pk 1954be3560 NORMAL_C,NOPROF_C,NORMAL_S: put `@' in front of these to get saner output.
Also we can't use _MKTARGET_COMPILE here. For now, just hard-code the message.
2003-11-25 08:52:40 +00:00
pk d8db9075f0 SYSTEM_LD: don't display every object file on the planet thrice. 2003-11-25 07:47:29 +00:00
lukem 6918f15fc1 Provide appropriate no-op defaults for _MK* macros, in case <bsd.own.mk>
is too old.
2003-11-20 07:08:02 +00:00
lukem 8ec8bba0a9 Add support for MAKEVERBOSE (a first pass, at least).
Use COPTS.<sourcefile> instead of <sourcefile>_G.
Use HOST_SH (which defaults to `sh' if not set).
2003-11-17 09:39:29 +00:00
tls ad6779479c Oops. I missed this file in my previous commit. Add inclusion of
"files.skipjack" now that Skipjack has been moved from
sys/opencrypto to crypto/skipjack.
2003-11-16 12:10:41 +00:00
dsl 438ae29810 Remove the .if !target(dependall) so that 'make dependall' works (again)
for the kernel.
2003-11-14 08:33:36 +00:00
enami 67b61c37a8 Prevent mkdep from parsing compiler flags like -pipe. 2003-11-11 21:26:53 +00:00
jdolecek a10e06c83e force -Wno-uninitialized if the compiler is gcc 2.95 2003-11-06 08:23:22 +00:00
drochner 559255f8db there is no SHMMMNI 2003-10-30 20:37:01 +00:00
mycroft 7198dd0a88 Back out -Wno-uninitialized for m68k -- the compiler bug is fixed. 2003-10-29 21:29:27 +00:00
tsutsui 2ba8cd8f89 Add MI driver for mc146818 based time-of-day clock with todr(9) support. 2003-10-29 17:00:40 +00:00
skrll a366cd57d6 Add COPTS.<fn>, CPUFLAGS.<fn>, CPPFLAGS.<fn> to CFLAGS to mirror the
file specific flags support of bsd.{lib,prog}.mk.

From Christos.
2003-10-28 17:58:57 +00:00
he 4bd87960fa sys/dev/ata/wd.c causes spurious warning about blkno not
being initialized before used.  This appears to be a bug
specific to (at least) the m68k target, and will be reported
to the GCC maintainers.
2003-10-28 12:11:31 +00:00
christos 97ded127c6 Delete -Wno-uninitialized. Tested on sparc64 and i386. Rationale:
Gcc-3.3 produces valid warnings in most cases and uncovers bugs. In the
cases where a variable is known to be initialized, we initialize it and
add: /* XXX: gcc */. If a $MACHINE_ARCH's compiler is busted, it can add
-Wno-uninitialized in the MD Makefile.
2003-10-26 19:24:06 +00:00
thorpej 4011fcfefd Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.
2003-10-21 22:55:47 +00:00
cdi 2b3e81f067 Introduce null console. This pseudo device acts as a normal console with the
exception that it discards any output, and is useful for booting the kernel
on headless boxes.
2003-10-17 18:16:42 +00:00
lukem 1fa9c076ee Use a shell variable instead of a cpp #define to provide the full
version string; it's more consistent.
2003-10-15 01:28:49 +00:00
christos bd5d984311 Check for file existance, not readability. Remove extra touch. 2003-10-14 16:59:54 +00:00
lukem 5ab4225f2d assign the variables on separate lines; makes it easier to read and
easier to change one locally with minimal cvs merge issues
2003-10-14 14:23:10 +00:00
lukem 6fc70a0f8c clean up the method to initialize sccs[] and version[] to remove
unnecessary duplication in the source
2003-10-14 06:46:57 +00:00
dyoung 5cea02e6fe Complete replacement of the old 802.11 layer with the new. 2003-10-13 08:34:15 +00:00
jdolecek 83968947b5 Add major for Vinum 2003-10-10 22:46:07 +00:00
jdolecek ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek b5cc0b5a22 update comments for the final major space arrangement:
0-143    machine-dependant/traditional majors
144-159  local/vendor use
160-255  new-style MI range
2003-10-10 22:41:39 +00:00
jdolecek f3e4bcccdc move MI majors config file from sys/dev/majors to sys/conf/majors 2003-10-10 21:26:38 +00:00
grog 17709f5057 Include Vinum. 2003-10-10 06:13:02 +00:00
bouyer 7719e83c8b Following Matt Thomas's request, rename ata attribute to ata_hl, and
wdc_base to ata. We can now have
atabus* at ata?
in kernel config files.
2003-10-08 20:57:59 +00:00
bouyer 99d6009c2a Make the ATA mid-layer appears as atabus, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.

Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.
2003-10-08 10:58:12 +00:00
jdolecek e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
jdolecek 4e1d4165e5 get the release version from <sys/param.h>, so that it won't be necessary
to change two places on version bump
2003-10-04 06:59:56 +00:00
matt 3aafdaac96 Make the kernel makefiles pay attention to NOGCCERROR 2003-10-01 23:11:29 +00:00
thorpej 2652188cc4 New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.
2003-09-30 00:35:30 +00:00