Commit Graph

8724 Commits

Author SHA1 Message Date
rwatson
1bb6530f3e Add additional range checks for copyout targets.
Submitted by:	Silvio Cesare <silvio@qualys.com>
2002-08-09 05:50:32 +00:00
iwasaki
c395ac01ee Improve stack manipulation code of ACPI wakeup routine.
The new code just override stack top value with saved return address
rather than pop/push operation.

Submitted by:	jhb
2002-08-07 12:48:28 +00:00
imp
836a5bf4a5 Add Intersil and Symbol as vendors for 802.11 cards that the wi driver
supports.

Obtained from: NetBSD
2002-08-07 05:40:34 +00:00
peter
273b24988c Revert rev 1.356 and 1.352 (pmap_mapdev hacks). It wasn't worth the
pain.
2002-08-05 06:10:03 +00:00
alc
e363dee16b o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-05 03:40:28 +00:00
anholt
50661385eb Add device agp to GENERIC, filter it out of floppy builds
Approved by:	des (mentor)
2002-08-04 18:35:02 +00:00
peter
b1ae8f9d32 Fix a mistake in 1.352 - I was returning a pointer to the rounded down
address.  I expect this will fix acpica.
2002-08-04 18:11:38 +00:00
imp
a3625aac03 Remove commented out PCI_ENABLE_IO_MODES. It is gone now. 2002-08-04 18:06:15 +00:00
jeff
02517b6731 - Replace v_flag with v_iflag and v_vflag
- v_vflag is protected by the vnode lock and is used when synchronization
   with VOP calls is needed.
 - v_iflag is protected by interlock and is used for dealing with vnode
   management issues.  These flags include X/O LOCK, FREE, DOOMED, etc.
 - All accesses to v_iflag and v_vflag have either been locked or marked with
   mp_fixme's.
 - Many ASSERT_VOP_LOCKED calls have been added where the locking was not
   clear.
 - Many functions in vfs_subr.c were restructured to provide for stronger
   locking.

