Commit Graph

29742 Commits

Author SHA1 Message Date
msmith
19aab9d410 Staticise the socket list. 2002-01-08 10:30:34 +00:00
msmith
e814937e0b Staticise private interface lists. 2002-01-08 10:30:09 +00:00
msmith
c2a5e58c01 Gut this header; since physio_proc_init is never called, the code never does
anything more than multiply declare some unused variables.
2002-01-08 10:26:44 +00:00
msmith
a456a9e083 Staticise the flash buffer, since it isn't needed anywhere else. 2002-01-08 10:25:12 +00:00
msmith
7ff97afb06 Staticise the con_bios and digi_devclass variables, since they aren't needed
by anything else.
2002-01-08 10:24:34 +00:00
msmith
02828a5597 Staticise the device node pointers. 2002-01-08 06:50:17 +00:00
msmith
4dc53ad8f8 Staticise the joy devclass. 2002-01-08 06:49:06 +00:00
msmith
e6a5f9545c Fix a couple of bogus enums. 2002-01-08 06:47:55 +00:00
msmith
e868bf2df8 Staticise the amr devclass. 2002-01-08 06:47:02 +00:00
msmith
a855b09ad9 Staticise devclasses and some unnecessarily global variables. 2002-01-08 06:46:01 +00:00
jake
c8fe4def6b Connect smp support to the kernel build. 2002-01-08 05:55:46 +00:00
jake
9304ac0dfd Catch up to the latest and greatest. 2002-01-08 05:53:31 +00:00
jake
c6fae03058 Add initial smp support. This gets as far as allowing the secondary
cpu(s) into the kernel, and sync-ing them up to "kernel" mode so we can
send them ipis, which also work.

Thanks to John Baldwin for providing me with access to the hardware
that made this possible.

Parts obtained from:	bsd/os
2002-01-08 05:50:26 +00:00
jake
68d3ae71f6 Setup the normal global pcb register as well on entry from user land.
Call critical_enter/critical_exit around (fast) interrupt handlers.  All
non-threaded interrupts are fast, and the threaded interrupt scheduler is
itself a fast interrupt.
Assert that an interrupt handler we are about to call is non-zero.
Be paranoid about restoring the users global registers.  Do it as the
last thing before switching to alternate globals (when we magically get
our preloaded registers back), and do it with interrupts disabled.  Any
kind of kernel trap when the globals are not setup properly is bad news.
Don't save and restore the kernel g6, it invariably points to the current
pcb now.
2002-01-08 05:37:52 +00:00
jake
f4c697794d Adapt the vectored interrupt handler for receiving ipis. If the second
data word in an interrupt packet is non-zero, it points to code to execute
to handle the ipi, so jump to it instead of enqueueing the packet.  It
is unclear if we will need queued ipis.
Interrupt g7 now points to pcpu, instead of to the per-cpu interrupt queue
itself, so use that instead.  Interrupt g6 is no longer reserved.
2002-01-08 05:27:13 +00:00
jake
a6184c4ddb Use the per-cpu panic stack in the case of a fault with a bad kernel
stack.
2002-01-08 05:20:40 +00:00
jake
0d87bee2b4 Remove ATOMIC_INC_INT macro which has moved elsewhere. 2002-01-08 05:17:28 +00:00
jake
0d46a69b72 Catch up to change in compile time assertion interface. 2002-01-08 05:15:31 +00:00
jake
28332fb455 Make this code more robust in the event of stray interrupts. Handle
stray level interrupts as well.
2002-01-08 05:13:29 +00:00
jake
c013d39a80 Use cpufunc macros instead of using inline asm directly. 2002-01-08 05:10:58 +00:00
jake
509c1e6c75 Set the normal global pcb register when context switching. 2002-01-08 05:10:07 +00:00
jake
eb9c7712df Add a macro for getting the tlbs (itlb and/or dtlb) which the given
tte may be mapped by.
2002-01-08 05:07:58 +00:00
jake
2fdfe48a88 Prototype pmap_map_tsb(). 2002-01-08 05:06:39 +00:00
jake
38396563c7 Remove PANIC_STACK_PAGES which is no longer used.
Redefine the compile time assertion macro to take one parameter.
2002-01-08 05:05:42 +00:00
jake
bb32d5779c Add declarations needed by last commit. 2002-01-08 05:03:36 +00:00
jake
712c074db3 Update comments about _start, the kernel entry point, to reflect new
parameters needed for smp support.
If we are not the boot processor, jump to the smp startup code instead.
Implement a per-cpu panic stack, which is used for bootstrapping both
primary and secondary processors and during faults on the kernel stack.
Arrange the per-cpu page like the pcb, with the struct pcpu at the end
of the page and the panic stack before it.
Use the boot processor's panic stack for calling sparc64_init.
Split the code to set preloaded global registers and to map the kernel
tsb out into functions, which non-boot processors can call.
Allocate the kstack for thread0 dynamically in pmap_bootstrap, and give
it a guard page too.
2002-01-08 05:02:13 +00:00
jake
9424335541 Fix qsort callouts used for sorting memory regions during boot. vm_offset_t
is unsigned, so we can't use signed arithmetic.

