Commit Graph

9007 Commits

Author SHA1 Message Date
marcel
6317601ef1 Export the physical address of the RSDP to userland by means
of the `machdep.acpi_root' sysctl. This is required on ia64
because the root pointer hardly ever, if at all, lives in the
first MB of memory and also because scanning the first MB of
memory can cause machine checks.
This provides a save and reliable way for ACPI tools to work
with the tables if ACPI support is present in the kernel. On
ia64 ACPI is non-optional.
2002-12-18 08:47:07 +00:00
njl
b41b7d707e Back out 1.19 to rethink approach
Requested by:	julian@
2002-12-17 05:55:36 +00:00
njl
595fed56c7 Automatically issue a "continue" along with the "detach" command. This
fixes the problem of cleanly restarting a target after entering gdb mode.

Reviewed by:	archie@
2002-12-17 01:32:11 +00:00
julian
b0781634bb Reformat last change
Requested by: nate@
2002-12-16 23:25:12 +00:00
julian
168664d0ec Don't dump core into a partition that is too small for it.
If we do, we usually wrote backwareds into the proceeding partititon
which is usually the root partition.
2002-12-16 23:04:54 +00:00
cognet
1696b05046 Add the trm(4) driver.
MFC after:	1 day
2002-12-16 18:47:37 +00:00
phk
626fd7d8d8 Only dump the BIOS geometry table from bootinfo on PC98, we don't use
the contents on i386 anymore.
2002-12-14 16:11:28 +00:00
alc
766e484560 Add page locking to pmap_mincore().
Submitted (in part) by:	tjr@
2002-12-14 07:06:27 +00:00
alfred
d070c0a52d SCARGS removal take II. 2002-12-14 01:56:26 +00:00
alfred
4f48184fb2 Backout removal SCARGS, the code freeze is only "selectively" over. 2002-12-13 22:41:47 +00:00
alfred
d19b4e039d Remove SCARGS.
Reviewed by: md5
2002-12-13 22:27:25 +00:00
julian
9868d96f1f Unbreak the KSE code. Keep track of zobie threads using the Per-CPU storage
during the context switch. Rearrange thread cleanups
to avoid problems with Giant. Clean threads when freed or
when recycled.

Approved by:	re (jhb)
2002-12-10 02:33:45 +00:00
jhb
24449fa30e Add "disabled" hints to all of the uncommon ISA devices that are in
GENERIC.  Each device can be re-enabled at startup time by unsetting the
disabled hint in the loader.

Requested by:	mdodd
Approved by:	re
Prodded by:	rwatson
2002-12-05 22:49:47 +00:00
alc
23c63c0ea9 Hold the page queues lock around calls to pmap_remove().
Approved by:	re
2002-12-04 18:40:39 +00:00
phk
7beb8a484e Use the correct value when writing the Day Of Week byte in the CMOS.
The correct range is [1...7] with Sunday=1, but we have been writing
[0...6] with Sunday=0.

The Soekris computers flagged the zero, zapped the date, so if you
rebooted your soekris on a sunday, it would come up with a wrong
date.

Bruce has a more extensive rework of this code, but we will stick with
the minimalist fix for now.

Spotted by:	Soren Kristensen <soren@soekris.com>
Thanks to:	Michael Sierchio <kudzu@tenebras.com>.
Confirmed by:	bde
Approved by:	re
2002-12-04 13:46:49 +00:00
alc
1195f22080 Avoid recursive acquisition of the page queues lock in pmap_unuse_pt().
Approved by:	re
2002-12-03 04:00:42 +00:00
deischen
88d7b8f56b Align the FPU state in the ucontext and sigcontext to 16 bytes
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)
2002-12-02 19:58:55 +00:00
alc
dd30d349af Hold the page queues lock when calling pmap_unwire_pte_hold() or
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)
2002-12-02 04:54:21 +00:00
alc
7361695828 Assert that the page queues lock is held in pmap_changebit()
and pmap_ts_referenced().

Approved by:	re (blanket)
2002-12-01 00:08:14 +00:00
alc
23d55a2ef1 Assert that the page queues lock is held in pmap_page_exists_quick().
Approved by:	re (blanket)
2002-11-30 17:46:59 +00:00
obrien
3632d1fa8f Fix for non-GCC compilers.
Approved by:	re (jhb)
2002-11-27 16:28:18 +00:00
alc
c5c8eb6c56 Assert that the page queues lock is held in pmap_remove_pages().
Approved by:	re (blanket)
2002-11-25 04:45:03 +00:00
alc
7aa057786e Add page queues locking to vunmapbuf(); reduce differences with respect
to the sparc64 implementation.  (Note: With modest effort on the alpha and
ia64 this function could migrate to the MI part of the kernel.)

Approved by:	re (blanket)
2002-11-24 21:37:02 +00:00
iwasaki
723c83e3b4 Add `if (!cold)' checkings for functions which is called via SYSINIT.
Loading acpi.ko with kldload is disallowed, however some
functions were executed unexpectedly.

