summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Convert ipfw to use PFIL_HOOKS. This is change is transparent to userlandandre2004-08-1720-852/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and preserves the ipfw ABI. The ipfw core packet inspection and filtering functions have not been changed, only how ipfw is invoked is different. However there are many changes how ipfw is and its add-on's are handled: In general ipfw is now called through the PFIL_HOOKS and most associated magic, that was in ip_input() or ip_output() previously, is now done in ipfw_check_[in|out]() in the ipfw PFIL handler. IPDIVERT is entirely handled within the ipfw PFIL handlers. A packet to be diverted is checked if it is fragmented, if yes, ip_reass() gets in for reassembly. If not, or all fragments arrived and the packet is complete, divert_packet is called directly. For 'tee' no reassembly attempt is made and a copy of the packet is sent to the divert socket unmodified. The original packet continues its way through ip_input/output(). ipfw 'forward' is done via m_tag's. The ipfw PFIL handlers tag the packet with the new destination sockaddr_in. A check if the new destination is a local IP address is made and the m_flags are set appropriately. ip_input() and ip_output() have some more work to do here. For ip_input() the m_flags are checked and a packet for us is directly sent to the 'ours' section for further processing. Destination changes on the input path are only tagged and the 'srcrt' flag to ip_forward() is set to disable destination checks and ICMP replies at this stage. The tag is going to be handled on output. ip_output() again checks for m_flags and the 'ours' tag. If found, the packet will be dropped back to the IP netisr where it is going to be picked up by ip_input() again and the directly sent to the 'ours' section. When only the destination changes, the route's 'dst' is overwritten with the new destination from the forward m_tag. Then it jumps back at the route lookup again and skips the firewall check because it has been marked with M_SKIP_FIREWALL. ipfw 'forward' has to be compiled into the kernel with 'option IPFIREWALL_FORWARD' to enable it. DUMMYNET is entirely handled within the ipfw PFIL handlers. A packet for a dummynet pipe or queue is directly sent to dummynet_io(). Dummynet will then inject it back into ip_input/ip_output() after it has served its time. Dummynet packets are tagged and will continue from the next rule when they hit the ipfw PFIL handlers again after re-injection. BRIDGING and IPFW_ETHER are not changed yet and use ipfw_chk() directly as they did before. Later this will be changed to dedicated ETHER PFIL_HOOKS. More detailed changes to the code: conf/files Add netinet/ip_fw_pfil.c. conf/options Add IPFIREWALL_FORWARD option. modules/ipfw/Makefile Add ip_fw_pfil.c. net/bridge.c Disable PFIL_HOOKS if ipfw for bridging is active. Bridging ipfw is still directly invoked to handle layer2 headers and packets would get a double ipfw when run through PFIL_HOOKS as well. netinet/ip_divert.c Removed divert_clone() function. It is no longer used. netinet/ip_dummynet.[ch] Neither the route 'ro' nor the destination 'dst' need to be stored while in dummynet transit. Structure members and associated macros are removed. netinet/ip_fastfwd.c Removed all direct ipfw handling code and replace it with the new 'ipfw forward' handling code. netinet/ip_fw.h Removed 'ro' and 'dst' from struct ip_fw_args. netinet/ip_fw2.c (Re)moved some global variables and the module handling. netinet/ip_fw_pfil.c New file containing the ipfw PFIL handlers and module initialization. netinet/ip_input.c Removed all direct ipfw handling code and replace it with the new 'ipfw forward' handling code. ip_forward() does not longer require the 'next_hop' struct sockaddr_in argument. Disable early checks if 'srcrt' is set. netinet/ip_output.c Removed all direct ipfw handling code and replace it with the new 'ipfw forward' handling code. netinet/ip_var.h Add ip_reass() as general function. (Used from ipfw PFIL handlers for IPDIVERT.) netinet/raw_ip.c Directly check if ipfw and dummynet control pointers are active. netinet/tcp_input.c Rework the 'ipfw forward' to local code to work with the new way of forward tags. netinet/tcp_sack.c Remove include 'opt_ipfw.h' which is not needed here. sys/mbuf.h Remove m_claim_next() macro which was exclusively for ipfw 'forward' and is no longer needed. Approved by: re (scottl)
* Fix a deadlock on boot for some systems where reading the battery statusnjl2004-08-171-2/+6
| | | | | | | | | also generates a notify. Since we held the lock over this call, the notify never got to run and the battery status read never returned. Document this also. Tested by: Maxim Maximov <mcsi_at_mcsi.pp.ru> Approved by: re (scottl)
* Defer the capture of the "expected sync bits" until the first "normal"gibbs2004-08-172-40/+26
| | | | | | | | | | data packet is received from the mouse. In the case of many KVM's, this avoids a bug in their mouse emulation that sends back incorrect sync when you explicitly request a data packet from the mouse. Without this change, you must force the driver into stock PS/2 mode or be flooded with a never ending stream of "out of sync" messages on these KVMs. Approved by: re
* Annotate call to DELAY() in interrupt storm mitigation as beingrwatson2004-08-171-0/+3
| | | | | | something to revisit. Approved by: re (scottl)
* Add ISA attachement files for the aic7xxx driver.gibbs2004-08-172-0/+317
| | | | | Approved by: re Reminded by: obrien
* Add an ISA attachement to the aic7xxx driver to handle 284X controllers.gibbs2004-08-1714-156/+133
| | | | | | | | | | | | | | | | | | | | | The ISA probe uses an identify routine to probe all slot locations from 1 to 14 that do not conflict with other allocated resources. This required making aic7770.c part of the driver core when compiled as a module. aic7xxx.c: aic79xx.c: aic_osm_lib.c: Use aic_scb_timer_start() consistently to start the watchdog timer. This removes a few places that verbatum copied the code in aic_scb_timer_start(). During recovery processing, allow commands to still be queued to the controller. The only requirement we have is that our recovery command be queued first - something the code already guaranteed. The only other change required to make this work is to prevent timers from being started for these newly queued commands. Approved by: re
* - Sync whitespace and comments with i386 GENERIC.marius2004-08-161-53/+65
| | | | | | | | | | | - Add some commented out NICs from i386 GENERIC. Most of them look like they would work but I'm not sure if they are endian-clean and can't test. There was a report that sk(4) works on sparc64 but it doesn't look like it would because it doesn't use busdma. - Improve some of the descriptions of sparc64 specific devices. There's no functional change, i.e. no added or deleted uncommented devices or options, in this commit.
* Try to catch up with reality:marius2004-08-161-30/+38
| | | | | | | | | | | - Chase the split of pcm(4). This unbreaks LINT compiles. - sc(4) basically works and a lot of its options should be supported. - Add the creator and ofw_console drivers. - vinum(4) should work, at least its module was turned on for sparc64 a while ago. - Don't build sio(4). Its EBus front-end was removed a while ago and the ISA one hardly works. Use uart(4) instead, it's not perfect yet but works much better.
* ciss's interrupt handler was missing the INTR_ENTROPY flag.peter2004-08-161-1/+2
|
* Sync with i386 - Optimize intr_execute_handlers a bit etc.peter2004-08-164-27/+71
|
* Sync with i386 - remove unused includespeter2004-08-161-2/+0
|
* Sync with i386 - get the softc via the devclass rather than caching the devpeter2004-08-161-2/+1
|
* Sync with i386 - add ADAPTIVE_GIANT, remove pcicpeter2004-08-161-1/+1
|
* Sync with i386 - add foot shooting protection for the DDB/KDB thing.peter2004-08-161-0/+5
|
* Sync with i386 - set rbp reg to 0 for upcalls as a frame marker, not thatpeter2004-08-161-0/+1
| | | | it is guaranteed to be used in userland though.
* Sync with i386 - trace syscall entry/exit times, and a cosmetic fix.peter2004-08-161-1/+7
|
* Sync with i386 - fix bounds check in lapic_create()peter2004-08-161-1/+1
|
* Sync with i386 - pass resource requests up to parentpeter2004-08-161-92/+2
|
* Sync with i386 - s/cpu_swtch/cpu_switch/peter2004-08-161-1/+1
|
* Sync with i386 - dont count needed bounce pages if loading a buffer thatpeter2004-08-161-1/+1
| | | | was created with bud_dmamem_alloc()
* Sync with i386 - cosmetic fixespeter2004-08-161-1/+2
|
* Catch up with i386 - remove lots of no longer used symbolic constantspeter2004-08-161-76/+1
|
* Sync with i386peter2004-08-161-3/+11
|
* The existing code fails some corner cases. Replace it witharun2004-08-161-6/+3
| | | | | | | ia64_bsp_adjust() which has been tested to work in all cases for arbitrary (bsp, nslots) combinations. reviewed by: marcel@
* Remove outb to "prime" the EISA ID registers of each slot. This wasgibbs2004-08-161-7/+4
| | | | | | only required to support probing of the Adaptec 284X VLB SCSI controller which becomes visible in EISA space if you perform these writes. 284X probing is moving to an ISA attachment.
* Modify the "legacy bus" to pass all resource allocations through to itsgibbs2004-08-161-92/+2
| | | | | | | | | | | | parent rather than track resources locally. The original code was incomplete in that it would only honor requests for resources that already exist in its resource list. This prevented many ISA identify routines from allocating temporary resources. Passing the requests up to legacy's parent losing no functionality and allows these requests to succeed. Reviewed by: imp, jhb Approved by: RE
* Don't initialize static variables to 0 (C should just take care of that).philip2004-08-162-4/+4
| | | | Spotted by: njl
* I'm a dumbass: remember to initialize fh->nf_map to NULL inwpaul2004-08-161-0/+1
| | | | ndis_open_file() in the module loading case.
* As I said: the previous commit was untested... Remove an #endif whichmarcel2004-08-161-1/+0
| | | | should have ceased to exist when its corresponding #if was removed.
* Catch up with the drive-by renaming of IA32 to COMPAT_IA32. It mustmarcel2004-08-164-15/+13
| | | | | | | | | | have been rush hour... While here, move COMPAT_IA32 from opt_global.h to opt_compat.h like on amd64. Consequently, it's unsafe to use the option in pcb.h. We now unconditionally have the ia32 specific registers in the PCB. This commit is untested.
* The Texas Instruments ACX111 driver wants srand(), so provide it.wpaul2004-08-161-0/+10
|
* Make the Texas Instruments 802.11g chipset work with the NDISulator.wpaul2004-08-164-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was tested with a Netgear WG311v2 802.11b/g PCI card. Things that were fixed: - This chip has two memory mapped regions, one at PCIR_BAR(0) and the other at PCIR_BAR(1). This is a little different from the other chips I've seen with two PCI shared memory regions, since they tend to have the second BAR ad PCIR_BAR(2). if_ndis_pci.c tests explicitly for PCIR_BAR(2). This has been changed to simply fill in ndis_res_mem first and ndis_res_altmem second, if a second shared memory range exists. Given that NDIS drivers seem to scan for BARs in ascending order, I think this should be ok. - Fixed the code that tries to process firmware images that have been loaded as .ko files. To save a step, I was setting up the address mapping in ndis_open_file(), but ndis_map_file() flags pre-existing mappings as an error (to avoid duplicate mappings). Changed this so that the mapping is now donw in ndis_map_file() as expected. - Made the typedef for 'driver_entry' explicitly include __stdcall to silence gcc warning in ndis_load_driver(). NOTE: the Texas Instruments ACX111 driver needs firmware. With my card, there were 3 .bin files shipped with the driver. You must either put these files in /compat/ndis or convert them with ndiscvt -f and kldload them so the driver can use them. Without the firmware image, the NIC won't work.
* ITC.{i,d} instructions use format M41 not M42.arun2004-08-161-2/+2
| | | | reviewed by: marcel@
* White space cleanup for netinet before branch:rwatson2004-08-1632-674/+674
| | | | | | | | | | | - Trailing tab/space cleanup - Remove spurious spaces between or before tabs This change avoids touching files that Andre likely has in his working set for PFIL hooks changes for IPFW/DUMMYNET. Approved by: re (scottl) Submitted by: Xin LI <delphij@frontfree.net>
* Comment out rev. 1.4 after problems w/ IPv6, a better solution must bemlaier2004-08-161-0/+2
| | | | found.
* Fix low level code for Tau-PCI/2E1 and Tau-PCI/4E1 that was broken by previousrik2004-08-161-364/+364
| | | | | commit. Pointy hat: rik
* Allow i386 binaries to do amr ioctls such as LSI's megamgr on amd64 andambrisko2004-08-162-88/+134
| | | | | | | | ia64. PR: 63155 Submitted by: Mikhail Teterin Tested on: i386, amd64 (via 64bit Xeon system)
* Update support for Synaptics Touchpads (Volume V)philip2004-08-162-10/+58
| | | | | | | o Add (long awaited) support for guest devices Submitted by: Arne Schwabe <arne@rfc2549.org> Approved by: njl (in a former revision)
* agp_amd64.c is not needed on pc98.nyan2004-08-161-1/+4
|
* Some cards don't have the info entries in the CIS, so vendorstr and/orimp2004-08-161-7/+21
| | | | | | | | | prodstr may be NULL when fetched. For the default device description, guard against this and return the numeric IDs instead when this happens. For the matching routines, and consider NULL to not match those entries that aren't NULL w/o calling strcmp. Early patches by: Anders Hanssen
* Instead of "OpenFirmware", "openfirmware", etc. use the official spellingmarius2004-08-1638-58/+58
| | | | | | "Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended). Ok'ed by: tmm
* And isa_if.himp2004-08-161-1/+1
|
* Add pccbb_isa.c and pccbb_pci.cimp2004-08-161-1/+1
|
* Upgrading a lock does not play well together with acquiring an exclusive lockkan2004-08-161-5/+12
| | | | | | | | | | | | | | | and can lead to two threads being granted exclusive access. Check that no one has the same lock in exclusive mode before proceeding to acquire it. The LK_WANT_EXCL and LK_WANT_UPGRADE bits act as mini-locks and can block other threads. Normally this is not a problem since the mini locks are upgraded to full locks and the release of the locks will unblock the other threads. However if a thread reset the bits without obtaining a full lock other threads are not awoken. Add missing wakeups for these cases. PR: kern/69964 Submitted by: Stephan Uphoff <ups at tree dot com> Very good catch by: Stephan Uphoff <ups at tree dot com>
* Add MP_WATCHDOG option information to pc98, as it uses the i386rwatson2004-08-162-0/+2
| | | | | | | mp_machdep.c, which relies on the option's include file and defines. Constancy of: tinderbox
* Add /dev/mem and /dev/kmem to powerpc.ssouhlal2004-08-1611-0/+301
| | | | Approved by: grehan (mentor)
* Complete 'IA32' -> 'COMPAT_IA32' change for the Linuxulator32.obrien2004-08-163-12/+12
|
* Un-comment LINPROCFS.tjr2004-08-161-2/+2
|
* AMD64 on-CPU GART support.obrien2004-08-1616-8/+694
| | | | | | | This also applies to AMD64 HW running 'i386' OS. Submitted by: Jung-uk Kim <jkim@niksun.com> Integration by: obrien
* style.9.obrien2004-08-162-24/+16
|
OpenPOWER on IntegriCloud