njl
6c165fc101
Move the timer difference convenience function from acpi_cpu.c to make it
...
globally available. acpi_TimerDelta() subtracts two readings from the
ACPI PM timer and returns the difference. It properly distinguishes between
24-bit and 32-bit timers and handles wraparound.
2004-04-21 00:36:15 +00:00
njl
3818a02710
Style fixes.
2004-04-20 17:13:08 +00:00
njl
8059c69810
Allow the AC adapter device to be disabled with debug.acpi.disable="acad".
...
Even though documented, this option was never enabled even in rev 1.1.
Submitted by: sos
2004-04-20 13:09:17 +00:00
njl
fce4fe318a
Add a temporary workaround for acpi_AppendBufferResource() returning with
...
a NULL crsbuf pointer. This shouldn't happen if it returns AE_OK. We'll
figure out why this is happening later.
Submitted by: Bruno Ducrot <ducrot@poupinou.org>
2004-04-19 17:52:20 +00:00
njl
8d672f8640
Disable the new wake GPE behavior. With it enabled, my laptop won't stay
...
suspended after the second try. Intel is working on a fix to properly
differentiate the non-standard wake/runtime GPEs from wake-only GPEs.
2004-04-16 16:27:37 +00:00
njl
91b03e909b
Return an error immediately if asked to switch a non-existent consumer.
2004-04-14 17:58:19 +00:00
njl
973a760dd6
Remove a non-variable static and move other static variables to the same
...
location.
2004-04-14 17:48:33 +00:00
njl
37b624bbca
Fix some warnings by commenting out unused code.
2004-04-14 17:47:42 +00:00
njl
47c9dd6929
Only try to set the ACPI power state if the handle is valid. There was
...
probably no problem with this except it may have had the side effect of
registering a NULL consumer.
2004-04-14 17:46:21 +00:00
njl
7f3dad2879
Unbreak the DDB build by replacing #includes that were deleted.
...
Pointed out by: Tai-hwa Liang, Xin LI
Pointed hat to: njl
2004-04-14 16:24:28 +00:00
njl
6ad9bc9a77
Style cleanups, M_ZERO instead of bzero.
2004-04-14 03:45:20 +00:00
njl
7e03a67713
Style cleanups, use M_ZERO instead of bzero, unify the !semaphore and
...
semaphore return paths.
2004-04-14 03:43:06 +00:00
njl
10f3b6fc29
Style cleanup, plus properly backup partial resource allocation in
...
AcpiOsInstallInterruptHandler() in the case of failure to initialize.
2004-04-14 03:41:06 +00:00
njl
d84baf420a
Style cleanups to reduce diffs to locking tree.
2004-04-14 03:39:08 +00:00
njl
ad7733a68a
Style and printf message cleanups.
2004-04-14 03:34:11 +00:00
njl
9e1427e0cf
Use TRUE for a boolean and a style nit.
2004-04-14 03:30:09 +00:00
njl
fbb8b45dea
Update the name for edge triggered for the 20040402 import.
2004-04-14 02:20:35 +00:00
njl
a9c2757cc6
Remove a check for the return value added in rev 1.41. It's not an error
...
to fail to turn off a fan, since the case is that it's usually already off.
2004-04-12 05:04:47 +00:00
njl
9acc8ad69e
Add MODULE_DEPEND entries so some of these drivers can eventually be
...
loaded separately from ACPI (i.e., embedded use).
2004-04-09 18:14:32 +00:00
imp
ca56ea20fc
Omnibus PCI commit:
...
o Save and restore bars for suspend/resume as well as for D3->D0
transitions.
o preallocate resources that the PCI devices use to avoid resource
conflicts
o lazy allocation of resources not allocated by the BIOS.
o set unattached drivers to state D3. Set power state to D0
before probe/attach. Right now there's two special cases
for this (display and memory devices) that need work in other
areas of the tree.
Please report any bugs to me.
2004-04-09 15:44:34 +00:00
njl
6c09d371b9
Replace more ad-hoc versions of acpi_GetReference(). Since the type of
...
Reference objects changed from ACPI_TYPE_ANY to ACPI_TYPE_LOCAL_REFERENCE
in Oct. 2002, this may help systems where switching the cooler on failed.
We support both types for now until this sorts out.
2004-04-09 06:55:50 +00:00
njl
2c8ba3e867
Include the prototype for acpi_GetReference.
2004-04-09 06:53:50 +00:00
njl
fdef51d350
Add support for packages as the first element of _PRW. This may allow
...
some machines to enable wake events for more devices although I haven't
seen a system yet that uses this form. Also, introduce acpi_GetReference()
which retrieves an object reference from various types.
2004-04-09 06:40:03 +00:00
njl
9898fa8613
Unify on version 1 to be similar to the rest of the tree. After 5-stable
...
branches, increment version on any API change visible to other modules.
2004-04-08 16:45:12 +00:00
jhb
baec2dbefc
Implement an ACPI-aware pci_set_powerstate() method for PCI busses that
...
are enumerated in the ACPI device tree. In addition to the normal PCI
powerstate functionality, the ACPI _PSx methods are executed and ACPI
PowerResources are switched on and off via the acpi_pwr_switch_consumer()
function.
Glanced at by: imp, njl
2004-04-07 19:42:21 +00:00
njl
d976b2d5bf
Move the ivar accessing routines back to inlines (reverting acpivar.h
...
rev 1.44 and acpi.c rev 1.96). Now gcc can handle larger inlines and we
really need external drivers to be able to read their acpi ivars.
2004-04-01 04:21:33 +00:00
njl
b8b283bcbb
Staticize pnp methods, style fixes. Remove unused variable to unbreak
...
kernel build.
2004-03-31 17:35:28 +00:00
takawata
fbe8ede40b
Add ACPI path in location string for ACPI namespace aware PCI device.
2004-03-31 17:27:19 +00:00
njl
fd0c34e87b
Add an interface to pass an argument to the resource parsing functions.
...
This is just groundwork for changing sysresource behavior.
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2004-03-31 17:23:46 +00:00
takawata
9f95817abb
Style fix.
...
Pointed out by: njl
2004-03-31 17:21:14 +00:00
njl
b33d64d240
Disable serialize_methods and enable _OSI support by default. The former
...
is necessary because some IBMs use recursive methods (pointed out by
Robert Moore from Intel). The latter was a typo on my part. It was disabled
by default when it should have been enabled.
2004-03-30 07:35:18 +00:00
takawata
d40cec4051
Add ACPI PnP string. This affects devinfo(8) output with -v option.
2004-03-27 16:26:00 +00:00
njl
c19241479b
Use the correct length for appending an extended irq resource. This may
...
have broken APIC routing. This bug has been present since rev 1.33.
2004-03-22 20:39:20 +00:00
njl
532a38d009
Shorten some printfs to fit better. No other functional changes.
2004-03-22 20:36:33 +00:00
njl
d23002657c
Whitespace and comment changes. No MD5 change to the object file.
2004-03-22 20:32:27 +00:00
njl
f80c9bf833
Fix loop termination condition for parsing resources in _PRS buffers.
...
This completes the effort to handle dependent functions, which are used
in some machines for irq link resources. Also, clean up some nearby
comments while I'm at it.
2004-03-20 20:47:08 +00:00
njl
00144b17be
Move the poweroff handler to a separate function. Make sure it is run
...
on the boot processor (cpuid == 0). Some chipsets do not power off the
system if the shutdown handler runs on an AP.
2004-03-19 07:05:01 +00:00
njl
00a636f251
Add tunables for disabling serialized method execution and disabling the
...
new _OSI method. These can be used if these new features end up causing
regression for users.
2004-03-18 18:42:22 +00:00
njl
2217ce5fdc
Support the DPF (start dependent function) resource type in parsing _PRS.
...
This should fix this error people get attaching cardbus controllers:
pcib0: _PRS resource entry has unsupported type 2
2004-03-18 02:33:58 +00:00
njl
39929fa757
Fix border error to allow systems that specify 100 for latency also use
...
C2 and 1000 to use C3.
Submitted by: Bruno Ducrot <ducrot@poupinou.org>
Tested by: Scott Lambert <lambert@lambertfam.org>
2004-03-17 21:49:47 +00:00
njl
05a1f56fc9
Convert callers to the new bus_alloc_resource_any(9) API.
...
Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde
2004-03-17 17:50:55 +00:00
njl
ed981b0de3
Simplify some logic in converting a buffer to an integer.
2004-03-09 05:44:47 +00:00
njl
8cbce9a150
Use an unsigned int instead of an int for the Get/Set Integer interface.
...
Pointed out by: le
2004-03-09 05:41:28 +00:00
njl
1a9ff39b00
Document a sysctl.
...
Submitted by: Craig Rodrigues <rodrigc@crodrigues.org>
2004-03-05 18:08:23 +00:00
njl
27ea45097f
A user can set tz_requested via the hw.acpi.thermal.tzX.active sysctl.
...
The previous logic meant that if a user sets it to a minimal cooling value
acpi_thermal will not use higher cooling levels. Reverse the logic so that
the user requesting a level (say, 2) also gets 0 - 1 also.
PR: kern/61592
Submitted by: Andrew Thompson <andy@fud.org.nz>
2004-03-05 18:06:31 +00:00
njl
17bb63efbc
Fix an off-by-one error and rework our EC space handler. Writing to address
...
0xFF would fail previously as AE_BAD_PARAMETER. It's unknown if this caused
any actual problems.
2004-03-04 05:58:50 +00:00
njl
e46b6ea21b
Don't disable Cx support and throttling on machines with a P_BLK_LEN != 6
...
even though the spec mandates this. Some have a value of 5 to indicate
throttling + C2 and some have 7 to indicate an extra C3 state. Support
throttling if the value is >= 4, C2 for >= 5, and C3 for >= 6.
2004-03-04 05:17:52 +00:00
njl
2b5556f4cf
Add a "quirks" value to disable quirks handling for a given boot.
...
Also, disable quirks if booting with a custom DSDT. Add a quirk
to disable loading ACPI so known bad systems can be completely
blacklisted.
2004-03-04 04:42:59 +00:00
njl
902e092d18
Change to acpi_{Get,Set}Integer to provide both methods. Convert all
...
callers to the new API.
Submitted by: Mark Santcroos <marks@ripe.net>
2004-03-03 18:34:42 +00:00
njl
3baf2d6bee
Add support for quirks for acpi tables. Key off OEM vendor and revision.
...
Sort acpi debug values. Change "disable" to "disabled" to match rest of
the kernel. Remove debugging from acpi_toshiba since it was only used for
probe/attach.
2004-03-03 03:02:17 +00:00