History log of /haiku/headers/os/drivers/ACPI.h
Revision Date Author Comments
# e2f1a42e 17-Dec-2023 Jérôme Duval <jerome.duval@gmail.com>

acpi: add device tree attributes from _CLS if available

means B_DEVICE_TYPE, B_DEVICE_SUB_TYPE, B_DEVICE_INTERFACE.
_CLS is rare, it means I don't own devices with this attribute.

from the spec: _CLS:
Class Code – supplies OSPM with the PCI-defined class, subclass and programming interface for a device. Optional.

Change-Id: I4f7b7ed66cbe6b4ff4511cb13df2af218350a5d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7210
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 526752bc 15-Apr-2020 Jérôme Duval <jerome.duval@gmail.com>

acpi: add ACPI_DEVICE_UID_ITEM

Change-Id: I6f1dba7d9d757859375e2339141ba92559d5cf9b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2484
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# b9d64076 04-Apr-2020 Jérôme Duval <jerome.duval@gmail.com>

acpi: add ACPI_DEVICE_HANDLE_ITEM

type is acpi_handle, to be used with the ACPI bus manager

Change-Id: Ibbdd81a21bdd57fc651f7a7238e3676033204857
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2456
Reviewed-by: Rene Gollent <rene@gollent.com>


# 8f6d6057 30-Mar-2020 Jérôme Duval <jerome.duval@gmail.com>

acpi: add walk_namespace bus and device method

Change-Id: I03fa43e0ba9b37f6db43f6ff16bbca892684cc49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2446
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# b5dba2e4 15-Mar-2020 Jérôme Duval <jerome.duval@gmail.com>

acpi: add ACPI_DEVICE_ADDR_ITEM and ACPI_DEVICE_CID_ITEM for device nodes

ACPI_DEVICE_HID_ITEM is now optional, instead of an empty string.

Change-Id: I352ffaaad377659f650a0b8c0d56e40a68b739c3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2420
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# e5c95a01 28-Mar-2017 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Use 64 bit addressing for ACPI on 32 bit builds.

32 bit builds with PAE are so much fun. It's like
64 bit without all the extra registers...


# 3594baab 13-Sep-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Add get_name and fix get_next_object.

TODO: Need to add defines or enum for nameType.


# 15d8a434 10-Sep-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Add function to walk through children.

Without losing my sanity that is.
ACPI API refactoring will happen some day.


# 847ab5a7 11-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: EcGpeHandler() should return ACPI_REENABLE_GPE.

* this clears the GPE if level triggered and possibly enables the GPE.
See AcpiEvFinishGpe() and AcpiEvGpeDispatch().


# daf95c6d 30-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: use acpi_event_handler instead of interrupt_handler.


# 2bd8cdc1 24-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: switch acpi_object from a struct to a union

* this way the size of acpi_object_type matches the size of ACPI_OBJECT
for 32-bit and 64-bit builds.
* adjust users of the type acpi_object_type.


# ce2d7d5a 21-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: use walk_resources to find embedded controller I/O ports.

* export walk_resources and use it
* removed SmallResourceData
* added embedded controller module for x86_64


# 92d766df 15-Dec-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Pass a handle to evaluate_object as start point.


# 0a0af895 17-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

acpi: export read_bit_register and write_bit_register

acpi cpuidle needs such acpi functions

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 57311e7b 04-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

acpi: add ACPI_ALLOCATE_LOCAL_BUFFER to ACPI.h

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 9b0d045c 03-Nov-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update to ACPICA 20121018.

This is an update from 20120711 and A LOT has happened since then. See
https://acpica.org/download/changes.txt for all the changes.


# a51a5f3e 12-Jul-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Fixes to Haiku specific code to work with ACPICA 20120711.


# fcb8a5cb 17-Aug-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

* Updated ACPICA to 20110623.
See http://www.acpica.org/download/changes.txt done after 2010-10-13 for info on ACPI changes.
* Adapted the embedded controller to match current FreeBSD one.

There will probably be some issues with these changes initially.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42637 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 407af313 11-May-2011 Michael Lotz <mmlr@mlotz.ch>

Make the signature argument to get_table() const. Should fix the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2645ca0a 11-May-2011 Michael Lotz <mmlr@mlotz.ch>

Provide a function to gain ACPI table access.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41429 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2800b064 09-May-2011 Michael Lotz <mmlr@mlotz.ch>

