Commit Graph

24668 Commits

Author SHA1 Message Date
Peter Wemm
adaae327bb Remove some cruft 2001-02-27 07:40:09 +00:00
Peter Wemm
26086a0366 "Document" the COMPAT_LINUX and IBCS2 ABI emulation support together
rather than in silly places like "VFS Cluster debugging".  People
should really be using COMPAT_LINUX instead of the linux module on
dynamic systems like -current.
2001-02-27 07:39:12 +00:00
Cameron Grant
82db23e2af MFS: 4.x/5.x compatibility #ifdefs 2001-02-27 07:01:49 +00:00
Cameron Grant
041e207dec MFS: 4.x/5.x compatibility #defines 2001-02-27 06:58:55 +00:00
Peter Wemm
ed277dc979 Add pci/agp_if.m to the MFILES list so that we can auto depend on agp_if.h 2001-02-27 01:23:34 +00:00
Peter Wemm
003223c276 Disable the mutex locking calls. These do not work in their present form
as the code calls the usb stack (which can sleep) while holding the driver
lock.  This leads to a deadlock.
2001-02-27 01:05:25 +00:00
Jonathan Lemon
0b7088c4d0 Cast nfds to u_int before range checking it in order to catch negative
values.

PR:	25393
2001-02-27 00:50:20 +00:00
Matt Jacob
b0a3ba7e28 Fix at2_entry_t to reflect what the firmware actually writes (instead
of just deriving from SCSI at_entry_t). In this case, there is no
'suggested sense' for FC cards.
2001-02-27 00:14:39 +00:00
Jake Burkholder
be15bfc091 Initialize native priority to PRI_MAX. It was usually 0 which made a
process's priority go through the roof when it released a (contested)
mutex.  Only set the native priority in mtx_lock if hasn't already
been set.

Reviewed by:	jhb
2001-02-26 23:27:35 +00:00
Jonathan Lemon
55d782fcc3 Add crashdump support.
Tested by:	ps
2001-02-26 22:25:30 +00:00
Bill Paul
e979bff557 Workaround to prevent VMware from melting down. The pseudo PCnet interface
in VMware reports 0x00000000 in the PCI subsystem ID register, but
0x10001000 when you read the mirror registers in I/O space. This causes
pcn_probe() to think it's found a card in 32-bit mode, and performing
a 32-bit I/O access makes on a 16-bit port makes VMware go boom. Special
case the 0x10001000 value until somebody at VMware grows a clue.

Finally discovered by: Andrew Gallatin
2001-02-26 22:23:55 +00:00
Jonathan Lemon
7d42e30c2e Use more aggressive retransmit timeouts for the initial SYN packet.
As we currently drop the connection after 4 retransmits + 2 ICMP errors,
this allows initial connection attempts to be dropped much faster.
2001-02-26 21:33:55 +00:00
Jonathan Lemon
c693a045de Remove in_pcbnotify and use in_pcblookup_hash to find the cb directly.
For TCP, verify that the sequence number in the ICMP packet falls within
the tcp receive window before performing any actions indicated by the
icmp packet.

Clean up some layering violations (access to tcp internals from in_pcb)
2001-02-26 21:19:47 +00:00
John Baldwin
68960924fe Properly protect the parameters to the EC_{GET,SET}_{DATA,CSR} macros with
parens.
2001-02-26 20:39:28 +00:00
John Baldwin
ee785aa9e8 - Use a loop to read consecutive bytes from the embedded controller to
handle read and write requests for widths of multiple bytes.  This
  can be used to read 16-bit battery status registers for example.
- Remove some unused variables and #if 0'd debugging cruft.
- Don't complain about a GPE query that fails due to AE_NOT_FOUND if the
  query method was _Q00.
2001-02-26 20:36:56 +00:00
John Baldwin
e3225e78f7 When ensuring the destination buffer is truncated for a string obtained
from a BIF, use the size of the destinatino buffer, not the length of the
string to determine where to put the nul char.  As a side effect, the
old code would truncate the string by one character while it was possibly
overflowing the buffer.
2001-02-26 20:32:18 +00:00
Mike Smith
358cd20f3a Typo fix; use & to test for bits set in the status register.
Submitted by:	Joel Jacobson <jake@3ware.com>
2001-02-26 20:13:19 +00:00
Jeroen Ruigrok van der Werven
b9af273fe3 Remove struct full_tcpiphdr{}.
This piece of code has not been referenced since it was put there
in 1995.  Also done a codebased search on popular networking libraries
and third-party applications.  This is an orphan.