Approved by:	re
2002-11-24 02:27:07 +00:00
alc
0e73fe8515 - Assert that the page queues lock is held in pmap_remove_all().
- Fix a diagnostic message and comment in pmap_remove_all().
 - Eliminate excessive white space from pmap_remove_all().

Approved by:	re
2002-11-23 04:48:13 +00:00
mux
8169a213d9 Under certain circumstances, we were calling kmem_free() from
i386 cpu_thread_exit().  This resulted in a panic with WITNESS
since we need to hold Giant to call kmem_free(), and we weren't
helding it anymore in cpu_thread_exit().  We now do this from a
new MD function, cpu_thread_dtor(), called by thread_dtor().

Approved by:	re@
Suggested by:	jhb
2002-11-22 23:57:02 +00:00
jhb
fbf4456fd8 *sigh*. It seems that in the ACPICA code, Intel defines its own APIC_IO
macro for use when parsing MADT tables, thus we always tried to set the
interrupt model to APIC.  This proved to be harmful on UP machines with
IO APIC's (or for UP kernels on SMP machines) since the wrong interrupt
routing information would be returned.

Pointy hat to:	jhb
Approved by:	re (rwatson)
2002-11-21 20:55:22 +00:00
deischen
31ea801074 Add getcontext, setcontext, and swapcontext as system calls.
Previously these were libc functions but were requested to
be made into system calls for atomicity and to coalesce what
might be two entrances into the kernel (signal mask setting
and floating point trap) into one.

A few style nits and comments from bde are also included.

Tested on alpha by: gallatin
2002-11-16 06:35:53 +00:00
sam
6a05792540 network interface and link layer changes:
o on input don't strip the Ethernet header from packets
o input packet handling is now done with if_input
o track changes to ether_ifattach/ether_ifdetach API
o track changes to bpf tapping
o call ether_ioctl for default handling of ioctl's
o use constants from net/ethernet.h where possible

Reviewed by:	many
Approved by:	re
2002-11-15 00:00:15 +00:00
imp
98e8cbaed5 MFp4:
o Fix small style nit.  This was supposed to be part of the last batch of
  style fixes, but somehow didn't get merged.
2002-11-14 05:22:37 +00:00
peter
51cb1ae47b Recognize the Serverworks CIOB30 host to pci bridge. 2002-11-13 21:30:44 +00:00
mux
f737ca00a4 Remove a commented out #include "opt_pci.h", it doesn't
exist anymore.
2002-11-13 17:50:59 +00:00
mdodd
07a965e862 Loader tunable 'machdep.disable_mtrrs'.
Sysctl of same name to reflect status.

Submitted by:	 jhb
Approved by:	 re (murray)
MFC after:	 1 day
2002-11-13 09:37:43 +00:00
alc
c02d224c79 Move pmap_collect() out of the machine-dependent code, rename it
to reflect its new location, and add page queue and flag locking.