Add missing const to the path argument of get_handle().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41398 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ce57718d 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Add set_current_resources() which will be used to configure device resources
from settings retrieved through get_{current|possible}_resources().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41382 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 290ac5f9 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Basically revert r41365. Remove the get_pci_info() function of ACPI again as it
turns out to be flaky, is a little bit of a hack anyway and performs unnecessary
operations. The functionality is now handled kernel side which optimizes those
problems away.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41372 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0fc2a29e 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Cleanup spaces vs. tabs. Probably those spaces were copied over from ACPICA
sources as they use 4 spaces instead of tabs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41366 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5789be33 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Add a way to look up basic PCI info for an ACPI device. It works for retrieving
the base bus number and segment which is what we're using them for. It should
work generically, however I only tested it to look up PCI bridge devices.
The logic is a subset of what is done in AcpiEvPciConfigRegionSetup when setting
up the operation region for a PCI device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41365 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fbf6f924 05-May-2011 Michael Lotz <mmlr@mlotz.ch>

* The integer type is actually 64bit, probably just a typo (from very long ago).
* Some automatic whitespace cleanup.

This makes the interrupt model change via kernel actually work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41340 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 01de6adf 05-May-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

This opens up so many possiblities.
* ACPI module now has a get_possible_resources function.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41320 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e9e1577 01-Apr-2011 Brecht Machiels <brecht@mos6581.org>

* added notify headers to the ACPI header (from actypes.h)
* adjusted acpi_battery accordingly



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41162 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12474ac0 21-Nov-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Updated ACPICA to 20101013 from 20100428. See http://www.acpica.org/download/changes.txt for changes.
Embedded Controller still needs some looking into, and I had to remove the WIP code for dumping MADT.
Both are on my TODO.

Also removed a lot of unneeded parts of ACPICA from trunk and did some cleanup in Jamfile.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39565 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7b1a83f 20-Aug-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Add get_current_resources call to ACPI module which allows us to read out a device current resources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffb873af 19-May-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Merge acpi from acpica vendor branch 20100428:
* AcpiSetGpeType no longer exists, replaced with AcpiSetGpe. Since acpi changed gpe handling embedded controller might need improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36867 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d9cc10f 22-Apr-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Moving ACPI Embedded Controller to ACPI bus manager.
* Removed irq_routing struct from ACPI.h to where it is used. Might be able to use acrestype.h instead of duplication.
* Disable old embedded controller and remove it from image.
* Move embedded controller code to busmanager module.
* Remove (some) code duplication

Should work as before, but is now initialized right after the bus manager. Can probably remove further code duplication.
I hope I've done it correctly, feedback is most welcome.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 186058c5 15-Apr-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Some corrections and cleanup to ACPI Embedded controller:
* Exposed ACPI API needed by Embedded Controller
This will be removed again if moved inside the bus manager.
It also duplicates ACPI's own headers so it might go out of sync atm.
* Added mutex to controller and fixed the mixup between acpi_status needed in int handlers and Haiku status.
* Major code cleanup
Not for headers as they are mostly redundant if we move the controller.
Variable names still needs some cleanup

This makes the ACPI errors from the controller understandable. I get AE_NO_HARDWARE_RESPONSE now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36318 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef0f557c 23-Jan-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

As suggested by Axel use addr_t and size_t.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35267 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52378978 09-Dec-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Check if we have 64 or 32 bit.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34598 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d503f262 23-Nov-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Forget ACPI.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34202 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f6d3afb 19-Oct-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add ns_handle_to_pathname acpi function to the acpi module.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb6cd182 19-Oct-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove type variable from reference, it is already defined as object_type before of the union.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33657 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 40d6120c 14-Sep-2009 Jérôme Duval <korli@users.berlios.de>

