Commit Graph

22497 Commits

Author SHA1 Message Date
Nick Hibma
9258cec045 Add the Sony MSC Memory Stick Adaptor (in the Sony PCS laptops) 2000-10-20 00:29:21 +00:00
Peter Wemm
9b57bb4ef5 execsw_set hasn't been used for a while and does not exist. 2000-10-20 00:26:33 +00:00
Josef Karthauser
5da9f8fa97 Augment the 'ifaddr' structure with a 'struct if_data' to keep
statistics on a per network address basis.

Teach the IPv4 and IPv6 input/output routines to log packets/bytes
against the network address connected to the flow.

Teach netstat to display the per-address stats for IP protocols
when 'netstat -i' is evoked, instead of displaying the per-interface
stats.
2000-10-19 23:15:54 +00:00
Warner Losh
7ae6b1ebd2 o Fix memory leak in ivars
o Change name of bus
o Change the panic on resource allocation failure to just a message.  We'll
  work out why this fails later in the pcic/pccbb code merge.
2000-10-19 22:36:41 +00:00
Doug Rabson
4e94026a72 Don't force bootverbose anymore. 2000-10-19 20:39:48 +00:00
Doug Rabson
45b56a5505 Decrease the number of ticks between clock interrupts by a factor of ten
to place more pressure on the exception handling code.
2000-10-19 20:37:28 +00:00
Doug Rabson
2a4f0b6fd4 * Disable interrupts when restoring a trapframe.
* Make sure we reset ar.k6 (used to hold the kernel stack pointer when
  we are returning to user mode after a syscall.
2000-10-19 20:36:31 +00:00
John Baldwin
d8f831678d Reparent a kernel thread to init during kthread_exit() so that the zombie
can be reaped.
2000-10-19 19:53:44 +00:00
John Baldwin
bd788f7aca - Move the prototype for proc_reparent from sys/ptrace.h to sys/proc.h
- Fix the sorting of function prototypes in sys/proc.h
2000-10-19 18:55:22 +00:00
John Baldwin
0cfbef3288 Quiet a silly warning.
Pointy-hat to:	ps
2000-10-19 18:52:20 +00:00
Ruslan Ermilov
f136389613 A failure to allocate memory for auxiliary TCP data is now fatal.
This fixes a null pointer dereference problem that is unlikely to
happen in normal circumstances.
2000-10-19 10:44:44 +00:00
Jonathan Chen
feb78939ee NEWCARD/Cardbus -
This commit adds support for Xircom X3201 based cardbus cards.
Support for the TDK 78Q2120 MII is also added.
IBM Etherjet, Intel and Xircom cards uses these chips.

Note that as a result of this commit, some Intel/DEC 21143 based cardbus
cards will also attach, but not get link.  That is being looked at.
2000-10-19 08:34:32 +00:00
John Baldwin
cbbee1e4e6 Move init_clocks earlier in the system startup so that hardclock and clock
interrupts are started before the device probe.  This allows interrupt
threads to run during the device probe among other things.
2000-10-19 08:16:34 +00:00
Mike Smith
c7e95d0abe Write the routed interrupt back to PCI configuration space. 2000-10-19 08:07:23 +00:00
Mike Smith
9d55863400 Call the BIOS to route the selected interrupt. Correctly calculate the
interrupt from the PCI routing table (ffs returns 1 for the rightmost
bit, not 0).
2000-10-19 08:06:50 +00:00
Mike Smith
4bbbd5e215 Add PCI BIOS function codes for IRQ routing fetch and route. 2000-10-19 08:02:46 +00:00
Robert Watson
47460a23a0 o Introduce new VOP_ACCESS() flag VADMIN, allowing file systems to perform
"administrative" authorization checks.  In most cases, the VADMIN test
  checks to make sure the credential effective uid is the same as the file
  owner.
o Modify vaccess() to set VADMIN as an available right if the uid is
  appropriate.
o Modify references to uid-based access control operations such that they
  now always invoke VOP_ACCESS() instead of using hard-coded policy checks.
o This allows alternative UFS policies to be implemented by replacing only
  ufs_access() (such as mandatory system policies).
o VOP_ACCESS() requires the caller to hold an exclusive vnode lock on the
  vnode: I believe that new invocations of VOP_ACCESS() are always called
  with the lock held.
o Some direct checks of the uid remain, largely associated with the QUOTA
  and SUIDDIR code.

Reviewed by:	eivind
Obtained from:	TrustedBSD Project
2000-10-19 07:53:59 +00:00
John Baldwin
dc13e6dfbb Axe the idle_event eventhandler, and add a MD cpu_idle function used
for things such as halting CPU's, idling CPU's, etc.

Discussed with:	msmith
2000-10-19 07:47:16 +00:00
Roger Hardiman
de2c745ce3 Add Daniel's name and fix release data 2000-10-19 07:34:18 +00:00
Roger Hardiman
97e1cf9c1b Update to driver 2.17
Fixes bugs in devfs when unloading and reloading
Syncs with NetBSD changes

Submitted by:	Alexander Langer <alex@big.endian.de>
Submitted by:	Thomas Klausner <wiz@netbsd.org>
Submitted by:	Daniel O'Connor" <doconnor@gsoft.com.au>
2000-10-19 07:33:28 +00:00
Søren Schmidt
550abec2a0 Minor changes to the ATA RAID support code, remove some verbosity
and put some under bootverbose..
2000-10-18 18:49:42 +00:00
Peter Wemm
5d391f75d6 EVENTHANDLER_INVOKE() takes two arguments. 2000-10-18 17:56:06 +00:00
Peter Wemm
df58517066 This didn't compile. Fix typo: s/rmang_get_start/rman_get_start/ 2000-10-18 17:45:29 +00:00
KATO Takenori
d430064589 Converted da' and wd' into rda' and rwd', respectively.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2000-10-18 15:28:10 +00:00
Ruslan Ermilov
0531ca1fd8 If we do not byte-swap the ip_id in the first place, don't do it in
the second.  NetBSD (from where I've taken this originally) needs
to fix this too.
2000-10-18 11:36:09 +00:00
Peter Wemm
93d88e0056 Attempt to fix the random read blocking. The old code slept at
priority "0" and without PCATCH, so it was uninterruptable.  And
even when it did wake up after entropy arrived, it exited after the
wakeup without actually reading the freshly arrived entropy.  I
sent this to Mark before but it seems he is in transit.
Mark: feel free to replace this if it gets in your way.
2000-10-18 10:39:18 +00:00
John Baldwin
25f3f7c530 Add in a simple API for memory barriers to machine/bus.h:
- barrier_read() enforces a memory read barrier
- barrier_write() enforces a memory write barrier
- barrier_rw() enforces a memory read/write barrier
2000-10-18 10:30:12 +00:00
Warner Losh
b8493884df Go ahead and disable the legacy mapping of the pcic registers on the
RF5C47x.  Before the code would only do this on the RF5C46x bridges.

Submitted by: Jonathan Chen
2000-10-18 09:55:39 +00:00
Hellmuth Michaelis
8ccc600fa4 Add ifpnp driver to list of i4b hardware drivers. 2000-10-18 09:16:30 +00:00
KATO Takenori
a5414135aa Merged from sys/i386/i386/machdep.c revision 1.416. 2000-10-18 09:05:09 +00:00
Hellmuth Michaelis
5682901b52 Add a debug flag bit for a new driver. 2000-10-18 08:39:24 +00:00
John Baldwin
86bc23af90 Don't needlessly pass the diagnostic counter to the idle_event event
handlers.
2000-10-18 08:10:25 +00:00
Matthew N. Dodd
0cb53e2487 Add new bus method 'GET_RESOURCE_LIST' and appropriate generic
implementation.

Add bus_generic_rl_{get,set,delete,release,alloc}_resource() functions
which provide generic operations for devices using resource list style
resource management.

This should simplify a number of bus drivers.  Further commits to follow.
2000-10-18 05:15:40 +00:00
Jonathan Chen
6672edd320 Initial commit of NEWCARD cardbus side (that actually compiles and works)
Files:
	dev/cardbus/cardbus.c
	dev/cardbus/cardbusreg.h
	dev/cardbus/cardbusvar.h
	dev/cardbus/cardbus_cis.c
	dev/cardbus/cardbus_cis.h
	dev/pccbb/pccbb.c
	dev/pccbb/pccbbreg.h
	dev/pccbb/pccbbvar.h
	dev/pccbb/pccbb_if.m

This should support:
  - cardbus controllers:
    * TI 113X
    * TI 12XX
    * TI 14XX
    * Ricoh 47X
    * Ricoh 46X
    * ToPIC 95
    * ToPIC 97
    * ToPIC 100
    * Cirrus Logic CLPD683x
  - cardbus cards
    * 3c575BT
    * 3c575CT
    * Xircom X3201 (includes IBM, Xircom and, Intel cards)
    [ 3com support already in kernel, Xircom will be committed real soon now]

This doesn't work with 16bit pccards under NEWCARD.

Enable in your config by having "device pccbb" and "device cardbus".
(A "device pccard" will attach a pccard bus, but it means you system have
a high chance of panicing when a 16bit card is inserted)

It should be fairly simple to make a driver attach to cardbus under
NEWCARD -- simply add an entry for attaching to cardbus on a new
DRIVER_MODULE and add new device IDs as necessary.  You should also make
sure the card can be detached nicely without the interrupt routine doing
something weird, like going into an infinite loop.  Usually that should
entail adding an additional check when a pci register or the bus space is
read to check if it equals 0xffffffff.

Any problems, please let me know.

Reviewed by: imp
2000-10-18 03:37:21 +00:00
Jonathan Chen
0db7e66cdc Initial commit of NEWCARD cardbus side (that actually compiles and works)
Files:
	dev/cardbus/cardbus.c
	dev/cardbus/cardbusreg.h
	dev/cardbus/cardbusvar.h
	dev/cardbus/cardbus_cis.c
	dev/cardbus/cardbus_cis.h
	dev/pccbb/pccbb.c
	dev/pccbb/pccbbreg.h
	dev/pccbb/pccbbvar.h
	dev/pccbb/pccbb_if.m

This should support:
  - cardbus controllers:
    * TI 113X
    * TI 12XX
    * TI 14XX
    * Ricoh 47X
    * Ricoh 46X
    * ToPIC 95
    * ToPIC 97
    * ToPIC 100
    * Cirrus Logic CLPD683x
  - cardbus cards
    * 3c575BT
    * 3c575CT
    * Xircom X3201 (includes IBM, Xircom and, Intel cards)
    [ 3com support already in kernel, Xircom will be committed real soon now]

This doesn't work with 16bit pccards under NEWCARD.

Enable in your config by having "device pccbb" and "device cardbus".
(A "device pccard" will attach a pccard bus, but it means you system have
a high chance of panicing when a 16bit card is inserted)

It should be fairly simple to make a driver attach to cardbus under
NEWCARD -- simply add an entry for attaching to cardbus on a new
DRIVER_MODULE and add new device IDs as necessary.  You should also make
sure the card can be detached nicely without the interrupt routine doing
something weird, like going into an infinite loop.  Usually that should
entail adding an additional check when a pci register or the bus space is
read to check if it equals 0xffffffff.

Any problems, please let me know.

Reviewed by: imp
2000-10-18 03:25:13 +00:00
Warner Losh
e8f9f4ecd4 Remove some silly debug writes and code that we don't need 2000-10-18 02:22:39 +00:00
Warner Losh
cc8e7d4250 o Remove a boatload of debugging printfs.
o Report function number and config index on probe line
o Activate the resources (I hope) when RF_ACTIVE is set on those resources
  I'm allocating on behalf of my children.
o Always enable interrupts on multifunction cards in the multifunction
  register.
2000-10-18 02:21:00 +00:00
Matthew N. Dodd
a4a64f2f0a Use appropriate resource management accessors instead of directly
referencing structure members.

Use rman_get_size() instead of end - start + 1.
2000-10-18 00:09:26 +00:00
Matthew N. Dodd
7f9b204636 Add rman_get_size(), which does what you would expect.
Further commits to make use of this will follow.
2000-10-17 23:45:28 +00:00
John Baldwin
3650b37578 - Wrap the sanity checks for staying in the idle loop for absurdly long
amounts of time in #ifdef DIAGNOSTIC
- Call vm_page_zero_idle() during the idle loop.
2000-10-17 23:12:37 +00:00
John Baldwin
ffc2c9e3ee - Catch up to moving headers, machine/ipl.h -> sys/ipl.h
- Fix some whitespace bogons.

Submitted by:	bde (2)
2000-10-17 23:10:23 +00:00
Warner Losh
85d693f9d8 Implement resource alignment as discussed in arch@ a long time ago.
This was implemented by Shigeru YAMAMOTO-san and Jonathan Chen.  I've
cleaned them up somewhat and they seem to work well enough to boot
current (but given current's state it can be hard to tell).  Doug
Rabson also reviewed the design and signed off on it.
2000-10-17 22:08:03 +00:00
Matt Jacob
e92fbe47e2 Roll minor revision- for once we'll use this because.... if revision >= 5.4,
compile time will build in mutex locks, otherwise the old locking (splcam/splx
with a recursion counter) will be compiled in.

We still depend on config_intr_hook to tell us when it's okay to call
msleep instead of polling. It'd be real nice if we could do this early
enough to not hang up a machine struggling with a bad Fibre Channel loop,
but that's still to come.
2000-10-17 18:18:14 +00:00
Matt Jacob
39f3fc6f69 remove "SERVICING_INTERRUPT" nonsense 2000-10-17 18:15:30 +00:00
Paul Saab
c794ceb56a Implement write combining for crashdumps. This is useful when
write caching is disabled on both SCSI and IDE disks where large
memory dumps could take up to an hour to complete.

Taking an i386 scsi based system with 512MB of ram and timing (in
seconds) how long it took to complete a dump, the following results
were obtained:

Before:				After:
	WCE           TIME		WCE           TIME
	------------------		------------------
	1	141.820972		1	 15.600111
	0	797.265072		0	 65.480465

Obtained from:	Yahoo!
Reviewed by:	peter
2000-10-17 10:05:49 +00:00
Roger Hardiman
63883894bf Add new bktr options 2000-10-17 07:59:56 +00:00
Warner Losh
c5cdd6f29e More NEWCARD fixes. We now almost properly print the probe message.
o Remember the resources we allocate for the config entry.
o When we get the resource, do an resource_list_add and do a
  resource_list_delete if we fail later in the resource list.
o In the pccard bus, we allocate the resources.  When a child asks for
  them, just return the resources that we allocated (thanks to Paul
  Richards and Mike Smith for the idea).
2000-10-17 06:29:21 +00:00
Andrew Gallatin
242fae60f0 Some linux apps, such as IBM's JDK 1.3, will attempt to mmap thread
stacks near the top of their address space.  If their TOS is greater
than vm_maxsaddr, vm_map_growstack() will confuse the thread stack
with the process stack and deliver a SEGV if they attempt to grow the
thread stack past their current stacksize rlimit.  To avoid this,
adjust vm_maxsaddr upwards to reflect the current stacksize rlimit
rather than the maximum possible stacksize.  It would be better to
adjust the mmap'ed region, but some apps (again, IBM's JDK 1.3) do not
check mmap's return value..

This commit (in conjunction with setting MINSIGSTKSZ to 2048 &
rebuilding your kernel and modules) will get IBM's JDK 1.3 working
with FreeBSD at least well enough to run many of the example applets.

Reviewed by: marcel
Tested by:   sto@stat.duke.edu, many others on freebsd-java@
2000-10-17 00:25:43 +00:00
Andrew Gallatin
21b0b22ce3 regen after addition of linux_rt_sigreturn 2000-10-17 00:03:02 +00:00
Andrew Gallatin
7936339495 A start at an implemention of linux_rt_sendsig & linux_rt_sigreturn
and associated user-level signal trampoline glue.

Without this patch, an SA_SIGINFO style handler can be installed by a linux
app, but if the handler accesses its sip argument, it will get a garbage
pointer and likely segfault.

We currently supply a valid pointer, but its contents are mainly
garbage.  Filling this in properly is future work.

This is the second of 3 commits that will get IBM's JDK 1.3 working with
FreeBSD ...
2000-10-17 00:00:20 +00:00