Commit Graph

76 Commits

Author SHA1 Message Date
jmcneill
ea66278262 In com_acpi_attach, set sc->sc_iot unconditionally. 2002-12-28 08:14:39 +00:00
jmcneill
3b08a81ed6 Add an lpt attachment to acpi(4) 2002-12-28 08:04:28 +00:00
matt
8ff6f8feb3 Fix an uninitialized variable. 2002-12-28 07:37:51 +00:00
matt
99597db362 make id const, and use it for the strcmp since we went to the trouble
of remembering it.
2002-12-28 07:34:04 +00:00
matt
f388356f39 const the pnpid array. 2002-12-28 07:30:33 +00:00
jmcneill
33ac82dfff Add 'com at acpi' and 'wss at acpi' glue. These are both working great on
my ThinkPad 600E.

XXX isa_dmainit isn't called early enough for the 'audio at wss' attachment
XXX to work, so I'm deferring the call to 'wssattach' until later on. This
XXX should be fixed soon.
2002-12-28 06:20:15 +00:00
jmcneill
c8111254a1 Pass ISA chipset information through to ACPI devices, to allow for porting
of pnpbios(4) glue to acpi(4).
2002-12-28 06:14:07 +00:00
kanaoka
31623769c9 Resolve conflict from acpica-unix-20021205. 2002-12-23 00:22:04 +00:00
kanaoka
932351b509 Import INTEL acpica 20021205 release. 2002-12-23 00:01:36 +00:00
jdolecek
9d0bfe1097 reduce number of <'s in FatalOp debug print, to not get mistaken with
CVS conflict marker
2002-11-02 20:58:17 +00:00
tshiozak
47cefca831 fix a simple, but wicked bug in EcSpaceHandler().
this bug causes EcWrite via EcSpaceHandler to always write 0 as the data byte.
2002-10-15 20:53:37 +00:00
christos
4b7d7adde4 strstr() is part of libkern now. don't supply another. 2002-10-05 01:21:40 +00:00
thorpej
c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej
387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
yamt
82de657077 make AcpiOsStall always delay instead of sleep.
sleeping isn't safe because sometimes it's called with interrupt-disabled.
ok'ed by thorpej.
2002-09-15 17:04:12 +00:00
christos
64bf5ef14f Fix battery support (Masanori Kanaoka).
XXX: ToDo: Still the battery charge is 96% when the battery is
fully charged on my libretto because of the estimated total charge offset.
2002-08-20 14:07:51 +00:00
kanaoka
6e12c44e0f - Fix typo in a message.
- Avoid to divide by 0.
   When booting without battery, sc->sc_design_capacity become 0.
2002-08-18 07:45:04 +00:00
explorer
4dd0826200 display the V, W, and Wh rather than mV, mW, and mWh 2002-08-02 16:51:48 +00:00
augustss
9ae405a13b Add code to activate devices that are no active. 2002-07-29 03:26:20 +00:00
augustss
91282a0226 Another part of the PCI fixup change. 2002-07-29 03:25:18 +00:00
augustss
9891751782 Only be very verbose with ACPI_EXTRA_DEBUG set. 2002-07-29 03:10:16 +00:00
augustss
290fa82ceb Add code to perform PCI interrupt routing fixup. 2002-07-29 03:06:56 +00:00
augustss
1394e1ce1a A resource with 0 interrupts is not illegal; it occurs before interrupts
have been allocated.
2002-07-29 03:05:52 +00:00
augustss
1d1e817466 Fix typo in macro. 2002-07-28 15:22:06 +00:00
kanaoka
69c8929084 - Disable Interrput before execute AcpiEnterSleepState().
- Add acpi_md_OsDisableInterrupt() for this.
2002-07-18 12:05:11 +00:00
drochner
93755862ca make it compile with ACPI_DEBUG 2002-06-18 10:26:15 +00:00
tshiozak
368090887b add MI part of ACPI sleep state transition code.
However, we have no interface to use it, and we also need device driver
support. (e.g. D2/D3 support for PCI)
2002-06-18 08:09:21 +00:00
christos
8bb4772dd8 move spic_acpi to arch/i386/acpi 2002-06-17 22:39:25 +00:00
christos
4b396d8f13 AcpiUtGetObjectTypeName is not defined if we are not debugging. 2002-06-17 22:30:07 +00:00
kanaoka
23508069b7 - Show SCI interrupt information.
- Remove ACPI_STA_DEV_SHOW from device check in acpi_build_tree().
2002-06-17 08:18:51 +00:00
thorpej
5dfc880fdd * #if 0 ACPI_DISABLE_IRQS() and ACPI_ENABLE_IRQS(); they're not used.
* Fill in ACPI_ACQUIRE_GLOBAL_LOCK() and ACPI_RELEASE_GLOBAL_LOCK()
  (copied from FreeBSD just to get it working -- room for improvement,
  here).
