Commit Graph

4076 Commits

Author SHA1 Message Date
njl
53a70792e9 Add machdep quirks functions. On i386, this disables acpi on systems with
BIOS dates earlier than Jan 1, 1999.  Add prototypes and quirks flags.
2004-06-30 04:42:29 +00:00
jhb
8371bbfa53 Fetch the actual acpi0 device_t and use device_is_attached() to see if
it's alive rather than trying to fetch its softc pointer via its devclass.

Glanced at by:	imp, njl
2004-06-23 17:59:01 +00:00
alc
a7339dd630 Implement the protection check required by the pmap_extract_and_hold()
specification.  This enables the elimination of Giant from that function.
2004-06-23 04:37:14 +00:00
alc
1450b79b4f - Simplify pmap_remove_pages(), eliminating unnecessary indirection.
- Simplify the locking of pmap_is_modified() by converting control flow to
   data flow.
2004-06-20 20:57:06 +00:00
alc
d711478366 Add pmap locking to pmap_is_prefaultable(). 2004-06-20 06:11:00 +00:00
bde
da4e7c693b Backed out previous commit. Blind substitution of dev_t by `struct cdev *'
was just wrong here because the dev_t's are user dev_t's.
2004-06-20 03:52:50 +00:00
alc
72c4b0bd2f Remove unused pt_entry_ts. Remove an unneeded semicolon. 2004-06-19 19:09:08 +00:00
bde
e041a584a6 Include <sys/_lock.h>'s prerequisite <sys/queue.h> before including the
former, not after.

Don't hide this bug by including <sys/queue.h> in <sys/_lock.h>.
2004-06-19 14:58:35 +00:00
peter
8c286596fc Try harder to give new processes a clean initial fpu state. fpu_cleanstate
wasn't actually clean, it was saving the xmm registers as left over by the
bios.  fninit() doesn't clear those.

In fpudna(), instead of doing a fninit() and forgetting to load the initial
mxcsr, do a full fxrstor(&fpu_cleanstate).  Otherwise we hand over whatever
random values are left in the xmm registers by the last user.

I'm not certain of whether this is excessive paranoia or not, but there was
an outright bug in neglecting to set the mxcsr value that caused awk to
SIGFPE in some case.  Especially for Tim Robbins. :-)

i386 probably should do something about the mxcsr setings too.

Found by:  tjr
2004-06-18 04:01:54 +00:00
njl
bbd8cdb07b Revert last change. If acpi is loaded or compiled into the kernel, its
devclass will be present even if the driver was disabled by a hint.  Using
device_get_softc() provides the right info even if it's overkill.

Explained by:	jhb
2004-06-17 17:27:37 +00:00
alc
4c2e464ea2 Do not preset PG_BUSY on VM_ALLOC_NOOBJ pages. Such pages are not
accessible through an object.  Thus, PG_BUSY serves no purpose.
2004-06-17 06:16:58 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
alc
315177e2ec Add some lock assertions. Lock a small part of pmap_enter(). 2004-06-16 07:51:19 +00:00
alc
d82b0bb246 Correct an error in the implementation of pmap_is_prefaultable(). When I
introduced this function in revision 1.441, I inverted one of the
comparisons.
2004-06-16 03:11:24 +00:00
alc
72b65ac70d Remove a stale comment. 2004-06-15 19:28:40 +00:00
alc
1ccccce78d Add pmap locking to pmap_extract(), pmap_mincore(), and pmap_remove(). 2004-06-15 07:41:44 +00:00
njl
8d89806526 We only need the devclass_find() result, not the softc. 2004-06-15 02:12:12 +00:00
alc
c14fd5dbce Introduce pmap locking to many of the pmap functions. There is more to
come later.
2004-06-14 01:17:50 +00:00
obrien
a57bdc7ec6 The majority of FreeBSD/amd64 machines are SMP, so use ADAPTIVE_MUTEXES
by default to improve performance.
2004-06-13 23:03:57 +00:00
alc
a73d5d0e50 Prevent the loss of a PG_M bit through an SMP race in pmap_ts_referenced(). 2004-06-13 21:59:42 +00:00
alc
3a5f5107c8 Remove dead or unneeded code, e.g., spl calls. 2004-06-13 19:48:38 +00:00
alc
91c65a303c - Remove an unused declaration.
- Move a definition inside the scope of a #ifdef _KERNEL.
2004-06-13 03:44:11 +00:00
alc
f6af690bde In a multiprocessor, the PG_W bit in the pte must be changed atomically.
Otherwise, the setting of the PG_M bit by one processor could be lost if
another processor is simultaneously changing the PG_W bit.

Reviewed by:	tegge@
2004-06-12 20:01:48 +00:00
phk
86602fc06c Deorbit COMPAT_SUNOS.
We inherited this from the sparc32 port of BSD4.4-Lite1.  We have neither
a sparc32 port nor a SunOS4.x compatibility desire these days.
2004-06-11 11:16:26 +00:00
peter
d7de00696f Argh. Add the mini-stack-frame back in for mcount's benefit for syscall
stubs.
2004-06-10 22:02:26 +00:00
peter
0fe04edc1b Make profiling work for varargs functions.. %al is an additional argument
which indicates the number of xmm registers used in the varargs.  This
stops the explosion that happened when profiling printf() etc.
2004-06-10 22:00:58 +00:00
peter
59fbae3b46 Insta-MFi386: ignore disabled cpu apic id's entirely 2004-06-10 21:30:08 +00:00
jhb
ee8370535a - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is
present and thus that the PnPBIOS probe should be skipped instead of
  having ACPI zero out the PnPBIOStable pointer.
- Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is
  the only place it is used.
2004-06-10 20:43:04 +00:00
jhb
f7c8770deb Remove atdevbase and replace it's remaining uses with direct references to
KERNBASE instead.
2004-06-10 20:31:00 +00:00
peter
f9a170c34a In pmap_extract_and_hold(), there is no need to mask off PG_FRAME because
pmap_extract() already does it.
In pmap_enter(), opa has already been masked so don't do it again.
Wrap a long line (recent transgression).
Use trunc_page() in pmap_mapdev() instead of anding with PG_FRAME, since
that is what we really meant.

Submitted by:  alc (first item)
2004-06-08 02:20:40 +00:00
peter
0ef9412643 Fix my silly typo in asm statement in previous commit. 2004-06-08 01:35:48 +00:00
peter
6d14a160e7 Argh. Remove stray number that slipped into the previous commit. 2004-06-08 01:20:37 +00:00
peter
7740067a4a Reapply rev 1.151 after enable sse/fpuinit order fixed in mp_machdep.c
Obtained from:  das
2004-06-08 01:14:39 +00:00
peter
5cebad93ca Set up the fpu *after* enabling SSE mode on AP's
Submitted by: (argh, I can't find the email)
2004-06-08 01:07:51 +00:00
peter
35d8561b4c Initial PG_NX support (no-execute page bit)
- export the rest of the cpu features (and amd's features).
- turn on EFER_NXE, depending on the NX amd feature bit
- reorg the identcpu stuff a bit in order to stop treating the
  amd features as second class features (since it is now a primary feature
  bit set) and make it easier to export.
2004-06-08 01:02:52 +00:00
peter
8a41fbc207 Mask pte's with PG_FRAME before passing it to PHYS_TO_VM_PAGE().. PG_NX
lives in the top 12 'available' bits.  atop() in the PHYS_TO_VM_PAGE()
macro only masks off the lower bits (by accident) and the upper bits
in the 64 bit ptes turn into "interesting" index values.
2004-06-08 00:29:42 +00:00
peter
e0ac92157b Use trunc_page(va) when we mean it rather than anding it with PG_FRAME
(which doesn't work all that well when there are bits at the top that are
 masked by PG_FRAME)
2004-06-08 00:11:32 +00:00
peter
33636f4f34 Fix a serious problem that manifested during swap, and a few other times.
pmap_remove() would be called with a huge range and we'd stride across
it in only 2MB chunks.  This would manifest as massive cpu time and a
largely unresponsive system during hard swap.  Instead, check the higher
page directories which means we can run pmap_remove() in just a few
hundred loop iterations instead of millions since we can process
address space in chunks of 512GB and 1GB as well as 2MB.

Eternal thanks to:  tmm
2004-06-07 23:51:20 +00:00
peter
101e49d30a Be a little more consistent in the naming of the PML4 defines. 2004-06-07 23:47:59 +00:00
das
51a41f503f Back out revision 1.150, since dwmalone reports that it causes a panic
upon startup on his machine.
2004-06-06 09:16:02 +00:00
das
46f1d333d1 Initialize the MXCSR to the appropriate default value at startup.
Tested on:	tjr
2004-06-05 03:13:39 +00:00
phk
89408985ea Add new bios_string() which will hunt for a string inside a given range
of the BIOS.  This can be used for finding arbitrary magic in the BIOS
in order to recognize particular platforms.
2004-06-03 22:36:24 +00:00
peter
1c9355a69a MFi386: add ixgp device 2004-06-03 21:40:41 +00:00
peter
14c9e7f788 MFi386: apic intpin programming updates etc. 2004-06-03 20:25:05 +00:00
peter
e1d648f932 MFi386: remove debug printf 2004-06-03 20:22:48 +00:00
peter
dc5552e5f9 Move module.h include to the same place as on i386 for diff reduction. 2004-06-03 20:21:30 +00:00
peter
fb5cc8376e MFi386: move cpu_nameclass struct next to its only consumer 2004-06-03 20:18:15 +00:00
tjr
48c79c9521 Remove checks for curthread == NULL - it can't happen. 2004-06-03 10:22:47 +00:00
phk
c0b3b891ee Add missing <sys/module.h> instances which were shadowed by the nested
include in <sys/kernel.h>
2004-06-03 05:58:30 +00:00
tjr
7a46b27935 Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(),
and uiomove_fromphys().

Reviewed by:	jhb
2004-06-03 01:47:37 +00:00