Reviewed by:	jesper
2001-02-26 20:10:16 +00:00
Jeroen Ruigrok van der Werven
05f15c3dc3 Remove conditionals for vax support.
People who care much about this are welcomed to try 2.11BSD. :)

Noticed by:	luigi
Reviewed by:	jesper
2001-02-26 20:05:32 +00:00
John Hay
88fe45dd33 Fix clock selection for X.21 interfaces. 2001-02-26 16:30:02 +00:00
Noriaki Mitsunaga
205274e87d o Check the size of I/O window handed by parent bus.
o Allocate memory mapped by pcic even when not used for ncv.
  This is for PC-Cards which needs offset, because I/O space should not be
  used by other devices.

Pointed-out-by: YAMAMOTO Shigeru <shigeru@iij.ad.jp>
2001-02-26 12:26:29 +00:00
Julian Elischer
69c5c26010 take major number 18 for the nmdm "nullmodem" back-to-back tty device.
Incredibally useful for debugging kernels using vmware.
Vmware com1 is diverted to one side, and gdb listens to the other side.
viola.. instant debugging sandbox on one system.
2001-02-26 09:55:02 +00:00
Alfred Perlstein
95cbf4d3c0 Protect against negative numbers as well 2001-02-26 09:52:43 +00:00
Julian Elischer
e08d3e3c33 Allow a changed MAC address to show up in ifconfig by changing it
in the ifaddr list as well. Also change an error return in the base system.
2001-02-26 09:31:54 +00:00
Alfred Perlstein
a5700d6002 fix typo in comment 2001-02-26 09:13:42 +00:00
Alfred Perlstein
3c18a0cac9 Santize a size variable passed to kernel malloc.
Since we know there's always an upper bound we force that bound,
otherwise users can cause a panic via malloc getting hit with a
odd (huge or negative) amount of memory to allocate.

Tested by: kris
Pointed out by: Andrey Valyaev <dron@infosec.ru>
2001-02-26 09:07:55 +00:00
Seigo Tanimura
87a636ccb0 - Mutexify midi(4). The driver runs under the giant lock by default.
If you ever want to run midi(4) out of the giant lock, uncomment
MIDI_OUTOFGIANT in midi.h. Confirmed to work for csamidi with WITNESS
and INVARIANTS.

- midi_info, midi_open and seq_info are now tailqs, allowing arbitrary
numbers of devices to be configured.

- Do not send an active sensing message to reset midi modules.