2002-06-15 18:59:03 +00:00
thorpej
17848b05a8 Update for acpica-unix-20020612. From Takayoshi Kochi. 2002-06-15 18:01:05 +00:00
thorpej
1b7848b55b Remove a locally-added static from several functions, now that
the master sources have added extern prototypes for them.
2002-06-15 17:59:50 +00:00
thorpej
aed30267cd Update for acpica-unix-20020612. 2002-06-15 17:58:34 +00:00
thorpej
d24f2ef86a Don't define DEBUGGER_THREADING if it's already defined. 2002-06-15 17:56:48 +00:00
thorpej
d1da74ff06 Delete files not present in acpica-unix-20020612. 2002-06-15 01:59:29 +00:00
thorpej
932e9074c8 Update for acpica-unix-20020612. 2002-06-15 01:58:23 +00:00
thorpej
bd5d00a47f Add RCS IDs. 2002-06-15 01:52:19 +00:00
thorpej
c510528ce7 Resolve conflicts from acpica-unix-20020612 import. 2002-06-15 01:47:07 +00:00
thorpej
3b40046c9a Import the Intel ACPICA Unix 20020612 release. 2002-06-14 23:36:27 +00:00
augustss
b6c5332498 Add copyright notice (thanks itojun). 2002-06-13 16:48:34 +00:00
drochner
7a79aa5e02 usability fixes for the debugger:
-cut yhe trailing '\r' from input lines so that commands are recognized
-use db_vprintf() for output in interactive mode to get the "|more" effect
-do the same setjmp() game as ddb, so we can return to the prompt
2002-06-05 17:58:33 +00:00
lukem
06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
augustss
5b899ef99d Attach the spic driver via ACPI. 2002-04-22 12:42:56 +00:00
sommerfeld
b8de140e4e Prototype ACPI Control Method Battery driver.
ACPI defines two different battery device interfaces: "Control Method"
batteries, in which AML methods are defined in order to get battery
status and set battery alarm thresholds, and a "Smart Battery" device,
which is an SMbus device accessed through the ACPI Embedded Controller
device; this driver knows how to attach to the former sort of device.

As a total kludge, since we haven't wired things up to sysmon/envsys
yet, we report battery status through a once-per-minute kernel printf,
so don't use this driver yet if you want your disk to spin down.

Motivated by and tested on Sony PCG-R505TL laptop, which has
nonfunctional APM.

configure as:

acpibat* at acpi ?

Sample output:

acpibat0 at acpi0: ACPI Battery
acpibat0: Sony Corp. LION
acpibat0: Design 38480mWh, Predicted 38480mWh Warn 120mWh Low 0mWh
acpibat0: discharging: 15112mV cap 25480mWh (66%) rate 16849mW
...
acpibat0: discharging: 15224mV cap 25070mWh (65%) rate 18405mW
...
acpibat0: discharging: 15200mV cap 24310mWh (63%) rate 13771mW
...
acpibat0: charging: 15768mV cap 23330mWh (60%) rate 20388mW
2002-03-24 03:46:10 +00:00
sommerfeld
44ede71657 Add acpi_eval_struct, to evaluate a complex data structure.
#if 0-out a half-fixed acpi_eval_string() and #if 0 the only call to it.
(Previous code referenced an uninitialized local variable and couldn't
have possibly worked).
2002-03-24 03:32:14 +00:00
augustss
101cc60a48 Don't define ACPI_BUT_DEBUG here. 2002-03-10 19:55:01 +00:00
augustss
7cf6202cca Fix a typo. 2002-03-10 18:46:35 +00:00
tsutsui
c12b5c180d Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:41:02 +00:00