summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastmsmith1999-08-2116-16/+36
| | | | | minute. This should cover all of the missed cases (and should let LINT build again).
* Add missing include.billf1999-08-212-0/+2
| | | | | Submitted by: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org> Reviewed by: Alex Perel <veers@disturbed.net>
* Remove MII/PHY related junk from here. It's not needed anymore.wpaul1999-08-211-106/+1
|
* To christen the brand new security category for syslog, we get IPFWgreen1999-08-211-58/+86
| | | | | | | | | | | | | | using syslog(3) (log(9)) for its various purposes! This long-awaited change also includes such nice things as: * macros expanding into _two_ comma-delimited arguments! * snprintf! * more snprintf! * linting and criticism by more people than you can shake a stick at! * a slightly more uniform message style than before! and last but not least * no less than 5 rewrites! Reviewed by: committers
* This commit adds device driver support for the Sundance Technologies ST201wpaul1999-08-2113-12/+2359
| | | | | | | | | | | | | PCI fast ethernet controller. Currently, the only card I know that uses this chip is the D-Link DFE-550TX. (Don't ask me where to buy these: the only cards I have are samples sent to me by D-Link.) This driver is the first to make use of the miibus code once I'm sure it all works together nicely, I'll start converting the other drivers. The Sundance chip is a clone of the 3Com 3c90x Etherlink XL design only with its own register layout. Support is provided for ifmedia, hardware multicast filtering, bridging and promiscuous mode.
* This is the addition of a syslog(3) security.* top-level category. Thisgreen1999-08-211-4/+5
| | | | | | | | | should be used from now on for anything security but not auth-related. Included are updates for all relevant manpages and also to /etc files, creating a new /var/log/security. Nothing in the system logs to /var/log/security yet as of the time of this commit. Reviewed by: rgrimes, imp, chris
* Use more compiler friendly test for overflow.phk1999-08-211-3/+3
| | | | Submitted by: bde
* This commit adds support for the NetBSD MII abstraction layer andwpaul1999-08-2121-6/+2970
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MII-compliant PHY drivers. Many 10/100 ethernet NICs available today either use an MII transceiver or have built-in transceivers that can be programmed using an MII interface. It makes sense then to separate this support out into common code instead of duplicating it in all of the NIC drivers. The mii code also handles all of the media detection, selection and reporting via the ifmedia interface. This is basically the same code from NetBSD's /sys/dev/mii, except it's been adapted to FreeBSD's bus architecture. The advantage to this is that it automatically allows everything to be turned into a loadable module. There are some common functions for use in drivers once an miibus has been attached (mii_mediachg(), mii_pollstat(), mii_tick()) as well as individual PHY drivers. There is also a generic driver for all PHYs that aren't handled by a specific driver. It's possible to do this because all 10/100 PHYs implement the same general register set in addition to their vendor-specific register sets, so for the most part you can use one driver for pretty much any PHY. There are a couple of oddball exceptions though, hence the need to have specific drivers. There are two layers: the generic "miibus" layer and the PHY driver layer. The drivers are child devices of "miibus" and the "miibus" is a child of a given NIC driver. The "miibus" code and the PHY drivers can actually be compiled and kldoaded as completely separate modules or compiled together into one module. For the moment I'm using the latter approach since the code is relatively small. Currently there are only three PHY drivers here: the generic driver, the built-in 3Com XL driver and the NS DP83840 driver. I'll be adding others later as I convert various NIC drivers to use this code. I realize that I'm cvs adding this stuff instead of importing it onto a separate vendor branch, but in my opinion the import approach doesn't really offer any significant advantage: I'm going to be maintaining this stuff and writing my own PHY drivers one way or the other.
* Detect if the the offset used to read from a raw device loose bitsphk1999-08-211-2/+8
| | | | when converted to block number.
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-2130-263/+496
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* Fix power management register definitions.wpaul1999-08-211-5/+5
|
* Loosen up the constructed argument segment generation slightly; rather thanmsmith1999-08-202-20/+6
| | | | | | | | trying to size it intelligently just make it 64k and leave it up to the caller to ensure that the arguments all fit within that range. This should resolve the issue that some people were seeing with the PnP BIOS scan crashing on a large PnP node.
* First small steps at merging DEVFS and PHK's Dev_t stuff.julian1999-08-206-35/+43
|
* Fixes for some style bugs in the initial version of this file:ken1999-08-201-10/+8
| | | | | | | | | | | | - missing reformatting protection in copyright. - missing blank line after copyright. - unusual spelling of idempotency macro (no trailing underscore). - unusual value of idempotency macro (1 instead of <empty>). - space instead of tab after #define's. - unnecessary namespace pollution and extra code to give it. - tab instead of space after #endif. Submitted by: bde
* Fix stupid error (xse -> xsc).mdodd1999-08-203-22/+24
| | | | | | | | | Notice that 'unit' wasn't defined once I changed the parameters of the func. These things make me feel like wading in with a flamethrowr or something. Too much cruft! </rant>
* Fix a nasty kld bug where modules with objects of type GLOB_DAT which hadgallatin1999-08-202-2/+4
| | | | non-zero addends were being loaded incorrectly
* Set ifp->if_init to the right function.mdodd1999-08-207-67/+88
| | | | | | | | | | | | if_init_f_t is passed void * containing the address of ifp->if_softc not the unit number. Someone tell me if these things don't work as I don't have the hardware needed to test them. (thats a first.) I'll get if_ze and if_zp later. Pointed out by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
* There may exist two kinds of IBM BlueLightning CPU. One is that 5/2kato1999-08-202-2/+30
| | | | | | | | | test does not change undefined flag like Cyrix CPUs. Another is that 5/2 test changes undefined flag like Intel CPUs. Latter one could not be detected and was recognized 486DX CPU. To solve this, finishidentcpu() calls identblue() when cpu_vendor is null string (that is, CPUID instruction is not supported) and cpu == CPU_486. Tests have been done on IBM BlueLightning CPUs, i486SX and i486DX.
* vm_page_alloc and contigmalloc1:alc1999-08-201-3/+3
| | | | | | Verify that free pages are not dirty. Submitted by: dillon
* Fix short timeout problems with the pt(4) driver:ken1999-08-206-8/+125
| | | | | | | | | | | | | - increase the default timeout from 10 seconds to 60 seconds - add a new kernel option, SCSI_PT_DEFAULT_TIMEOUT, that lets users specify the default timeout for the pt driver to use - add two new ioctls, one to get the timeout for a given pt device, the other to set the timeout for a given pt device. The idea is that userland applications using the device can set the timeout to suit their purposes. The ioctls are defined in a new header file, sys/ptio.h PR: 10266 Reviewed by: gibbs, joerg
* Change the name of the static variable 'files' to 'linker_files' ingrog1999-08-201-14/+14
| | | | | | order to be able to refer to it uniquely from the kernel debugger. Approved-by: peter
* Let processes retrieve their argv through procfs. Revert to the originalmarcel1999-08-192-16/+82
| | | | | | behaviour in all other cases. Submitted by: Andrew Gordon <arg@arg1.demon.co.uk>
* Fix a typo and a bug.peter1999-08-191-10/+12
| | | | | | - One RTP_PRIO_REALTIME was meant to be RTP_PRIO_IDLE. - RTP_PRIO_FIFO was not handled. - Move the usual case first for setrunqueue() etc.
* Replace the tulip_delay_300ns() with a DELAY(1). Hammering the PCI buspeter1999-08-192-22/+4
| | | | | | | | | | | | | | | | | | | | | | | to achieve a delay is pretty mean. Andrew reports: "The tulip_delay_300ns() is, well, bloody stupid on machines with a heavily loaded PCI bus. It tries to do a delay by assuming PCI reads will take a certain amount of time & issues a large amount of (expensive, 5% CPU when your PCI bus is heavily loaded) pci reads. Locally, we've replaced the calls to tulip_delay_300ns(sc) in the EMIT macros with a simple DELAY(1) and not seen any problems. Plus we've gained about 50Mb/sec throughput on our gigabit network cards because of the added PCI bus bandwidth available." Also, I do not understand why, but this change appears to stop the Transmit Fifo underrun on one of my systems (but not the Alpha PC164SX). This shouldn't make that much of a difference since the mii bus isn't touched all that often, but perhaps when it does get accessed and hence hammers the register, it was causing the chip to get upset. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
* Undo my previous commit and do it differently. Break the ffs() etc macrospeter1999-08-192-28/+54
| | | | | | | | into two parts - one to do the bsfl and the other to convert the result (base 0) to ffs()-like (base 1) in inline C. This enables the optimizer to be a lot smarter in certain cases, like where it knows that the argument is non-zero and we want ffs(known non zero arg) - 1. This appears to produce identical code to the old inline when the argument is unknown.
* Convert all the nfs macros to do { blah } while (0) to ensure itpeter1999-08-195-455/+688
| | | | | | works correctly in if/else etc. egcs had probably picked up most of the problems here before with "ambiguous braces" etc, but this should increase the robustness a bit. Based on an idea from Eivind Eklund.
* Fix breakage if blackhole=1 and tiflags & TH_SYN, pluscsgr1999-08-193-16/+26
| | | | | | style(9) fixes Submitted by: Jonathon Lemon
* Small tweak: in xl_rxeof(), rxstat should be u_int32_t, not u_int16_t.wpaul1999-08-191-3/+3
|
* Try using the builtin ffs() for egcs, it (by random inspection)peter1999-08-192-2/+10
| | | | | generates slightly better code and avoids the incl then subl when using ffs(foo) - 1.
* Update for MI switch code, and trim a heap of unused (I believe) entries.peter1999-08-195-208/+7
|
* Use the MI process selection. We use a quick routine to decide whetherpeter1999-08-193-807/+45
| | | | to get the mplock and enter the kernel to run a process in the SMP case.
* Use MI switch code for process selection. This gets run queues entirelypeter1999-08-192-148/+10
| | | | | | out of the asm code, and as a bonus implements rtprio and idprio for the Alpha. Previously if you ran an idprio process, you were assured of a deadlock.
* Update for run queue code.peter1999-08-191-2/+2
|
* Don't initialize run queues here, do it all in one place.peter1999-08-191-22/+2
|
* Run queue heads have moved to TAILQ's.peter1999-08-191-5/+1
|
* Update for MI switch components. struct prochd is replaced by TAILQ's.peter1999-08-191-10/+11
| | | | Use a spare pad field for saving the run queue index.
* Sort xrefs.mpp1999-08-191-3/+3
| | | | Submitted by: Alexey Zelkin <phantom@cris.net>
* Extract the next runnable process selection out of cpu_switch() into apeter1999-08-192-0/+205
| | | | | | | fairly machine independent C routine. gcc actually does a pretty good job of this. Reviewed by: msmith (in principle)
* Make these actually compile. I got a little delete happy pruning includesmdodd1999-08-1816-34/+82
| | | | | | | and used 'command' instead of 'cmd' in a few cases. Also clear up some unused variables. Pointed out by: phk
* Add pin-numbers for easy reference.phk1999-08-181-11/+12
|
* printf("%x",dev); -> printf("%s",devtoname(dev));nsayer1999-08-182-22/+22
|
* Slight tweak to tcp.blackhole to add optional behaviour tocsgr1999-08-182-18/+52
| | | | | | | | | drop any segment arriving at a closed port. tcp.blackhole=1 - only drop SYN without RST tcp.blackhole=2 - drop everything without RST tcp.blackhole=0 - always send RST - default behaviour This confuses nmap -sF or -sX or -sN quite badly.
* Hopefully make IFMEDIA_DEBUG compile. if_xname[] is a NetBSD addition,peter1999-08-181-3/+3
| | | | | | we need if_name, if_unit. (maybe we should pick up if_xname[] ?) Pointed out by: jkb@yahoo-inc.com
* The "LINUX" option isn't actually used or referenced anywhere. The stuffpeter1999-08-182-4/+2
| | | | | | | that goes to opt_dontuse.h is so an opt_*.h file doesn't get created even though an option may be used for bringing stuff in via files[.*]. Pointed out by: bde
* 1) rename dev->self to be consistentn_hibma1999-08-184-152/+214
| | | | | 2) use device_printf 3) properly tear down and disable interrupts when init fails
* Remove redundant spaces in the whole line, not only the first occurrence.n_hibma1999-08-181-3/+3
| | | | (not that anyone actually reads the created .c and .h files :)
* Merge from sys/i386/isa/spkr.c revision 1.38.kato1999-08-181-5/+5
|
* Merge from sys/i386/i386/machdep.c revision 1.359.kato1999-08-182-16/+34
|
* Merge from sys/i386/conf/files.i386 revision 1.259.kato1999-08-182-4/+8
|
* SIOCSIFADDR, SIOCGIFADDR, and SIOCSIFMTU are implemented inmdodd1999-08-1816-1018/+77
| | | | | | | | sys/net/if_ethersubr.c:ether_ioctl(). Drivers need not implement generic behavior. PR: kern/12126 Submitted by: in part by Boris Popov <bp@butya.kz>
OpenPOWER on IntegriCloud