1345 Commits

Author SHA1 Message Date
cherry
3c3a6a3a8e Hide the MD details of specific IPIs behind semantically pleasing functions. This cleans up a couple of #ifdef XEN/#endif pairs 2011-08-11 18:11:17 +00:00
cherry
d7b11fa417 xen ipi infrastructure 2011-08-10 11:39:44 +00:00
cherry
e0e9175da4 Add Xen specific members to struct cpu_info, Add proper per-cpu curcpu() functionality 2011-08-10 06:40:35 +00:00
jmcneill
beb12362eb revert previous 2011-08-08 17:00:23 +00:00
jmcneill
698af758ce If the USE_PLATFORM_CLOCK flag is set in the FADT, it indicates that OSPM
should use a platform provided timer (either HPET or the PM timer). A
platform may set this flag if internal processor clock(s) cannot provide
consistent monotonically non-decreasing counters. Set TSC quality to -100
if this flag is set.
2011-08-08 11:18:34 +00:00
jmcneill
bd79b21e79 x86_reset: use acpi_reset instead of AcpiReset 2011-08-01 11:26:31 +00:00
drochner
f54d17f2c0 add an experimental implementation of PCI MSIs (Message Signaled
Interrupts). Successfully tested with hdaudio and "wpi" wireless
ethernet.
notes:
-There seem to be buggy chips around which announce MSI support
 but don't correctly implement it. Thus the final word whether MSIs
 can be used should be by the driver.
-Only a single vector is supported. For multiple vectors, the IDT
 allocation code would have to be changed. (And we would possibly
 run into problems due to the limited number of vectors supported
 by the current code.)
-The code is "#if NIOAPIC > 0" because it uses the ioapic_edge
 interrupt stubs. These actually don't touch any ioapic, so this
 is somewhat a misnomer.
-MSIs can't be identified by a "pin" but only by a cpu/vector
 pair. Common intr code soesn't deal well with this yet.
-Drivers need to take care of saving/restoring MSI data in the device's
 config space on suspend/resume.
2011-08-01 11:08:03 +00:00
drochner
0ce8c54d89 if checking whether an interrupt is shared, don't compare pin numbers
if it is "-1" -- this is a hack to allow MSIs which don't have a concept
of pin numbers, and are generally not shared
(This doesn't give us sensible event names for statistics display. The
whole abstraction has more exceptions than regular cases, it should
be redesigned imho.)
2011-08-01 10:42:23 +00:00
jmcneill
7e89c84d93 x86_reset: If the FADT defines a reset register and ACPI was active, try
to use it to reset the system before attempting any other methods
2011-07-31 22:43:01 +00:00
jmcneill
2e5784d8be add Family14h (AMD Fusion) support 2011-07-31 22:04:07 +00:00
dyoung
1b847f1e51 Don't shutdown the boostrap processor (BSP) because we may have to run
BIOS methods on it.  For example, ACPI requires that we execute the code
for changing sleep state on the BSP.

This may help the problem where folks' machines would hang instead of
powering off when they entered ACPI sleep state 5.

XXX If the BSP is already shut down, we should start it back up.
2011-07-29 21:21:43 +00:00
yamt
44feae8dc4 - add PCID
- comment
2011-07-26 12:59:41 +00:00
dyoung
9396015d90 Constify bus_space_reserve_subregion() implementation. 2011-07-25 20:34:07 +00:00
dyoung
6f92bd37d6 In _bus_dmamap_load_busaddr(), just return 0 instead of assigning an
intermediate variable (int error = 0;) and returning that (return
error;).
2011-07-25 20:33:20 +00:00
dyoung
f9a358cfdb Good-bye bus.h. Don't install <machine/bus.h>. 2011-07-17 23:38:32 +00:00
jruoho
57c7846186 Do not disable interrupts at machine-level in the MI idle-loop entry. 2011-07-13 07:34:55 +00:00
dyoung
5b0b4c98b3 Bring bus_space_tag_create(9) up-to-date with doco.
Fix overrides of bus_space_unmap(9) et cetera.
2011-07-08 03:23:14 +00:00
dyoung
24e681f5cd Implement bus_space_tag_create() and _destroy().
Factor bus_space_reserve(), bus_space_release(), et cetera out of
bus_space_alloc(), bus_space_map(), bus_space_free(), bus_space_unmap(),
et cetera.

