Commit Graph

1252 Commits

Author SHA1 Message Date
riastradh
8b7a790367 Match LEN0068 in thinkpad(4) too, as newer Thinkpads report.
Tested on a W530.  Lots of stuff is missing, though.
2012-11-24 20:56:39 +00:00
cegger
51eec0573c Add support for various things:
- hddtemp sensor
- ambient light sensor on/off (via sysctl)
- display info
- docking station info
2012-10-12 13:02:28 +00:00
chs
323db750fc locate PCI buses and determine their bus numbers using the info
previously extracted from ACPICA rather than trying to figure it out again.
allow PCI buses that don't have a _PRT method.
2012-09-23 00:31:05 +00:00
chs
7a69ec70ee re-enable the code to disable link devices at startup, ie. revert rev 1.3.
this fixes PCI interrupts on some systems (eg. HP XW9400) and we suspect that
the problems which led to the original change were caused by buggy early
implementations of ACPI, which are now ignored by date.
2012-09-23 00:26:25 +00:00
jruoho
ce0335d479 Use KM_SLEEP. 2012-08-14 14:38:02 +00:00
jruoho
4f0c2c3f04 Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).
2012-08-14 14:36:43 +00:00
pgoyette
fa22835bbb Replace local handling of entropy gathering with the new common code
recently introduced into sysmon_envsys(4).

Thanks to jruoho@ for testing.
2012-07-29 02:58:27 +00:00
christos
a0b6dd8ad5 Treat empty package returned from _AL<n> method the same as non-existent.
From jmcneill.
2012-07-19 18:03:32 +00:00
spz
1fdd2bae8c add function switch to switch on/off "wireless WAN", aka GSM et al modem
not tested to actually work, extensively tested not to do any harm if you
don't have a wwan
2012-07-15 11:52:01 +00:00
dsl
e21a34c25e Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-06-02 21:36:41 +00:00
jruoho
06ade55260 Remove the upper limit for the number of T-states. 2012-04-27 04:38:24 +00:00
jruoho
24d5434adb As in Linux, prevent BIOS from trying to map addresses beyond ULONG_MAX. 2012-04-22 06:33:04 +00:00
jruoho
0addcacfb8 Now that 6.0 is branched, remove the ACPI-related sysctl nodes in machdep. 2012-04-10 13:48:24 +00:00
jruoho
78d78ed5a9 Fix a regression introduced during the change of the DMI naming conventions
(rev. 1.48). Also add a quirk for ASUSTeK's M2A-MX in order to allow
powernow(4) to attach (reported by bouyer@).
2012-03-27 18:37:57 +00:00
bouyer
e15100e94c Do not use uninitialized level if fujitsu_bp_get_brightness() returned
an error; from gcc -O3 (completely harmless in this case though).
2012-03-15 16:19:02 +00:00
jruoho
87e0bf89e7 Set the flag for checking for PCI bus master activity only for C3. 2012-02-25 17:22:52 +00:00
tls
7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
christos
4383182c44 make it never match for now. 2012-01-22 20:25:25 +00:00
christos
26e776da8e make it handle legacy devices too, although the ones in the table are not. 2012-01-22 20:24:27 +00:00
christos
2bf32572a7 remove aborted work in progress 2012-01-22 13:53:24 +00:00
christos
6fb39d18da add a tpm driver from bsssd.sourceforge.net 2012-01-22 06:44:28 +00:00
jmcneill
13b0b03b15 initialize fan sensor state to ENVSYS_SINVALID, should fix:
asus0 at acpi0 (ATKD, ASUS010-16843008)
sme_update_sensor_dictionary: can not update sensor state 0 unknown
asus0: couldn't register with envsys
2012-01-21 18:13:56 +00:00
mrg
5249bbc553 provide a lock for mpu_attach. 2011-12-09 08:56:54 +00:00
mrg
8de08fa998 put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.
2011-11-24 03:35:56 +00:00
jmcneill
8a962f23f2 Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.
2011-11-23 23:07:28 +00:00
jruoho
f7eabaaeb3 Add comment. 2011-11-15 07:43:37 +00:00
jmcneill
bd2d899c84 add a machdep.dmi sysctl tree with the following read-only keys:
system-vendor, system-product, system-version, system-serial, system-uuid
 bios-vendor, bios-version
 board-vendor, board-product, board-version, board-serial
