Commit Graph

388 Commits

Author SHA1 Message Date
mycroft
3d7395ab71 Update for new attach method. 2003-09-25 01:12:43 +00:00
gson
144519b826 The unit displayed when printing battery capacities and
charge/discharge rates was incorrect - the value printed is actually
in A, W, Ah, or Wh, not in mA, mW, mAh, or mWh (assuming as we must
that the period is interpreted as a decimal point, not a thousands
separator).
2003-08-31 01:36:12 +00:00
kochi
42ade8383d check return value of AcpiEnterSleepStatePrep() to catch
any failure
2003-08-17 03:45:19 +00:00
kochi
e7df232658 'struct acpi_resources' will have references to malloc'ed memory.
So it's better to not to allocate on stack.
2003-08-15 17:22:23 +00:00
kochi
77db8900ab Correct calculation of timeout. 2003-08-15 17:07:04 +00:00
kochi
645984364d Workaround for AcpiOsGetThreadId: can be called with curlwp == NULL 2003-08-03 08:19:58 +00:00
kochi
28e9389fdb Fix a wrong handling of clearing a flag 2003-08-03 08:16:07 +00:00
christos
ec3e43edf4 appease gcc-3 by adding ULL to constants that do not fit in longs 2003-08-03 03:49:29 +00:00
lukem
365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
kochi
61634e9a74 Don't compile db*.c & dm*.c unless ACPI_DEBUG and DDB are specified 2003-07-08 15:34:32 +00:00
itojun
a706d499a1 function prototype must not have variable name 2003-07-08 09:07:15 +00:00
kochi
473dc8a475 make bootup messages prettier 2003-07-06 05:24:18 +00:00
kochi
9ab543513d o cleanup usage of ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP
o delete usage of ENABLE_DEBUGGER

As ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP are defflag'ed in files.acpi,
these options don't have to have a value.
2003-07-06 04:03:21 +00:00
kochi
03c72d8b24 Fix typo. 2003-07-06 03:50:07 +00:00
kochi
3c3271accf Cleanup usage of ENABLE_DEBUGGER/ACPI_DEBUGGER/DDB.
By this change, ACPI debugger/disassembler are only
compiled when both DDB and ACPI_DEBUG options are
specified.  This change also reduces the kernel size
a little when ACPI_DEBUG is not specified.
2003-07-03 14:37:34 +00:00
kochi
7a37dbe54d cleanup usage of ACPI_ALLOCATE_BUFFER/AcpiOsFree combination 2003-07-02 12:23:25 +00:00
kochi
735150f269 print ACPI CA version 2003-07-02 11:54:43 +00:00
kochi
68dae3c110 Implement AcpiOsDerivePciId 2003-07-02 11:45:08 +00:00
kochi
862f80594c Bugfix from FreeBSD tree:
>Fix a bug in register access.  This should fix warning messages of:
>  ACPI-0340: *** Error: Could not release ACPI Global Lock, AE_BAD_PARAMETER

Thanks for jhb@freebsd to find out this problem.
2003-07-01 17:49:57 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
drochner
1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
gson
f60f21cf0b The remaining capacity percentage was incorrect for batteries larger than
21.47 Wh becaue of integer overflow.
2003-05-29 02:47:49 +00:00
kochi
0cb6714769 Backport a bugfix from the latest ACPI CA.
This will fix false AE_NOT_FOUND messages, reported in
port-i386/20897.
2003-05-25 10:08:24 +00:00
kochi
0d6c5a668c * make use of NetBSD ACPI APIs (acpi_eval_{struct,integer})
* minor cleanups
2003-05-22 15:35:51 +00:00
christos
a2f80a1464 size_t != unsigned int all the time. 2003-05-21 17:23:55 +00:00
fvdl
c0b6986667 Add quirk handling to ACPI. First quirk entry is "PTLTD " rev 0x06040000,
which gives problems with PCI bus finding; the object hierarchy doesn't
match the real world for some systems, most notably SuperMicro boards.
Linux has this one blacklisted as well.
2003-05-15 21:29:49 +00:00
kochi
bf026fa41a Fix a reference count problem that may cause unexpected memory free etc.
This is a backport of the latest ACPI CA that has a fix for this.
2003-05-13 13:29:00 +00:00
kochi
19e73853da Fix parent-child loop problem found by Takashi Yamamoto. 2003-05-13 13:07:13 +00:00
fvdl
f0e810d923 Always use 32bit-wide header pointers for an RSDT (ACPI 1.0). The comment
in the code talks about "machine-dependent length", but my copy of
the spec clearly says "an array of 32-bit physical addresses".
2003-05-12 00:19:17 +00:00
fvdl
26f04d0979 Avoid a strict-alias warning. 2003-05-11 21:21:16 +00:00
fvdl
3d7030e668 Avoid some strict-alias warnings. 2003-05-11 21:20:23 +00:00
fvdl
c99f4a15ba s/UINT32/ACPI_SIZE/ to match function prototypes. 2003-05-11 19:08:37 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
yamt
545cae513c this doesn't need to include callout.h anymore. 2003-04-26 16:38:00 +00:00
thorpej
9dd2908b35 Use sysmon_taskq. 2003-04-20 20:21:29 +00:00
tron
6d26862b28 Fix for ACPI poweroff problem provided by Takayoshi Kochi. This resolves
PR kern/20614 by myself.
2003-04-19 16:09:16 +00:00
thorpej
5a20f4be3c * Add a generic power management event API, defined in <sys/power.h>.
Right now, only power switch state change events are supported.  This
  is a work-in-progress.