For i386 and amd64, activate the use of <machine/bus_defs.h> and
<machine/bus_funcs.h> by #defining __HAVE_NEW_STYLE_BUS_H in
their respective types.h.  While I'm here, remove unnecessary
__HAVE_DEVICE_REGISTER #defines.
2011-07-06 18:46:04 +00:00
yamt
03e0d01e97 unrelax an assertion 2011-07-05 14:07:12 +00:00
mrg
899d666939 insert some (uintptr_t) between some casts involving pointer to int.
(they already had casts for the pointer.)
2011-07-02 13:09:31 +00:00
dyoung
391925c74f #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 18:21:31 +00:00
dyoung
59adf08e17 Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet.  Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
2011-07-01 17:09:58 +00:00
yamt
90a297503a pmap_map_ptes: fix a bug introduced by rmind-uvmplock merge 2011-06-24 01:39:41 +00:00
rmind
aade7fc010 pmap_map_ptes: use cpu_load_pmap() to handle i386 PAE case.
Spotted by cherry@
2011-06-23 16:25:09 +00:00
jruoho
849fd36f5e Fix bug pointed out by njoly@. 2011-06-23 08:10:35 +00:00
jruoho
1adfb1b50e Add small comment. 2011-06-22 09:28:08 +00:00
jruoho
4fb79b4e25 Get rid of RUN_ONCE(9). Should fix PR # kern/44043. 2011-06-22 08:49:54 +00:00
pgoyette
ee17befd6c Initialize sensor state before registering. 2011-06-20 17:07:21 +00:00
jruoho
0301c37913 Use acpi_match_cpu_handle() from acpi_util.c and only evaluate
the _PDC control method for CPUs that are enabled in the MADT.
2011-06-20 15:39:54 +00:00
pgoyette
f9d2d0003e Inialize sensor state before registering. 2011-06-20 15:01:30 +00:00
rmind
e43016c1ed pmap_page_remove: perform TLB shootdown, as it is not caller's responsibility
to perform pmap_update() according to the interface.  Might want to revisit.

Should fix recently reported tmpfs problems.  Thanks to enami@ and hannken@!
2011-06-18 21:18:20 +00:00
rmind
06b5aba5f8 Few XEN fixes:
- cpu_load_pmap: perform tlbflush() after xen_set_user_pgd().
- xen_pmap_bootstrap: perform xpq_queue_tlb_flush() in the end.
- pmap_tlb_shootdown: do not check PG_G for Xen.
2011-06-15 20:50:02 +00:00
jruoho
ced73275c5 Modularize hpet(4). Works nicely with the multiple bus locations. 2011-06-15 08:19:43 +00:00
jruoho
d762059910 Factor out hpet(4) from ichlpcib(4). 2011-06-15 06:43:20 +00:00
jruoho
0c1ae21bb3 Use defined constants. 2011-06-15 04:52:52 +00:00
jruoho
e0d3725369 Add detach function for hpet(4) at amdpcib(4). 2011-06-15 04:20:47 +00:00
jruoho
3bd1efebe2 Small cleanup; use KM_SLEEP, wrap long lines, etc. No functional change. 2011-06-15 03:30:15 +00:00
jruoho
c6e5cf85e6 Modularize amdtemp(4). 2011-06-15 03:22:39 +00:00
tls
ceba797a83 Fix Xen kernel builds (pmap_is_curpmap can't be static) 2011-06-13 04:30:40 +00:00
jruoho
2ef5adcc96 Follow IA-64 with the x86-specific ACPI MD functions and move these where
they belong to. Remove an unused function. Minor KNF. No functional change.
2011-06-12 11:31:30 +00:00
jruoho
0fc4e4ab7e Move the evaluation of the _PDC control method out from the acpicpu(4)
driver to the main acpi(4) stack. Follow Linux and evaluate it early.
Should fix PR port-amd64/42895, possibly also PR kern/42583, and many
other comparable bugs.

A common sense explanation is that Intel supplies additional CPU tables to
OEMs. BIOS writers do not bother to modify their DSDTs, but instead load
these extra tables dynamically as secondary SSDT tables. The actual Load()
happens when the _PDC method is invoked, and thus namespace errors occur
when the CPU-specific ACPI methods are not yet present but referenced in the
AML by various drivers, including, but not limited to, acpitz(4).
2011-06-12 10:11:52 +00:00
rmind
e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
msaitoh
4ad86a183a Rename to use PCI_PRODUCT_INTEL_82801DBM_LPC 2011-06-06 14:33:31 +00:00
jruoho
33432cfc01 When getting the frequency, use APERF/MPERF as a fallback method. 2011-06-06 07:42:32 +00:00
dyoung
0840f9ccfc Don't use the C preprocessor to configure USERCONF. Instead, either do
or do not link in subr_userconf.c and x86_userconf.c.

Provide no-op stubs for userconf_bootinfo(), userconf_init(), and
userconf_prompt().

Delete all occurrences of #include "opt_userconf.h" as well as USERCONF
and __HAVE_USERCONF_BOOTINFO #ifdef'age.
2011-05-31 23:28:52 +00:00
jruoho
be0f34db1d Remove the sanity check that tested the internal consistency of the "FID/VID
algorithm" used by K8. Tested by cegger@. The check is still included in the
original powernow(4) (where possible failures have probably gone unnoticed
because the driver is less noisy).
2011-05-31 14:45:36 +00:00
para
2f1f53a009 typo in comment 2011-05-26 16:38:57 +00:00
para
096446fa2f put userconf_bootinfo under option USERCONF, to allow kernels without that option 2011-05-26 16:29:13 +00:00
uebayasi
dcf649145a Support userconf(4) command in boot(8)/boot.cfg(5) on i386/amd64.
From jmmv@, no objections seen in the proposed thread:

	http://mail-index.netbsd.org/tech-kern/2009/01/22/msg004081.html
2011-05-26 04:25:26 +00:00
drochner
9f36e7657e move the "context size" struct member (which is a pure software
implementation thing) from the abstract xform descriptor to
the cryptosoft implementation part -- for sanity, and now clients
of opencrypto don't depend on headers of cipher implementations anymore
2011-05-24 18:59:21 +00:00