Commit Graph

106330 Commits

Author SHA1 Message Date
pgoyette
f05cff10bd Update the various xxx_verbose modules to conform to the module subsystem's
new locking protocol.
2010-08-21 13:18:35 +00:00
pgoyette
4a743ad47d Define a set of new kernel locking primitives to implement the recursive
kernconfig_mutex.  Update module subsystem to use this mutex rather than
its own internal (non-recursive) mutex.  Make module_autoload() do its
own locking to be consistent with the rest of the module_xxx() calls.
Update module(9) man page appropriately.

As discussed on tech-kern over the last few weeks.

Welcome to NetBSD 5.99.39 !
2010-08-21 13:17:31 +00:00
jmcneill
0b3fb1fe44 - don't clobber the data found by _PSS if XPSS validation fails
- XPSS spec says that Status{,Mask} and Control{,Mask} buffers are 8 bytes
- use ACPI_GET64 macros instead of memcpy when reading from buffers

This makes acpicpu work again on my VIA C7-M, whose firmware reports
malformed XPSS packages but has a working _PSS
2010-08-21 13:12:15 +00:00
jmcneill
550cccfc5c enable viadrm 2010-08-21 11:55:21 +00:00
jmcneill
3df8768a1c Get viadrm working again 2010-08-21 11:54:36 +00:00
jruoho
57af947c67 Use an inverse logic when filling the (X)PSS structures -- if we know
the addresses, we trust ourselves more than a random BIOS in the field.
2010-08-21 09:16:28 +00:00
jruoho
7aac1c3ec2 Add a comment. 2010-08-21 07:18:34 +00:00
jruoho
497fed0a50 Check from CPUID 0x06 %eax (on Intel) whether we might actually have an
invariant APIC timer or an "ARAT" ("always running APIC timer"). This means
that the APIC timer may keep ticking at the same rate also in deep C-states
with some new or forthcoming Intel CPUs.
2010-08-21 06:45:50 +00:00
jruoho
503e356fbc Add a quirk for Turbo Boost.
It was observed that at least Sverre Froyen's ThinkPad T500 reports values
that do not match readings from the IA32_PERF_STATUS register. This only
applied to the P0-state. Thus, for now, skip the status check if Turbo
Boost has been detected and the requested state is P0.