* Add support to sysmon for delivering power mangement events to userland.
  Add poll, kqueue, and read entry points to sysmon.
* Adapt ACPI to use the new generic <sys/power.h> event types.

This provides the kernel support for a forthcoming powerd(8) which can
do nice things like gracefully shut the system down when an ACPI power
button is pressed.
2003-04-18 01:31:34 +00:00
matt
062bcd3204 acpi.c needs sysmon_power too. 2003-04-17 20:56:29 +00:00
thorpej
b7394dfe47 Adapt to the sysmon_pswitch interface. 2003-04-17 01:34:14 +00:00
thorpej
ea45f2ccc1 Oops, remove a debugging define. 2003-04-17 01:26:41 +00:00
thorpej
59ea64b6f0 * Don't do the ACPI_PCI_FIXUP unless it is explicitly enabled in
the kernel config file.  That code makes a total mess of any
  system with multiple PCI busses.
* Rework the way buttons are handled; register them with sysmon,
  and let it take the appropriate action.  This lets us gracefully
  shut down when the power button is pressed.
2003-04-17 01:22:21 +00:00
kanaoka
5c5aa9ba83 Make sure this compiles with ACPI_DEBUG.
Pointed out by Patrick Welche <prlw1@newn.cam.ac.uk>.
2003-03-07 15:17:44 +00:00
christos
1fbc199e4e use M_ACPI where appropriate. 2003-03-05 23:00:56 +00:00
kochi
7629f23bb8 Fix a bug that affects machines which has non-zero base GPE blocks.
This bug is already reported to Intel ACPICA people.
2003-03-05 15:13:01 +00:00
kochi
b1b04fbfdf Update for acpica-unix-20030228. 2003-03-04 17:28:00 +00:00
kochi
589c0d70ae Resolve conflicts from acpica-20030228-2 import. 2003-03-04 17:25:09 +00:00
kochi
f874599c20 Import the Intel ACPICA 20030228 release. 2003-03-04 17:07:34 +00:00
kochi
f93b318be7 import the Intel ACPICA 20030228 release 2003-03-04 16:43:14 +00:00
kochi
e2b5c0723f Remove unexpectedly imported ACPI CA files and obsolete files 2003-02-26 17:06:40 +00:00
christos
580397c542 back-out previous; it was wrong. 2003-02-24 20:03:02 +00:00
christos
29cd3b6180 fix memory leaks. 2003-02-24 19:58:09 +00:00
yamt
148af81ca0 initialize a simple_lock in softc. 2003-02-19 11:32:13 +00:00
tshiozak
d62eb597a2 fix a few problems in the last commit:
- make sure that the driver checks the battery presence at acpibat_update()
    if the battery has been not present, because the driver sometimes
    (i.e. boot time or resuming time) miss to sense the presence.
  - make sure that the driver always update the status at acpibat_gtredata();
    I misunderstood about ACPI_NOTIFY_BatteryStatusChanged event.
2003-02-17 14:37:57 +00:00
tshiozak
f27a62da88 - reduce the frequency of updating informations on the power sources;
it is very slow to access to EC on some machines (i.e. CASIO FIVA 2xx).
- clean the flags up.
- add locks while updating informations.
- some cosmetic changes.
2003-02-16 16:50:09 +00:00
tshiozak
e077f7a7d9 - add acpi_acquire_global_lock()/acpi_release_global_lock()/
acpi_is_global_locked() functions.
  AcpiGlobalLock() API should be used to acquire lock between BIOS and OS.
  This API cannot be used to lock between threads of the OS side,
  because this function immediately returns if the lock is already acquired
  by the OS.  c.f. AcpiEvAcquireGlobalLock()@evmisc.c

