summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the PC98 platform to the ATA driver.sos2002-12-0312-44/+614
| | | | | | | | | | | | | | | | This mostly consists of functionality to serialize accesses to the two ATA channels (which can also be used to "fix" certain PCI based controllers). Add support for Acard controllers. Enable the ATA driver in PC98 GENERIC, and add device hints. Update man page with latest support. The PC98 core team has kindly provided me with a PC98 machine that made this all possible, thanks to all that contributed to that effort, without that this would probably newer have been possible.. Approved by: re@
* Have to use bread() rather than UFS_BALLOC() when obtaining amckusick2002-12-031-24/+30
| | | | | | | | | | | previously allocated block as the previous use of the block may have fallen out of the cache. Failure to reread its contents cause zeroed results to be written instead of the proper contents. Conversely, when the block is going to be entirely filled in, it is not necessary reread the old contents. Sponsored by: DARPA & NAI Labs. Approved by: re
* License tweak: remove clause 3 per permission of NAI.rwatson2002-12-032-6/+0
| | | | | | Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Unhook the old LOMAC module, now replaced with mac_lomac.rwatson2002-12-0332-6860/+0
| | | | | | Approved by: re (jhb) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Properly account for prefetchable memory when a request is being made.imp2002-12-031-47/+112
| | | | | | | | | | | | | | | | We allow the request to go through if it matches either a prefetchable or a non-prefetchable part of the bridge. We do not check to make sure it is the right kind of memory because most drivers to not yet properly set RF_PREFETCHABLE (only cardbus seems to do so, and I'm not entirely sure it does it right). RF_PREFETCHABLE was invented for cardbus, so hasn't been properly documented yet. This is still overridable by hw.pci.allow_unsupported_io_ranges, but the need for that is greatly reduced, especially for the nvida driver. Approved by: re Reviewed by: jhb and many testers Submitted by: Matt Emmerton (although this has been reworked somewhat)
* Avoid recursive acquisition of the page queues lock in pmap_unuse_pt().alc2002-12-032-2/+6
| | | | Approved by: re
* Implement DIOCGDINFO for volumes. newfs will no longer build a filegrog2002-12-021-0/+4
| | | | | | system on a volume without a disk label. Approved by: re (rwatson)
* Don't blindly call make_dev when configuring an object: the devicegrog2002-12-021-23/+24
| | | | | | | | | could already exist, and this triggers a booby trap panic in make_dev. remove_plex_entry: Don't remove the stripe mutex here, it gets done in free_plex. Approved by: re (rwatson)
* Use the hotspot code to prevent people from overwriting their disklabelphk2002-12-021-11/+90
| | | | | | with stuff which would ruin the day for any open parititons. Approved by: re
* Add a simplified version of the hot-spot code to enable us to protectphk2002-12-022-8/+95
| | | | | | in-band disklabels from in-band vandalism. Approve by: re
* Align the FPU state in the ucontext and sigcontext to 16 bytesdeischen2002-12-0211-48/+76
| | | | | | | | | to accomodate the new SSE/XMM floating point save/restore instructions. This commit is mostly from bde and includes some style nits. Approved by: re (jhb)
* Remove a workaround for a binutils bug that was fixed in the recenttmm2002-12-021-19/+4
| | | | | | | | | | import, as it breaks the relocation kernel modules built with the new binutils. Note that this, together with the binutils import, marks a kernel module flag day on sparc64: modules built with the old binutils will not work with new kernels and vice versa. Mismatches will result in panics. Approved by: re
* Hold the page queues lock when calling pmap_unwire_pte_hold() oralc2002-12-022-6/+20
| | | | | | | | pmap_remove_pte(). Use vm_page_sleep_if_busy() in _pmap_unwire_pte_hold() so that the page queues lock is released when sleeping. Approved by: re (blanket)
* Fix a dumb bug that broke net booting on sparc64. The wrong length wasjake2002-12-021-1/+1
| | | | | | | | passed to strncmp. Noticed by: tmm Approved by: re Pointy hat to: jake
* MFi386alc2002-12-022-0/+4
| | | | | | Hold the page queues lock around vm_page_unhold() in vunmapbuf(). Approved by: re (blanket)
* Always initialize the UPA target module id in the interrupt mappingtmm2002-12-013-33/+34
| | | | | | | | | | | | register to the one of the processor doing the interrupt setup. This is required since this field is preinitialized to 0, but there exist machines which have no processor with a MID of 0 (e.g. e450s with 1 or 2 processors). Add some more macros for handle the interrupt mapping registers, and rename some existing ones for consistency. Approved by: re
* 1.) Do not look for PCI INOs in the FFB interrupt mapping registers; theytmm2002-12-011-2/+6
| | | | | | | | | | | are nevers used for PCI interrupts, but can cause false matches since they are fully programmable. 2.) Skip the mapping registers for slot a2 and a3 on "psycho" bridges, since they are not present there. Again, this could cause false matches, which would result in the interrupt being delivered at most once. Submitted by: jake (2) Approved by: re
* Remove some long-dead cruft in the interrupt handling code which wastmm2002-12-011-44/+31
| | | | | | never used in FreeBSD. Approved by: re
* Reverse the quirk table entry for swizzling on a missing interrupt map;tmm2002-12-011-7/+10
| | | | | | | | | | | | | this is now done on all machines except for some known problematic ones. Add an additional guard to make sure that the interrupt numbers are in the correct range before swizzling. This should catch any remaining models for which the swizzle is inappropriate. Correct the swizzle calculation to account for the fact that the parent interrupt numbers to be swizzled are 1-based. Approved by: re
* Fix some comments describing psycho registers.tmm2002-12-011-2/+2
| | | | Approved by: re
* Do not panic when a dmamap is unloaded more then once, but just silentlytmm2002-12-011-4/+2
| | | | | | | ignore it. This is non-fatal on the other architectures, and some drivers seem to do this. Approved by: re
* Hold the page queues lock when calling pmap_protect(); it updates fieldsalc2002-12-011-7/+22
| | | | | | | of the vm_page structure. Make the style of the pmap_protect() calls consistent. Approved by: re (blanket)
* Add Makefile.inc to include ../Makefile.inc.nyan2002-12-011-0/+3
| | | | Approved by: re (rwatson)
* Use more mnemonic argument names in the access functions.phk2002-12-011-2/+2
| | | | | Sponsored by: DARPA & NAI Labs Approved by: re (blanket)
* Fix a cut&past-o.phk2002-12-011-1/+1
| | | | | Spotted by: yar Approved by: re (blanket)
* Conceiveably, there may exist an algorithm which can tell if a sequence of bytesphk2002-12-011-0/+7
| | | | | | | | are the output of AES/128/CBC or ARC4RANDOM. Encrypt the random data with which we wipe when we get a BIO_DELETE to make such an algorithm useful. Sponsored by: DARPA & NAI Labs Approved by: re (blanket)
* Use unsigned for an index.phk2002-12-011-6/+7
| | | | | Sponsored by: DARPA & NAI Labs. Approved by: re (blanket).
* In ata_reinit, when ata_getparam fails for a new device (indicating thatthomas2002-12-011-4/+5
| | | | | | | | | | | the device is not actually present), clear the corresponding bit in the ch->devices bitmap. This resolves a panic that occurred with ATAPI/CAM after an APM suspend/resume, when the ATA hardware would erroneously report an extra ATAPI device. Approved by: re, sos Reviewed by: roberto MFC after: 7 days
* Major update to the ahd driver to fix many bugs found in the previousscottl2002-12-014-372/+949
| | | | | | | | | | version, plus add support for the new features found in the Rev B version of the chip. The changelog is quite long and can be provided on request. Major features include vastly improved protocol violation handling, full support for the 7902 Rev B, better parity error handling, and better packetized overrun handling, to name a few. Approved by: re (blanket)
* Implement workaround for broken busfree-rev in the A4.scottl2002-12-011-69/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HP -> CPQ Rearrange IDs to better match which chips they use. Convert to uniform product description strings. Simplify 7901A setup function. Add the NONPACKFIFO_BUG and PACED_NEGTABLE_BUG entries for the A. Add rev B bugs and features. The double write workaround for CURRSCB is only required if abort pending is set. Remove this work around and set the abort pending bug bit on the B at least until we have better confirmation that the double write is always safe. Add updated H2B identifiers Move IOCell paramters into softc and add a hook for the OSM to modify these as well as other settings prior to committing them to the chip. SLEW -> SLEWRATE PREQDIS in DEVCONFIG1 went away after the A2. Remove all code that references this bit. This is especially important since this bit was reused in the B for a different HW fix workaround. Properly set the AHD_NEW_IOCELL_OPTS and AHD_NEW_DFCNTRL_OPTS features for the B. Remove stray/random extra 7901A generic PCI table entry. Also switch the correct 7901A generic entry to use ID_ALL_MASK since we can only differentiate the 7901A from the 7902 by checking for a "type field" of 0xE. Set AHD_INTCOLLISIONT_BUG for the Rev B. Set the PREQDIS bit in DEVCONFIG1 for the B. The bit is misnamed, but seems to disable a work-around that breaks on the B on PCI busses. Add a routine for testing memory mapped register access. This will hopefully detect things like buggy via chipsets so that the OSM can fallback to using I/O mapped access when memory mapped I/O simply will not work. Approved by: re (blanket)
* Add our controller name to the front of ourscottl2002-12-011-3/+16
| | | | | | | | | | | diagnostic "Setting Mode" messages. Use a read of HCNTRL to flush our write to CLRCMDCMPLT on the RevB. This allows us to check to see if the sequencer is paused and to initiate the interrupt collision workaround without incuring an extra read. Approved by: re (blanket)
* Remove redundant check for chip type being PCI-X.scottl2002-12-011-4/+4
| | | | | | | | | PCI-X only workarounds are automatically masked out if we are operating in PCI mode. Make use of ahd_pci_test_register_access() Approved by: re (blanket)
* Update to include new ahd_scb_timer_reset APIscottl2002-12-011-3/+12
| | | | | | | | Move IOCell paramters into softc and add a hook for the OSM to modify these as well as other settings prior to committing them to the chip. Approved by: re (blanket)
* Hold the page queues lock when calling pmap_protect(); it updates fieldsalc2002-12-011-3/+5
| | | | | | | of the vm_page structure. Nearby, remove an unnecessary semicolon and return statement. Approved by: re (blanket)
* Assert that the page queues lock is held in pmap_changebit()alc2002-12-012-4/+4
| | | | | | and pmap_ts_referenced(). Approved by: re (blanket)
* Increase the scope of the page queue lock in vm_pageout_scan().alc2002-12-011-2/+2
| | | | Approved by: re (blanket)
* Fix typo in comment. It's SYSINIT, not SYSINT.keramida2002-11-301-1/+1
| | | | Approved by: re (murray)
* Move the check for the MD_SHUTDOWN flag to before the tsleep() calliedowse2002-11-301-1/+1
| | | | | | | | | | in the per-device kthread. This ensures that synchronisation with mddestroy() succeeds even if the kthread was not waiting in tsleep() at the time of the wakeup(). Among other things, this fixes the problem of mdconfig getting stuck when an attempt is made to use a zero-length file as a vnode-type backing store. Approved by: re
* Synchronize perforce Id tagsscottl2002-11-301-1/+1
| | | | Approved by: re (blanket)
* Bring in many bugfixes and changes obtained from formal testing:scottl2002-11-304-149/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aic7xxx.c: aic7xxx.h: aic7xxx.reg: aic7xxx.seq: Bring in the protocol violation handler from the U320 driver and replace the NO_IDENT sequencer interrupt code with the PROTO_VIOLATION code. Support for this code required the following changes: SEQ_FLAGS: IDENTIFY_SEEN -> NOT_IDENTIFIED Added NO_CDB_SENT SCB_CONTROL: TARGET_SCB == STATUS_RCVD for initiator mode scb->flags: Added SCB_TARGET_SCB since we cannot rely on TARGET_SCB as a target/initiator differentiator due to it being overloaded in initiator mode to indicate that status has been received. aic7xxx.seq: Move data fifo CLRCHN to mesgin_rdptrs which is a safer location for doing this operation. This also saves a sequencer instruction. aic7xxx.c: aic7xxx.h: Change ahc/ahd_upate_neg_request() to take a "negotiation type" enum that allows us to negotiate: o only if the goal and current parameters differ. o only if the goal is non-async o always - even if the negotiation will be for async. aic7xxx.seq: Reset the FIFO whenever a short CDB transfer occurs so that the FIFO contents do not corrupt a future CDB transfer retry. Add support for catching the various protocol violations handled by ahc_handle_protocol_violation. Reformat some comments. aic7xxx.c: aic7xxx.h: Just for safety, have the aic7xxx driver probe the stack depth. aic7xxx.c: aic7xxx.h: Save and restore stack contents during diagnostics. Some chip variants overwrite stale entries on a stack "pop". Don't use 0 to probe the stack depth. 0 is the typical value used to backfill the stack if entries are overwritten on a "pop". aic7xxx.h: Add a missing typedef. Collapse SCB flag entries so they are bit contiguous. Add AHD_ULTRA2_XFER_PERIOD for narrow fallback calculations aic7xxx.c: Don't panic (as a diagnostic to catch bugs) if we decided to force the renegotiation of async even if we believe we are already async. This should allow us to negotiate async instead of the full user goal rate during startup if bus resets are disabled. Add a space to the end of the ahc/ahd_print_devinfo routines so that it behaves as expected by the code that uses it. Only force a renegotiation on a selection timeout if the SCB was valid. Doing otherwise may be dangerous as the connection was not valid for an unknown reason. Add additional diagnostic output to ahc_dump_card_state(), and have it use the register pretty printing functions. Update ahc_reg_print() to handle a NULL cur_col. Add a newline to ahc_dump_card_state() output. Bring back "use_ppr". We need to use_ppr anytime doppr is true or we have non-zero protocol options. The later case was not handled in the recent removal of use_ppr. Move a comment and remove a useless clearing of use_ppr. Don't disable ENBUSFREE when single stepping on a DT capable controller. We cannot re-enable unexpected busfree detection, so we must clear BUSFREE on each step instead. Correct the lookup of the SCB ID in ahc_handle_proto_error. Remove a diagnostic printf. Remove unecessary restoration of the STACK for older chips. Approved by: re (blanket)
* Add a routine for testing memory mapped register access.scottl2002-11-301-8/+58
| | | | | | | | This will hopefully detect things like buggy via chipsets so that the OSM can fallback to using I/O mapped access when memory mapped I/O simply will not work. Approved by: re (blanket)
* Always compile in the AHC_ALLOW_MEMIO code, but only try MEMIO ifscottl2002-11-301-4/+22
| | | | | | | | | AHC_ALLOW_MEMIO is set, or the hint hint.ahc.N.allow_memio=1 is set in the bootloader. Make use of ah?_pci_test_register_access(). Approved by: re (blanket)
* Handle changes to SCB_CONTROL, scb->flags and SEQ_FLAGSscottl2002-11-301-5/+6
| | | | Approved by: re (blanket)
* Use the new ahc_scb_timer_reset APIscottl2002-11-301-4/+27
| | | | | | Remove AHC_ALLOW_MEMIO Approved by: re (blanket)
* Add a check to disable the previous patch so that future filesystemsmckusick2002-11-301-2/+4
| | | | | | | that choose to place their superblocks in non-standard locations will not get them smashed. Sponsored by: DARPA & NAI Labs.
* Remove a race condition / deadlock from snapshots. Whenmckusick2002-11-303-60/+151
| | | | | | | | | | | | converting from individual vnode locks to the snapshot lock, be sure to pass any waiting processes along to the new lock as well. This transfer is done by a new function in the lock manager, transferlockers(from_lock, to_lock); Thanks to Lamont Granquist <lamont@scriptkiddie.org> for his help in pounding on snapshots beyond all reason and finding this deadlock. Sponsored by: DARPA & NAI Labs.
* Add support for the Olivetti branded EISA boards.scottl2002-11-301-1/+15
| | | | Approved by: re (blanket)
* Assert that the page queues lock is held in pmap_page_exists_quick().alc2002-11-302-2/+2
| | | | Approved by: re (blanket)
* Fix two deadlocks in snapshots:mckusick2002-11-301-2/+7
| | | | | | | | | | | | | | | | 1) Release the snapshot file lock while suspending the system. Otherwise a process trying to read the lock may block on its containing directory preventing the suspension from completing. Thanks to Sean Kelly <smkelly@zombie.org> for finding this deadlock. 2) Replace some bdwrite's with bawrite's so as not to fill all the buffers with dirty data. The buffers could not be cleaned as the snapshot vnode was locked hence the system could deadlock when making snapshots of really massive filesystems. Thanks to Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> for figuring this out. Sponsored by: DARPA & NAI Labs.
* devd kernel improvements:imp2002-11-301-21/+38
| | | | | | | | | | | | | 1) Record all device events when devctl is enabled, rather than just when devd has devctl open. This is necessary to prevent races between when a device arrives, and when devd starts. 2) Add hw.bus.devctl_disable to disable devctl, this can also be set as a tunable. 3) Fix async support. Reset nonblocking and async_td in open. remove async flags. 4) Free all memory when devctl is disabled. Approved by: re (blanket)
OpenPOWER on IntegriCloud