imp [Thu, 24 May 2001 06:54:48 +0000 (06:54 +0000)]
Use bus_space functions rather than inb/outb.
Add defines for PCIC_INDEX and PCIC_DATA offsets.
Change PCIC_INDEX_0 to PCIC_PORT_0
Add define for PCIC_NPORT.
Document why the vadem probe works.
imp [Thu, 24 May 2001 04:24:22 +0000 (04:24 +0000)]
Do what we should have done a long time ago:
o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_PCMCIA and
programming interface is 0, assume that it is a generic PCMCIA PCI
chip we can program. I don't think there are any of these that
we don't know about, but you never know.
o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_CARDBUS and
programming interface is 0, assume that it is a YENTA cardbus bridge
that we know how to cope with. There are likely some cardbus bridges
that haven't it made it in here yet.
imp [Thu, 24 May 2001 04:03:28 +0000 (04:03 +0000)]
Move getb1 and putb1 from pcic_isa.c to pcic.c. Rename them to
pcic_{get,put}b_io. There are some pci bridges (the CL-PD6729 and
maybe others) that do not have memory mapped registers, so we'll need
these in both places. Declare them in pcicvar.h.
grog [Wed, 23 May 2001 23:27:08 +0000 (23:27 +0000)]
*sigh* We can't remove VINUMDEBUG entirely, since we include kernel
header files and sources which depend on it. For userland, define
VINUMDEBUG here. Also remove a now superfluous #ifdef.
jhb [Wed, 23 May 2001 22:48:28 +0000 (22:48 +0000)]
- Add in several asserts of vm_mtx.
- Assert Giant in vm_pageout_scan() for the vnode hacking that it does.
- Don't hold vm_mtx around vget() or vput().
- Lock Giant when calling vm_pageout_scan() from the pagedaemon. Also,
lock curproc while setting the P_BUFEXHAUST flag.
- For now we still hold Giant for all of the vm_daemon. When process
limits are locked we will be only need Giant for swapout_procs().
jhb [Wed, 23 May 2001 22:42:10 +0000 (22:42 +0000)]
- Assert that the vm lock is held for all of _vm_object_allocate().
- Restore the previous order of setting up a new vm_object. The previous
had a small bug where we zero'd out the flags after we set the
OBJ_ONEMAPPING flag.
- Add several asserts of vm_mtx.
- Assert Giant is held rather than locking and unlocking it in a few
places.
- Add in some #ifdef objlocks code to lock individual vm objects when
vm objects each have their own lock someday.
- Don't bother acquiring the allproc lock for a ddb command. If DDB
blocked on the lock, that would be worse than having an inconsistent
allproc list.
jhb [Wed, 23 May 2001 22:38:00 +0000 (22:38 +0000)]
- Add lots of vm_mtx assertions.
- Add a few KTR tracepoints to track the addition and removal of
vm_map_entry's and the creation adn free'ing of vmspace's.
- Adjust a few portions of code so that we update the process' vmspace
pointer to its new vmspace before freeing the old vmspace.
jhb [Wed, 23 May 2001 22:35:45 +0000 (22:35 +0000)]
- Lock the VM around the pmap_swapin_proc() call in faultin().
- Don't lock Giant in the scheduler() function except for when calling
faultin().
- In swapout_procs(), lock the VM before the proccess to avoid a lock order
violation.
- In swapout_procs(), release the allproc lock before calling swapout().
We restart the process scan after swapping out a process.
- In swapout_procs(), un #if 0 the code to bump the vmspace reference count
and lock the process' vm structures. This bug was introduced by me and
could result in the vmspace being free'd out from under a running
process.
- Fix an old bug where the vmspace reference count was not free'd if we
failed the swap_idle_threshold2 test.
jhb [Wed, 23 May 2001 22:31:15 +0000 (22:31 +0000)]
- Fix the sw_alloc_interlock to actually lock itself when the lock is
acquired.
- Assert Giant is held in the strategy, getpages, and putpages methods and
the getchainbuf, flushchainbuf, and waitchainbuf functions.
- Always call flushchainbuf() w/o the VM lock.
jhb [Wed, 23 May 2001 22:17:43 +0000 (22:17 +0000)]
- Obtain Giant in mmap() syscall while messing with file descriptors and
vnodes.
- Fix an old bug that would leak a reference to a fd if the vnode being
mmap'd wasn't of type VREG or VCHR.
- Lock Giant in vm_mmap() around calls into the VM that can call into
pager routines that need Giant or into other VM routines that need
Giant.
- Replace code that used a goto to jump around the else branch of a test
to use an else branch instead.
wpaul [Wed, 23 May 2001 22:10:55 +0000 (22:10 +0000)]
Tweak the xmphy driver a little bit based on something I learned about
the built-in 1000baseX interface in the Level 1 LXT1001 chip. The Level 1
PHY comes up with the isolate bit in the control register set by default,
but it also has the autonegotiate bit set. When you tell the xmphy driver
to select IFM_AUTO mode, it sees that the autoneg bit is already on, and
thus doesn't bother updating the control register. However this means that
the isolate bit is never turned off (unless you manually select 1000baseSX
full or half duplex mode, which does result in the control register being
modified and the ISO bit being turned off).
This subtle and unusual behavioral difference stopped me from being able
to receive packets on the SMC9462TX card for several days, since isolating
the PHY disconnects it from the MAC's data interface. The fix is to omit
the 'is the autoneg big set?' test, since it doesn't really provide much
of an optimization anyway.
This commit also updates the xmphy driver to support the Jato/Level 1
internal PHY. (I'm not sure how Jato Technologies is related to Level 1:
all I know is the OUI from the PHY ID registers maps to Jato in the OUI
database.) This will be used once I add the if_lge driver to support
the LXT10010 chip.
jhb [Wed, 23 May 2001 22:06:47 +0000 (22:06 +0000)]
- Lock the VM when initializing the vmspace for proc0.
- Don't bother releasing Giant while doing a lookup on the vm_map of
initproc while starting up init. We have to grab it again right after
the lookup anyways.
phk [Wed, 23 May 2001 21:01:01 +0000 (21:01 +0000)]
When a game ends that makes the top 10, the function insert_score in
score.c is called to make the new score file. But the case for KFIRE
(killed by fire) incorrectly uses strcpy instead of strcat (all the
other cases use strcat). This puts the string in the wrong place and
corrupts the score file.
PR: 13278
Submitted by: Mark W. Krentel krentel@dreamscape.com
dfr [Wed, 23 May 2001 19:44:17 +0000 (19:44 +0000)]
Make sure that all resource allocation is handled in the pcib device, not
the chipset. This is already how the multi-hose systems handle resource
allocation and it fixes a bug where dense and bwx memory allocations were
not handled properly.
jhb [Wed, 23 May 2001 19:38:26 +0000 (19:38 +0000)]
Add in assertions to ensure that we always call msleep or mawait with
either a timeout or a held mutex to detect unprotected infinite sleeps
that can easily lead to deadlock.
phk [Wed, 23 May 2001 19:02:50 +0000 (19:02 +0000)]
syslogd gets kernel log messages only once every 30 seconds or
at the top of the minute, whichever comes first. It seems
logtimeout() is only called once after the kernel log is opened
and then never again after that. So I guess syslogd only gets
kernel log messages by virtue of syncer(4)'s flushes ...?
pirzyk [Wed, 23 May 2001 17:12:09 +0000 (17:12 +0000)]
Changed 'blocks' to 'usage' because we may not be getting quotas from
a ufs filesystem and it may be reporting in K instead of 512b blocks.
This is true when using a vxfs filesystem (on a solaris box) for instance.
grog [Wed, 23 May 2001 05:25:45 +0000 (05:25 +0000)]
Set flag VF_HASDEBUG in vinum_conf to indicate that the module was
compiled with debug support. This can be used by userland programs to
recognize which ioctls the module supports.
As a result, remove the gross debug device/non-debug device hack used
to recognize whether the kernel module was in sync with the userland
module.
Replace explicit references to major/minor numbers of vinum
superdevice with the VINUM_SUPERDEV macro written for that purpose.
imp [Wed, 23 May 2001 05:06:04 +0000 (05:06 +0000)]
Add better support for the Ricoh 5C296 and 5C396 chips. These chips
have a slightly different 3.3V support than the other clones, so
compensate as best we can. Note: 3.3V support is untested since I do
not have any 3.3V cards that I know of to test it with.
dd [Tue, 22 May 2001 22:13:14 +0000 (22:13 +0000)]
Convert this driver to (ab?)use line disciplines to get the input it
needs instead of relying on idiosyncratic hacks in the tty subsystem.
Also add module code since this can now be compiled as a module.
bde [Tue, 22 May 2001 21:20:49 +0000 (21:20 +0000)]
Convert npx interrupts into traps instead of vice versa. This is much
simpler for npx exceptions that start as traps (no assembly required...)
and works better for npx exceptions that start as interrupts (there is
no longer a problem for nested interrupts).
Submitted by: original (pre-SMPng) version by luoqi
joerg [Tue, 22 May 2001 12:37:50 +0000 (12:37 +0000)]
Include the Power Control page (0x1a) that is standardized by SCSI-3.
At least some IBM drives support the Standby Condition Timer (i. e.
they allow for an automatic spindown).
Update copyright for 2001. I don't want to insert my name for just
one mode page definition, do people think that `The FreeBSD Project'
is OK?