Commit Graph

3622 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
8373d51d4b randomize IPv6 fragment ID.
Obtained from:	KAME
2003-10-01 15:13:29 +00:00
Peter Wemm
00f553ed0c Stop this warning:
"Makefile", line 35: warning: "grep DDB opt_ddb.h" returned non-zero status
2003-09-30 03:49:09 +00:00
Scott Long
5dfa218a11 Remove the static reservations for the raid and raidctl devices. 2003-09-29 14:15:57 +00:00
Scott Long
ca0ef5374f aac no longer uses a static major number. 2003-09-29 14:11:23 +00:00
Poul-Henning Kamp
b294143142 Introduce no_poll() default method for device drivers. Have it
do exactly the same as vop_nopoll() for consistency and put a
comment in the two pointing at each other.

Retire seltrue() in favour of no_poll().

Create private default functions in kern_conf.c instead of public
ones.

Change default strategy to return the bio with ENODEV instead of
doing nothing which would lead the bio stranded.

Retire public nullopen() and nullclose() as well as the entire band
of public no{read,write,ioctl,mmap,kqfilter,strategy,poll,dump}
funtions, they are the default actions now.

Move the final two trivial functions from subr_xxx.c to kern_conf.c
and retire the now empty subr_xxx.c
2003-09-27 12:53:33 +00:00
Max Khon
c4f02a891f - Support for multibyte charsets in LIBICONV.
- CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options
(with corresponding modules).
- kiconv(3) for loadable charset conversion tables support.

Submitted by:	Ryuichiro Imura <imura@ryu16.org>
2003-09-26 20:26:25 +00:00
Sam Leffler
28cfb8fc84 indicate PFIL_HOOKS is now required by IPFILTER; it used to automagically
be defined in net/pfil.h
2003-09-25 16:06:17 +00:00
Marcel Moolenaar
b8d941f010 Move uma_small_alloc() and uma_small_free() to uma_machdep.c. These
functions reference UMA internals from <vm/uma_int.h>, which makes
them highly unwanted in non-UMA specific files.

While here, prune the includes in pmap.c and use __FBSDID(). Move
the includes above the descriptive comment.

The copyright of uma_machdep.c is assigned to the project and can
be reassigned to the foundation if and when when such is preferrable.
2003-09-20 19:27:48 +00:00
John Baldwin
ad27c4c7e0 Document MUTEX_NOINLINE.
Reported by:	sam
2003-09-19 19:04:30 +00:00
Takanori Watanabe
0d62746979 Add uart pccard attachment decription on conf/files, too.
Pointed out by: ru
2003-09-14 17:02:59 +00:00
Marcel Moolenaar
8194412b89 Add support for using uart(4) for pulse capturing for the Pulse Per
Second (PPS) timing interface. The support is non-optional and by
default uses the DCD line signal as the pulse input. A compile-time
option (UART_PPS_ON_CTS) can be used to have uart(4) use the CTS line
signal.

Include <sys/timepps.h> in uart_bus.h to avoid having to add the
inclusion of that header in all source files.

Reviewed by: phk
2003-09-11 23:06:42 +00:00
Bill Paul
9bac70b851 Add a PHY driver to support the built-in gigE PHY in the 8169S/8110S
ethernet chips. This driver is pretty simple, however it contains
special DSP initialization code which is needed in order to get
the chip to negotiate a gigE link. (This special initialization
may not be needed in subsequent chip revs.) Also:

- Fix typo in if_rlreg.h (RL_GMEDIASTAT_1000MPS -> RL_GMEDIASTAT_1000MBPS)

- Deal with shared interrupts in re_intr(): if interface isn't up,
  return.

- Fix another bug in re_gmii_writereg() (properly apply data field mask)

- Allow PHY driver to read the RL_GMEDIASTAT register via the
  re_gmii_readreg() register (this is register needed to determine
  real time link/media status).
