Provide a function to gain ACPI table access.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41429 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-05-11 08:22:22 +00:00
parent 5d01e61a91
commit 2645ca0a28
4 changed files with 23 additions and 3 deletions

View File

@ -234,7 +234,7 @@ struct acpi_module_info {
status_t (*evaluate_method)(acpi_handle handle, const char *method,
acpi_objects *args, acpi_data *returnValue);
/* Resource info */
/* Resource Management */
status_t (*get_irq_routing_table)(acpi_handle busDeviceHandle,
acpi_data *retBuffer);
@ -251,6 +251,10 @@ struct acpi_module_info {
size_t size);
status_t (*enter_sleep_state)(uint8 state);
status_t (*reboot)(void);
/* Table Access */
status_t (*get_table)(char *signature, uint32 instance,
void **tableHeader);
};

View File

@ -713,6 +713,14 @@ reboot(void)
}
status_t
get_table(char* signature, uint32 instance, void** tableHeader)
{
return AcpiGetTable(signature, instance, (ACPI_TABLE_HEADER**)tableHeader)
== AE_OK ? B_OK : B_ERROR;
}
struct acpi_module_info gACPIModule = {
{
B_ACPI_MODULE_NAME,
@ -752,5 +760,6 @@ struct acpi_module_info gACPIModule = {
set_current_resources,
prepare_sleep_state,
enter_sleep_state,
reboot
reboot,
get_table
};

View File

@ -219,7 +219,8 @@ static struct acpi_root_info sACPIRootModule = {
set_current_resources,
prepare_sleep_state,
enter_sleep_state,
reboot
reboot,
get_table
};

View File

@ -134,6 +134,10 @@ typedef struct acpi_root_info {
size_t size);
status_t (*enter_sleep_state)(uint8 state);
status_t (*reboot)(void);
/* Table Access */
status_t (*get_table)(char *signature, uint32 instance,
void **tableHeader);
} acpi_root_info;
@ -211,6 +215,8 @@ status_t enter_sleep_state(uint8 state);
status_t reboot(void);
status_t get_table(char* signature, uint32 instance, void** tableHeader);
__END_DECLS