Idea stolen from:	BSD/OS
2002-08-04 10:29:36 +00:00
alc
93ee0b7e93 o Request a wired page from vm_page_grab() in _pmap_allocpte(). 2002-08-04 04:55:31 +00:00
alc
17a175bb0b o Ask for a prezeroed page in pmap_pinit() for the page directory page. 2002-08-03 20:24:51 +00:00
alc
366a6392ad o Don't set PG_MAPPED on the page allocated and mapped in _pmap_allocpte().
(Only set this flag if the mapping has a corresponding pv list entry,
   which this mapping doesn't.)
2002-08-03 06:42:30 +00:00
peter
11999f6534 Take advantage of the fact that there is a small 1MB direct mapped region
on x86 in between KERNBASE and the kernel load address.  pmap_mapdev()
can return pointers to this for devices operating in the isa "hole".
2002-08-03 01:02:37 +00:00
peter
d468bdf569 Take a shot at fixing a nasty bug in the pmap changes that I did. I
missed the pmap_kenter/kremove in this file, which leads to read()/write()
of /dev/mem using stale TLB entries. (gah!)  Fortunately, mmap of /dev/mem
wasn't affected, so it wasn't as bad as it could have been.  This throws
some light on the 'X server affects stability' thread....

Pointed out by:	bde
2002-08-03 00:59:15 +00:00
phk
7f3d1cc63f Move a prototype to the least wrong place.
Suggested by:	bde
2002-08-02 18:45:43 +00:00
phk
7e3ab43ac8 SYSINIT needs to be SI_SUB_PSEUDO. Add a printf to tell we are here. 2002-08-02 16:47:29 +00:00
phk
950d3e303c Add the minimalist elan-mmcr device driver.
This driver allows a userland program to mmap the MMCR of the AMD
Elan sc520 CPU.
2002-08-02 15:53:04 +00:00
alc
9a9424f83a o Lock page queue accesses by vm_page_deactivate(). 2002-08-02 04:14:19 +00:00
blackend
9c8ad2f838 Fix the link to the Handbook 2002-08-01 17:21:18 +00:00
iwasaki
dcd6a10ea7 Fix a bug about stack manipulation at ACPI wakeup.
This should avoid kernel panic on kernel compiled w/o
NO_CPU_COPTFLAGS.

Suggested by:	optimized code by -mcpu=pentiumpro
2002-08-01 09:48:01 +00:00
alc
cf35cc4c68 o Setting PG_MAPPED and PG_WRITEABLE on pages that are mapped and unmapped
by pmap_qenter() and pmap_qremove() is pointless.  In fact, it probably
   leads to unnecessary pmap_page_protect() calls if one of these pages is
   paged out after unwiring.

Note: setting PG_MAPPED asserts that the page's pv list may be
non-empty.  Since checking the status of the page's pv list isn't any
harder than checking this flag, the flag should probably be eliminated.
Alternatively, PG_MAPPED could be set by pmap_enter() exclusively
rather than various places throughout the kernel.
2002-07-31 18:46:47 +00:00
phk
b678abefa2 The Elan SC520 MMCR is actually 16bit wide, so u_char is inconvenient. 2002-07-31 13:45:44 +00:00
iwasaki
b2baff05fb Resolve conflicts arising from the ACPI CA 20020725 import. 2002-07-30 19:35:32 +00:00
alc
18acb2ea27 o Lock page queue accesses by pmap_release_free_page(). 2002-07-30 06:45:39 +00:00
mike
9f0ddc464e Create a new header <machine/_stdint.h> for storing MD parts of
<stdint.h>.  Previously, parts were defined in <machine/ansi.h> and
<machine/limits.h>.  This resulted in two problems:
  (1) Defining macros in <machine/ansi.h> gets in the way of that
      header only defining types.
  (2) Defining C99 limits in <machine/limits.h> adds pollution to
      <limits.h>.
2002-07-29 17:41:23 +00:00
alc
ca32cecfcf o Pass VM_ALLOC_WIRED to vm_page_grab() rather than calling vm_page_wire()
in pmap_new_thread(), pmap_pinit(), and vm_proc_new().
 o Lock page queue accesses by vm_page_free() in pmap_object_init_pt().
2002-07-29 05:42:44 +00:00
peter
f34d68bd30 Unwind the syscall_with_err_pushed tweak that jake did some time back.
OK'ed by:	jake
2002-07-28 00:27:51 +00:00
mike
577982e3cc Catch up to rev 1.339 of src/sys/conf/options (PCI_ENABLE_IO_MODES is
now a sysctl and is enabled by default).
2002-07-27 16:25:30 +00:00
julian
7e6f866aa8 Add some locking asserts and some comments 2002-07-24 23:21:05 +00:00
peter
0d8fe1f3c6 de-count pci 2002-07-23 06:38:47 +00:00
peter
5e78bc7662 Add unit counts for the i4b stuff where it still uses NFOO etc. 2002-07-21 23:23:14 +00:00
peter
d437ba4322 Add static unit count for 'card' 2002-07-21 23:09:48 +00:00
peter
82a9cc8e6e Add static unit count for pci here as well. 2002-07-21 23:09:15 +00:00
peter
0e1289a90e Add explicit unit count on 'device pci' for ahc/ahd 2002-07-21 23:07:31 +00:00
peter
fb92891b11 The following devices do not take a static unit 'count' argument:
ar, fe, lnc, sr, wl, fpa, bktr, sbni
2002-07-21 22:28:43 +00:00
imp
fa4e4420cd style(9)ize the whole file
Approved in concept a long time ago by: msmith
2002-07-21 05:35:42 +00:00
imp
ccdb32c74a Fix more abuse of __FreeBSD__ to detect version. 2002-07-21 05:34:14 +00:00
peter
89dd52cb15 Stop abusing NPCI for code that doesn't even work. Emit a warning. 2002-07-21 05:25:49 +00:00
peter
4a13c91393 Move SWTCH_OPTIM_STATS related code out of cpufunc.h. (This sort of stat
gathering is not an x86 cpu feature)
2002-07-21 05:22:16 +00:00
peter
cc7b2e4248 Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable
handler in the kernel at the same time.  Also, allow for the
exec_new_vmspace() code to build a different sized vmspace depending on
the executable environment.  This is a big help for execing i386 binaries
on ia64.   The ELF exec code grows the ability to map partial pages when
there is a page size difference, eg: emulating 4K pages on 8K or 16K
hardware pages.

Flesh out the i386 emulation support for ia64.  At this point, the only
binary that I know of that fails is cvsup, because the cvsup runtime
tries to execute code in pages not marked executable.

Obtained from:  dfr (mostly, many tweaks from me).
2002-07-20 02:56:12 +00:00
alc
1926ab155f o Use vm_page_alloc(... | VM_ALLOC_WIRED) in place of vm_page_wire(). 2002-07-19 19:35:06 +00:00
gallatin
cf80a92297 Add support for probing secondary buses on the ServerWorks Grand Champion
chipset used for P4-Xeon machines

PR: kern/38894
Tested-by: "Marc G. Fournier" <scrappy@hub.org>
Submitted-by: Mark Tinguely (partially)
2002-07-19 18:35:08 +00:00
markm
c5b0a0ebfe Beautify. This has the side effect of improving portability and
making lint work cleaner.

Inspired to do this by:	jhb
2002-07-18 15:56:46 +00:00
phk
a535ae6741 Add initialization code for the AMD Elan sc520 which maps the MMCR
into KVM and sets the i8254 frequency to the correct value.
2002-07-18 12:56:54 +00:00
phk
c2a5e50467 Add an entry for the AMD Elan SC520 hostbridge. I do not belive we can
identify this gadget on the CPUID result alone, so I intend to activate
the necessary magic (i8254 frequency for instance) for it based on the
precense of the on-chip host to PCI bridge.
2002-07-18 10:57:20 +00:00
peter
cc2882c16b Use pmap_kenter() rather than vtopte() and bashing the page tables
directly.
2002-07-18 00:42:53 +00:00
peter
decf7baa13 Avoid trying to set PG_G on the first 4MB when we set up the 4MB page.
This solves the SMP panic for at least one system.  I'd still like to know
why my xeon works though.

Tested by: bmilekic
2002-07-17 21:47:05 +00:00
markm
a6f49f3bf1 Clean up the syntax WRT semicolons at the end of function-like-macros, and protect GCCisms from non-GNU compilers and lint. 2002-07-17 16:19:37 +00:00
dillon
22d1581cc2 Qualify comment on machdep.cpu_idle_hlt. Turning this on on a SMP
machine will result in approximately a 4.2% loss of performance (buildworld)
and approximately a 5% reduction in power consumption (when idle).  Add XXX
note on how to really make hlt work (send an IPI to wakeup HLTed cpus on
a thread-schedule event?  Generate an interrupt somehow?).
2002-07-17 05:41:43 +00:00
jhb
0dbee33a27 Various comment and minor style fixes. No actual content changes.
Inspired by:	bde
2002-07-16 18:20:17 +00:00