- make sure that acpiec driver uses above functions.

- use ACPI_ALLOCATE_BUFFER instead of twice calls of AcpiEvaluateObject(),
  in acpi_eval_string()/acpi_eval_struct().
  Twice AcpiEvaluateObject() calls may cause twice side effects
  to ACPI machine / hardware and this may be wrong in some cases.
2003-02-14 11:05:39 +00:00
kanaoka
47b9a825ab Resolve conflict from acpica-unix-20030123. 2003-02-13 14:16:13 +00:00
kanaoka
34d90725e0 Import INTEL 20030123 release. 2003-02-13 13:51:55 +00:00
kanaoka
86e5527901 Import INTEL 20030123 release. 2003-02-13 13:41:53 +00:00
perry
b46df93398 Document a URL from which you can get the ACPICA programmer reference manual. 2003-02-06 00:27:06 +00:00
perry
b3c149b15f pro forma -- no actual changes but the source file did change version 2003-02-04 01:43:11 +00:00
perry
dcb5109a39 Add explicit comment handling.
Handle any [A-Z]{3} preceded value, not just "PNP".
2003-02-04 01:42:32 +00:00
perry
d30d72b4a5 Add a comment noting the origin of the list
XXX We need to make it easier to import this list
XXX We also need to find a more comprehensive list
2003-02-04 01:12:06 +00:00
perry
5ac6107478 Correct an obvious syntax error (a comment without a # in front of it) 2003-02-04 00:49:56 +00:00
wiz
7bd6fd354d unknown, not unkown. Noted by mjl. 2003-01-28 22:19:22 +00:00
jmcneill
182716ac88 Attach to PNP0F03 -- makes the PS/2 mouse on this Dell work. 2003-01-27 19:18:46 +00:00
thorpej
b97e4c2136 Merge the nathanw_sa branch. 2003-01-19 16:50:16 +00:00
mrg
090790c7a7 pull across the quirk table from the wss@pnpbios driver and use it identically.
now wss@acpi works on my dell inspiron 3500.
2003-01-13 13:01:15 +00:00
jmcneill
d81b190541 Why do I always think 'evaluate' and type 'evalulate'? 2003-01-13 06:26:10 +00:00
fvdl
4726f033ed Use 'int' in the SCI interrupt message, not 'irq'. The number in question
is a global ACPI interrupt number.
2003-01-13 01:24:11 +00:00
christos
0f9b5cdd18 add some more flags used only in acpi.c 2003-01-12 01:15:50 +00:00
jdolecek
98449270da need to select proper IST for interrupt - IST_NONE is almost certainly not
right

this makes fdc@acpi and com@acpi actually work on my machine; lpt@acpi
change untested, but should be same as fdc and com
2003-01-09 12:23:28 +00:00
jdolecek
dca94cc235 _FDE is optional, so don't print warning messages about it failing
unless ACPI_FDC_DEBUG
array returned from _FDE contains UINT32 values, not UINT8; also change
  the magic number '14' to '5 * sizeof(UINT32)' for clarity
remove XXX for the tape presence comment; it's Just Okay to not use the info
fdc_acpi_getknownfds(): if fdc_acpi_nvtotype() returns NULL, don't
  attempt to attach the drive at all

XXX not tested
2003-01-09 12:18:38 +00:00
jdolecek
b47e7ca732 use AcpiUtGetTypeName() to print object type name in acpi_print() 2003-01-09 10:35:29 +00:00
jmcneill
41e9687a33 A few fallbacks:
1. If _FDE fails, fall-back to the old-style of drive probing.
  2. If _FDI fails on a drive, assume a 1.44MB 3.5" floppy drive.
2003-01-09 01:25:13 +00:00
jmcneill
de1dbc74c4 Enumerate floppy disk drives via ACPI (mmm, faster booting). Known to work
with one floppy drive; not quite sure if the logic handling _FDI is right.
2003-01-09 00:22:39 +00:00
fvdl
9f4eb04ccb Print some OEM version info for the R/XSDT. Can be used to help identify
buggy ACPI implementations.
2003-01-08 16:52:49 +00:00
fvdl
524c804fc9 Define ACPI_MADT_DEBUG externally. 2003-01-08 12:33:03 +00:00
fvdl
422f1b7f01 Deal correctly with an MADT that is not found, or was already found
in acpi_madt_{un}map.
2003-01-07 23:05:08 +00:00
fvdl
9352d5f785 * Add aux argument to functions called from apic_madt_walk
* Improve acpi interrupt fixup a bit
	* Source is an array, don't compare it to NULL, instead
	  look for an empty string to denote a link-device-less
	  entry.
	* For root PCI busses, try to use the _BBN method to get
	  numbering right.
* Add acpi_md_callback() function for MD handling after the init,
  but before * at acpi probing.
2003-01-07 18:46:48 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
jdolecek
b2b3b18bd8 change the 'GPE Block%d defined as GPE%d to GPE%d' message to
ACPI_DEBUG_PRINT(), rather than ACPI_REPORT_INFO(); it's not very useful
normally
2003-01-06 09:33:06 +00:00
jdolecek
855a497919 only print the dot-per-method thing if debugging ACPI_LV_LOAD, too
ACPI_LV_LOAD was chosen quite arbitrarily; perhaps the dot printing
should be removed altogether
2003-01-06 09:30:31 +00:00
christos
125b1a5718 Regen, err. Gen. 2003-01-05 22:34:35 +00:00
christos
11bbaf4453 Infrastucture for ACPIVERBOSE 2003-01-05 22:33:53 +00:00
christos
c601b2355e add ACPIVERBOSE; while I am there, fix the eval_string function so it does
not leak.
2003-01-05 22:33:21 +00:00
jdolecek
fd682b678b it's sufficient to install notify handler once
fix a typo in error printf in acpitz_get_integer()
#if 0 the warning when there is no _TZP
2003-01-05 12:16:22 +00:00
jmcneill
3e467b8109 Print something a bit more informative when displaying 'not configured'
messages for objects without a valid HID.
2003-01-05 06:19:05 +00:00
fvdl
eff9b6d311 Add some code to deal with the MADT. 2003-01-05 01:03:44 +00:00
jmcneill
1e3dfcd74c Initial support for ACPI Thermal Zones. For now, we only export the zone
temperature to sysmon; in the near future we should be associating devices
in this thermal zone with this device so we can do active or passive
cooling on a zone-by-zone basis.
2003-01-04 05:36:03 +00:00
jmcneill
4d5c7fa4ba Attempt to attach drivers to devices without a valid HID so long as they're
not of type ACPI_TYPE_DEVICE.
2003-01-04 05:32:15 +00:00
thorpej
72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
augustss
d202c97c46 Fix some messages and some formatting. 2002-12-31 11:23:34 +00:00
jmcneill
3893537d91 If we have a valid UID but it's a null string, display '<null>' rather than
nothing at all.
2002-12-31 05:59:53 +00:00
explorer
59e0238f99 add envsys support to acpi A/C adapter and batteries. This is still a work
in progress, much like the rest of ACPI.
2002-12-31 05:26:56 +00:00
explorer
a26c9e1804 When a battery isn't present, display that rather than bogus values. 2002-12-30 13:06:43 +00:00
chris
eabbfc15c6 Fix build break.. 2002-12-30 10:19:59 +00:00
explorer
6ce13e9a31 clean up printing of battery info. This includes other changes I've toyed with, #if 0'd out 2002-12-30 09:37:50 +00:00
matt
db2f223f09 Print out the pnpname that was matched. 2002-12-30 09:33:25 +00:00
matt
839550b347 remove declaration of wss_acpi_config_interrupts since it no longer exists. 2002-12-30 07:29:26 +00:00
jmcneill
165d7516fb Again, in acpibat_get_status, bail rather than continuing if the package
we receive contains less elements than expected.
2002-12-30 06:20:02 +00:00
jmcneill
46e00cd6f7 Oops, I didn't mean for that commented out verbose flag to make it into the
last commit -- uncomment it again.
2002-12-30 04:52:13 +00:00
jmcneill
e49259c17a If we receive a battery information package with less than 13 elements,
cleanup and return rather than trying to continue anyway.
2002-12-30 04:47:22 +00:00
jmcneill
9459fbd817 Allow ACPI_EXTRA_DEBUG without ACPI_DEBUG 2002-12-30 01:56:44 +00:00
jmcneill
fdcb4005e7 Correctly pass the proper DRQ down to the common fdc driver. 2002-12-28 19:53:50 +00:00
jmcneill
18e5fbcc75 Add an fdc at acpi(4) attachment 2002-12-28 19:31:35 +00:00
jmcneill
57713b735f We no longer need to delay the call to wssprobe, so remove the disgusting
config_interrupts hack.
2002-12-28 18:59:52 +00:00
jmcneill
e4db50c7b9 Add IBM0071, until we have access to the Compat Ids. 2002-12-28 10:19:06 +00:00
matt
60040239dc Only remember the softc if was for the keyboard port. Only try to attach
the console to a keyboard port.
2002-12-28 10:14:43 +00:00
matt
d00c47eb40 Add IBM3780 (PNP id for IBM's trackpoint). Also consider anything starting
with PNP0F as a mouse.
2002-12-28 09:44:11 +00:00
matt
17fb086421 Add a pckbc acpi attachment (it compiles but it untested). 2002-12-28 08:45:31 +00:00
matt
da1df3d58f Make sure we record the type of irq as well as its number. 2002-12-28 08:44:43 +00:00
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
lukem
ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
lukem
0fa231134c - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
2001-11-20 14:34:18 +00:00
lukem
13ac430285 add RCSID 2001-11-13 13:01:57 +00:00
enami
de085459c1 Fix printf format. 2001-10-12 07:30:23 +00:00
thorpej
fa591d48c0 - Add an acpi_evaluate_string() to evaluate string objects.
- In acpi_print(), try to evaluate the _STR object, and print
  it if the device is not configured.
- Make this compile without ACPI_DEBUG, from Masanori Kanaoka.
2001-09-29 18:13:48 +00:00
thorpej
84b2da1b5c Don't install a single system notify handler. 2001-09-29 05:39:14 +00:00
thorpej
4ce1f116cf Don't be DEBUG by default, but still be noisy about lid status
changes until such time as we actually do something with them.
2001-09-29 05:36:49 +00:00
thorpej
533c169276 Build acpi_resource.c, add "acpiec" and "acpiacad". 2001-09-29 05:36:03 +00:00
thorpej
2945805ff3 Skeleton ACPI AC Adapter driver. 2001-09-29 05:35:06 +00:00
thorpej
b41a7fd4de ACPI Embedded Controller driver. 2001-09-29 05:34:23 +00:00
thorpej
6179b9baef Add code to parse ACPI bus resources. 2001-09-29 05:34:00 +00:00
thorpej
391ff9e86d Flesh out w/ some comments from the spec, and add some _ADR decoding
macros.
2001-09-29 05:33:00 +00:00
thorpej
1a9d24bce1 Add stub drivers for ACPI buttons and lid switches. These don't
really do anything yet.
2001-09-28 02:30:13 +00:00
thorpej
69f30a1104 Add some basic ACPI probing framework. This is far from complete,
it is merely a work in progress.
2001-09-28 02:09:22 +00:00
thorpej
bad233b1df config(8) files declaration for ACPICA. 2001-09-28 02:05:47 +00:00
thorpej
7fb46a1597 Minor changes to get ACPICA to compile with our kernel warning levels. 2001-09-28 01:59:43 +00:00
thorpej
5b5d892cd5 Add __attribute__((__unused__)) to _THIS_MODULE. 2001-09-28 01:52:52 +00:00
thorpej
46f84eb8d0 Fix include file mishap. 2001-09-28 01:37:03 +00:00
thorpej
6e9086bf0b Glue header file to pull in the ACPICA headers. 2001-09-28 01:25:55 +00:00
thorpej
9cc29ba9a4 Oops, RCS ID. 2001-09-28 01:24:44 +00:00
thorpej
b6279c024f File describing the ACPICA and how we glue it to NetBSD. 2001-09-28 01:24:21 +00:00
thorpej
5f7bd77097 OS Services Layer to glue the Intel ACPICA to NetBSD. 2001-09-28 01:06:58 +00:00
thorpej
6a930624d7 Let <machine/cpufunc.h> provide wbinvd() on NetBSD. 2001-09-28 00:46:50 +00:00
thorpej
c3e86966fb We've flattened out the directory heirarchy -- acenv.h is not found
in platform/ in our tree.
2001-09-28 00:43:40 +00:00
thorpej
415b593488 NetBSD "environment" header for ACPICA. 2001-09-28 00:40:54 +00:00
thorpej
3926b0395b Import the 20010831 snapshot of the Intel ACPI Component Architecture
ACPI reference implementation.
2001-09-27 23:11:59 +00:00