Patch from Vincent Duvert (edited by myself): Implement reboot via ACPI (#4459)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33135 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f6906e1 18-Jun-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Add some more acpi function to the acpi module and acpi device module. Need this functions for the embedded controller and battery driver.
- Now also use the acpi handle to call a function and not use the path to get a handle and then call the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31101 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c1f94990 02-May-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

get_device_hid() now has a 'size_t bufferLength' parameter, to avoid the risk of buffer overflow

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30575 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88db3889 16-Oct-2008 Michael Lotz <mmlr@mlotz.ch>

Remove one line of whitespace.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28189 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a181d013 10-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Divided enter_sleep_state() to have a prepare_sleep_state() that accepts a
wake vector (not tested at all).
* Removed disabling interrupts when entering the sleep state - looks like
ACPI still needs memory then.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27403 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c20e9eef 29-Nov-2006 Jérôme Duval <korli@users.berlios.de>

added a jam rule AddDriverRegistrationToHaikuImage to add device mappings on the image
commented the insertion of the attribute name in patterns in the case of a string attribute
notify_probe_by_file chooses a module based on a bus specific suffix
dm_register_child_device has a parameter to optionally check the support for the node
added scanning of bus devices after the boot filesystem is mounted
fixed dm_rescan, locking was misbehaving
fixed SYSTEM_DRIVER_REGISTRATION definition
added B_DRIVER_MAPPING attributes for PCI and ACPI devices:
%vendor%_%device% for PCI, hid_%hid% and type_%type% for ACPI
moved acpi_device_module_info definition to public ACPI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea71f2e7 18-Nov-2006 Jérôme Duval <korli@users.berlios.de>

acpi now uses a simple pci layer instead of the pci bus manager
added a new style module to publish acpi devices ("listdev -d" to list them)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abe0393b 07-Mar-2006 Bryan Varner <bvarner@nowhere.fake>

* acpi bus_manager addition of get_object() functions.
* thermal driver uses get_object to obtain the passive device package.

Need changes to acpi_object_type to handle references... that'll have to come in the near future.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16637 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d92b102 17-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Upgraded the bus manager interface. It's now capable enough to start actually doing interesting things, like power management, thermal stuff, and hyperthreading.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 92ba8215 02-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Added basic (i.e. argumentless) control method execution. Now we can read fan speeds, cpu temperatures, laptop lid states, and all sorts of other glorious things.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11545 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53403b7e 02-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

ACPI bus manager interface, revision 3. Now allows full namespace traversal. Next is AML control method execution.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11540 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c11886db 01-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Now we have a nice structure for handling ACPI fixed events. This means we can do things like make acpi_button block, instead of polling it. Direct register access has gone away. The next revision of the bus manager interface should include namespace traversal and AML control method execution.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11529 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08923ac8 21-Feb-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

ACPI Bus Manager interface header. Currently highly incomplete.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11442 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3594baabf88289684adfb6ba9d5759c3b121593c 13-Sep-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Add get_name and fix get_next_object.

TODO: Need to add defines or enum for nameType.


# 15d8a434d02aa7ee180d1bb613aaabfff61ad965 10-Sep-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Add function to walk through children.

Without losing my sanity that is.
ACPI API refactoring will happen some day.


# 847ab5a73455d77d0510dcaccf46d844877926d6 11-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: EcGpeHandler() should return ACPI_REENABLE_GPE.

* this clears the GPE if level triggered and possibly enables the GPE.
See AcpiEvFinishGpe() and AcpiEvGpeDispatch().


# daf95c6d8cac174aed8b1bd3c3482e71918e014d 30-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: use acpi_event_handler instead of interrupt_handler.


# 2bd8cdc16ba6292d6d13ddf871a101e86b2fd43f 24-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: switch acpi_object from a struct to a union

* this way the size of acpi_object_type matches the size of ACPI_OBJECT
for 32-bit and 64-bit builds.
* adjust users of the type acpi_object_type.


# ce2d7d5ac8d220cb661fd12529fd5c88f5d80d6e 21-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: use walk_resources to find embedded controller I/O ports.

* export walk_resources and use it
* removed SmallResourceData
* added embedded controller module for x86_64


# 92d766df7c465761a8bbddc4e17c38af02fb2833 15-Dec-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Pass a handle to evaluate_object as start point.


# 0a0af8957e4ad48168cb26dba4a058f7eb0e4892 17-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

acpi: export read_bit_register and write_bit_register

acpi cpuidle needs such acpi functions

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 57311e7bb7302866bdcbb28aea336152c7ae873d 04-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

acpi: add ACPI_ALLOCATE_LOCAL_BUFFER to ACPI.h

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 9b0d045c59c1d03dbedf8c76ac88efe6bda7d8d0 03-Nov-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update to ACPICA 20121018.

This is an update from 20120711 and A LOT has happened since then. See
https://acpica.org/download/changes.txt for all the changes.


# a51a5f3e1e8dbcf4a92a041fa99e73475d2d5524 12-Jul-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Fixes to Haiku specific code to work with ACPICA 20120711.


# fcb8a5cb4eef0c50fa90e66d9b6a4f9a7aca5e07 17-Aug-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

* Updated ACPICA to 20110623.
See http://www.acpica.org/download/changes.txt done after 2010-10-13 for info on ACPI changes.
* Adapted the embedded controller to match current FreeBSD one.

There will probably be some issues with these changes initially.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42637 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 407af313ca1b889cc9954f67c4dece9221e324ee 11-May-2011 Michael Lotz <mmlr@mlotz.ch>

Make the signature argument to get_table() const. Should fix the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2645ca0a28fdab77c70f8a5dbcb6fff6d1dd7df8 11-May-2011 Michael Lotz <mmlr@mlotz.ch>

Provide a function to gain ACPI table access.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41429 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2800b0646257f6b82c44e4f4176cb812a86bb09f 09-May-2011 Michael Lotz <mmlr@mlotz.ch>

Add missing const to the path argument of get_handle().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41398 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ce57718d127923247f26afce97afcae755174725 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Add set_current_resources() which will be used to configure device resources
from settings retrieved through get_{current|possible}_resources().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41382 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 290ac5f9b55450fdec3039712388679f2ecb2999 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Basically revert r41365. Remove the get_pci_info() function of ACPI again as it
turns out to be flaky, is a little bit of a hack anyway and performs unnecessary
operations. The functionality is now handled kernel side which optimizes those
problems away.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41372 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0fc2a29e52a526d2ddc6212f8ab9873e3adb99cf 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Cleanup spaces vs. tabs. Probably those spaces were copied over from ACPICA
sources as they use 4 spaces instead of tabs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41366 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5789be33af09d93eb251011ce4079edcc20a7627 07-May-2011 Michael Lotz <mmlr@mlotz.ch>

Add a way to look up basic PCI info for an ACPI device. It works for retrieving
the base bus number and segment which is what we're using them for. It should
work generically, however I only tested it to look up PCI bridge devices.
The logic is a subset of what is done in AcpiEvPciConfigRegionSetup when setting
up the operation region for a PCI device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41365 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fbf6f924d38f7af893486c1d3fccdcc3887323ea 05-May-2011 Michael Lotz <mmlr@mlotz.ch>

* The integer type is actually 64bit, probably just a typo (from very long ago).
* Some automatic whitespace cleanup.

This makes the interrupt model change via kernel actually work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41340 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 01de6adfba9f19662cb39b871bfebdf484195473 05-May-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

This opens up so many possiblities.
* ACPI module now has a get_possible_resources function.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41320 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e9e1577ccfb50194a07204ddd40309daa92d0f0 01-Apr-2011 Brecht Machiels <brecht@mos6581.org>

* added notify headers to the ACPI header (from actypes.h)
* adjusted acpi_battery accordingly



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41162 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12474ac0a5ef9e83d404c8b756ae6f51d7cfa7e2 21-Nov-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Updated ACPICA to 20101013 from 20100428. See http://www.acpica.org/download/changes.txt for changes.
Embedded Controller still needs some looking into, and I had to remove the WIP code for dumping MADT.
Both are on my TODO.

Also removed a lot of unneeded parts of ACPICA from trunk and did some cleanup in Jamfile.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39565 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7b1a83fc3e320c5dc1d26c48dab5fa9f0ad2028 20-Aug-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Add get_current_resources call to ACPI module which allows us to read out a device current resources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffb873afec75fff177a0e5e5388513788e698049 19-May-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Merge acpi from acpica vendor branch 20100428:
* AcpiSetGpeType no longer exists, replaced with AcpiSetGpe. Since acpi changed gpe handling embedded controller might need improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36867 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d9cc10f80057d28c9dd0131e85f2b6ef5687fe3 22-Apr-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Moving ACPI Embedded Controller to ACPI bus manager.
* Removed irq_routing struct from ACPI.h to where it is used. Might be able to use acrestype.h instead of duplication.
* Disable old embedded controller and remove it from image.
* Move embedded controller code to busmanager module.
* Remove (some) code duplication

Should work as before, but is now initialized right after the bus manager. Can probably remove further code duplication.
I hope I've done it correctly, feedback is most welcome.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 186058c5170b2a73ad0bdab55f609ed13373c3f2 15-Apr-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Some corrections and cleanup to ACPI Embedded controller:
* Exposed ACPI API needed by Embedded Controller
This will be removed again if moved inside the bus manager.
It also duplicates ACPI's own headers so it might go out of sync atm.
* Added mutex to controller and fixed the mixup between acpi_status needed in int handlers and Haiku status.
* Major code cleanup
Not for headers as they are mostly redundant if we move the controller.
Variable names still needs some cleanup

This makes the ACPI errors from the controller understandable. I get AE_NO_HARDWARE_RESPONSE now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36318 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef0f557c659b0a59bc800a1a9935c4d729487248 23-Jan-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

As suggested by Axel use addr_t and size_t.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35267 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52378978013f9dc4619313d6b484702a402b82c5 09-Dec-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Check if we have 64 or 32 bit.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34598 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d503f2628bcf9209224b300db9c151e592b72c93 23-Nov-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Forget ACPI.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34202 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f6d3afb1d6abb8336052a5a01f2c686efee9c65 19-Oct-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add ns_handle_to_pathname acpi function to the acpi module.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb6cd182c44ce1be2c9d94dd891cdf81f2528b47 19-Oct-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove type variable from reference, it is already defined as object_type before of the union.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33657 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 40d6120c3b777e678e79cbf7ac7b81fdcc31324d 14-Sep-2009 Jérôme Duval <korli@users.berlios.de>

Patch from Vincent Duvert (edited by myself): Implement reboot via ACPI (#4459)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33135 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f6906e1eb0cdb6008514eaab99d0d537f5f0480 18-Jun-2009 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Add some more acpi function to the acpi module and acpi device module. Need this functions for the embedded controller and battery driver.
- Now also use the acpi handle to call a function and not use the path to get a handle and then call the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31101 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c1f949908a5c8c402590633c23922787bc54b1d5 02-May-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

get_device_hid() now has a 'size_t bufferLength' parameter, to avoid the risk of buffer overflow

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30575 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88db38893001cf9ebdc3e40c07b6223e0d03cd2f 16-Oct-2008 Michael Lotz <mmlr@mlotz.ch>

Remove one line of whitespace.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28189 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a181d013aab3e01662a95862d4666fe101e67c23 10-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Divided enter_sleep_state() to have a prepare_sleep_state() that accepts a
wake vector (not tested at all).
* Removed disabling interrupts when entering the sleep state - looks like
ACPI still needs memory then.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27403 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c20e9eefcd5728962fb0d03777574b6734c9cb37 29-Nov-2006 Jérôme Duval <korli@users.berlios.de>

added a jam rule AddDriverRegistrationToHaikuImage to add device mappings on the image
commented the insertion of the attribute name in patterns in the case of a string attribute
notify_probe_by_file chooses a module based on a bus specific suffix
dm_register_child_device has a parameter to optionally check the support for the node
added scanning of bus devices after the boot filesystem is mounted
fixed dm_rescan, locking was misbehaving
fixed SYSTEM_DRIVER_REGISTRATION definition
added B_DRIVER_MAPPING attributes for PCI and ACPI devices:
%vendor%_%device% for PCI, hid_%hid% and type_%type% for ACPI
moved acpi_device_module_info definition to public ACPI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea71f2e7b8e1a1524683029560576e8917bb2298 18-Nov-2006 Jérôme Duval <korli@users.berlios.de>

acpi now uses a simple pci layer instead of the pci bus manager
added a new style module to publish acpi devices ("listdev -d" to list them)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abe0393b82740ff6ae905a42694bfa88181cb979 07-Mar-2006 Bryan Varner <bvarner@nowhere.fake>

* acpi bus_manager addition of get_object() functions.
* thermal driver uses get_object to obtain the passive device package.

Need changes to acpi_object_type to handle references... that'll have to come in the near future.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16637 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d92b10268dd05503fe53e55450c6fdfc629161c 17-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Upgraded the bus manager interface. It's now capable enough to start actually doing interesting things, like power management, thermal stuff, and hyperthreading.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 92ba8215d2db1683c59bae9c28f4f7e28fc54e35 02-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Added basic (i.e. argumentless) control method execution. Now we can read fan speeds, cpu temperatures, laptop lid states, and all sorts of other glorious things.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11545 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53403b7edc9e786221cee289b18eb762ec758c06 02-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

ACPI bus manager interface, revision 3. Now allows full namespace traversal. Next is AML control method execution.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11540 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c11886dbbe7d88b703b84630c82c92f5c6b75b9c 01-Mar-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Now we have a nice structure for handling ACPI fixed events. This means we can do things like make acpi_button block, instead of polling it. Direct register access has gone away. The next revision of the bus manager interface should include namespace traversal and AML control method execution.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11529 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08923ac8ba572914ff081eeda14c1cce6b87d51c 21-Feb-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

ACPI Bus Manager interface header. Currently highly incomplete.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11442 a95241bf-73f2-0310-859d-f6bbb57e9c96