Notes: (1) alpha, i386, and ia64 had identical implementations
of pmap_collect() in terms of machine-independent interfaces;
(2) sparc64 doesn't require it; (3) powerpc had it as a TODO.
2002-11-13 05:39:58 +00:00
alc
78766a7b7a - Clear the page's PG_WRITEABLE flag in the i386's pmap_changebit()
if we're removing write access from the page's PTEs.
 - Export pmap_remove_all() on alpha, i386, and ia64.  (It's already
   exported on sparc64.)
2002-11-11 05:17:34 +00:00
iwasaki
eec4b9c40a Add a new loader tunable, hw.hasbrokenint12, to indicate that BIOS
has broken int 12H.
If hw.hasbrokenint12="1" in loader environment, kernel never use BIOS
INT 12 call to determine base memory size.
Otherwise, kernel use INT 12 in old behaviour.
This should fix kernel panic problem caused by 1.544 changes.

MFC after:	1 day
2002-11-09 21:17:41 +00:00
des
4e2288959e Print real / avail memory in megabytes rather than kilobytes. 2002-11-09 16:19:14 +00:00
alfred
533541c47b Fix instances of macros with improperly parenthasized arguments.
Verified by: md5
2002-11-09 12:55:07 +00:00
jhb
ad9e680296 Make 3dfx i386-only. The memrange API it uses may be defined in an MI
header, but it is only implemented on i386.
2002-11-08 20:04:38 +00:00
jhb
257ad7107b Move rc(4) over to MI notes and enable it as a MI module. 2002-11-08 19:34:26 +00:00
jhb
2c9bc07b31 Make xrpu(4) i386-only. Consumers of i386_btop() are not MI. 2002-11-08 15:05:16 +00:00
davidxu
8274c76b58 adjust critical section to only wrap around vm86_bioscall(). 2002-11-08 03:07:52 +00:00
davidxu
9ca980d0e7 use critical_enter/exit to add a critical section around BIOS call,
this unbreaks WITNESS.

Pointed out by: jhb
2002-11-08 01:09:16 +00:00
tmm
f740e3df9b Move the definitions of the hw.physmem, hw.usermem and hw.availpages
sysctls to MI code; this reduces code duplication and makes all of them
available on sparc64, and the latter two on powerpc.
The semantics by the i386 and pc98 hw.availpages is slightly changed:
previously, holes between ranges of available pages would be included,
while they are excluded now. The new behaviour should be more correct
and brings i386 in line with the other architectures.

Move physmem to vm/vm_init.c, where this variable is used in MI code.
2002-11-07 23:57:17 +00:00
alfred
815055f65a Properly parenthesize the DBREG_DRX macro's variables to allow for
DBREG_DRX(&dbregs, n) usage.
2002-11-07 22:42:31 +00:00
jhb
3eba316228 Move sr(4) over to i386-only as it is yet another user of kvtop(). 2002-11-07 21:15:29 +00:00
alc
6e5122867a Simplify and optimize pmap_object_init_pt(). More specifically,
take advantage of the fact that the vm object's list of pages is
now ordered to reduce the overhead of finding the desired set of
pages to be mapped.  (See revision 1.215 of vm/vm_page.c.)
2002-11-07 18:33:55 +00:00
jhb
d9b16f1b77 Move firewire back to being MI. 2002-11-07 16:19:43 +00:00
davidxu
b2a02ec1dc 1.Fix smp race between kernel vm86 BIOS calling and userland vm86 mode code,
remove global variable in_vm86call, set vm86 calling flag in PCB flags.

2.Fix vm86 BIOS calling preempted problem by changing vm86_lock mutex type
  from MTX_DEF to MTX_SPIN. vm86pcb is not remembered in thread struct,
  when the thread calling vm86 BIOS is preempted by interrupt thread,
  and later switching back to the thread would cause incorrect context be
  loaded into CPU registers, this leads to kernel crash.
2002-11-07 01:34:23 +00:00
jhb
74e3cefa12 lnc(4) uses kvtop() and is thus i386-only for now. 2002-11-06 22:56:57 +00:00