the *-serial and *-uuid keys are marked with CTLFLAG_PRIVATE

a few of the pmf platform key names changed so update callers to match
2011-11-14 02:44:59 +00:00
jruoho
67fcddd627 Revert the revision 1.5 in cpufreq(9). Instead, document that the KPI can
not be used before interrupts have been enabled. Suggested by macallan@.
2011-10-27 05:25:07 +00:00
jruoho
77e84d0e62 Initialize P-states to P0 (i.e. the highest frequency). 2011-10-20 06:57:23 +00:00
jmcneill
11e87ad5a9 clear fixed events and disable GPEs before re-enabling interrupts on resume
from S1
2011-10-18 23:47:26 +00:00
jruoho
804fdee3ad Convert to use cpufreq(9). 2011-10-18 05:08:24 +00:00
jruoho
b2ff993d35 Remove bogus assertion that came with revisions 1.55-1.56. 2011-10-13 05:20:45 +00:00
jmcneill
b2284bc274 _ACx is for active cooling policy, using it for envsys temp 'warn max' doesn't
make sense
2011-10-02 22:20:33 +00:00
jakllsch
8524c1046a valz(4) is superseded entirely by acpivga(4) these days. 2011-09-22 01:15:31 +00:00
cegger
bb4604ebfe hpacel_reg_info() wants a device_t and not an ACPI_HANDLE.
Fixes NULL pointer dereference in hpacel_reg_info().
2011-09-07 08:43:20 +00:00
jmcneill
e08b9dc98f The absence of USE_PLATFORM_CLOCK does not imply that the PM Timer is
unreliable; in fact, the PM Timer has to be reliable by definition! Remove
the incorrect warning message that was added in r1.19
2011-08-08 11:27:44 +00:00
jruoho
a25d4403d3 Improve a comment. 2011-08-06 13:19:46 +00:00
jruoho
adb8c21493 If both the new and the old methods are available, prefer the old ones, as
the new ones may not be functional in this case.
2011-08-06 05:03:56 +00:00
jakllsch
704e16c17e Turns out all we need is AcpiClearEvent in the right place,
and we don't really care if it fails.  Pointed out by jmcneill.
2011-08-05 18:59:44 +00:00
jakllsch
aff0a6a01c As we add a handler for the ACPI fixed feature button events,
ensure they aren't going to trigger as soon as we enable interrupts,
furthermore ensure that the event is unmasked.
2011-08-05 18:27:48 +00:00
mrg
59919ed806 relax an assert slightly, from jmcneill. 2011-08-05 02:29:53 +00:00
jmcneill
a1ac6a0eda Don't treat C2 states as C1 if the _CST package doesn't have an entry
for C1. ACPI mandates C1 so if it's not present in the _CST package use
the HLT method. Fixes all sorts of performance regressions on AMD CPUs.
2011-08-04 23:22:30 +00:00
jmcneill
048f3118a4 add support for reset registers in PCI config space 2011-08-01 11:25:59 +00:00
jakllsch
6e0da0a10e Fix off-by-one in validation of EmbeddedControl OperationRegion handler. 2011-07-24 20:15:09 +00:00
jakllsch
99909122e5 Implement recognition of more wmieeepc(4) hotkey events. 2011-07-22 15:53:02 +00:00
jruoho
1e7e299c69 Do not unnecessarily maintain a state between suspend and resume. 2011-07-22 04:15:05 +00:00
jakllsch
ff198a0b2c - Fix wmieeepc(4) hotkeys on Eee PC 1215T
- Rework wmi_event_enable into appropriately seperate versions for enabling
   events and collection.
 - Enable all events, not just ones tagged as expensive.
2011-07-17 02:46:01 +00:00
jakllsch
041ea5875c "successfully" spell "succesfully" in a comment. 2011-07-17 02:32:01 +00:00
jmcneill
07b278992f If there are CPUs associated with this thermal zone, use their names to
create the temperature sensor name:

[acpitz0]
  cpu0 temperature:    53.000  105.000   41.800                   degC
2011-07-16 15:45:24 +00:00
jruoho
1ac5895a9a Fix autoconf(9) attach message. 2011-07-13 10:59:35 +00:00