Tripped over by:	jhb
2002-01-08 04:43:04 +00:00
jake
29ddfd4ed0 Add a md field to pcpu for the upa module id.
Remove the alt_stack field.
Use the defines for the register variables declared in C, so that they
don't get out of sync with the assembler.
2002-01-08 04:40:13 +00:00
jake
777d499906 Define CKLF_PC in terms of TRAPF_PC. 2002-01-08 04:36:53 +00:00
jake
3e20261f8a Add a mov() macro, which is used in conjunction with the register defines
for setting reserved global registers from c.
2002-01-08 04:36:01 +00:00
jake
36aea0f17e Update comments and defines to reflect that normal and alternate g6 point
to the current pcb.
Remove interrupt global defines; they use PCPU_REG now.
Move ATOMIC_INC_INT here from exception.s, add ATOMIC_DEC_INT.
Add a KASSERT macro for use in assembler.
2002-01-08 04:34:20 +00:00
jake
ceb8ef47f2 Add asis for the upa config reg, which contains the hardware cpu id, and
for the interrupt send register, which is used for dispatching ipis.
2002-01-08 04:29:50 +00:00
jlemon
da24d835d0 Explicitly reload the multicast filters when the hardware is reinitialized
instead of relying on the previous filters to be present.

Back out r1.125, as a reset is needed to unload any existing microcode,
(which clears the multicast addresses), as it is superceded by this change.
2002-01-07 15:08:54 +00:00
cjc
14705316d2 Fix a missing "ipfw:" in a syslog message.
MFC after:	1 day
2002-01-07 07:12:09 +00:00
kbyanc
fc0c999770 Extend Olympus E-100RS quirk to cover entire E series of digital cameras. 2002-01-07 03:32:56 +00:00
alc
938cb766b8 o Add missing synchronization (splnet()/splx()) in aio_free_entry().
o Move the definition of struct aiocblist from sys/aio.h to kern/vfs_aio.c.
 o Make aio_swake_cb() static.
2002-01-06 21:03:39 +00:00
imp
57b0798bee s/oferride/override/
submitted by: dima
2002-01-06 20:33:55 +00:00
nyan
6d6bb6e826 Merged from sys/dev/sio/sio.c revisions 1.354 and 1.358. 2002-01-06 09:54:50 +00:00
nyan
183d0fe2bf MFi386: revisions 1.382 and 1.386. 2002-01-06 09:47:36 +00:00
nyan
219388b653 Sorted the lists. 2002-01-06 09:46:30 +00:00
kbyanc
9af9cb3fe9 * Implement SBUF_AUTOEXTEND flag; sbufs created with this flag are
automatically extended to prevent overflow.
 * Added sbuf_vprintf(); sbuf_printf() is now just a wrapper around
   sbuf_vprintf().
 * Include <stdio.h> and <string.h> when building libsbuf to silence
   WARNS=4 warnings.

Reviewed by:	des
2002-01-06 08:38:23 +00:00
silby
719af3e61a Reorder a calculation in sbreserve so that it does not overflow
with multi-megabyte socket buffer sizes.

PR:		7420
MFC after:	3 weeks
2002-01-06 06:50:54 +00:00
archie
8d266cece1 Avoid reentrantly sending on the same socket, which causes a kernel panic. 2002-01-06 01:08:30 +00:00
rwatson
51a1c19396 - Teach SIGIO code to use cr_cansignal() instead of a custom CANSIGIO()
macro.  As a result, mandatory signal delivery policies will be
  applied consistently across the kernel.

- Note that this subtly changes the protection semantics, and we should
  watch out for any resulting breakage.  Previously, delivery of SIGIO
  in this circumstance was limited to situations where the subject was
  privileged, or where one of the subject's (ruid, euid) matched one
  of the object's (ruid, euid).  In the new scenario, subject (ruid, euid)
  are matched against the object's (ruid, svuid), and the object uid's
  must be a subset of the subject uid's.  Likewise, jail now affects
  delivery, and special handling for P_SUGID of the object is present.
  This change can always be reversed or tweaked if it proves to disrupt
  application behavior substantially.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 00:54:46 +00:00
rwatson
6b7ac7804d - Push much of the logic for p_cansignal() behind cr_cansignal, which
authorized based on a subject credential rather than a subject process.
  This will permit the same logic to be reused in situations where only
  the credential generating the signal is available, such as in the
  delivery of SIGIO.
- Because of two clauses, the automatic success against curproc,
  and the session semantics for SIGCONT, not all logic can be pushed
  into cr_cansignal(), but those cases should not apply for most other
  consumers of cr_cansignal().
- This brings the base system inter-process authorization code more
  into line with the MAC implementation.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 00:20:12 +00:00
dwmalone
f974b4f783 Release text vnode in exit() rather than wait(). Occasionally
fifesystem problems could prevent the release from completing and
this could result in init being blocked indefinitely.

This was looked over by Matt ages ago.

Approved by:	dillon
2002-01-05 21:47:58 +00:00
fenner
1a8ac98fc3 Pre-calculate the checksum for multicast packets sourced on a
multicast router.  This is overkill; it should be possible to
delay to hardware interfaces and only pre-calculate when forwarding
to a tunnel.
2002-01-05 18:23:53 +00:00
jhb
b8765de1bf Fix a bug where the mutex name wasn't always displayed for processes in
SMTX in utils such as ps and top.  The KI_CTTY flag was assigned to
kinfo_proc->ki_kiflag rather than or'd into the flag, thus clobbering
any flags set earlier, including KI_MTXBLOCK.

Prodding by:	peter
2002-01-05 17:18:59 +00:00
sobomax
49cfbeab2d In the word selection mode don't append newline if the word ends at the
screen boundary.
2002-01-05 16:52:44 +00:00
peter
b19d3ea0e2 Convert a bunch of 1 << PCPU_GET(cpuid) to PCPU_GET(cpumask). 2002-01-05 09:41:37 +00:00