- Clone /dev/sequencer*. /dev/sequencer0 and /dev/sequencer are generated
upon initialization.
2001-02-26 07:36:24 +00:00
Kris Kennaway
19391949fb More IP option length validation.
Includes the following revisions from KAME (two of these were actually
committed previously but the CVS revisions weren't documented):

1.40      kame/kame/sys/netinet6/ah_core.c (committed in previous rev)
1.41      kame/kame/sys/netinet6/ah_core.c
1.28      kame/kame/sys/netinet6/ah_output.c (committed in previous rev)
1.29      kame/kame/sys/netinet6/ah_output.c
1.30      kame/kame/sys/netinet6/ah_output.c
1.129     kame/kame/sys/netinet6/nd6.c
1.130     kame/kame/sys/netinet6/nd6.c
1.24      kame/kame/sys/netinet6/dest6.c
1.25      kame/kame/sys/netinet6/dest6.c

Obtained from:	KAME
2001-02-26 03:41:13 +00:00
Mike Smith
8674fa777f Remove the 'gdt' and 'gdtd' majors; the ICP driver is taking a
different direction.

Add 'mly' for the newer Mylex driver's control interface.
2001-02-25 22:51:36 +00:00
Mike Smith
ac91d75193 Major update and bugfix for the 'mly' driver.
- Convert to a more efficient queueing implementation.
 - Don't allocate command buffers on the fly; simply work from a
   static pool.
 - Add a control device interface, for later use.
 - Handle controller overload better as a consequence of the
   improved queue implementation.
 - Add support for the XPT_GET_TRAN_SETTINGS ccb, and correctly
   set the virtual SCSI channels up for multiple outstanding I/Os.
 - Update copyrights for 2001.
 - Some whitespace fixes to improve readability.

Due to a misunderstanding on my part, previous versions of the
driver were limited to a single outstanding I/O per virtual drive.
Needless to say, this update improves performance substantially.
2001-02-25 22:48:34 +00:00
Jesper Skriver
694a9ff95b Remove tcp_drop_all_states, which is unneeded after jlemon removed it
from tcp_subr.c in rev 1.92
2001-02-25 17:20:19 +00:00
Julian Elischer
950809d7ac slight cleanups during testing. 2001-02-25 16:49:04 +00:00
Jake Burkholder
a10f496636 Remove brackets around variables in a function that used to be
a macro.
2001-02-25 16:18:13 +00:00
Jonathan Lemon
d8c85a260f Do not delay a new ack if there already is a delayed ack pending on the
connection, but send it immediately.  Prior to this change, it was possible
to delay a delayed-ack for multiple times, resulting in degraded TCP
behavior in certain corner cases.
2001-02-25 15:17:24 +00:00
Noriaki Mitsunaga
b94193dfc1 o Check the size of I/O window handed by parent bus. 2001-02-25 14:01:46 +00:00
Noriaki Mitsunaga
fe80cc3e0d o Check the size of I/O window handed by parent bus.
o Check if it is in PIO_MODE when memory window is not handed.
2001-02-25 14:01:05 +00:00
Poul-Henning Kamp
174b5e9aec Make "md" and "mdctl" macroized parameters.
Implement "-l" option to mdconfig which can list one or all md devices.

Submitted by:   Dima Dorfman <dima@unixfreak.org>
2001-02-25 13:12:57 +00:00
Noriaki Mitsunaga
a4539b3e56 o Support AUTO SENSE correctly.
o Offset and period in synch messages and width negotiation should be
  done for per target not per lun. Move these from *lun_info to
  *targ_info.
o Change in handling XPT_RESET_DEV and XPT_GET_TRAN_SETTINGS .
o Change CAM_* xpt_done return values.
o Busy loop did not timeout. Change this to timeout as original NetBSD/pc98.

Reviewed by:	bsd-nomads ML
2001-02-25 12:40:30 +00:00
Yoshihiro Takahashi
c41e6d1684 Supported pcmcia modem card.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2001-02-25 08:55:07 +00:00
KATO Takenori
c558d45a97 Merged from sys/i386/i386/machdep.c revision 1.443. 2001-02-25 08:00:35 +00:00
Peter Wemm
29604605a7 genassym.sh does not work with a.out because the sizes are rounded up
by the compiler.  ie: char foo[0] comes out as 4 bytes on a.out, and
we depended on it coming out as 0 for the script version. :-(

Make double sure that genassym.o is built and nm'ed in elf mode.

(ia64 skipped since it is stuck on the linux toolchain and doesn't
 understand the -elf switches)
2001-02-25 07:51:19 +00:00
Peter Wemm
dae42c1ad6 Make the kernel actually compile and link under a.out, using
gcc -aout -mno-underscores.  The bioscall.s tweak is not an a.out
requirement really, but to work around the bugs in the antique version of
gas that used for a.out.  Makefile hacks are all that is needed to
get an a.out kernel.  There is no telling if it will work though.
This is little more than an academic curiosity anyway since all it is
good for is situations where the boot code is hard wired, eg: rom
bootstraps (such as the gnat box).

GENERIC:
...
size -aout kernel ; chmod 755 kernel
text    data    bss     dec     hex
3051520 368640  198688  3618848 373820
2001-02-25 07:44:39 +00:00
Peter Wemm
d6df01d823 Make this compile in a.out mode. link.h has extra dependencies for a.out. 2001-02-25 07:26:54 +00:00
Peter Wemm
1a5f13cfbf Manually add an extra _ to _DYNAMIC since it is provided by ld, not gcc.
Make the rest compile.
2001-02-25 07:25:05 +00:00
Peter Wemm
240a9a7ab3 Remove underscores from linker set stabs for the a.out case, after
the demise of asnames.h.
2001-02-25 07:24:03 +00:00
Peter Wemm
5107b058bc Always use the ELF naming after the demise of asnames.h. 2001-02-25 07:23:03 +00:00
Bosko Milekic
096e2dd9d8 Remove superfluous m_pkthdr.rcv_if = NULL assignment following
m_gethdr() mbuf allocation, which already does this for us.
2001-02-25 06:33:50 +00:00
Jake Burkholder
02318dac2c Remove the leading underscore from all symbols defined in x86 asm
and used in C or vice versa.  The elf compiler uses the same names
for both.  Remove asnames.h with great prejudice; it has served its
purpose.

Note that this does not affect the ability to generate an aout kernel
due to gcc's -mno-underscores option.

moral support from:	peter, jhb
2001-02-25 06:29:04 +00:00
Julian Elischer
e548a5c513 Allow the eiface node to be made as a module (not linked into build yet) 2001-02-25 06:18:22 +00:00
Peter Wemm
b9e3a5d31f Drop the 'count' from the aha device specs 2001-02-25 05:52:38 +00:00
Julian Elischer
2b2c95c996 Add a node that looks to all the word like an ethernet but delivers its
ehternet frames to a netgraph  hook.

Submitted by: "Vitaly V. Belekhov" <vitaly@riss-telecom.ru>
translated to 5.0 by me. man page not yet written.

This node still needs a little work.. don't use yet. Not yet linked into
the build.
2001-02-25 05:46:52 +00:00
Julian Elischer
e519ede348 Make the sample netgraph node compileable again.
Makes it easier for people if they can start with something
that actually compiles.
2001-02-25 05:36:25 +00:00
Julian Elischer
6de306ecee Add a Makefile for the sample node so It can be compiled.
This helps to stop it from geting out of sync.
It is not part of the normal build but I can use it with all the others
when I make changes to netgraph to ensure it is buildable.
2001-02-25 05:34:33 +00:00
Julian Elischer
7433466190 Move netgraph spimlock order entries out of
the #ifdef SMP section. They need to be there for UP too.
2001-02-25 04:56:23 +00:00
Jake Burkholder
631d7bf3da - Rename the lcall system call handler from Xsyscall to Xlcall_syscall
to be more like Xint0x80_syscall and less like c function syscall().
- Reduce code duplication between the int0x80 and lcall handlers by
  shuffling the elfags into the right place, saving the sizeof the
  instruction in tf_err and jumping into the common int0x80 code.

Reviewed by:	peter
2001-02-25 02:53:06 +00:00
David E. O'Brien
f310d6cfbf Add "ELFOSABI_NONE" which is the symbol used in a copy of the old ELF spec,
as an alias for "ELFOSABI_SYSV".
2001-02-24 22:23:12 +00:00
David E. O'Brien
21a3ee0ead MFS: bring the consistent `compat_3_brand' support into -CURRENT
(the work was first done in the RELENG_4 branch near a release
	 during a MFC to make the code cleaner and more consistent)
2001-02-24 22:20:11 +00:00
John Baldwin
1103f3b05b Grrr, s/INVARIANTS_SUPPORT/INVARIANT_SUPPORT/. 2001-02-24 21:29:32 +00:00
John Baldwin
15ec816acc - Axe RETIP() as it was very i386 specific and unwieldy. Instead, use the
passed in filename and line number in the KTR tracepoint message.
- Even though it is #if 0'd code, change the code to detect that a process
  is an interrupt thread to check p->p_ithd against NULL rather than
  checking non-existant process flags from BSD/OS.
- Use '%p' to print pointers in KTR log messages instead of assuming
  sizeof(int) == sizeof(void *).
- Don't set p_mtxname to NULL when releasing a mutex.  It doesn't hurt
  to leave it set (we don't clear w_mesg for example) and at least at
  one time in the past, there used to be race conditions in the kernel
  that would result in setting this to NULL causing the kernel to
  dereference NULL.
- Make the _mtx_assert() function be compiled in if INVARIANTS_SUPPORT is
  defined rather than if INVARIANTS is defined so that a KLD compiled
  with INVARIANTS that uses mtx_assert() can be used with a kernel that
  just has INVARIANT_SUPPORT compiled in.
2001-02-24 19:36:13 +00:00
Justin T. Gibbs
ce81b0893e In the SCSI_NO_SENSE_STRINGS case, properly fill the table with the
asc and ascq pair rather than asc, asc.

PR: 25291
Submitted by: Stephen Ferrari <sferrari@yahoo.com>
2001-02-24 19:24:36 +00:00
John Baldwin
505b544d52 sched_swi -> swi_sched 2001-02-24 19:09:37 +00:00
John Baldwin
f58a8b1a54 Don't include machine/mutex.h and relocate sys/mutex.h's include to be
closer to alphabetical order and identical to that of the alpha.
2001-02-24 19:09:16 +00:00
John Baldwin
34b15f2a20 Add back in INVARIANT_SUPPORT and expand the comments in NOTES about it
to include the reasoning Eivind justifiably thwapped me over the head with.
2001-02-24 19:03:18 +00:00
John Baldwin
7b4a30b689 Clockframes have a trapframe stored in a cf_tf member, not ct_tf. 2001-02-24 18:57:34 +00:00
John Baldwin
7182d6578d Whitespace nits. 2001-02-24 18:41:38 +00:00
John Baldwin
ad0a541a9e Pass in process to mark ast on to aston(). 2001-02-24 18:41:17 +00:00
Poul-Henning Kamp
57e9624ec9 Make md/mdconfig do kld.
Submitted by:	dcs
2001-02-24 16:26:41 +00:00
Boris Popov
d8589bd5cb Introduce API for sequential reads/writes (build/dissect) of mbuf chains.
Reviewed by:	Ian Dowse <iedowse@maths.tcd.ie>,
		Bosko Milekic <bmilekic@technokratis.com>,
		Julian Elischer <julian@elischer.org> and arch@/net@
Obtained from:	smbfs
2001-02-24 15:44:30 +00:00
Julian Elischer
33338e7370 Add knowledge of the netgraph spinlocks into the Witness code.
Well, at least I think that's how it's done.
2001-02-24 14:29:47 +00:00
Jake Burkholder
f32ded2fb5 - Assert that the proc to return is not NULL in runq_choose the
same as runq_remove.
- bzero the whole struct runq in runq_init just in case its not
  statically allocated.
2001-02-24 14:06:36 +00:00
Kris Kennaway
9b1db09190 Bump FreeBSD version to correspond to addition of CPUTYPE make variable. 2001-02-24 10:44:03 +00:00
John Baldwin
130c1f25a4 It turns out the kernel console works fine and thus doesn't need quite this
much extra testing.
2001-02-24 03:40:23 +00:00
Jonathan Lemon
24607d88ed Add an EV_SET() convenience macro for initializing struct kevent prior
to the call to kevent().

Update the copyright notices as well.
2001-02-24 01:44:03 +00:00
Jonathan Lemon
da403b9df8 Introduce a NOTE_LOWAT flag for use with the read/write filters, which
allow the watermark to be passed in via the data field during the EV_ADD
operation.

Hook this up to the socket read/write filters; if specified, it overrides
the so_{rcv|snd}.sb_lowat values in the filter.

Inspired by: "Ronald F. Guilmette" <rfg@monkeys.com>
2001-02-24 01:41:31 +00:00
Jonathan Lemon
b07540c837 When returning EV_EOF for the socket read/write filters, also return
the current socket error in fflags.  This may be useful for determining
why a connect() request fails.

Inspired by:  "Jonathan Graehl" <jonathan@graehl.org>
2001-02-24 01:33:12 +00:00
Peter Wemm
3e688165a9 Stricter style(9) conformance - remove unnecessary blank lines in previous
commit.
2001-02-23 23:05:46 +00:00
Jonathan Lemon
c484d1a38c When converting soft error into a hard error, drop the connection. The
error will be passed up to the user, who will close the connection, so
it does not appear to make a sense to leave the connection open.

This also fixes a bug with kqueue, where the filter does not set EOF
on the connection, because the connection is still open.

Also remove calls to so{rw}wakeup, as we aren't doing anything with
them at the moment anyway.

Reviewed by: alfred, jesper
2001-02-23 21:07:06 +00:00
Jonathan Lemon
e4bb5b0572 Allow ICMP unreachables which map into PRC_UNREACH_ADMIN_PROHIB to
reset TCP connections which are in the SYN_SENT state, if the sequence
number in the echoed ICMP reply is correct.  This behavior can be
controlled by the sysctl net.inet.tcp.icmp_may_rst.

Currently, only subtypes 2,3,10,11,12 are treated as such
(port, protocol and administrative unreachables).

Assocaiate an error code with these resets which is reported to the
user application: ENETRESET.

Disallow resetting TCP sessions which are not in a SYN_SENT state.

Reviewed by: jesper, -net
2001-02-23 20:51:46 +00:00
Jonathan Lemon
89bbe051bb Fix typo in comment (knode -> knote). 2001-02-23 20:32:42 +00:00
Jonathan Lemon
7df2842dee Add a NOTE_REVOKE flag for vnodes, which is triggered from within vclean().
Use this to tell a filter attached to a vnode that the underlying vnode is
no longer valid, by returning EV_EOF.

PR: kern/25309, kern/25206
2001-02-23 20:06:01 +00:00
John Baldwin
0b1d793211 Test out the kernel console just before launching the AP's. 2001-02-23 19:44:25 +00:00
Jonathan Lemon
31e7122397 Use correct list pointer when detaching knote from list. 2001-02-23 19:20:21 +00:00
Robert Watson
edfa785a8e Introduce per-swap area accounting in the VM system, and export
this information via the vm.nswapdev sysctl (number of swap areas)
and vm.swapdevX nodes (where X is the device), which contain the MIBs
dev, blocks, used, and flags.  These changes are required to allow
top and other userland swap-monitoring utilities to run without
setgid kmem.

Submitted by:	Thomas Moestl <tmoestl@gmx.net>
Reviewed by:	freebsd-audit
2001-02-23 18:46:21 +00:00
Julian Elischer
bfa7e882d1 Shuffle sysctls a bit (thankyou whoever made them dynamic for modules)
and add a sysctl to pppoe to activate non standard ethertypes
so that idiot ISPs (apparently in France) who use
equipment from idiot suppliers (rumour says 3com)
who use nonstandard ethertypes can still connect.

 "yep, sure we do pppoe, we use a different identifier to that dictated in
 the standard, but sure it's pppoe!"

sysctl -w net.graph.stupid_isp=1 enables the changeover.
2001-02-23 16:34:22 +00:00
Kirk McKusick
a5a94e3936 Free lock before calling panic so that subsequent attempt to write out
buffers does not re-panic with `locking against myself'. This change
should not affect normal operations of soft updates in any way.
2001-02-23 09:01:31 +00:00
Warner Losh
e1b10b380d Additional enhancments to allow IBM Etherjet cards to be probed,
attached and ifconfigable.  The card doesn't interrupt yet.

Also, move towards bus space by introducing new macros/inline
functions which make such a move much easier than before.

These inline functions are setup now to work around an IBM EtherJet
pccard cardbus bridge incompatibility.  The card works in 8 bit mode,
but not in 16-bit mode when it is connected to a cardbus bridge for
reasons unknown.  The Linux driver also has a similar workaround in
it.

Future work will include making the above workaround runtime
conditional rather than compile time conditional, as well as fixing
the interrupts in pccards and converting it to bus space.
2001-02-23 08:08:21 +00:00
Matt Jacob
4102f2f6ef Fix a longstanding bug- we had the sense of what bit 14
for the ICB firmware options meant- *I* had taken it to
mean that if you set it, Node Name would be ignored and
derived from Port Name. Actually, it meant the opposite.
As a consequence- change ICBOPT_USE_PORTNAME to the
define ICBOPT_BOTH_WWNS- makes more sense.

Fix wrong input bitmap for MBOX_DUMP_RAM command. Call
ISP_DUMPREGS if we get a f/w crash. Add ISPCTL_RUN_MBOXCMD
control command (so outer layers can run a mailbox command
directly) and add a ISPASYNC_UNHANDLED_RESPONSE hook so
outer layers can understand response queue entries we
might not know about.
2001-02-23 05:35:50 +00:00
Warner Losh
f3cc9575fd If the symbolic links @ or machine exist, do not depend on them.
This fixes the problem where if src/sys or src/sys/$MACHINE_ARCH/include
changed at all, all the modules would be rebuilt.

Reviewed by: bde
2001-02-23 04:49:31 +00:00
Alfred Perlstein
8283130be4 Display the Joliet Extension 'level' in the log message.
PR: kern/24998
2001-02-23 03:43:05 +00:00
Peter Wemm
c14e19116f Sigh, nobody ever got back to me about this. So, here it is..
Implement auto scsi scan at insert time for the aic driver.
2001-02-23 02:32:31 +00:00
Peter Wemm
f1532aadee Activate USER_LDT by default. The new thread libraries are going to
depend on this.  The linux ABI emulator tries to use it for some linux
binaries too.  VM86 had a bigger cost than this and it was made default
a while ago.

Reviewed by:	jhb, imp
2001-02-23 01:25:02 +00:00
John Baldwin
4c8ccdab0f Remove undefined and unreferenced doreti_syscall_ret globl. While I'm
here, adjust comment block above doreti.  We don't have the old MP lock
anymore.
2001-02-23 00:41:05 +00:00
Jesper Skriver
d1c54148b7 Redo the security update done in rev 1.54 of src/sys/netinet/tcp_subr.c
and 1.84 of src/sys/netinet/udp_usrreq.c

The changes broken down:

- remove 0 as a wildcard for addresses and port numbers in
  src/sys/netinet/in_pcb.c:in_pcbnotify()
- add src/sys/netinet/in_pcb.c:in_pcbnotifyall() used to notify
  all sessions with the specific remote address.
- change
  - src/sys/netinet/udp_usrreq.c:udp_ctlinput()
  - src/sys/netinet/tcp_subr.c:tcp_ctlinput()
  to use in_pcbnotifyall() to notify multiple sessions, instead of
  using in_pcbnotify() with 0 as src address and as port numbers.
- remove check for src port == 0 in
  - src/sys/netinet/tcp_subr.c:tcp_ctlinput()
  - src/sys/netinet/udp_usrreq.c:udp_ctlinput()
  as they are no longer needed.
- move handling of redirects and host dead from in_pcbnotify() to
  udp_ctlinput() and tcp_ctlinput(), so they will call
  in_pcbnotifyall() to notify all sessions with the specific
  remote address.

Approved by:	jlemon
Inspired by:    NetBSD
2001-02-22 21:23:45 +00:00
Tor Egge
9d0ddf1861 Streamline updating of switchtime (don't copy code from kern_sync.c).
Submitted by:	jhb
2001-02-22 20:16:51 +00:00
Tor Egge
35030da9f8 Backout previous commit. sched_lock is held, thus interrupts are prevented
here.

Submitted by:	jhb
2001-02-22 20:12:52 +00:00
Tor Egge
0d139b3741 Protect update of the per processor switchtime variable against
interrupts.

Protect usage of the per processor switchtime variable against
interrupts in calcru().

This seem to eliminate the "microuptime() went backwards" warnings.
2001-02-22 19:50:37 +00:00
John Baldwin
feb43c5f37 The p_md.md_regs member of proc is used in signal handling to reference
the the original trapframe of the syscall, trap, or interrupt that entered
the kernel.  Before SMPng, ast's were handled via a psuedo trap at the
end of doerti.  With the SMPng commit, ast's were broken out into a
separate ast() function that was called from doreti to match the behavior
of other architectures.  Unfortunately, when this was done, the
p_md.md_regs member of curproc was not updateda in ast(), thus when
signals are handled by userret() after an interrupt that returns to
userland, we end up using a stale trapframe that will result in the
registers from the old trapframe overwriting the real trapframe and
smashing all the registers right before we return to usermode.  The saved
%cs:%eip from where we were in usermode are saved in the trapframe for
example.
2001-02-22 19:35:20 +00:00
Bill Paul
d467c136d0 Apply patch to allow TX underrun handling without issuing a complete
chip reset. Just temporarily turn off the transmitter instead.

Submitted by:	Stephen McKay <mckay@freebsd.org>
2001-02-22 19:26:55 +00:00
John Baldwin
51c9129957 Since the PC is a pointer to a code address, change the second parameter of
addupc_task() and addupc_intr() to be a uintptr_t instead of a u_long.
2001-02-22 18:07:31 +00:00
John Baldwin
f308e0d714 - Change ast() to take a pointer to a trapframe like other architectures.
- Don't use an atomic operation to update cnt.v_soft in ast().  This is
  the only place the variable is written to, and sched_lock is always
  held when it is written, so it is already protected and the mutex release
  of sched_lock asserts a memory barrier that ensures the value will be
  updated in a timely fashion.
2001-02-22 18:05:15 +00:00