2003-09-11 03:53:46 +00:00
Marcel Moolenaar
999a2bfab3 Add LOG2_ID_PAGE_SIZE to the mix of options on ia64. 2003-09-09 18:30:20 +00:00
Bill Paul
b9f78d2b4a Add a device driver for the Broadcom BCM4401 ethernet controller,
written by Stuart Walsh and Duncan Barclay (with some kibbitzing by
me). I'm checking it in on Stuart's behalf.

The BCM4401 is built into several x86 laptop and desktop systems. For the
moment, I have only enabled it in the x86 kernel config because although
it's a PCI device, I haven't heard of any standalone NICs that use it. If
somebody knows of one, we can easily add it to the other arches.

This driver uses register/structure data gleaned from the Linux
driver released by Broadcom, but does not contain any of the code
from the Linux driver itself. It uses busdma.
2003-09-09 18:17:23 +00:00
Eric Anholt
a1810e1513 Hook the SiS DRM up to the build
Sponsored by:	LinuxFund
2003-09-09 00:29:02 +00:00
Bill Paul
a94100fa9b Take the support for the 8139C+/8169/8169S/8110S chips out of the
rl(4) driver and put it in a new re(4) driver. The re(4) driver shares
the if_rlreg.h file with rl(4) but is a separate module. (Ultimately
I may change this. For now, it's convenient.)

rl(4) has been modified so that it will never attach to an 8139C+
chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to
match the 8169/8169S/8110S gigE chips. if_re.c contains the same
basic code that was originally bolted onto if_rl.c, with the
following updates:

- Added support for jumbo frames. Currently, there seems to be
  a limit of approximately 6200 bytes for jumbo frames on transmit.
  (This was determined via experimentation.) The 8169S/8110S chips
  apparently are limited to 7.5K frames on transmit. This may require
  some more work, though the framework to handle jumbo frames on RX
  is in place: the re_rxeof() routine will gather up frames than span
  multiple 2K clusters into a single mbuf list.

- Fixed bug in re_txeof(): if we reap some of the TX buffers,
  but there are still some pending, re-arm the timer before exiting
  re_txeof() so that another timeout interrupt will be generated, just
  in case re_start() doesn't do it for us.

- Handle the 'link state changed' interrupt

- Fix a detach bug. If re(4) is loaded as a module, and you do
  tcpdump -i re0, then you do 'kldunload if_re,' the system will
  panic after a few seconds. This happens because ether_ifdetach()
  ends up calling the BPF detach code, which notices the interface
  is in promiscuous mode and tries to switch promisc mode off while
  detaching the BPF listner. This ultimately results in a call
  to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init()
  to handle the IFF_PROMISC flag change. Unfortunately, calling re_init()
  here turns the chip back on and restarts the 1-second timeout loop
  that drives re_tick(). By the time the timeout fires, if_re.ko
  has been unloaded, which results in a call to invalid code and
  blows up the system.

  To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(),
  which stops the ioctl routine from trying to reset the chip.

- Modified comments in re_rxeof() relating to the difference in
  RX descriptor status bit layout between the 8139C+ and the gigE
  chips. The layout is different because the frame length field
  was expanded from 12 bits to 13, and they got rid of one of the
  status bits to make room.

- Add diagnostic code (re_diag()) to test for the case where a user
  has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some
  NICs have the REQ64# and ACK64# lines connected even though the
  board is 32-bit only (in this case, they should be pulled high).
  This fools the chip into doing 64-bit DMA transfers even though
  there is no 64-bit data path. To detect this, re_diag() puts the
  chip into digital loopback mode and sets the receiver to promiscuous
  mode, then initiates a single 64-byte packet transmission. The
  frame is echoed back to the host, and if the frame contents are
  intact, we know DMA is working correctly, otherwise we complain
  loudly on the console and abort the device attach. (At the moment,
  I don't know of any way to work around the problem other than
  physically modifying the board, so until/unless I can think of a
  software workaround, this will have do to.)

- Created re(4) man page

- Modified rlphy.c to allow re(4) to attach as well as rl(4).

Note that this code works for the sample 8169/Marvell 88E1000 NIC
that I have, but probably won't work for the 8169S/8110S chips.
RealTek has sent me some sample NICs, but they haven't arrived yet.
I will probably need to add an rlgphy driver to handle the on-board
PHY in the 8169S/8110S (it needs special DSP initialization).
2003-09-08 02:11:25 +00:00
Marcel Moolenaar
c8956b36d6 Improved English, proper spacing and capitalization for the serial
drivers. The shared 0x10 flag has been reworded to be more precise
and complete.

Submitted by: bde
Edited by: marcel
2003-09-07 19:19:49 +00:00
Tim J. Robbins
d14e51c95c Add support for the Coda 6.x venus<->kernel interface. This extends
FIDs to be 128-bits wide and adds support for realms.

Add a new CODA_COMPAT_5 option, which requests support for the old
Coda 5.x interface instead of the new one.

Create a new coda5.ko module that supports the 5.x interface, and make
the existing coda.ko module use the new 6.x interface. These modules
cannot both be loaded at the same time.

Obtained from:	Jan Harkes & the coda-6.0.2 distribution,
		NetBSD (drochner) (CODA_COMPAT_5 option).
2003-09-07 07:43:10 +00:00
Warner Losh
4d60276b05 Add proper pc98 MD files. Add a commented out cbus attachment for
uart because that depends on the cbus implementation that nyan-san and
I came up with after the CBUG meeting and not yet ready for the tree.
2003-09-07 05:05:40 +00:00
Marcel Moolenaar
501ef98fe8 Add uart(4). Shuffle the information about sio(4) flags and options
so that it's clear whicfh flags/options are used by both sio(4) and
uart(4) and which flags/options are specific to sio(4).
2003-09-07 03:45:48 +00:00
Marcel Moolenaar
2bec1c8919 Hook-up the uart(4) driver to the build. For a detailed description
of what uart(4) is and/or is not see the initial commit log of one
of the files in sys/dev/uart (or see share/man/man4/uart.4).

Note that currently pc98 shares the MD file with i386. This needs
to change when pc98 support is fleshed-out to properly support the
various UARTs. A good example is sparc64 in this respect.

We build uart(4) as a module on all platforms. This may break
the ppc port. That depends on whether they do actually build
modules.

To use uart(4) on alpha, one must use the NO_SIO option.
2003-09-06 23:23:26 +00:00
Marcel Moolenaar
dc7d0dea12 Enhance puc(4) to support uart(4). This includes:
o  Introduce PUC_PORT_TYPE_UART so that we can attach to uart(4),
o  Introduce port sub-types (eg PUC_PORT_UART_NS8250, PUC_PORT_UART_Z8530)
   to handle different hardware and determine resource sizes.
o  Introduce two new IVARs: PUC_IVAR_SUBTYPE and PUC_IVAR_REGSHFT. Both
   are used by uart(4) to get sufficient information to talk to the HW.
o  Introduce PUC_FLAGS_ALTRES to tell puc(4) to try memory mapped I/O
   if I/O port space cannot be allocated, or vice versa.
o  Have ports of type PUC_PORT_TYPE_COM attach to uart(1) if attaching
   to sio(4) fails (due to not having the sio driver).
o  Put struct puc_device_description in struct puc_softc instead of
   having a pointer to a device description in the softc. This allows
   us to create device descriptions on the fly without having to use
   malloc() or otherwise have them staticly defined.
o  Move puc_find_description() from puc.c to puc_pci.c as it's specific
   to PCI.
o  Add EBUS and SBUS frontends for use on sparc64. Note that the P in
   puc stands for PCI, so we kinda mess things up here. It's too soon
   to worry about it though. We'll know what to do about it in time.

NOTE: This commit changes the behaviour of puc(4) to not quieten the
device probe and attach for child devices. The uart(4) driver provides
additional device description that is valuable to have.
2003-09-06 21:48:50 +00:00
Marcel Moolenaar
dfbd7790d4 Load the kernel at a 64M instead of 5M. The advantage of this is that
we can switch to 64M-sized identity mappings and not having to map the
first 64M. This is especially important because the first 1M contains
the VGA frame buffer and is otherwise a legacy memory range. Best to
make as little assumptions about it as possible. Switching to 64M-sized
mappings is important to avoid creating overlapping translations, which
have the side-effect of triggering machine checks. This is currently
what's preventing us to boot on an Intel Tiger 4.

Note that since we currently use 256M-sized identity mappings, we
would reduce the size of the mappings and consequently increase the
TLB pressure. The performance implications of this are minimal if
measurable at all because identify mappings are not our primary
means for memory management.

Also note that there's no guarantee that physical memory exists at
64M. Then again, we didn't had the guarantee when we were loading at
5M. We'll deal with this when it's a problem.

Discussed with: arun@
2003-09-06 05:15:36 +00:00
Poul-Henning Kamp
f633e00615 Detect Geode CPUs and initialize the 27MHz timecounter "Geode".
This timecounter is 2usec faster than the i8254 and has 22 times
better resolution.
2003-08-31 16:20:34 +00:00
Nate Lawson
ad1fdf57d2 Use the ACPICA AcpiEnterSleepStateS4bios instead of rolling our own. This
change also disables interrupts around non-S4 suspends whereas before we
did not do this.  Our version of AcpiEnterSleepStateS4bios was almost
identical to the ACPICA version.
2003-08-29 04:02:19 +00:00
Hidetoshi Shimokawa
b87da29dd4 Reserve 184 for dumb console driver(dcons) which can be found in
ports/devel/dcons.
2003-08-27 07:35:12 +00:00
Yoshihiro Takahashi
e4d023cef8 Switch to dev/syscons/syscons.c. 2003-08-25 07:52:11 +00:00
Yoshihiro Takahashi
175212344f MFi386: revision 1.452 2003-08-25 07:20:41 +00:00
Marcel Moolenaar
875e2e9ca9 Add option NO_SIO to work-around the hardcoded dependency on sio(4).
Without this option it is not possible to omit the driver from the
configuration file and successfully build a kernel.

This option is specific to alpha.
2003-08-25 03:43:08 +00:00
Søren Schmidt
5fdbb0d222 This is a major rework of the ATA driver (ATAng)
Restructure the way ATA/ATAPI commands are processed, use a common
ata_request structure for both. This centralises the way requests
are handled so locking is much easier to handle.

The driver is now layered much more cleanly to seperate the lowlevel
HW access so it can be tailored to specific controllers without touching
the upper layers. This is needed to support some of the newer
semi-intelligent ATA controllers showing up.

The top level drivers (disk, ATAPI devices) are more or less still
the same with just corrections to use the new interface.

Pull ATA out from under Gaint now that locking can be done in a sane way.

Add support for a the National Geode SC1100. Thanks to Soekris engineering
for sponsoring a Soekris 4801 to make this support.

Fixed alot of small bugs in the chipset code for various chips now
we are around in that corner anyways.
2003-08-24 09:22:26 +00:00
Jake Burkholder
e16255d3f0 Hook syscons and the creator driver up to the sparc64. This compiles but
will not link due to missing keyboard drivers.
2003-08-24 01:54:06 +00:00
Matthew N. Dodd
34345c0870 AGP GART driver for NVIDIA nForce/nForce2 chipsets. 2003-08-23 18:00:31 +00:00
Marcel Moolenaar
6ff26c064f Picking PAGE_SHIFT as a global option is a bad idea. Instead call the
option LOG2_PAGE_SIZE.
2003-08-23 03:38:36 +00:00
Marcel Moolenaar
cfe9466fcc Remove PAGE_SIZE_4K, PAGE_SIZE_8K and PAGE_SIZE_16K and replace
them with PAGE_SHIFT. A single option is better to LINT than
multiple mutual exclusive ones.
2003-08-23 03:22:41 +00:00
Marcel Moolenaar
c42c5d3f7a Add rules for font.h and ukbdmap.h. Needed for LINT. 2003-08-23 02:33:36 +00:00
Peter Wemm
4872a3d74c Turn on the MTRR driver. 2003-08-23 00:59:26 +00:00
Peter Wemm
401004db6d Complete the switch to the common 32 bit support code. 2003-08-23 00:58:33 +00:00
Marcel Moolenaar
b60be71f54 DEV_ACPI is an unused option. 2003-08-23 00:14:32 +00:00
Marcel Moolenaar
738777746d Both CLK_USE_I8254_CALIBRATION and TIMER_FREQ have ceased to be options
on ia64 after the cleanup of the clock code.
2003-08-23 00:02:18 +00:00
Warner Losh
74455e5526 Now that the pci include file location migration has been completed,
remove the -I$S/dev and -I@/dev which were there only for pci.

# If I've broken something, please let me know.
2003-08-22 15:41:44 +00:00
Robert Watson
782f725560 Hook up mac_stub to the modules Makefile.
Hook up mac_stub in files and options.
Reference mac_stub in NOTES.
2003-08-21 16:48:39 +00:00
Marcel Moolenaar
7b50deb12e Add ptrace_machdep.c. 2003-08-15 18:01:10 +00:00
Poul-Henning Kamp
c43001fc56 As warned: Initiate deorbit burn for the pcaudio driver. 2003-08-15 14:56:05 +00:00
Alexander Langer
30e27d9623 Add a overhaul of the soundchip initialization for the MSP34xx chipsets
found only many tv-cards.

We currently use more ore less evil hacks (slow_msp_audio sysctl) to
configure the various variants of these chips in order to have
stereo autodetection work.  Nevertheless, this doesn't always work
even though it _should_, according to the specs.
This is, for example, the case for some popular Hauppauge models sold
sold in Germany.

However, the Linux driver always worked for me and others.  Looking at
the sourcecode you will find that the linux-driver uses a very much
enhanced approach to program the various msp34xx chipset variants,
which is also found in the specs for these chips.

This is a port of the Linux MSP34xx code, written by Gerd Knorr
<kraxel@bytesex.org>, who agreed to re-release his code under a
BSD license for this port.

A new config option "BKTR_NEW_MSP34XX_DRIVER" is added, which is required
to enable the new driver.  Otherwise the old code is used.

The msp34xx.c file is diff-reduced to the linux-driver to make later
modifications easier, thus it doesn't follow style(9) in most cases.

Approved by:	roger (committing this, no time to test/review),
		keichii (code review)
2003-08-12 09:45:34 +00:00
Hartmut Brandt
ee4080d424 Add ng_atmpif: a HARP physical interface emulation. This allows one
to run the HARP ATM stack without real hardware.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
2003-08-11 08:40:02 +00:00
Ruslan Ermilov
98a32cb196 Fix logic in Makefile.i386,v 1.249: only back up ${DESTDIR}${KODIR}
to ${DESTDIR}${KODIR}.old if we have booted from ${DESTDIR}${KODIR},
and always keep kern.bootfile in a good shape.
2003-08-07 19:12:06 +00:00
Jeffrey Hsu
e0f688ba30 Add support for "options PIM" in the kernel configuration file.
Submitted by:	Pavlin Radoslavov <pavlin@icir.org>
2003-08-07 18:19:28 +00:00
Nate Lawson
327f90d8cc Remove nowerror from some files that no longer generate warnings. 2003-08-07 15:51:35 +00:00
Warner Losh
11dc7df11d fix disordering of filenames. Place the dev/ppc files in alphabetical
order.
2003-08-04 02:39:14 +00:00
Poul-Henning Kamp
86e2f1f1ea Remove the NSWAPDEV option, we have no upper limit on how many
swap devices we can have anymore.
2003-08-03 13:39:59 +00:00