This needs to be revisited once Turbo Boost actually works in NetBSD. It is
unclear whether this is a BIOS flaw or not; these values may well be what we
get from IA32_PERF_STATUS once the CPU actually uses the +133.33 MHz boost.
2010-08-21 05:10:43 +00:00
jruoho
4362bda118 Detect Intel's Turbo Boost and presence of IA32_APERF/IA32_MPERF. The former
is required for a quirk, and the latter is needed for hardware P-state
coordination (once acpicpu(4) will support fine-grained coordination).
2010-08-21 04:36:29 +00:00
jruoho
6cf2f2d125 Detect whether TSC is invariant, which may be the case on both new AMD and
Intel processors. The invariance means that TSC runs at a constant rate
during all ACPI state changes. If it is variant, skew may occur and TSC is
generally unsuitable for wall clock services. This is especially relevant
with C-states; with variant TSC, the whole counter may be stopped with states
larger than C1. All x86 CPUs before circa mid-2000s can be assumed to have a
variant time stamp counter.
2010-08-21 03:55:24 +00:00
tsutsui
d078479716 Add upgt(4), Intersil PrismGT USB 802.11b/g adapter. 2010-08-21 03:06:37 +00:00
jruoho
ec113abb1c Add IA32_MPERF (E7h) and IA32_APERF (E8h) as MSR_MPERF and MSR_APERF. 2010-08-21 02:59:18 +00:00
jruoho
26cf8b0518 Properly detect AMD hardware P-state support. Also detect "core boost" (only
present in some models of family 10h).
2010-08-21 02:47:37 +00:00
jruoho
78ed01b2e1 Add CPUID_APM_CPB at Fn8000_0007 %edx, for core performance boost. 2010-08-21 02:31:13 +00:00
jruoho
0499ea91d4 Use a constant from <x86/specialreg.h>. 2010-08-21 01:57:34 +00:00
joerg
0253fb8bf4 Remove stray { 2010-08-20 16:38:16 +00:00
joerg
0e26070ea9 Consider a mapped IPv4 address of 0.0.0.0 as unspecified. This allows
using mapped IPv4 address with connect without preceding bind.
2010-08-20 15:01:11 +00:00
joerg
e84862bd9b Allow ELF objects with more than two PT_LOAD sections. Go creates such
binaries by default with separate sections for executable, writeable
data and constants. Use the same heuristic as FreeBSD to match up the
text and data segment assumptions.
2010-08-20 14:59:53 +00:00
jruoho
222d798a76 Add two flags that needs to be dealt with (hardware vs. software
coordination of P-state transitions, and Turbo Boost / Turbo Core).
2010-08-20 12:20:23 +00:00
jruoho
0e8d2e5a05 Check if SpeedStep is enabled. If it is disabled, try to enable it. 2010-08-20 07:00:17 +00:00
jruoho
24ca85d180 Give a hint about a driver conflict. 2010-08-20 06:36:40 +00:00
jruoho
a448b8a1b9 Revert all previous changes that were made naively believing that the
existing CPU power management implementations could peacefully coexist with
the acpicpu(4) driver. The following options can not be used with acpicpu(4):
ENHANCED_SPEEDSTEP, INTEL_ONDEMAND_CLOCKMOD, POWERNOW_K7, and POWERNOW_K8.
2010-08-20 06:34:32 +00:00
jruoho
ce692d69b0 Check the cached value also when setting a state. 2010-08-20 04:16:00 +00:00
jruoho
8b94ac2ff3 Properly calculate the AMD CPU family. 2010-08-19 21:40:45 +00:00
jmcneill
11d8465e82 pull in acpireg.h for ACPI_COMPONENT_RESOURCE 2010-08-19 18:37:38 +00:00
jmcneill
e9887a1821 define _COMPONENT and ACPI_MODULE_NAME() for ACPI_DEBUG 2010-08-19 18:30:33 +00:00
jruoho
2ea8b86098 Add native P-state support for AMD family 10h and 11h processors. Both are
supported irrespective of XPSS. Family 10h tested by jakllsch@.
2010-08-19 18:30:24 +00:00
jmcneill
d7a3ccfac9 more assoc dump fixes 2010-08-19 18:06:37 +00:00
jmcneill
b4ea244316 flush cache on suspend 2010-08-19 17:59:10 +00:00
tsutsui
961a253c71 Fix device_t/softc split botches. PR port-hpcarm/43780 2010-08-19 15:17:53 +00:00
jmcneill
70496e9ae2 add pmf support 2010-08-19 14:59:24 +00:00
jmcneill
0465f35ecf add suspend/resume support 2010-08-19 14:58:22 +00:00
jmcneill
77b2a8365a VIA CPUs can have EST as well, so treat them the same as Intel 2010-08-19 11:08:33 +00:00
jruoho
5ecdb7f351 Deal with autoconfiguration madness by using config_defer(9) to defer
config_interrupts(9) to be executed. This is necessary because: (a) the
initialization routines must be run only once after interrupts are enabled
and (b) all ACPI CPUs have attached.
2010-08-19 05:09:53 +00:00
jruoho
e1be1909e4 Add sysctl-glue for interaction with the acpicpu(4). 2010-08-19 04:12:45 +00:00
pooka
6cd7b7a7ca print more info in the "past eof" panic 2010-08-19 02:10:02 +00:00
pooka
14ac9d6c4c Use the same base pagerflags for both ubc_uiomove and ubc_zerorange. 2010-08-19 02:07:11 +00:00
macallan
59c2899703 - add support for running the console in 8 bit colour
- make shadow fb optional
- use VCONS_DONT_READ if there's no shadow fb
2010-08-18 21:11:50 +00:00
jruoho
77e2991ced Add DIAGNOSTIC. 2010-08-18 19:33:10 +00:00
jruoho
8116cea3d3 Use the idea from cegger@ and fill the (X)PSS structure during initialization. 2010-08-18 18:32:20 +00:00
macallan
9c10440f53 Add copycols() and copyrows() methods which, instead of calling the underlying
driver methods, call the driver's putchar() method to redraw the affected
areas.
For unaccelerated framebuffers where reads are expensive and we can't spare
any memory for a shadow framebuffer. Enabled by setting VCONS_DONT_READ in
scr_flags
2010-08-18 16:46:51 +00:00
jruoho
dd6aeafa08 Check the status of P- and T-state transformations on all CPUs. This is
still not ideal, as ACPI gives us information about "cross logical processor
dependencies". For instance, a single MSR call on one CPU may cause all other
CPUs in the same domain to follow the state shift. Thus, rather than using
xc_broadcast(9), we should xc_unicast(9) on per-domain or per-CPU-set basis.
2010-08-18 16:08:50 +00:00
jruoho
8302489936 Add MD support for the vendor-independent extended PSS. Some conforming AMD
systems are known to work. Alas, not all of them. We still need to deal with
the variety of different PowerNow! revisions.
2010-08-18 04:12:29 +00:00
jruoho
46457f068f Fix fix of a bug: first initialize sc, check sc != NULL, then KASSERT(9). 2010-08-18 02:01:45 +00:00
pgoyette
a5e851409f Use SYSCTL_DESCR() 2010-08-17 23:36:51 +00:00
jym
4d0d2a4c7b Use SYSCTL_DESCR() 2010-08-17 22:24:04 +00:00
pooka
942c727880 Prefault bus pages in driver attachment. This seems to work around
weird corruption I've been seeing (most likely a host kernel bug).

For more details, see thread at:
http://mail-index.netbsd.org/tech-kern/2010/08/17/msg008749.html
2010-08-17 20:42:47 +00:00
macallan
3bc68298fb - fix 8 bit support and run the console in 8 bit for a little extra speed
- fix colour oddities seen occasionally on sparc64
- try to use firmware DAC wiring until we figure out what's wrong
TODO:
- find out why radeonfb gets the DAC wiring ass-backwards on my xvr-100
  while Xorg's radeon driver gets it right
- find out why reverse characters aren't drawn in reverse

tested on macppc and sparc64
2010-08-17 18:53:16 +00:00
cegger
63f1e79c2b build fix: first initialize sc then KASSERT 2010-08-17 18:49:28 +00:00