Commit Graph

55 Commits

Author SHA1 Message Date
mycroft 01558f7ee2 Clean up some messages:
* Use AcpiFormatException() in a bunch of places.
* acpi_resource_parse() already prints an error, so don't do it in the callers.
2003-11-03 17:24:22 +00:00
kochi 84795bd3fd * now the size of ACPI_DEVICE_INFO is variable:
it can now accomodate multiple _CIDs
  sizeof(ACPI_DEVICE_INFO) should not be used
* make ad_devinfo member in acpi_devnode a pointer
* implement acpi_match_hid() to simplify matching devices;
  _CIDs are also taken into account now as well as _HID
2003-11-03 06:03:47 +00:00
mycroft 31806f9f22 One more spot for a structure change. 2003-11-01 20:58:33 +00:00
yamt 64f5a4d263 make this compilable again with ACPI_DEBUG. 2003-11-01 19:24:42 +00:00
mycroft ff9f7d764c Do not install address handlers before calling AcpiEnableSubsystem() -- this
is done by AcpiInitializeObjects() anyway.
2003-11-01 08:03:24 +00:00
mycroft 8dc2532a4f Update copyright. 2003-11-01 03:45:48 +00:00
mycroft 8632b558b7 Move a declaration. 2003-11-01 01:03:23 +00:00
mycroft fec4c11f9e Catch up with ABI changes in ACPI-CA. Some additional changes to acpi_bat to
set the VALID bits correctly, so we don't report garbage for missing batteries.
2003-10-31 20:54:18 +00:00
mycroft 31273d1288 We were passing flags to AcpiEnableSubsystem() that aren't even used there.
Call AcpiInitializeObjects() to create global variables and run _INI methods.
2003-10-31 17:22:28 +00:00
mycroft 95dfd3bd55 Use AcpiEvulateObjectTyped() to simplify some code. 2003-10-30 20:29:54 +00:00
mycroft 9e419e7a10 Check to see if we have valid status info before looking at it. 2003-10-30 19:33:24 +00:00
mycroft 208fa12050 Remove another extra AcpiGetObjectInfo(). 2003-10-30 18:15:35 +00:00
mycroft 97fa5fbf36 Minor tweaks:
* Only fetch the object info a second time if we activated the device.
* Do not attempt to activate a device with no HID.
2003-10-30 18:13:38 +00:00
kochi 42ade8383d check return value of AcpiEnterSleepStatePrep() to catch
any failure
2003-08-17 03:45:19 +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 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
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
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
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
christos 1fbc199e4e use M_ACPI where appropriate. 2003-03-05 23:00:56 +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
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
jdolecek b47e7ca732 use AcpiUtGetTypeName() to print object type name in acpi_print() 2003-01-09 10:35:29 +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 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
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
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
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
matt db2f223f09 Print out the pnpname that was matched. 2002-12-30 09:33:25 +00:00
jmcneill 9459fbd817 Allow ACPI_EXTRA_DEBUG without ACPI_DEBUG 2002-12-30 01:56:44 +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
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
augustss 9ae405a13b Add code to activate devices that are no active. 2002-07-29 03:26:20 +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
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
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 17848b05a8 Update for acpica-unix-20020612. From Takayoshi Kochi. 2002-06-15 18:01:05 +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
tsutsui c12b5c180d Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:41:02 +00:00