Commit Graph

1294 Commits

Author SHA1 Message Date
riastradh
f2a2263adb Avoid reading one byte past end of array.
Fixes

   acpiout0: brightness levels: [20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,uvm_fault(0xffffffff8133d200, 0xffff80000c1d8000, 1) -> e
   fatal page fault in supervisor mode
   trap type 6 code 0 rip ffffffff803b63d7 cs 8 rflags 10212 cr2 ffff80000c1d8000 ilevel 8 rsp ffffffff816a1b00
2016-02-18 15:42:44 +00:00
christos
7481a22a73 The new acpi code tries to read the pci configuration registers in the
acpi_probe() phase, before acpi_softc is allocated. Detect this and use
a NULL chipset handle instead of crashing.
2016-01-26 22:52:14 +00:00
joerg
7ed988494f Don't skip entries in the table, one increment per iteration is enough. 2016-01-15 15:42:57 +00:00
christos
81bd9c9c95 merge new acpica 2016-01-09 21:14:12 +00:00
christos
e453ad6414 PR/50626: Vicente Chaves de Melo: acpi_display.c erroneously sends character
to console during boot
2016-01-06 01:37:17 +00:00
christos
25babac1be add missing debugging attributes 2015-10-11 21:49:22 +00:00
christos
2a1508e4be Previous code was mis-indented but correct; simplify to make the intent clear. 2015-10-05 15:57:50 +00:00
msaitoh
605f564f52 PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific
2015-10-02 05:22:49 +00:00
christos
fae14d9262 CID 1324963: Remove bogus NULL test
CID 1324962: This is not python, one needs braces too.
2015-09-26 13:04:10 +00:00
nonaka
ac3789be33 PR/50261: Added newer Toshiba hotkeys support. 2015-09-21 12:32:06 +00:00
christos
f8d654da70 add extra argument to method. 2015-08-18 10:41:28 +00:00
msaitoh
53b3110f9e Add ACPI_RESOURCE_TYPE_END_TAG and ACPI_RESOURCE_TYPE_ADDRESS64. 2015-07-27 04:50:50 +00:00
pgoyette
76a2f91a0e Update module dependencies for all the existing modules that depend on sysmon components. 2015-04-23 23:23:00 +00:00
christos
6252065cbb sync with new acpica struct shuffling. 2015-04-13 18:32:50 +00:00
riastradh
233f556c2e Convert sys/dev to use <sys/rndsource.h>. 2015-04-13 16:33:23 +00:00
mlelstv
bbcc69a643 handle unknown values. Also BIF_UNIT is an enum, not a bitmask. 2014-12-31 22:01:01 +00:00
msaitoh
c61278b1af Add missing newlines... 2014-12-08 16:16:45 +00:00
christos
ddfebefe71 adjust for newer acpica 2014-10-25 21:00:20 +00:00
christos
99e45faf20 summarize levels instead of printing dozens of them. 2014-10-14 19:50:57 +00:00
riastradh
68275ddbde Don't kdassert about crap provided by the firmware. 2014-10-02 12:42:12 +00:00
mrg
a4412a693b introduce a new option: ACPI__DIS_IS_BROKEN. this is a hack to
avoid calling the "_DIS" method during acpi interrupt link setup,
which hangs various nforce4 based motherboards.

when the problem is properly fixed, remove this hack.  for now,
it allows someone (me) to have a valid kernel config that doesn't
require a source hack every new tree.

ok chs@
2014-09-14 19:54:05 +00:00
riastradh
12a0c4d516 Register a null power handler if acpiec fails to attach.
On one of my machines, there's no _GPE method, so
acpiec_parse_gpe_package fails, and the only function acpiec(4)
serves is to inhibit suspend/resume.

XXX We should really put the power handlers in the cfattach so that
it's not necessary to register a null power handler in every error
branch of every device's attach routine...
2014-07-06 15:35:42 +00:00
jakllsch
89097d7fef don't run off the end of the source resource buffer 2014-04-14 01:56:18 +00:00
riastradh
f58fb90d2f Fix unused variable warning in non-modular apple_smc build. 2014-04-01 17:49:40 +00:00
riastradh
9456e37730 Rework Apple SMC attachment goo and split into multiple modules.
The four modules are apple_smc for the core functions, apple_smc_acpi
for attachment at acpi, and apple_smc_fan & apple_smc_temp for stuff
on the SMC.

Seems like there's a lot more bookkeeping necessary to maintain
children of an applesmc device implemented by loadable modules.
Maybe there's a better way I just haven't figured out yet.
2014-04-01 17:48:39 +00:00
riastradh
0396c57641 First draft of drivers for the Apple System Management Controller.
Device interface derived by reading the Linux driver source code and
<http:///www.parhelia.ch/blog/statics/k3_keys.html> as of 2012-12-05.

Includes support for attaching fan and temperature sensors to sysmon.
No accelerometer yet.

Compile-tested only, based on some run-testing of experiments from
userland.  Module attachment is not quite finished, so it won't work
yet.
2014-04-01 17:47:36 +00:00
maxv
38b6f18cc1 Some {} are missing. The behavior is thus wrong: the code always jumps to
out1.

Spotted by my code scanner.

ok christos@
2014-03-01 16:59:41 +00:00
pooka
4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
christos
f5fe8e85e2 fix unused 2014-01-25 21:11:20 +00:00
apb
b29660a1ad + Please also update ACPI_DATE in include/acapps.h. 2014-01-18 09:51:08 +00:00
christos
6865ff7222 use ACPI_DEBUG not ACPI_DEBUGGER which is used internally by acpica 2013-12-27 20:55:59 +00:00
christos
0a1a7e4862 Add new functions 2013-12-27 18:53:25 +00:00
christos
e9e92000ab - remove function list that was out of date
- explain magical munging so that people are not scared to update in the future.
2013-12-27 18:53:16 +00:00
christos
a76e346af4 function argument changed width 2013-12-27 18:52:16 +00:00
christos
5b339ad5cf constant changed name 2013-12-27 18:51:44 +00:00
jruoho
c41db882ba As discussed with bouyer@, fix a too eager T-state validation check to
accomodate new Intel CPUs.
2013-11-20 13:39:59 +00:00
christos
0d211931ed fix unused variable warnings 2013-10-20 21:13:15 +00:00
christos
6888745cca remove unused variable 2013-10-17 21:18:43 +00:00
christos
83c3d19b88 print a warning if we failed. 2013-10-16 17:31:28 +00:00
christos
5d72dee0e3 remove unused variable 2013-10-16 17:30:42 +00:00
christos
9b9040ce5f reverse the polarity of the extra key option, always enabling them. 2013-03-30 19:05:20 +00:00
christos
262712cd9f Define THINKPAD_EXTENDED_HOTKEYS to enable more hotkeys on ThinkPads.
This has only been tested on a T61.
XXX: Should we put THINKPAD_EXTENDED_HOTKEYS into a opt_*.h include
     (defflag) or just always enable it?
2013-03-30 03:09:44 +00:00
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