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:
@@ -234,7 +234,7 @@ struct acpi_module_info {
|
|||||||
status_t (*evaluate_method)(acpi_handle handle, const char *method,
|
status_t (*evaluate_method)(acpi_handle handle, const char *method,
|
||||||
acpi_objects *args, acpi_data *returnValue);
|
acpi_objects *args, acpi_data *returnValue);
|
||||||
|
|
||||||
/* Resource info */
|
/* Resource Management */
|
||||||
|
|
||||||
status_t (*get_irq_routing_table)(acpi_handle busDeviceHandle,
|
status_t (*get_irq_routing_table)(acpi_handle busDeviceHandle,
|
||||||
acpi_data *retBuffer);
|
acpi_data *retBuffer);
|
||||||
@@ -251,6 +251,10 @@ struct acpi_module_info {
|
|||||||
size_t size);
|
size_t size);
|
||||||
status_t (*enter_sleep_state)(uint8 state);
|
status_t (*enter_sleep_state)(uint8 state);
|
||||||
status_t (*reboot)(void);
|
status_t (*reboot)(void);
|
||||||
|
|
||||||
|
/* Table Access */
|
||||||
|
status_t (*get_table)(char *signature, uint32 instance,
|
||||||
|
void **tableHeader);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 = {
|
struct acpi_module_info gACPIModule = {
|
||||||
{
|
{
|
||||||
B_ACPI_MODULE_NAME,
|
B_ACPI_MODULE_NAME,
|
||||||
@@ -752,5 +760,6 @@ struct acpi_module_info gACPIModule = {
|
|||||||
set_current_resources,
|
set_current_resources,
|
||||||
prepare_sleep_state,
|
prepare_sleep_state,
|
||||||
enter_sleep_state,
|
enter_sleep_state,
|
||||||
reboot
|
reboot,
|
||||||
|
get_table
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -219,7 +219,8 @@ static struct acpi_root_info sACPIRootModule = {
|
|||||||
set_current_resources,
|
set_current_resources,
|
||||||
prepare_sleep_state,
|
prepare_sleep_state,
|
||||||
enter_sleep_state,
|
enter_sleep_state,
|
||||||
reboot
|
reboot,
|
||||||
|
get_table
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -134,6 +134,10 @@ typedef struct acpi_root_info {
|
|||||||
size_t size);
|
size_t size);
|
||||||
status_t (*enter_sleep_state)(uint8 state);
|
status_t (*enter_sleep_state)(uint8 state);
|
||||||
status_t (*reboot)(void);
|
status_t (*reboot)(void);
|
||||||
|
|
||||||
|
/* Table Access */
|
||||||
|
status_t (*get_table)(char *signature, uint32 instance,
|
||||||
|
void **tableHeader);
|
||||||
} acpi_root_info;
|
} acpi_root_info;
|
||||||
|
|
||||||
|
|
||||||
@@ -211,6 +215,8 @@ status_t enter_sleep_state(uint8 state);
|
|||||||
|
|
||||||
status_t reboot(void);
|
status_t reboot(void);
|
||||||
|
|
||||||
|
status_t get_table(char* signature, uint32 instance, void** tableHeader);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user