* walking the MADT again.
*/
status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
- (acpi_table_header **) &madt);
+ (struct acpi_table_header **) &madt);
if (ACPI_SUCCESS(status)) {
madt_end = (void *) (unsigned long)madt + madt->header.length;
/* acpi_utils.h */
-acpi_status acpi_extract_package (acpi_object *, acpi_buffer *, acpi_buffer *);
-acpi_status acpi_evaluate_integer (acpi_handle, acpi_string, acpi_object_list *, unsigned long *);
-acpi_status acpi_evaluate_reference (acpi_handle, acpi_string, acpi_object_list *, struct acpi_handle_list *);
+acpi_status
+acpi_extract_package (
+ union acpi_object *package,
+ struct acpi_buffer *format,
+ struct acpi_buffer *buffer);
+acpi_status
+acpi_evaluate_integer (
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *arguments,
+ unsigned long *data);
+acpi_status
+acpi_evaluate_reference (
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *arguments,
+ struct acpi_handle_list *list);
+
#ifdef CONFIG_ACPI_BUS
/* ACPI PCI Root Bridge (pci_root.c) */
-void acpi_pci_get_translations (acpi_pci_id* id, u64* mem_tra, u64* io_tra);
+void acpi_pci_get_translations (struct acpi_pci_id* id, u64* mem_tra, u64* io_tra);
/* ACPI PCI Interrupt Link (pci_link.c) */
struct pci_bus;
int acpi_pci_bind (struct acpi_device *device);
-int acpi_pci_bind_root (struct acpi_device *device, acpi_pci_id *id, struct pci_bus *bus);
+int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);
#endif /*CONFIG_ACPI_PCI*/
{
int result = 0;
acpi_status status = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
ACPI_BATTERY_FORMAT_BIF};
- acpi_buffer data = {0, NULL};
- acpi_object *package = NULL;
+ struct acpi_buffer data = {0, NULL};
+ union acpi_object *package = NULL;
ACPI_FUNCTION_TRACE("acpi_battery_get_info");
return_VALUE(-ENODEV);
}
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
/* Extract Package Data */
{
int result = 0;
acpi_status status = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BST),
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BST),
ACPI_BATTERY_FORMAT_BST};
- acpi_buffer data = {0, NULL};
- acpi_object *package = NULL;
+ struct acpi_buffer data = {0, NULL};
+ union acpi_object *package = NULL;
ACPI_FUNCTION_TRACE("acpi_battery_get_status");
return_VALUE(-ENODEV);
}
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
/* Extract Package Data */
unsigned long alarm)
{
acpi_status status = 0;
- acpi_object arg0 = {ACPI_TYPE_INTEGER};
- acpi_object_list arg_list = {1, &arg0};
+ union acpi_object arg0 = {ACPI_TYPE_INTEGER};
+ struct acpi_object_list arg_list = {1, &arg0};
ACPI_FUNCTION_TRACE("acpi_battery_set_alarm");
acpi_bus_init_irq (void)
{
acpi_status status = AE_OK;
- acpi_object arg = {ACPI_TYPE_INTEGER};
- acpi_object_list arg_list = {1, &arg};
+ union acpi_object arg = {ACPI_TYPE_INTEGER};
+ struct acpi_object_list arg_list = {1, &arg};
char *message = NULL;
ACPI_FUNCTION_TRACE("acpi_bus_init_irq");
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
+ struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
ACPI_FUNCTION_TRACE("acpi_bus_init");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_create_buffer_field (
- acpi_parse_object *op,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *arg;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_operand_object *second_desc = NULL;
- u32 flags;
+ union acpi_parse_object *arg;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *second_desc = NULL;
+ u32 flags;
ACPI_FUNCTION_TRACE ("ds_create_buffer_field");
acpi_status
acpi_ds_get_field_names (
- acpi_create_field_info *info,
- acpi_walk_state *walk_state,
- acpi_parse_object *arg)
+ struct acpi_create_field_info *info,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg)
{
- acpi_status status;
- acpi_integer position;
+ acpi_status status;
+ acpi_integer position;
ACPI_FUNCTION_TRACE_PTR ("ds_get_field_names", info);
acpi_status
acpi_ds_create_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg;
- acpi_create_field_info info;
+ acpi_status status;
+ union acpi_parse_object *arg;
+ struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_field", op);
acpi_status
acpi_ds_init_field_objects (
- acpi_parse_object *op,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg = NULL;
- acpi_namespace_node *node;
- u8 type = 0;
+ acpi_status status;
+ union acpi_parse_object *arg = NULL;
+ struct acpi_namespace_node *node;
+ u8 type = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_init_field_objects", op);
acpi_status
acpi_ds_create_bank_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg;
- acpi_create_field_info info;
+ acpi_status status;
+ union acpi_parse_object *arg;
+ struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_bank_field", op);
acpi_status
acpi_ds_create_index_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg;
- acpi_create_field_info info;
+ acpi_status status;
+ union acpi_parse_object *arg;
+ struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_index_field", op);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_object_type type;
- acpi_status status;
- acpi_init_walk_info *info = (acpi_init_walk_info *) context;
+ acpi_object_type type;
+ acpi_status status;
+ struct acpi_init_walk_info *info = (struct acpi_init_walk_info *) context;
ACPI_FUNCTION_NAME ("ds_init_one_object");
* We are only interested in objects owned by the table that
* was just loaded
*/
- if (((acpi_namespace_node *) obj_handle)->owner_id !=
+ if (((struct acpi_namespace_node *) obj_handle)->owner_id !=
info->table_desc->table_id) {
return (AE_OK);
}
status = acpi_ds_initialize_region (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n",
- obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
+ obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
}
* on a per-table basis. Currently, we just use a global for the width.
*/
if (info->table_desc->pointer->revision == 1) {
- ((acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
+ ((struct acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
}
/*
status = acpi_ds_parse_method (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
- obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
+ obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
/* This parse failed, but we will continue parsing more methods */
* for every execution since there isn't much overhead
*/
acpi_ns_delete_namespace_subtree (obj_handle);
- acpi_ns_delete_namespace_by_owner (((acpi_namespace_node *) obj_handle)->object->method.owning_id);
+ acpi_ns_delete_namespace_by_owner (((struct acpi_namespace_node *) obj_handle)->object->method.owning_id);
break;
acpi_status
acpi_ds_initialize_objects (
- acpi_table_desc *table_desc,
- acpi_namespace_node *start_node)
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *start_node)
{
- acpi_status status;
- acpi_init_walk_info info;
+ acpi_status status;
+ struct acpi_init_walk_info info;
ACPI_FUNCTION_TRACE ("ds_initialize_objects");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_parse_method (
- acpi_handle obj_handle)
+ acpi_handle obj_handle)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_parse_object *op;
- acpi_namespace_node *node;
- acpi_owner_id owner_id;
- acpi_walk_state *walk_state;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_parse_object *op;
+ struct acpi_namespace_node *node;
+ acpi_owner_id owner_id;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE_PTR ("ds_parse_method", obj_handle);
}
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Parsing [%4.4s] **** named_obj=%p\n",
- ((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
+ ((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
/* Extract the method object from the method Node */
- node = (acpi_namespace_node *) obj_handle;
+ node = (struct acpi_namespace_node *) obj_handle;
obj_desc = acpi_ns_get_attached_object (node);
if (!obj_desc) {
return_ACPI_STATUS (AE_NULL_OBJECT);
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"**** [%4.4s] Parsed **** named_obj=%p Op=%p\n",
- ((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
+ ((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
acpi_ps_delete_parse_tree (op);
return_ACPI_STATUS (status);
acpi_status
acpi_ds_begin_method_execution (
- acpi_namespace_node *method_node,
- acpi_operand_object *obj_desc,
- acpi_namespace_node *calling_method_node)
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object *obj_desc,
+ struct acpi_namespace_node *calling_method_node)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ds_begin_method_execution", method_node);
acpi_status
acpi_ds_call_control_method (
- acpi_thread_state *thread,
- acpi_walk_state *this_walk_state,
- acpi_parse_object *op)
+ struct acpi_thread_state *thread,
+ struct acpi_walk_state *this_walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_namespace_node *method_node;
- acpi_operand_object *obj_desc;
- acpi_walk_state *next_walk_state;
- u32 i;
+ acpi_status status;
+ struct acpi_namespace_node *method_node;
+ union acpi_operand_object *obj_desc;
+ struct acpi_walk_state *next_walk_state;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("ds_call_control_method", this_walk_state);
acpi_status
acpi_ds_restart_control_method (
- acpi_walk_state *walk_state,
- acpi_operand_object *return_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *return_desc)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_restart_control_method", walk_state);
acpi_status
acpi_ds_terminate_control_method (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *obj_desc;
- acpi_namespace_node *method_node;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *method_node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_terminate_control_method", walk_state);
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ds_method_data_init (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ds_method_data_init");
void
acpi_ds_method_data_delete_all (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 index;
+ u32 index;
ACPI_FUNCTION_TRACE ("ds_method_data_delete_all");
acpi_status
acpi_ds_method_data_init_args (
- acpi_operand_object **params,
- u32 max_param_count,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **params,
+ u32 max_param_count,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- u32 index = 0;
+ acpi_status status;
+ u32 index = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_method_data_init_args", params);
acpi_status
acpi_ds_method_data_get_node (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_namespace_node **node)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **node)
{
ACPI_FUNCTION_TRACE ("ds_method_data_get_node");
acpi_status
acpi_ds_method_data_set_value (
- u16 opcode,
- u32 index,
- acpi_operand_object *object,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *new_desc = object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *new_desc = object;
ACPI_FUNCTION_TRACE ("ds_method_data_set_value");
acpi_object_type
acpi_ds_method_data_get_type (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_get_type");
acpi_status
acpi_ds_method_data_get_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_operand_object **dest_desc)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **dest_desc)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_get_value");
void
acpi_ds_method_data_delete_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_delete_value");
acpi_status
acpi_ds_store_object_to_local (
- u16 opcode,
- u32 index,
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *current_obj_desc;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *current_obj_desc;
ACPI_FUNCTION_TRACE ("ds_store_object_to_local");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_build_internal_object (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object **obj_desc_ptr)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object **obj_desc_ptr)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ds_build_internal_object");
status = acpi_ns_lookup (walk_state->scope_info, op->common.value.string,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
- (acpi_namespace_node **) &(op->common.node));
+ (struct acpi_namespace_node **) &(op->common.node));
if (ACPI_FAILURE (status)) {
ACPI_REPORT_NSERROR (op->common.value.string, status);
acpi_status
acpi_ds_build_internal_buffer_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 buffer_length,
- acpi_operand_object **obj_desc_ptr)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 buffer_length,
+ union acpi_operand_object **obj_desc_ptr)
{
- acpi_parse_object *arg;
- acpi_operand_object *obj_desc;
- acpi_parse_object *byte_list;
- u32 byte_list_length = 0;
+ union acpi_parse_object *arg;
+ union acpi_operand_object *obj_desc;
+ union acpi_parse_object *byte_list;
+ u32 byte_list_length = 0;
ACPI_FUNCTION_TRACE ("ds_build_internal_buffer_obj");
}
obj_desc->buffer.flags |= AOPOBJ_DATA_VALID;
- op->common.node = (acpi_namespace_node *) obj_desc;
+ op->common.node = (struct acpi_namespace_node *) obj_desc;
return_ACPI_STATUS (AE_OK);
}
acpi_status
acpi_ds_build_internal_package_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 package_length,
- acpi_operand_object **obj_desc_ptr)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 package_length,
+ union acpi_operand_object **obj_desc_ptr)
{
- acpi_parse_object *arg;
- acpi_parse_object *parent;
- acpi_operand_object *obj_desc = NULL;
- u32 package_list_length;
- acpi_status status = AE_OK;
- u32 i;
+ union acpi_parse_object *arg;
+ union acpi_parse_object *parent;
+ union acpi_operand_object *obj_desc = NULL;
+ u32 package_list_length;
+ acpi_status status = AE_OK;
+ u32 i;
ACPI_FUNCTION_TRACE ("ds_build_internal_package_obj");
if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {
/* Object (package or buffer) is already built */
- obj_desc->package.elements[i] = ACPI_CAST_PTR (acpi_operand_object, arg->common.node);
+ obj_desc->package.elements[i] = ACPI_CAST_PTR (union acpi_operand_object, arg->common.node);
}
else {
status = acpi_ds_build_internal_object (walk_state, arg,
}
obj_desc->package.flags |= AOPOBJ_DATA_VALID;
- op->common.node = (acpi_namespace_node *) obj_desc;
+ op->common.node = (struct acpi_namespace_node *) obj_desc;
return_ACPI_STATUS (status);
}
acpi_status
acpi_ds_create_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_create_node", op);
acpi_status
acpi_ds_init_object_from_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u16 opcode,
- acpi_operand_object **ret_obj_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u16 opcode,
+ union acpi_operand_object **ret_obj_desc)
{
- const acpi_opcode_info *op_info;
- acpi_operand_object *obj_desc;
- acpi_status status = AE_OK;
+ const struct acpi_opcode_info *op_info;
+ union acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ds_init_object_from_op");
/*
* Defer evaluation of Buffer term_arg operand
*/
- obj_desc->buffer.node = (acpi_namespace_node *) walk_state->operands[0];
+ obj_desc->buffer.node = (struct acpi_namespace_node *) walk_state->operands[0];
obj_desc->buffer.aml_start = op->named.data;
obj_desc->buffer.aml_length = op->named.length;
break;
/*
* Defer evaluation of Package term_arg operand
*/
- obj_desc->package.node = (acpi_namespace_node *) walk_state->operands[0];
+ obj_desc->package.node = (struct acpi_namespace_node *) walk_state->operands[0];
obj_desc->package.aml_start = op->named.data;
obj_desc->package.aml_length = op->named.length;
break;
#ifndef ACPI_NO_METHOD_EXECUTION
status = acpi_ds_method_data_get_node (AML_LOCAL_OP, obj_desc->reference.offset,
- walk_state, (acpi_namespace_node **) &obj_desc->reference.object);
+ walk_state, (struct acpi_namespace_node **) &obj_desc->reference.object);
#endif
break;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_execute_arguments (
- acpi_namespace_node *node,
- acpi_namespace_node *scope_node,
- u32 aml_length,
- u8 *aml_start)
+ struct acpi_namespace_node *node,
+ struct acpi_namespace_node *scope_node,
+ u32 aml_length,
+ u8 *aml_start)
{
- acpi_status status;
- acpi_parse_object *op;
- acpi_walk_state *walk_state;
- acpi_parse_object *arg;
+ acpi_status status;
+ union acpi_parse_object *op;
+ struct acpi_walk_state *walk_state;
+ union acpi_parse_object *arg;
ACPI_FUNCTION_TRACE ("acpi_ds_execute_arguments");
acpi_status
acpi_ds_get_buffer_field_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_operand_object *extra_desc;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *extra_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_field_arguments", obj_desc);
acpi_status
acpi_ds_get_buffer_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_arguments", obj_desc);
acpi_status
acpi_ds_get_package_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_package_arguments", obj_desc);
acpi_status
acpi_ds_get_region_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_namespace_node *node;
- acpi_status status;
- acpi_operand_object *extra_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ union acpi_operand_object *extra_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_get_region_arguments", obj_desc);
acpi_status
acpi_ds_initialize_region (
- acpi_handle obj_handle)
+ acpi_handle obj_handle)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
obj_desc = acpi_ns_get_attached_object (obj_handle);
acpi_status
acpi_ds_init_buffer_field (
- u16 aml_opcode,
- acpi_operand_object *obj_desc,
- acpi_operand_object *buffer_desc,
- acpi_operand_object *offset_desc,
- acpi_operand_object *length_desc,
- acpi_operand_object *result_desc)
+ u16 aml_opcode,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *buffer_desc,
+ union acpi_operand_object *offset_desc,
+ union acpi_operand_object *length_desc,
+ union acpi_operand_object *result_desc)
{
- u32 offset;
- u32 bit_offset;
- u32 bit_count;
- u8 field_flags;
- acpi_status status;
+ u32 offset;
+ u32 bit_offset;
+ u32 bit_count;
+ u8 field_flags;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_init_buffer_field", obj_desc);
acpi_status
acpi_ds_eval_buffer_field_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_parse_object *next_op;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ union acpi_parse_object *next_op;
ACPI_FUNCTION_TRACE_PTR ("ds_eval_buffer_field_operands", op);
acpi_status
acpi_ds_eval_region_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_operand_object *operand_desc;
- acpi_namespace_node *node;
- acpi_parse_object *next_op;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *operand_desc;
+ struct acpi_namespace_node *node;
+ union acpi_parse_object *next_op;
ACPI_FUNCTION_TRACE_PTR ("ds_eval_region_operands", op);
acpi_status
acpi_ds_eval_data_object_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object *obj_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object *obj_desc)
{
- acpi_status status;
- acpi_operand_object *arg_desc;
- u32 length;
+ acpi_status status;
+ union acpi_operand_object *arg_desc;
+ u32 length;
ACPI_FUNCTION_TRACE ("ds_eval_data_object_operands");
acpi_status
acpi_ds_exec_begin_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status = AE_OK;
- acpi_generic_state *control_state;
+ acpi_status status = AE_OK;
+ union acpi_generic_state *control_state;
ACPI_FUNCTION_NAME ("ds_exec_begin_control_op");
acpi_status
acpi_ds_exec_end_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status = AE_OK;
- acpi_generic_state *control_state;
+ acpi_status status = AE_OK;
+ union acpi_generic_state *control_state;
ACPI_FUNCTION_NAME ("ds_exec_end_control_op");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u8
acpi_ds_is_result_used (
- acpi_parse_object *op,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state)
{
- const acpi_opcode_info *parent_info;
+ const struct acpi_opcode_info *parent_info;
ACPI_FUNCTION_TRACE_PTR ("ds_is_result_used", op);
void
acpi_ds_delete_result_if_not_used (
- acpi_parse_object *op,
- acpi_operand_object *result_obj,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ union acpi_operand_object *result_obj,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_delete_result_if_not_used", result_obj);
acpi_status
acpi_ds_resolve_operands (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
- acpi_status status = AE_OK;
+ u32 i;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ds_resolve_operands", walk_state);
void
acpi_ds_clear_operands (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("acpi_ds_clear_operands", walk_state);
acpi_status
acpi_ds_create_operand (
- acpi_walk_state *walk_state,
- acpi_parse_object *arg,
- u32 arg_index)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg,
+ u32 arg_index)
{
- acpi_status status = AE_OK;
- char *name_string;
- u32 name_length;
- acpi_operand_object *obj_desc;
- acpi_parse_object *parent_op;
- u16 opcode;
- acpi_interpreter_mode interpreter_mode;
- const acpi_opcode_info *op_info;
+ acpi_status status = AE_OK;
+ char *name_string;
+ u32 name_length;
+ union acpi_operand_object *obj_desc;
+ union acpi_parse_object *parent_op;
+ u16 opcode;
+ acpi_interpreter_mode interpreter_mode;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_operand", arg);
ACPI_TYPE_ANY, interpreter_mode,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
walk_state,
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &obj_desc));
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc));
/*
* The only case where we pass through (ignore) a NOT_FOUND
* error is for the cond_ref_of opcode.
* indicate this to the interpreter, set the
* object to the root
*/
- obj_desc = ACPI_CAST_PTR (acpi_operand_object, acpi_gbl_root_node);
+ obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node);
status = AE_OK;
}
acpi_status
acpi_ds_create_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *first_arg)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *first_arg)
{
- acpi_status status = AE_OK;
- acpi_parse_object *arg;
- u32 arg_count = 0;
+ acpi_status status = AE_OK;
+ union acpi_parse_object *arg;
+ u32 arg_count = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_create_operands", first_arg);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_get_predicate_value (
- acpi_walk_state *walk_state,
- acpi_operand_object *result_obj) {
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *result_obj) {
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_get_predicate_value", walk_state);
acpi_status
acpi_ds_exec_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op)
{
- acpi_parse_object *op;
- acpi_status status = AE_OK;
- u32 opcode_class;
+ union acpi_parse_object *op;
+ acpi_status status = AE_OK;
+ u32 opcode_class;
ACPI_FUNCTION_TRACE_PTR ("ds_exec_begin_op", walk_state);
acpi_status
acpi_ds_exec_end_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *op;
- acpi_status status = AE_OK;
- u32 op_type;
- u32 op_class;
- acpi_parse_object *next_op;
- acpi_parse_object *first_arg;
+ union acpi_parse_object *op;
+ acpi_status status = AE_OK;
+ u32 op_type;
+ u32 op_class;
+ union acpi_parse_object *next_op;
+ union acpi_parse_object *first_arg;
ACPI_FUNCTION_TRACE_PTR ("ds_exec_end_op", walk_state);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_init_callbacks (
- acpi_walk_state *walk_state,
- u32 pass_number)
+ struct acpi_walk_state *walk_state,
+ u32 pass_number)
{
switch (pass_number) {
acpi_status
acpi_ds_load1_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op)
{
- acpi_parse_object *op;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_object_type object_type;
- char *path;
- u32 flags;
+ union acpi_parse_object *op;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ acpi_object_type object_type;
+ char *path;
+ u32 flags;
ACPI_FUNCTION_NAME ("ds_load1_begin_op");
acpi_status
acpi_ds_load1_end_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *op;
- acpi_object_type object_type;
- acpi_status status = AE_OK;
+ union acpi_parse_object *op;
+ acpi_object_type object_type;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_NAME ("ds_load1_end_op");
acpi_status
acpi_ds_load2_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op)
{
- acpi_parse_object *op;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_object_type object_type;
- char *buffer_ptr;
+ union acpi_parse_object *op;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ acpi_object_type object_type;
+ char *buffer_ptr;
ACPI_FUNCTION_TRACE ("ds_load2_begin_op");
acpi_status
acpi_ds_load2_end_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *op;
- acpi_status status = AE_OK;
- acpi_object_type object_type;
- acpi_namespace_node *node;
- acpi_parse_object *arg;
- acpi_namespace_node *new_node;
+ union acpi_parse_object *op;
+ acpi_status status = AE_OK;
+ acpi_object_type object_type;
+ struct acpi_namespace_node *node;
+ union acpi_parse_object *arg;
+ struct acpi_namespace_node *new_node;
#ifndef ACPI_NO_METHOD_EXECUTION
- u32 i;
+ u32 i;
#endif
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ds_scope_stack_clear (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *scope_info;
+ union acpi_generic_state *scope_info;
ACPI_FUNCTION_NAME ("ds_scope_stack_clear");
acpi_status
acpi_ds_scope_stack_push (
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_walk_state *walk_state)
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *scope_info;
- acpi_generic_state *old_scope_info;
+ union acpi_generic_state *scope_info;
+ union acpi_generic_state *old_scope_info;
ACPI_FUNCTION_TRACE ("ds_scope_stack_push");
acpi_status
acpi_ds_scope_stack_pop (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *scope_info;
- acpi_generic_state *new_scope_info;
+ union acpi_generic_state *scope_info;
+ union acpi_generic_state *new_scope_info;
ACPI_FUNCTION_TRACE ("ds_scope_stack_pop");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_result_insert (
- void *object,
- u32 index,
- acpi_walk_state *walk_state)
+ void *object,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_insert");
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Obj=%p [%s] State=%p Num=%X Cur=%X\n",
- object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
+ object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
walk_state, state->results.num_results, walk_state->current_result));
return (AE_OK);
acpi_status
acpi_ds_result_remove (
- acpi_operand_object **object,
- u32 index,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_remove");
acpi_status
acpi_ds_result_pop (
- acpi_operand_object **object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state)
{
- acpi_native_uint index;
- acpi_generic_state *state;
+ acpi_native_uint index;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_pop");
acpi_status
acpi_ds_result_pop_from_bottom (
- acpi_operand_object **object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state)
{
- acpi_native_uint index;
- acpi_generic_state *state;
+ acpi_native_uint index;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_pop_from_bottom");
acpi_status
acpi_ds_result_push (
- acpi_operand_object *object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_push");
state->results.num_results++;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p Num=%X Cur=%X\n",
- object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
+ object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
walk_state, state->results.num_results, walk_state->current_result));
return (AE_OK);
acpi_status
acpi_ds_result_stack_push (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_stack_push");
acpi_status
acpi_ds_result_stack_pop (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_stack_pop");
acpi_status
acpi_ds_obj_stack_delete_all (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_delete_all", walk_state);
acpi_status
acpi_ds_obj_stack_push (
- void *object,
- acpi_walk_state *walk_state)
+ void *object,
+ struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_NAME ("ds_obj_stack_push");
walk_state->num_operands++;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p #Ops=%X\n",
- object, acpi_ut_get_object_type_name ((acpi_operand_object *) object),
+ object, acpi_ut_get_object_type_name ((union acpi_operand_object *) object),
walk_state, walk_state->num_operands));
return (AE_OK);
acpi_status
acpi_ds_obj_stack_pop_object (
- acpi_operand_object **object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_NAME ("ds_obj_stack_pop_object");
acpi_status
acpi_ds_obj_stack_pop (
- u32 pop_count,
- acpi_walk_state *walk_state)
+ u32 pop_count,
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_NAME ("ds_obj_stack_pop");
acpi_status
acpi_ds_obj_stack_pop_and_delete (
- u32 pop_count,
- acpi_walk_state *walk_state)
+ u32 pop_count,
+ struct acpi_walk_state *walk_state)
{
- u32 i;
- acpi_operand_object *obj_desc;
+ u32 i;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_NAME ("ds_obj_stack_pop_and_delete");
void *
acpi_ds_obj_stack_get_value (
- u32 index,
- acpi_walk_state *walk_state)
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_get_value", walk_state);
*
******************************************************************************/
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_get_current_walk_state (
- acpi_thread_state *thread)
+ struct acpi_thread_state *thread)
{
ACPI_FUNCTION_NAME ("ds_get_current_walk_state");
void
acpi_ds_push_walk_state (
- acpi_walk_state *walk_state,
- acpi_thread_state *thread)
+ struct acpi_walk_state *walk_state,
+ struct acpi_thread_state *thread)
{
ACPI_FUNCTION_TRACE ("ds_push_walk_state");
*
******************************************************************************/
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_pop_walk_state (
- acpi_thread_state *thread)
+ struct acpi_thread_state *thread)
{
- acpi_walk_state *walk_state;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE ("ds_pop_walk_state");
*
******************************************************************************/
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_create_walk_state (
- acpi_owner_id owner_id,
- acpi_parse_object *origin,
- acpi_operand_object *mth_desc,
- acpi_thread_state *thread)
+ acpi_owner_id owner_id,
+ union acpi_parse_object *origin,
+ union acpi_operand_object *mth_desc,
+ struct acpi_thread_state *thread)
{
- acpi_walk_state *walk_state;
- acpi_status status;
+ struct acpi_walk_state *walk_state;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ds_create_walk_state");
acpi_status
acpi_ds_init_aml_walk (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_namespace_node *method_node,
- u8 *aml_start,
- u32 aml_length,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc,
- u32 pass_number)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *method_node,
+ u8 *aml_start,
+ u32 aml_length,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc,
+ u32 pass_number)
{
- acpi_status status;
- acpi_parse_state *parser_state = &walk_state->parser_state;
- acpi_parse_object *extra_op;
+ acpi_status status;
+ struct acpi_parse_state *parser_state = &walk_state->parser_state;
+ union acpi_parse_object *extra_op;
ACPI_FUNCTION_TRACE ("ds_init_aml_walk");
void
acpi_ds_delete_walk_state (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ds_delete_walk_state", walk_state);
};
struct acpi_ec {
- acpi_handle handle;
- unsigned long uid;
- unsigned long gpe_bit;
- acpi_generic_address status_addr;
- acpi_generic_address command_addr;
- acpi_generic_address data_addr;
- unsigned long global_lock;
- spinlock_t lock;
+ acpi_handle handle;
+ unsigned long uid;
+ unsigned long gpe_bit;
+ struct acpi_generic_address status_addr;
+ struct acpi_generic_address command_addr;
+ struct acpi_generic_address data_addr;
+ unsigned long global_lock;
+ spinlock_t lock;
};
/* If we find an EC via the ECDT, we need to keep a ptr to its context */
int result = 0;
acpi_status status = AE_OK;
struct acpi_ec *ec = NULL;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_resource *resource = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_resource *resource = NULL;
ACPI_FUNCTION_TRACE("acpi_ec_start");
return_VALUE(-ENODEV);
}
- resource = (acpi_resource *) buffer.pointer;
+ resource = (struct acpi_resource *) buffer.pointer;
if (!resource || (resource->id != ACPI_RSTYPE_IO)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid or missing resource\n"));
result = -ENODEV;
struct acpi_table_ecdt *ecdt_ptr;
status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING,
- (acpi_table_header **) &ecdt_ptr);
+ (struct acpi_table_header **) &ecdt_ptr);
if (ACPI_FAILURE(status))
return 0;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_ev_initialize (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_initialize");
acpi_ev_handler_initialize (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_handler_initialize");
acpi_ev_fixed_event_initialize (
void)
{
- acpi_native_uint i;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_status status;
/*
acpi_ev_fixed_event_detect (
void)
{
- u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
- u32 fixed_status;
- u32 fixed_enable;
- acpi_native_uint i;
+ u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
+ u32 fixed_status;
+ u32 fixed_enable;
+ acpi_native_uint i;
ACPI_FUNCTION_NAME ("ev_fixed_event_detect");
u32
acpi_ev_fixed_event_dispatch (
- u32 event)
+ u32 event)
{
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ev_gpe_initialize (void)
{
- acpi_native_uint i;
- acpi_native_uint j;
- u32 gpe_block;
- u32 gpe_register;
- u32 gpe_number_index;
- u32 gpe_number;
- acpi_gpe_register_info *gpe_register_info;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_native_uint j;
+ u32 gpe_block;
+ u32 gpe_register;
+ u32 gpe_number_index;
+ u32 gpe_number;
+ struct acpi_gpe_register_info *gpe_register_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_gpe_initialize");
/* Allocate the GPE number-to-index translation table */
acpi_gbl_gpe_number_to_index = ACPI_MEM_CALLOCATE (
- sizeof (acpi_gpe_index_info) *
+ sizeof (struct acpi_gpe_index_info) *
((acpi_size) acpi_gbl_gpe_number_max + 1));
if (!acpi_gbl_gpe_number_to_index) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
/* Set the Gpe index table to GPE_INVALID */
ACPI_MEMSET (acpi_gbl_gpe_number_to_index, (int) ACPI_GPE_INVALID,
- sizeof (acpi_gpe_index_info) * ((acpi_size) acpi_gbl_gpe_number_max + 1));
+ sizeof (struct acpi_gpe_index_info) * ((acpi_size) acpi_gbl_gpe_number_max + 1));
/* Allocate the GPE register information block */
acpi_gbl_gpe_register_info = ACPI_MEM_CALLOCATE (
(acpi_size) acpi_gbl_gpe_register_count *
- sizeof (acpi_gpe_register_info));
+ sizeof (struct acpi_gpe_register_info));
if (!acpi_gbl_gpe_register_info) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Could not allocate the gpe_register_info table\n"));
*/
acpi_gbl_gpe_number_info = ACPI_MEM_CALLOCATE (
((acpi_size) acpi_gbl_gpe_register_count * ACPI_GPE_REGISTER_WIDTH) *
- sizeof (acpi_gpe_number_info));
+ sizeof (struct acpi_gpe_number_info));
if (!acpi_gbl_gpe_number_info) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not allocate the gpe_number_info table\n"));
goto error_exit2;
static acpi_status
acpi_ev_save_method_info (
- acpi_handle obj_handle,
- u32 level,
- void *obj_desc,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *obj_desc,
+ void **return_value)
{
- u32 gpe_number;
- u32 gpe_number_index;
- char name[ACPI_NAME_SIZE + 1];
- u8 type;
- acpi_status status;
+ u32 gpe_number;
+ u32 gpe_number_index;
+ char name[ACPI_NAME_SIZE + 1];
+ u8 type;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ev_save_method_info");
/* Extract the name from the object and convert to a string */
ACPI_MOVE_UNALIGNED32_TO_32 (name,
- &((acpi_namespace_node *) obj_handle)->name.integer);
+ &((struct acpi_namespace_node *) obj_handle)->name.integer);
name[ACPI_NAME_SIZE] = 0;
/*
* for use during dispatch of this GPE.
*/
acpi_gbl_gpe_number_info [gpe_number_index].type = type;
- acpi_gbl_gpe_number_info [gpe_number_index].method_node = (acpi_namespace_node *) obj_handle;
+ acpi_gbl_gpe_number_info [gpe_number_index].method_node = (struct acpi_namespace_node *) obj_handle;
/*
* Enable the GPE (SCIs should be disabled at this point)
acpi_status
acpi_ev_init_gpe_control_methods (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_init_gpe_control_methods");
u32
acpi_ev_gpe_detect (void)
{
- u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
- u32 i;
- u32 j;
- u8 enabled_status_byte;
- u8 bit_mask;
- acpi_gpe_register_info *gpe_register_info;
- u32 in_value;
- acpi_status status;
+ u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
+ u32 i;
+ u32 j;
+ u8 enabled_status_byte;
+ u8 bit_mask;
+ struct acpi_gpe_register_info *gpe_register_info;
+ u32 in_value;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ev_gpe_detect");
static void ACPI_SYSTEM_XFACE
acpi_ev_asynch_execute_gpe_method (
- void *context)
+ void *context)
{
- u32 gpe_number = (u32) ACPI_TO_INTEGER (context);
- u32 gpe_number_index;
- acpi_gpe_number_info gpe_info;
- acpi_status status;
+ u32 gpe_number = (u32) ACPI_TO_INTEGER (context);
+ u32 gpe_number_index;
+ struct acpi_gpe_number_info gpe_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_asynch_execute_gpe_method");
u32
acpi_ev_gpe_dispatch (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 gpe_number_index;
- acpi_gpe_number_info *gpe_info;
- acpi_status status;
+ u32 gpe_number_index;
+ struct acpi_gpe_number_info *gpe_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_gpe_dispatch");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u8
acpi_ev_is_notify_object (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
switch (node->type) {
case ACPI_TYPE_DEVICE:
u32
acpi_ev_get_gpe_register_index (
- u32 gpe_number)
+ u32 gpe_number)
{
if (gpe_number > acpi_gbl_gpe_number_max) {
u32
acpi_ev_get_gpe_number_index (
- u32 gpe_number)
+ u32 gpe_number)
{
if (gpe_number > acpi_gbl_gpe_number_max) {
acpi_status
acpi_ev_queue_notify_request (
- acpi_namespace_node *node,
- u32 notify_value)
+ struct acpi_namespace_node *node,
+ u32 notify_value)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *handler_obj = NULL;
- acpi_generic_state *notify_info;
- acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *handler_obj = NULL;
+ union acpi_generic_state *notify_info;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_NAME ("ev_queue_notify_request");
void ACPI_SYSTEM_XFACE
acpi_ev_notify_dispatch (
- void *context)
+ void *context)
{
- acpi_generic_state *notify_info = (acpi_generic_state *) context;
- acpi_notify_handler global_handler = NULL;
- void *global_context = NULL;
- acpi_operand_object *handler_obj;
+ union acpi_generic_state *notify_info = (union acpi_generic_state *) context;
+ acpi_notify_handler global_handler = NULL;
+ void *global_context = NULL;
+ union acpi_operand_object *handler_obj;
ACPI_FUNCTION_ENTRY ();
static void ACPI_SYSTEM_XFACE
acpi_ev_global_lock_thread (
- void *context)
+ void *context)
{
- acpi_status status;
+ acpi_status status;
/* Signal threads that are waiting for the lock */
static u32
acpi_ev_global_lock_handler (
- void *context)
+ void *context)
{
- u8 acquired = FALSE;
- acpi_status status;
+ u8 acquired = FALSE;
+ acpi_status status;
/*
acpi_status
acpi_ev_init_global_lock_handler (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_init_global_lock_handler");
acpi_status
acpi_ev_acquire_global_lock (
- u16 timeout)
+ u16 timeout)
{
- acpi_status status = AE_OK;
- u8 acquired = FALSE;
+ acpi_status status = AE_OK;
+ u8 acquired = FALSE;
ACPI_FUNCTION_TRACE ("ev_acquire_global_lock");
acpi_status
acpi_ev_release_global_lock (void)
{
- u8 pending = FALSE;
- acpi_status status = AE_OK;
+ u8 pending = FALSE;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ev_release_global_lock");
void
acpi_ev_terminate (void)
{
- acpi_native_uint i;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_terminate");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_ev_init_address_spaces (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_init_address_spaces");
static acpi_status
acpi_ev_execute_reg_method (
- acpi_operand_object *region_obj,
- u32 function)
+ union acpi_operand_object *region_obj,
+ u32 function)
{
- acpi_operand_object *params[3];
- acpi_operand_object *region_obj2;
- acpi_status status;
+ union acpi_operand_object *params[3];
+ union acpi_operand_object *region_obj2;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_execute_reg_method");
acpi_status
acpi_ev_address_space_dispatch (
- acpi_operand_object *region_obj,
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- void *value)
+ union acpi_operand_object *region_obj,
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ void *value)
{
- acpi_status status;
- acpi_status status2;
- acpi_adr_space_handler handler;
- acpi_adr_space_setup region_setup;
- acpi_operand_object *handler_desc;
- acpi_operand_object *region_obj2;
- void *region_context = NULL;
+ acpi_status status;
+ acpi_status status2;
+ acpi_adr_space_handler handler;
+ acpi_adr_space_setup region_setup;
+ union acpi_operand_object *handler_desc;
+ union acpi_operand_object *region_obj2;
+ void *region_context = NULL;
ACPI_FUNCTION_TRACE ("ev_address_space_dispatch");
void
acpi_ev_detach_region(
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked)
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked)
{
- acpi_operand_object *handler_obj;
- acpi_operand_object *obj_desc;
- acpi_operand_object **last_obj_ptr;
- acpi_adr_space_setup region_setup;
- void *region_context;
- acpi_operand_object *region_obj2;
- acpi_status status;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object **last_obj_ptr;
+ acpi_adr_space_setup region_setup;
+ void *region_context;
+ union acpi_operand_object *region_obj2;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_detach_region");
acpi_status
acpi_ev_attach_region (
- acpi_operand_object *handler_obj,
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked)
+ union acpi_operand_object *handler_obj,
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked)
{
- acpi_status status;
- acpi_status status2;
+ acpi_status status;
+ acpi_status status2;
ACPI_FUNCTION_TRACE ("ev_attach_region");
acpi_status
acpi_ev_addr_handler_helper (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_operand_object *handler_obj;
- acpi_operand_object *tmp_obj;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *tmp_obj;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ev_addr_handler_helper");
- handler_obj = (acpi_operand_object *) context;
+ handler_obj = (union acpi_operand_object *) context;
/* Parameter validation */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ev_system_memory_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
- acpi_operand_object *region_desc = (acpi_operand_object *) handle;
- acpi_mem_space_context *local_region_context;
+ union acpi_operand_object *region_desc = (union acpi_operand_object *) handle;
+ struct acpi_mem_space_context *local_region_context;
ACPI_FUNCTION_TRACE ("ev_system_memory_region_setup");
/* Create a new context */
- local_region_context = ACPI_MEM_CALLOCATE (sizeof (acpi_mem_space_context));
+ local_region_context = ACPI_MEM_CALLOCATE (sizeof (struct acpi_mem_space_context));
if (!(local_region_context)) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
acpi_status
acpi_ev_io_space_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_io_space_region_setup");
acpi_status
acpi_ev_pci_config_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
- acpi_status status = AE_OK;
- acpi_integer temp;
- acpi_pci_id *pci_id = *region_context;
- acpi_operand_object *handler_obj;
- acpi_namespace_node *node;
- acpi_operand_object *region_obj = (acpi_operand_object *) handle;
- acpi_device_id object_hID;
+ acpi_status status = AE_OK;
+ acpi_integer temp;
+ struct acpi_pci_id *pci_id = *region_context;
+ union acpi_operand_object *handler_obj;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *region_obj = (union acpi_operand_object *) handle;
+ struct acpi_device_id object_hID;
ACPI_FUNCTION_TRACE ("ev_pci_config_region_setup");
/* Create a new context */
- pci_id = ACPI_MEM_CALLOCATE (sizeof (acpi_pci_id));
+ pci_id = ACPI_MEM_CALLOCATE (sizeof (struct acpi_pci_id));
if (!pci_id) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
acpi_status
acpi_ev_pci_bar_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_pci_bar_region_setup");
acpi_status
acpi_ev_cmos_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_cmos_region_setup");
acpi_status
acpi_ev_default_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_default_region_setup");
acpi_status
acpi_ev_initialize_region (
- acpi_operand_object *region_obj,
- u8 acpi_ns_locked)
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_locked)
{
- acpi_operand_object *handler_obj;
- acpi_operand_object *obj_desc;
- acpi_adr_space_type space_id;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_namespace_node *method_node;
- acpi_name *reg_name_ptr = (acpi_name *) METHOD_NAME__REG;
- acpi_operand_object *region_obj2;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *obj_desc;
+ acpi_adr_space_type space_id;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ struct acpi_namespace_node *method_node;
+ acpi_name *reg_name_ptr = (acpi_name *) METHOD_NAME__REG;
+ union acpi_operand_object *region_obj2;
ACPI_FUNCTION_TRACE_U32 ("ev_initialize_region", acpi_ns_locked);
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static u32 ACPI_SYSTEM_XFACE
acpi_ev_sci_handler (
- void *context)
+ void *context)
{
- u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
- u32 value;
- acpi_status status;
+ u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
+ u32 value;
+ acpi_status status;
ACPI_FUNCTION_TRACE("ev_sci_handler");
u32
acpi_ev_install_sci_handler (void)
{
- u32 status = AE_OK;
+ u32 status = AE_OK;
ACPI_FUNCTION_TRACE ("ev_install_sci_handler");
acpi_status
acpi_ev_remove_sci_handler (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_remove_sci_handler");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_install_fixed_event_handler (
- u32 event,
- acpi_event_handler handler,
- void *context)
+ u32 event,
+ acpi_event_handler handler,
+ void *context)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_install_fixed_event_handler");
acpi_status
acpi_remove_fixed_event_handler (
- u32 event,
- acpi_event_handler handler)
+ u32 event,
+ acpi_event_handler handler)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_remove_fixed_event_handler");
acpi_status
acpi_install_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler,
- void *context)
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler,
+ void *context)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *notify_obj;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *notify_obj;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_install_notify_handler");
acpi_status
acpi_remove_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler)
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler)
{
- acpi_operand_object *notify_obj;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *notify_obj;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_remove_notify_handler");
acpi_status
acpi_install_gpe_handler (
- u32 gpe_number,
- u32 type,
- acpi_gpe_handler handler,
- void *context)
+ u32 gpe_number,
+ u32 type,
+ acpi_gpe_handler handler,
+ void *context)
{
- acpi_status status;
- u32 gpe_number_index;
+ acpi_status status;
+ u32 gpe_number_index;
ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler");
acpi_status
acpi_remove_gpe_handler (
- u32 gpe_number,
- acpi_gpe_handler handler)
+ u32 gpe_number,
+ acpi_gpe_handler handler)
{
- acpi_status status;
- u32 gpe_number_index;
+ acpi_status status;
+ u32 gpe_number_index;
ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler");
acpi_status
acpi_acquire_global_lock (
- u16 timeout,
- u32 *handle)
+ u16 timeout,
+ u32 *handle)
{
- acpi_status status;
+ acpi_status status;
if (!handle) {
acpi_status
acpi_release_global_lock (
- u32 handle)
+ u32 handle)
{
- acpi_status status;
+ acpi_status status;
if (handle != acpi_gbl_global_lock_handle) {
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_enable (void)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_enable");
acpi_status
acpi_disable (void)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_disable");
acpi_status
acpi_enable_event (
- u32 event,
- u32 type,
- u32 flags)
+ u32 event,
+ u32 type,
+ u32 flags)
{
- acpi_status status = AE_OK;
- u32 value;
+ acpi_status status = AE_OK;
+ u32 value;
ACPI_FUNCTION_TRACE ("acpi_enable_event");
acpi_status
acpi_disable_event (
- u32 event,
- u32 type,
- u32 flags)
+ u32 event,
+ u32 type,
+ u32 flags)
{
- acpi_status status = AE_OK;
- u32 value;
+ acpi_status status = AE_OK;
+ u32 value;
ACPI_FUNCTION_TRACE ("acpi_disable_event");
acpi_status
acpi_clear_event (
- u32 event,
- u32 type)
+ u32 event,
+ u32 type)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_clear_event");
acpi_status
acpi_get_event_status (
- u32 event,
- u32 type,
- acpi_event_status *event_status)
+ u32 event,
+ u32 type,
+ acpi_event_status *event_status)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_get_event_status");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_install_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler,
- acpi_adr_space_setup setup,
- void *context)
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler,
+ acpi_adr_space_setup setup,
+ void *context)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *handler_obj;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_object_type type;
- u16 flags = 0;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *handler_obj;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ acpi_object_type type;
+ u16 flags = 0;
ACPI_FUNCTION_TRACE ("acpi_install_address_space_handler");
acpi_status
acpi_remove_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler)
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *handler_obj;
- acpi_operand_object *region_obj;
- acpi_operand_object **last_obj_ptr;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *region_obj;
+ union acpi_operand_object **last_obj_ptr;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_remove_address_space_handler");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_add_table (
- acpi_table_header *table,
- acpi_namespace_node *parent_node,
- acpi_operand_object **ddb_handle)
+ struct acpi_table_header *table,
+ struct acpi_namespace_node *parent_node,
+ union acpi_operand_object **ddb_handle)
{
- acpi_status status;
- acpi_table_desc table_info;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ struct acpi_table_desc table_info;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ex_add_table");
acpi_status
acpi_ex_load_table_op (
- acpi_walk_state *walk_state,
- acpi_operand_object **return_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **return_desc)
{
- acpi_status status;
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_table_header *table;
- acpi_namespace_node *parent_node;
- acpi_namespace_node *start_node;
- acpi_namespace_node *parameter_node = NULL;
- acpi_operand_object *ddb_handle;
+ acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ struct acpi_table_header *table;
+ struct acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *start_node;
+ struct acpi_namespace_node *parameter_node = NULL;
+ union acpi_operand_object *ddb_handle;
ACPI_FUNCTION_TRACE ("ex_load_table_op");
if (parameter_node) {
/* Store the parameter data into the optional parameter object */
- status = acpi_ex_store (operand[5], ACPI_CAST_PTR (acpi_operand_object, parameter_node),
+ status = acpi_ex_store (operand[5], ACPI_CAST_PTR (union acpi_operand_object, parameter_node),
walk_state);
if (ACPI_FAILURE (status)) {
(void) acpi_ex_unload_table (ddb_handle);
acpi_status
acpi_ex_load_op (
- acpi_operand_object *obj_desc,
- acpi_operand_object *target,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *target,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object *ddb_handle;
- acpi_operand_object *buffer_desc = NULL;
- acpi_table_header *table_ptr = NULL;
- u8 *table_data_ptr;
- acpi_table_header table_header;
- u32 i;
+ acpi_status status;
+ union acpi_operand_object *ddb_handle;
+ union acpi_operand_object *buffer_desc = NULL;
+ struct acpi_table_header *table_ptr = NULL;
+ u8 *table_data_ptr;
+ struct acpi_table_header table_header;
+ u32 i;
ACPI_FUNCTION_TRACE ("ex_load_op");
/* Get the table header */
table_header.length = 0;
- for (i = 0; i < sizeof (acpi_table_header); i++) {
+ for (i = 0; i < sizeof (struct acpi_table_header); i++) {
status = acpi_ev_address_space_dispatch (obj_desc, ACPI_READ,
(acpi_physical_address) i, 8,
((u8 *) &table_header) + i);
/* Copy the header to the buffer */
- ACPI_MEMCPY (table_ptr, &table_header, sizeof (acpi_table_header));
- table_data_ptr = ACPI_PTR_ADD (u8, table_ptr, sizeof (acpi_table_header));
+ ACPI_MEMCPY (table_ptr, &table_header, sizeof (struct acpi_table_header));
+ table_data_ptr = ACPI_PTR_ADD (u8, table_ptr, sizeof (struct acpi_table_header));
/* Get the table from the op region */
goto cleanup;
}
- table_ptr = ACPI_CAST_PTR (acpi_table_header, buffer_desc->buffer.pointer);
+ table_ptr = ACPI_CAST_PTR (struct acpi_table_header, buffer_desc->buffer.pointer);
break;
acpi_status
acpi_ex_unload_table (
- acpi_operand_object *ddb_handle)
+ union acpi_operand_object *ddb_handle)
{
- acpi_status status = AE_NOT_IMPLEMENTED;
- acpi_operand_object *table_desc = ddb_handle;
- acpi_table_desc *table_info;
+ acpi_status status = AE_NOT_IMPLEMENTED;
+ union acpi_operand_object *table_desc = ddb_handle;
+ struct acpi_table_desc *table_info;
ACPI_FUNCTION_TRACE ("ex_unload_table");
/* Get the actual table descriptor from the ddb_handle */
- table_info = (acpi_table_desc *) table_desc->reference.object;
+ table_info = (struct acpi_table_desc *) table_desc->reference.object;
/*
* Delete the entire namespace under this table Node
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_convert_to_integer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state)
{
- u32 i;
- acpi_operand_object *ret_desc;
- u32 count;
- u8 *pointer;
- acpi_integer result;
- acpi_status status;
+ u32 i;
+ union acpi_operand_object *ret_desc;
+ u32 count;
+ u8 *pointer;
+ acpi_integer result;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_integer", obj_desc);
acpi_status
acpi_ex_convert_to_buffer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *ret_desc;
- u32 i;
- u8 *new_buf;
+ union acpi_operand_object *ret_desc;
+ u32 i;
+ u8 *new_buf;
ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_buffer", obj_desc);
u32
acpi_ex_convert_to_ascii (
- acpi_integer integer,
- u32 base,
- u8 *string,
- u8 data_width)
+ acpi_integer integer,
+ u32 base,
+ u8 *string,
+ u8 data_width)
{
- u32 i;
- u32 j;
- u32 k = 0;
- char hex_digit;
- acpi_integer digit;
- u32 remainder;
- u32 length;
- u8 leading_zero;
+ u32 i;
+ u32 j;
+ u32 k = 0;
+ char hex_digit;
+ acpi_integer digit;
+ u32 remainder;
+ u32 length;
+ u8 leading_zero;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ex_convert_to_string (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- u32 base,
- u32 max_length,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ u32 base,
+ u32 max_length,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *ret_desc;
- u32 i;
- u32 string_length;
- u8 *new_buf;
- u8 *pointer;
+ union acpi_operand_object *ret_desc;
+ u32 i;
+ u32 string_length;
+ u8 *new_buf;
+ u8 *pointer;
ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_string", obj_desc);
acpi_status
acpi_ex_convert_to_target_type (
- acpi_object_type destination_type,
- acpi_operand_object *source_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state)
+ acpi_object_type destination_type,
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_convert_to_target_type");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_create_alias (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_namespace_node *target_node;
- acpi_namespace_node *alias_node;
- acpi_status status = AE_OK;
+ struct acpi_namespace_node *target_node;
+ struct acpi_namespace_node *alias_node;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_create_alias");
/* Get the source/alias operands (both namespace nodes) */
- alias_node = (acpi_namespace_node *) walk_state->operands[0];
- target_node = (acpi_namespace_node *) walk_state->operands[1];
+ alias_node = (struct acpi_namespace_node *) walk_state->operands[0];
+ target_node = (struct acpi_namespace_node *) walk_state->operands[1];
if (target_node->type == ACPI_TYPE_LOCAL_ALIAS) {
/*
* always exactly one level of indirection away from the
* actual aliased name.
*/
- target_node = (acpi_namespace_node *) target_node->object;
+ target_node = (struct acpi_namespace_node *) target_node->object;
}
/*
* types, the object can change dynamically via a Store.
*/
alias_node->type = ACPI_TYPE_LOCAL_ALIAS;
- alias_node->object = ACPI_CAST_PTR (acpi_operand_object, target_node);
+ alias_node->object = ACPI_CAST_PTR (union acpi_operand_object, target_node);
break;
default:
acpi_status
acpi_ex_create_event (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ex_create_event");
/* Attach object to the Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) walk_state->operands[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) walk_state->operands[0],
obj_desc, ACPI_TYPE_EVENT);
cleanup:
acpi_status
acpi_ex_create_mutex (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_create_mutex", ACPI_WALK_OPERANDS);
/* Init object and attach to NS node */
obj_desc->mutex.sync_level = (u8) walk_state->operands[1]->integer.value;
- obj_desc->mutex.node = (acpi_namespace_node *) walk_state->operands[0];
+ obj_desc->mutex.node = (struct acpi_namespace_node *) walk_state->operands[0];
status = acpi_ns_attach_object (obj_desc->mutex.node,
obj_desc, ACPI_TYPE_MUTEX);
acpi_status
acpi_ex_create_region (
- u8 *aml_start,
- u32 aml_length,
- u8 region_space,
- acpi_walk_state *walk_state)
+ u8 *aml_start,
+ u32 aml_length,
+ u8 region_space,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_operand_object *region_obj2;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *region_obj2;
ACPI_FUNCTION_TRACE ("ex_create_region");
acpi_status
acpi_ex_create_table_region (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_table_header *table;
- acpi_operand_object *region_obj2;
+ acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ struct acpi_table_header *table;
+ union acpi_operand_object *region_obj2;
ACPI_FUNCTION_TRACE ("ex_create_table_region");
acpi_status
acpi_ex_create_processor (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_create_processor", walk_state);
/* Install the processor object in the parent Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
obj_desc, ACPI_TYPE_PROCESSOR);
acpi_status
acpi_ex_create_power_resource (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_status status;
- acpi_operand_object *obj_desc;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_create_power_resource", walk_state);
/* Install the power resource object in the parent Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
obj_desc, ACPI_TYPE_POWER);
acpi_status
acpi_ex_create_method (
- u8 *aml_start,
- u32 aml_length,
- acpi_walk_state *walk_state)
+ u8 *aml_start,
+ u32 aml_length,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *obj_desc;
- acpi_status status;
- u8 method_flags;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
+ u8 method_flags;
ACPI_FUNCTION_TRACE_PTR ("ex_create_method", walk_state);
/* Attach the new object to the method Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
obj_desc, ACPI_TYPE_METHOD);
/* Remove local reference to the object */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ex_dump_operand (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- u8 *buf = NULL;
- u32 length;
- acpi_operand_object **element;
- u16 element_index;
+ u8 *buf = NULL;
+ u32 length;
+ union acpi_operand_object **element;
+ u16 element_index;
ACPI_FUNCTION_NAME ("ex_dump_operand")
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is not a local object\n", obj_desc));
- ACPI_DUMP_BUFFER (obj_desc, sizeof (acpi_operand_object));
+ ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object));
return;
}
void
acpi_ex_dump_operands (
- acpi_operand_object **operands,
- acpi_interpreter_mode interpreter_mode,
- char *ident,
- u32 num_levels,
- char *note,
- char *module_name,
- u32 line_number)
+ union acpi_operand_object **operands,
+ acpi_interpreter_mode interpreter_mode,
+ char *ident,
+ u32 num_levels,
+ char *note,
+ char *module_name,
+ u32 line_number)
{
- acpi_native_uint i;
- acpi_operand_object **obj_desc;
+ acpi_native_uint i;
+ union acpi_operand_object **obj_desc;
ACPI_FUNCTION_NAME ("ex_dump_operands");
void
acpi_ex_out_string (
- char *title,
- char *value)
+ char *title,
+ char *value)
{
acpi_os_printf ("%20s : %s\n", title, value);
}
void
acpi_ex_out_pointer (
- char *title,
- void *value)
+ char *title,
+ void *value)
{
acpi_os_printf ("%20s : %p\n", title, value);
}
void
acpi_ex_out_integer (
- char *title,
- u32 value)
+ char *title,
+ u32 value)
{
acpi_os_printf ("%20s : %X\n", title, value);
}
void
acpi_ex_out_address (
- char *title,
- acpi_physical_address value)
+ char *title,
+ acpi_physical_address value)
{
#if ACPI_MACHINE_WIDTH == 16
void
acpi_ex_dump_node (
- acpi_namespace_node *node,
- u32 flags)
+ struct acpi_namespace_node *node,
+ u32 flags)
{
ACPI_FUNCTION_ENTRY ();
void
acpi_ex_dump_object_descriptor (
- acpi_operand_object *obj_desc,
- u32 flags)
+ union acpi_operand_object *obj_desc,
+ u32 flags)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ex_dump_object_descriptor");
}
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
- acpi_ex_dump_node ((acpi_namespace_node *) obj_desc, flags);
- acpi_os_printf ("\nAttached Object (%p):\n", ((acpi_namespace_node *) obj_desc)->object);
- acpi_ex_dump_object_descriptor (((acpi_namespace_node *) obj_desc)->object, flags);
+ acpi_ex_dump_node ((struct acpi_namespace_node *) obj_desc, flags);
+ acpi_os_printf ("\nAttached Object (%p):\n", ((struct acpi_namespace_node *) obj_desc)->object);
+ acpi_ex_dump_object_descriptor (((struct acpi_namespace_node *) obj_desc)->object, flags);
return;
}
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_read_data_from_field (
- acpi_walk_state *walk_state,
- acpi_operand_object *obj_desc,
- acpi_operand_object **ret_buffer_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **ret_buffer_desc)
{
- acpi_status status;
- acpi_operand_object *buffer_desc;
- acpi_size length;
- void *buffer;
- u8 locked;
+ acpi_status status;
+ union acpi_operand_object *buffer_desc;
+ acpi_size length;
+ void *buffer;
+ u8 locked;
ACPI_FUNCTION_TRACE_PTR ("ex_read_data_from_field", obj_desc);
acpi_status
acpi_ex_write_data_to_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc)
{
- acpi_status status;
- u32 length;
- u32 required_length;
- void *buffer;
- void *new_buffer;
- u8 locked;
- acpi_operand_object *buffer_desc;
+ acpi_status status;
+ u32 length;
+ u32 required_length;
+ void *buffer;
+ void *new_buffer;
+ u8 locked;
+ union acpi_operand_object *buffer_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_write_data_to_field", obj_desc);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_setup_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset)
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset)
{
- acpi_status status = AE_OK;
- acpi_operand_object *rgn_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *rgn_desc;
ACPI_FUNCTION_TRACE_U32 ("ex_setup_region", field_datum_byte_offset);
acpi_status
acpi_ex_access_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 function)
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 function)
{
- acpi_status status;
- acpi_operand_object *rgn_desc;
- acpi_physical_address address;
+ acpi_status status;
+ union acpi_operand_object *rgn_desc;
+ acpi_physical_address address;
ACPI_FUNCTION_TRACE ("ex_access_region");
u8
acpi_ex_register_overflow (
- acpi_operand_object *obj_desc,
- acpi_integer value)
+ union acpi_operand_object *obj_desc,
+ acpi_integer value)
{
if (obj_desc->common_field.bit_length >= ACPI_INTEGER_BIT_SIZE) {
acpi_status
acpi_ex_field_datum_io (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 read_write)
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 read_write)
{
- acpi_status status;
- acpi_integer local_value;
+ acpi_status status;
+ acpi_integer local_value;
ACPI_FUNCTION_TRACE_U32 ("ex_field_datum_io", field_datum_byte_offset);
acpi_status
acpi_ex_write_with_update_rule (
- acpi_operand_object *obj_desc,
- acpi_integer mask,
- acpi_integer field_value,
- u32 field_datum_byte_offset)
+ union acpi_operand_object *obj_desc,
+ acpi_integer mask,
+ acpi_integer field_value,
+ u32 field_datum_byte_offset)
{
- acpi_status status = AE_OK;
- acpi_integer merged_value;
- acpi_integer current_value;
+ acpi_status status = AE_OK;
+ acpi_integer merged_value;
+ acpi_integer current_value;
ACPI_FUNCTION_TRACE_U32 ("ex_write_with_update_rule", mask);
void
acpi_ex_get_buffer_datum(
- acpi_integer *datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset)
+ acpi_integer *datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset)
{
ACPI_FUNCTION_ENTRY ();
void
acpi_ex_set_buffer_datum (
- acpi_integer merged_datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset)
+ acpi_integer merged_datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset)
{
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ex_extract_from_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length)
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length)
{
- acpi_status status;
- u32 field_datum_byte_offset;
- u32 datum_offset;
- acpi_integer previous_raw_datum;
- acpi_integer this_raw_datum = 0;
- acpi_integer merged_datum = 0;
- u32 byte_field_length;
- u32 datum_count;
+ acpi_status status;
+ u32 field_datum_byte_offset;
+ u32 datum_offset;
+ acpi_integer previous_raw_datum;
+ acpi_integer this_raw_datum = 0;
+ acpi_integer merged_datum = 0;
+ u32 byte_field_length;
+ u32 datum_count;
ACPI_FUNCTION_TRACE ("ex_extract_from_field");
acpi_status
acpi_ex_insert_into_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length)
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length)
{
- acpi_status status;
- u32 field_datum_byte_offset;
- u32 datum_offset;
- acpi_integer mask;
- acpi_integer merged_datum;
- acpi_integer previous_raw_datum;
- acpi_integer this_raw_datum;
- u32 byte_field_length;
- u32 datum_count;
+ acpi_status status;
+ u32 field_datum_byte_offset;
+ u32 datum_offset;
+ acpi_integer mask;
+ acpi_integer merged_datum;
+ acpi_integer previous_raw_datum;
+ acpi_integer this_raw_datum;
+ u32 byte_field_length;
+ u32 datum_count;
ACPI_FUNCTION_TRACE ("ex_insert_into_field");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_get_object_reference (
- acpi_operand_object *obj_desc,
- acpi_operand_object **return_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **return_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *reference_obj;
- acpi_operand_object *referenced_obj;
+ union acpi_operand_object *reference_obj;
+ union acpi_operand_object *referenced_obj;
ACPI_FUNCTION_TRACE_PTR ("ex_get_object_reference", obj_desc);
acpi_status
acpi_ex_concat_template (
- acpi_operand_object *obj_desc1,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc1,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *return_desc;
- u8 *new_buf;
- u8 *end_tag1;
- u8 *end_tag2;
- acpi_size length1;
- acpi_size length2;
+ union acpi_operand_object *return_desc;
+ u8 *new_buf;
+ u8 *end_tag1;
+ u8 *end_tag2;
+ acpi_size length1;
+ acpi_size length2;
ACPI_FUNCTION_TRACE ("ex_concat_template");
acpi_status
acpi_ex_do_concatenate (
- acpi_operand_object *obj_desc1,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc1,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- u32 i;
- acpi_integer this_integer;
- acpi_operand_object *return_desc;
- char *new_buf;
+ acpi_status status;
+ u32 i;
+ acpi_integer this_integer;
+ union acpi_operand_object *return_desc;
+ char *new_buf;
ACPI_FUNCTION_ENTRY ();
acpi_integer
acpi_ex_do_math_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1)
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1)
{
u8
acpi_ex_do_logical_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1)
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1)
{
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ex_unlink_mutex (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_thread_state *thread = obj_desc->mutex.owner_thread;
+ struct acpi_thread_state *thread = obj_desc->mutex.owner_thread;
if (!thread) {
void
acpi_ex_link_mutex (
- acpi_operand_object *obj_desc,
- acpi_thread_state *thread)
+ union acpi_operand_object *obj_desc,
+ struct acpi_thread_state *thread)
{
- acpi_operand_object *list_head;
+ union acpi_operand_object *list_head;
list_head = thread->acquired_mutex_list;
acpi_status
acpi_ex_acquire_mutex (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_acquire_mutex", obj_desc);
acpi_status
acpi_ex_release_mutex (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_release_mutex");
void
acpi_ex_release_all_mutexes (
- acpi_thread_state *thread)
+ struct acpi_thread_state *thread)
{
- acpi_operand_object *next = thread->acquired_mutex_list;
- acpi_operand_object *this;
- acpi_status status;
+ union acpi_operand_object *next = thread->acquired_mutex_list;
+ union acpi_operand_object *this;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
char *
acpi_ex_allocate_name_string (
- u32 prefix_count,
- u32 num_name_segs)
+ u32 prefix_count,
+ u32 num_name_segs)
{
- char *temp_ptr;
- char *name_string;
- u32 size_needed;
+ char *temp_ptr;
+ char *name_string;
+ u32 size_needed;
ACPI_FUNCTION_TRACE ("ex_allocate_name_string");
acpi_status
acpi_ex_name_segment (
- u8 **in_aml_address,
- char *name_string)
+ u8 **in_aml_address,
+ char *name_string)
{
- char *aml_address = (void *) *in_aml_address;
- acpi_status status = AE_OK;
- u32 index;
- char char_buf[5];
+ char *aml_address = (void *) *in_aml_address;
+ acpi_status status = AE_OK;
+ u32 index;
+ char char_buf[5];
ACPI_FUNCTION_TRACE ("ex_name_segment");
acpi_status
acpi_ex_get_name_string (
- acpi_object_type data_type,
- u8 *in_aml_address,
- char **out_name_string,
- u32 *out_name_length)
+ acpi_object_type data_type,
+ u8 *in_aml_address,
+ char **out_name_string,
+ u32 *out_name_length)
{
- acpi_status status = AE_OK;
- u8 *aml_address = in_aml_address;
- char *name_string = NULL;
- u32 num_segments;
- u32 prefix_count = 0;
- u8 has_prefix = FALSE;
+ acpi_status status = AE_OK;
+ u8 *aml_address = in_aml_address;
+ char *name_string = NULL;
+ u32 num_segments;
+ u32 prefix_count = 0;
+ u8 has_prefix = FALSE;
ACPI_FUNCTION_TRACE_PTR ("ex_get_name_string", aml_address);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_opcode_1A_0T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
acpi_status
acpi_ex_opcode_1A_1T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object **operand = &walk_state->operands[0];
+ acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_1T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
acpi_status
acpi_ex_opcode_1A_1T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_operand_object *return_desc2 = NULL;
- u32 temp32;
- u32 i;
- u32 j;
- acpi_integer digit;
+ acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ union acpi_operand_object *return_desc2 = NULL;
+ u32 temp32;
+ u32 i;
+ u32 j;
+ acpi_integer digit;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
* different than the return value stored in the result descriptor
* (There are really two return values)
*/
- if ((acpi_namespace_node *) operand[0] == acpi_gbl_root_node) {
+ if ((struct acpi_namespace_node *) operand[0] == acpi_gbl_root_node) {
/*
* This means that the object does not exist in the namespace,
* return FALSE
acpi_status
acpi_ex_opcode_1A_0T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *temp_desc;
- acpi_operand_object *return_desc = NULL;
- acpi_status status = AE_OK;
- u32 type;
- acpi_integer value;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *temp_desc;
+ union acpi_operand_object *return_desc = NULL;
+ acpi_status status = AE_OK;
+ u32 type;
+ acpi_integer value;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
*/
status = acpi_ns_get_node_by_path (operand[0]->string.pointer,
walk_state->scope_info->scope.node, ACPI_NS_SEARCH_PARENT,
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &return_desc));
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &return_desc));
if (ACPI_FAILURE (status)) {
goto cleanup;
}
status = acpi_ex_resolve_node_to_value (
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &return_desc), walk_state);
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &return_desc), walk_state);
goto cleanup;
* Get the actual object from the Node (This is the dereference).
* -- This case may only happen when a local_x or arg_x is dereferenced above.
*/
- return_desc = acpi_ns_get_attached_object ((acpi_namespace_node *) operand[0]);
+ return_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) operand[0]);
}
else {
/*
if (ACPI_GET_DESCRIPTOR_TYPE (return_desc) == ACPI_DESC_TYPE_NAMED) {
- return_desc = acpi_ns_get_attached_object ((acpi_namespace_node *) return_desc);
+ return_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) return_desc);
}
/* Add another reference to the object! */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_opcode_2A_0T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_namespace_node *node;
- acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ struct acpi_namespace_node *node;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_0R",
/* The first operand is a namespace node */
- node = (acpi_namespace_node *) operand[0];
+ node = (struct acpi_namespace_node *) operand[0];
/* Notifies allowed on this object? */
acpi_status
acpi_ex_opcode_2A_2T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc1 = NULL;
- acpi_operand_object *return_desc2 = NULL;
- acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc1 = NULL;
+ union acpi_operand_object *return_desc2 = NULL;
+ acpi_status status;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_2T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
acpi_status
acpi_ex_opcode_2A_1T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_operand_object *temp_desc = NULL;
- u32 index;
- acpi_status status = AE_OK;
- acpi_size length;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ union acpi_operand_object *temp_desc = NULL;
+ u32 index;
+ acpi_status status = AE_OK;
+ acpi_size length;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
acpi_status
acpi_ex_opcode_2A_0T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_status status = AE_OK;
- u8 logical_result = FALSE;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ acpi_status status = AE_OK;
+ u8 logical_result = FALSE;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_opcode_3A_0T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_signal_fatal_info *fatal;
- acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ struct acpi_signal_fatal_info *fatal;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
(u32) operand[2]->integer.value));
- fatal = ACPI_MEM_ALLOCATE (sizeof (acpi_signal_fatal_info));
+ fatal = ACPI_MEM_ALLOCATE (sizeof (struct acpi_signal_fatal_info));
if (fatal) {
fatal->type = (u32) operand[0]->integer.value;
fatal->code = (u32) operand[1]->integer.value;
acpi_status
acpi_ex_opcode_3A_1T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- char *buffer;
- acpi_status status = AE_OK;
- acpi_native_uint index;
- acpi_size length;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ char *buffer;
+ acpi_status status = AE_OK;
+ acpi_native_uint index;
+ acpi_size length;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u8
acpi_ex_do_match (
- u32 match_op,
- acpi_integer package_value,
- acpi_integer match_value)
+ u32 match_op,
+ acpi_integer package_value,
+ acpi_integer match_value)
{
switch (match_op) {
acpi_status
acpi_ex_opcode_6A_0T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_status status = AE_OK;
- u32 index;
- acpi_operand_object *this_element;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ acpi_status status = AE_OK;
+ u32 index;
+ union acpi_operand_object *this_element;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_6A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static u32
acpi_ex_decode_field_access (
- acpi_operand_object *obj_desc,
- u8 field_flags,
- u32 *return_byte_alignment)
+ union acpi_operand_object *obj_desc,
+ u8 field_flags,
+ u32 *return_byte_alignment)
{
- u32 access;
- u8 byte_alignment;
- u8 bit_length;
-/* u32 Length; */
+ u32 access;
+ u8 byte_alignment;
+ u8 bit_length;
+/* u32 Length; */
ACPI_FUNCTION_NAME ("ex_decode_field_access");
acpi_status
acpi_ex_prep_common_field_object (
- acpi_operand_object *obj_desc,
- u8 field_flags,
- u8 field_attribute,
- u32 field_bit_position,
- u32 field_bit_length)
+ union acpi_operand_object *obj_desc,
+ u8 field_flags,
+ u8 field_attribute,
+ u32 field_bit_position,
+ u32 field_bit_length)
{
- u32 access_bit_width;
- u32 byte_alignment;
- u32 nearest_byte_address;
+ u32 access_bit_width;
+ u32 byte_alignment;
+ u32 nearest_byte_address;
ACPI_FUNCTION_TRACE ("ex_prep_common_field_object");
*
* RETURN: Status
*
- * DESCRIPTION: Construct an acpi_operand_object of type def_field and
+ * DESCRIPTION: Construct an union acpi_operand_object of type def_field and
* connect it to the parent Node.
*
******************************************************************************/
acpi_status
acpi_ex_prep_field_value (
- acpi_create_field_info *info)
+ struct acpi_create_field_info *info)
{
- acpi_operand_object *obj_desc;
- u32 type;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ u32 type;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_prep_field_value");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_system_memory_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
- void *logical_addr_ptr = NULL;
- acpi_mem_space_context *mem_info = region_context;
- u32 length;
- acpi_size window_size;
+ acpi_status status = AE_OK;
+ void *logical_addr_ptr = NULL;
+ struct acpi_mem_space_context *mem_info = region_context;
+ u32 length;
+ acpi_size window_size;
#ifndef _HW_ALIGNMENT_SUPPORT
- u32 remainder;
+ u32 remainder;
#endif
ACPI_FUNCTION_TRACE ("ex_system_memory_space_handler");
acpi_status
acpi_ex_system_io_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_io_space_handler");
acpi_status
acpi_ex_pci_config_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
- acpi_pci_id *pci_id;
- u16 pci_register;
+ acpi_status status = AE_OK;
+ struct acpi_pci_id *pci_id;
+ u16 pci_register;
ACPI_FUNCTION_TRACE ("ex_pci_config_space_handler");
* Value - input value for write, output address for read
*
*/
- pci_id = (acpi_pci_id *) region_context;
+ pci_id = (struct acpi_pci_id *) region_context;
pci_register = (u16) (u32) address;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
acpi_status
acpi_ex_cmos_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_cmos_space_handler");
acpi_status
acpi_ex_pci_bar_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_pci_bar_space_handler");
acpi_status
acpi_ex_data_table_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
- u32 byte_width = ACPI_DIV_8 (bit_width);
- u32 i;
- char *logical_addr_ptr;
+ acpi_status status = AE_OK;
+ u32 byte_width = ACPI_DIV_8 (bit_width);
+ u32 i;
+ char *logical_addr_ptr;
ACPI_FUNCTION_TRACE ("ex_data_table_space_handler");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_resolve_node_to_value (
- acpi_namespace_node **object_ptr,
- acpi_walk_state *walk_state)
+ struct acpi_namespace_node **object_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *source_desc;
- acpi_operand_object *obj_desc = NULL;
- acpi_namespace_node *node;
- acpi_object_type entry_type;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *source_desc;
+ union acpi_operand_object *obj_desc = NULL;
+ struct acpi_namespace_node *node;
+ acpi_object_type entry_type;
ACPI_FUNCTION_TRACE ("ex_resolve_node_to_value");
/*
- * The stack pointer points to a acpi_namespace_node (Node). Get the
+ * The stack pointer points to a struct acpi_namespace_node (Node). Get the
* object that is attached to the Node.
*/
node = *object_ptr;
if (entry_type == ACPI_TYPE_LOCAL_ALIAS) {
/* There is always exactly one level of indirection */
- node = (acpi_namespace_node *) node->object;
+ node = (struct acpi_namespace_node *) node->object;
source_desc = acpi_ns_get_attached_object (node);
entry_type = acpi_ns_get_type ((acpi_handle) node);
*object_ptr = node;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* FUNCTION: acpi_ex_resolve_to_value
*
* PARAMETERS: **stack_ptr - Points to entry on obj_stack, which can
- * be either an (acpi_operand_object *)
+ * be either an (union acpi_operand_object *)
* or an acpi_handle.
* walk_state - Current method state
*
acpi_status
acpi_ex_resolve_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_resolve_to_value", stack_ptr);
/*
* The entity pointed to by the stack_ptr can be either
- * 1) A valid acpi_operand_object, or
- * 2) A acpi_namespace_node (named_obj)
+ * 1) A valid union acpi_operand_object, or
+ * 2) A struct acpi_namespace_node (named_obj)
*/
if (ACPI_GET_DESCRIPTOR_TYPE (*stack_ptr) == ACPI_DESC_TYPE_OPERAND) {
status = acpi_ex_resolve_object_to_value (stack_ptr, walk_state);
*/
if (ACPI_GET_DESCRIPTOR_TYPE (*stack_ptr) == ACPI_DESC_TYPE_NAMED) {
status = acpi_ex_resolve_node_to_value (
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, stack_ptr),
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, stack_ptr),
walk_state);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
acpi_status
acpi_ex_resolve_object_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *stack_desc;
- void *temp_node;
- acpi_operand_object *obj_desc;
- u16 opcode;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *stack_desc;
+ void *temp_node;
+ union acpi_operand_object *obj_desc;
+ u16 opcode;
ACPI_FUNCTION_TRACE ("ex_resolve_object_to_value");
stack_desc = *stack_ptr;
- /* This is an acpi_operand_object */
+ /* This is an union acpi_operand_object */
switch (ACPI_GET_OBJECT_TYPE (stack_desc)) {
case ACPI_TYPE_LOCAL_REFERENCE:
acpi_status
acpi_ex_resolve_multiple (
- acpi_walk_state *walk_state,
- acpi_operand_object *operand,
- acpi_object_type *return_type,
- acpi_operand_object **return_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *operand,
+ acpi_object_type *return_type,
+ union acpi_operand_object **return_desc)
{
- acpi_operand_object *obj_desc = (void *) operand;
- acpi_namespace_node *node;
- acpi_object_type type;
+ union acpi_operand_object *obj_desc = (void *) operand;
+ struct acpi_namespace_node *node;
+ acpi_object_type type;
ACPI_FUNCTION_TRACE ("acpi_ex_resolve_multiple");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_check_object_type (
- acpi_object_type type_needed,
- acpi_object_type this_type,
- void *object)
+ acpi_object_type type_needed,
+ acpi_object_type this_type,
+ void *object)
{
ACPI_FUNCTION_NAME ("ex_check_object_type");
* specification, a store to a constant is a noop.)
*/
if ((this_type == ACPI_TYPE_INTEGER) &&
- (((acpi_operand_object *) object)->common.flags & AOPOBJ_AML_CONSTANT)) {
+ (((union acpi_operand_object *) object)->common.flags & AOPOBJ_AML_CONSTANT)) {
return (AE_OK);
}
}
acpi_status
acpi_ex_resolve_operands (
- u16 opcode,
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *obj_desc;
- acpi_status status = AE_OK;
- u8 object_type;
- void *temp_node;
- u32 arg_types;
- const acpi_opcode_info *op_info;
- u32 this_arg_type;
- acpi_object_type type_needed;
+ union acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
+ u8 object_type;
+ void *temp_node;
+ u32 arg_types;
+ const struct acpi_opcode_info *op_info;
+ u32 this_arg_type;
+ acpi_object_type type_needed;
ACPI_FUNCTION_TRACE_U32 ("ex_resolve_operands", opcode);
/* Node */
- object_type = ((acpi_namespace_node *) obj_desc)->type;
+ object_type = ((struct acpi_namespace_node *) obj_desc)->type;
break;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* PARAMETERS: *source_desc - Value to be stored
* *dest_desc - Where to store it. Must be an NS node
- * or an acpi_operand_object of type
+ * or an union acpi_operand_object of type
* Reference;
* walk_state - Current walk state
*
acpi_status
acpi_ex_store (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *ref_desc = dest_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *ref_desc = dest_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_store", dest_desc);
* Storing an object into a Named node.
*/
status = acpi_ex_store_object_to_node (source_desc,
- (acpi_namespace_node *) dest_desc, walk_state);
+ (struct acpi_namespace_node *) dest_desc, walk_state);
return_ACPI_STATUS (status);
}
acpi_status
acpi_ex_store_object_to_index (
- acpi_operand_object *source_desc,
- acpi_operand_object *index_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *index_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
- acpi_operand_object *new_desc;
- u8 value = 0;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *new_desc;
+ u8 value = 0;
ACPI_FUNCTION_TRACE ("ex_store_object_to_index");
acpi_status
acpi_ex_store_object_to_node (
- acpi_operand_object *source_desc,
- acpi_namespace_node *node,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ struct acpi_namespace_node *node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *target_desc;
- acpi_operand_object *new_desc;
- acpi_object_type target_type;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *target_desc;
+ union acpi_operand_object *new_desc;
+ acpi_object_type target_type;
ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_node", source_desc);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_resolve_object (
- acpi_operand_object **source_desc_ptr,
- acpi_object_type target_type,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **source_desc_ptr,
+ acpi_object_type target_type,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *source_desc = *source_desc_ptr;
- acpi_status status = AE_OK;
+ union acpi_operand_object *source_desc = *source_desc_ptr;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_resolve_object");
acpi_status
acpi_ex_store_object_to_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc,
- acpi_operand_object **new_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc,
+ union acpi_operand_object **new_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *actual_src_desc;
- acpi_status status = AE_OK;
+ union acpi_operand_object *actual_src_desc;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_object", source_desc);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_store_buffer_to_buffer (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc)
{
- u32 length;
- u8 *buffer;
+ u32 length;
+ u8 *buffer;
ACPI_FUNCTION_TRACE_PTR ("ex_store_buffer_to_buffer", source_desc);
acpi_status
acpi_ex_store_string_to_string (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc)
{
- u32 length;
- u8 *buffer;
+ u32 length;
+ u8 *buffer;
ACPI_FUNCTION_TRACE_PTR ("ex_store_string_to_string", source_desc);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_system_wait_semaphore (
- acpi_handle semaphore,
- u16 timeout)
+ acpi_handle semaphore,
+ u16 timeout)
{
- acpi_status status;
- acpi_status status2;
+ acpi_status status;
+ acpi_status status2;
ACPI_FUNCTION_TRACE ("ex_system_wait_semaphore");
acpi_status
acpi_ex_system_do_stall (
- u32 how_long)
+ u32 how_long)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ex_system_do_suspend (
- u32 how_long)
+ u32 how_long)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ex_system_acquire_mutex (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ex_system_acquire_mutex", obj_desc);
acpi_status
acpi_ex_system_release_mutex (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_release_mutex");
acpi_status
acpi_ex_system_signal_event (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_signal_event");
acpi_status
acpi_ex_system_wait_event (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_wait_event");
acpi_status
acpi_ex_system_reset_event (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
- void *temp_semaphore;
+ acpi_status status = AE_OK;
+ void *temp_semaphore;
ACPI_FUNCTION_ENTRY ();
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_enter_interpreter (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_enter_interpreter");
void
acpi_ex_exit_interpreter (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_exit_interpreter");
void
acpi_ex_truncate_for32bit_table (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
ACPI_FUNCTION_ENTRY ();
u8
acpi_ex_acquire_global_lock (
- u32 field_flags)
+ u32 field_flags)
{
- u8 locked = FALSE;
- acpi_status status;
+ u8 locked = FALSE;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_acquire_global_lock");
void
acpi_ex_release_global_lock (
- u8 locked_by_me)
+ u8 locked_by_me)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_release_global_lock");
u32
acpi_ex_digits_needed (
- acpi_integer value,
- u32 base)
+ acpi_integer value,
+ u32 base)
{
- u32 num_digits;
- acpi_integer current_value;
- acpi_integer quotient;
+ u32 num_digits;
+ acpi_integer current_value;
+ acpi_integer quotient;
ACPI_FUNCTION_TRACE ("ex_digits_needed");
void
acpi_ex_eisa_id_to_string (
- u32 numeric_id,
- char *out_string)
+ u32 numeric_id,
+ char *out_string)
{
- u32 eisa_id;
+ u32 eisa_id;
ACPI_FUNCTION_ENTRY ();
void
acpi_ex_unsigned_integer_to_string (
- acpi_integer value,
- char *out_string)
+ acpi_integer value,
+ char *out_string)
{
- u32 count;
- u32 digits_needed;
- u32 remainder;
- acpi_integer quotient;
+ u32 count;
+ u32 digits_needed;
+ u32 remainder;
+ acpi_integer quotient;
ACPI_FUNCTION_ENTRY ();
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_hw_initialize (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_initialize");
acpi_status
acpi_hw_set_mode (
- u32 mode)
+ u32 mode)
{
- acpi_status status;
- u32 retry;
+ acpi_status status;
+ u32 retry;
ACPI_FUNCTION_TRACE ("hw_set_mode");
u32
acpi_hw_get_mode (void)
{
- acpi_status status;
- u32 value;
+ acpi_status status;
+ u32 value;
ACPI_FUNCTION_TRACE ("hw_get_mode");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u8
acpi_hw_get_gpe_bit_mask (
- u32 gpe_number)
+ u32 gpe_number)
{
return (acpi_gbl_gpe_number_info [acpi_ev_get_gpe_number_index (gpe_number)].bit_mask);
}
acpi_status
acpi_hw_enable_gpe (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 in_byte;
- u32 register_index;
- u8 bit_mask;
- acpi_status status;
+ u32 in_byte;
+ u32 register_index;
+ u8 bit_mask;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
void
acpi_hw_enable_gpe_for_wakeup (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 register_index;
- u8 bit_mask;
+ u32 register_index;
+ u8 bit_mask;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_hw_disable_gpe (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 in_byte;
- u32 register_index;
- u8 bit_mask;
- acpi_status status;
+ u32 in_byte;
+ u32 register_index;
+ u8 bit_mask;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
void
acpi_hw_disable_gpe_for_wakeup (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 register_index;
- u8 bit_mask;
+ u32 register_index;
+ u8 bit_mask;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_hw_clear_gpe (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 register_index;
- u8 bit_mask;
- acpi_status status;
+ u32 register_index;
+ u8 bit_mask;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_hw_get_gpe_status (
- u32 gpe_number,
- acpi_event_status *event_status)
+ u32 gpe_number,
+ acpi_event_status *event_status)
{
- u32 in_byte = 0;
- u32 register_index = 0;
- u8 bit_mask = 0;
- acpi_gpe_register_info *gpe_register_info;
- acpi_status status;
+ u32 in_byte = 0;
+ u32 register_index = 0;
+ u8 bit_mask = 0;
+ struct acpi_gpe_register_info *gpe_register_info;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
acpi_hw_disable_non_wakeup_gpes (
void)
{
- u32 i;
- acpi_gpe_register_info *gpe_register_info;
- u32 in_value;
- acpi_status status;
+ u32 i;
+ struct acpi_gpe_register_info *gpe_register_info;
+ u32 in_value;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
acpi_hw_enable_non_wakeup_gpes (
void)
{
- u32 i;
- acpi_gpe_register_info *gpe_register_info;
- acpi_status status;
+ u32 i;
+ struct acpi_gpe_register_info *gpe_register_info;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_hw_clear_acpi_status (void)
{
- acpi_native_uint i;
- acpi_native_uint gpe_block;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_native_uint gpe_block;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_clear_acpi_status");
acpi_status
acpi_get_sleep_type_data (
- u8 sleep_state,
- u8 *sleep_type_a,
- u8 *sleep_type_b)
+ u8 sleep_state,
+ u8 *sleep_type_a,
+ u8 *sleep_type_b)
{
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("acpi_get_sleep_type_data");
*
******************************************************************************/
-acpi_bit_register_info *
+struct acpi_bit_register_info *
acpi_hw_get_bit_register_info (
- u32 register_id)
+ u32 register_id)
{
ACPI_FUNCTION_NAME ("hw_get_bit_register_info");
acpi_status
acpi_get_register (
- u32 register_id,
- u32 *return_value,
- u32 flags)
+ u32 register_id,
+ u32 *return_value,
+ u32 flags)
{
- u32 register_value = 0;
- acpi_bit_register_info *bit_reg_info;
- acpi_status status;
+ u32 register_value = 0;
+ struct acpi_bit_register_info *bit_reg_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_register");
acpi_status
acpi_set_register (
- u32 register_id,
- u32 value,
- u32 flags)
+ u32 register_id,
+ u32 value,
+ u32 flags)
{
- u32 register_value = 0;
- acpi_bit_register_info *bit_reg_info;
- acpi_status status;
+ u32 register_value = 0;
+ struct acpi_bit_register_info *bit_reg_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE_U32 ("acpi_set_register", register_id);
acpi_status
acpi_hw_register_read (
- u8 use_lock,
- u32 register_id,
- u32 *return_value)
+ u8 use_lock,
+ u32 register_id,
+ u32 *return_value)
{
- u32 value1 = 0;
- u32 value2 = 0;
- u32 bank_offset;
- acpi_status status;
+ u32 value1 = 0;
+ u32 value2 = 0;
+ u32 bank_offset;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_register_read");
acpi_status
acpi_hw_register_write (
- u8 use_lock,
- u32 register_id,
- u32 value)
+ u8 use_lock,
+ u32 register_id,
+ u32 value)
{
- u32 bank_offset;
- acpi_status status;
+ u32 bank_offset;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_register_write");
acpi_status
acpi_hw_low_level_read (
- u32 width,
- u32 *value,
- acpi_generic_address *reg,
- u32 offset)
+ u32 width,
+ u32 *value,
+ struct acpi_generic_address *reg,
+ u32 offset)
{
- acpi_physical_address mem_address;
- acpi_io_address io_address;
- acpi_pci_id pci_id;
- u16 pci_register;
- acpi_status status;
+ acpi_physical_address mem_address;
+ acpi_io_address io_address;
+ struct acpi_pci_id pci_id;
+ u16 pci_register;
+ acpi_status status;
ACPI_FUNCTION_NAME ("hw_low_level_read");
acpi_status
acpi_hw_low_level_write (
- u32 width,
- u32 value,
- acpi_generic_address *reg,
- u32 offset)
+ u32 width,
+ u32 value,
+ struct acpi_generic_address *reg,
+ u32 offset)
{
- acpi_physical_address mem_address;
- acpi_io_address io_address;
- acpi_pci_id pci_id;
- u16 pci_register;
- acpi_status status;
+ acpi_physical_address mem_address;
+ acpi_io_address io_address;
+ struct acpi_pci_id pci_id;
+ u16 pci_register;
+ acpi_status status;
ACPI_FUNCTION_NAME ("hw_low_level_write");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_enter_sleep_state_prep (
- u8 sleep_state)
+ u8 sleep_state)
{
- acpi_status status;
- acpi_object_list arg_list;
- acpi_object arg;
+ acpi_status status;
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state_prep");
acpi_status
acpi_enter_sleep_state (
- u8 sleep_state)
+ u8 sleep_state)
{
- u32 PM1Acontrol;
- u32 PM1Bcontrol;
- acpi_bit_register_info *sleep_type_reg_info;
- acpi_bit_register_info *sleep_enable_reg_info;
- u32 in_value;
- acpi_status status;
+ u32 PM1Acontrol;
+ u32 PM1Bcontrol;
+ struct acpi_bit_register_info *sleep_type_reg_info;
+ struct acpi_bit_register_info *sleep_enable_reg_info;
+ u32 in_value;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state");
acpi_status
acpi_leave_sleep_state (
- u8 sleep_state)
+ u8 sleep_state)
{
- acpi_object_list arg_list;
- acpi_object arg;
- acpi_status status;
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_leave_sleep_state");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_get_timer_resolution (
- u32 *resolution)
+ u32 *resolution)
{
ACPI_FUNCTION_TRACE ("acpi_get_timer_resolution");
acpi_status
acpi_get_timer (
- u32 *ticks)
+ u32 *ticks)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_timer");
acpi_status
acpi_get_timer_duration (
- u32 start_ticks,
- u32 end_ticks,
- u32 *time_elapsed)
+ u32 start_ticks,
+ u32 end_ticks,
+ u32 *time_elapsed)
{
- u32 delta_ticks = 0;
- uint64_overlay normalized_ticks;
- acpi_status status;
- acpi_integer out_quotient;
+ u32 delta_ticks = 0;
+ union uint64_overlay normalized_ticks;
+ acpi_status status;
+ acpi_integer out_quotient;
ACPI_FUNCTION_TRACE ("acpi_get_timer_duration");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define ACPI_DEBUG_BUFFER_SIZE 4196
-typedef struct command_info
+struct command_info
{
- char *name; /* Command Name */
- u8 min_args; /* Minimum arguments required */
+ char *name; /* Command Name */
+ u8 min_args; /* Minimum arguments required */
+};
-} COMMAND_INFO;
-
-typedef struct argument_info
+struct argument_info
{
- char *name; /* Argument Name */
-
-} ARGUMENT_INFO;
+ char *name; /* Argument Name */
+};
#define PARAM_LIST(pl) pl
acpi_status
acpi_db_single_step (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 op_type);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 op_type);
/*
void
acpi_db_display_table_info (
- char *table_arg);
+ char *table_arg);
void
acpi_db_unload_acpi_table (
- char *table_arg,
- char *instance_arg);
+ char *table_arg,
+ char *instance_arg);
void
acpi_db_set_method_breakpoint (
- char *location,
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ char *location,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
void
acpi_db_set_method_call_breakpoint (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_db_disassemble_aml (
- char *statements,
- acpi_parse_object *op);
+ char *statements,
+ union acpi_parse_object *op);
void
acpi_db_dump_namespace (
- char *start_arg,
- char *depth_arg);
+ char *start_arg,
+ char *depth_arg);
void
acpi_db_dump_namespace_by_owner (
- char *owner_arg,
- char *depth_arg);
+ char *owner_arg,
+ char *depth_arg);
void
acpi_db_send_notify (
- char *name,
- u32 value);
+ char *name,
+ u32 value);
void
acpi_db_set_method_data (
- char *type_arg,
- char *index_arg,
- char *value_arg);
+ char *type_arg,
+ char *index_arg,
+ char *value_arg);
acpi_status
acpi_db_display_objects (
- char *obj_type_arg,
- char *display_count_arg);
+ char *obj_type_arg,
+ char *display_count_arg);
acpi_status
acpi_db_find_name_in_namespace (
- char *name_arg);
+ char *name_arg);
void
acpi_db_set_scope (
- char *name);
+ char *name);
void
acpi_db_find_references (
- char *object_arg);
+ char *object_arg);
void
acpi_db_display_locks (void);
void
acpi_db_display_resources (
- char *object_arg);
+ char *object_arg);
void
acpi_db_check_integrity (
acpi_status
acpi_db_integrity_walk (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_db_walk_and_match_name (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_db_walk_for_references (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_db_walk_for_specific_objects (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
/*
void
acpi_db_display_method_info (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_db_decode_and_display_object (
- char *target,
- char *output_type);
+ char *target,
+ char *output_type);
void
acpi_db_decode_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_db_display_result_object (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_db_display_all_methods (
- char *display_count_arg);
+ char *display_count_arg);
void
acpi_db_display_internal_object (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
void
acpi_db_display_arguments (
void
acpi_db_display_argument_object (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
void
acpi_db_dump_parser_descriptor (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void *
acpi_db_get_pointer (
- void *target);
+ void *target);
void
acpi_db_decode_internal_object (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
/*
void
acpi_db_execute (
- char *name,
- char **args,
- u32 flags);
+ char *name,
+ char **args,
+ u32 flags);
void
acpi_db_create_execution_threads (
- char *num_threads_arg,
- char *num_loops_arg,
- char *method_name_arg);
+ char *num_threads_arg,
+ char *num_loops_arg,
+ char *method_name_arg);
acpi_status
acpi_db_execute_method (
- acpi_db_method_info *info,
- acpi_buffer *return_obj);
+ struct acpi_db_method_info *info,
+ struct acpi_buffer *return_obj);
void
acpi_db_execute_setup (
- acpi_db_method_info *info);
+ struct acpi_db_method_info *info);
u32
acpi_db_get_outstanding_allocations (
void ACPI_SYSTEM_XFACE
acpi_db_method_thread (
- void *context);
+ void *context);
/*
acpi_object_type
acpi_db_match_argument (
- char *user_argument,
- ARGUMENT_INFO *arguments);
+ char *user_argument,
+ struct argument_info *arguments);
acpi_status
ae_local_load_table (
- acpi_table_header *table_ptr);
+ struct acpi_table_header *table_ptr);
void
acpi_db_close_debug_file (
void
acpi_db_open_debug_file (
- char *name);
+ char *name);
acpi_status
acpi_db_load_acpi_table (
- char *filename);
+ char *filename);
acpi_status
acpi_db_get_acpi_table (
- char *filename);
+ char *filename);
/*
* dbhistry - debugger HISTORY command
void
acpi_db_add_to_history (
- char *command_line);
+ char *command_line);
void
acpi_db_display_history (void);
char *
acpi_db_get_from_history (
- char *command_num_arg);
+ char *command_num_arg);
/*
acpi_status
acpi_db_command_dispatch (
- char *input_buffer,
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ char *input_buffer,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
void ACPI_SYSTEM_XFACE
acpi_db_execute_thread (
- void *context);
+ void *context);
acpi_status
acpi_db_user_commands (
- char prompt,
- acpi_parse_object *op);
+ char prompt,
+ union acpi_parse_object *op);
void
acpi_db_display_help (
- char *help_type);
+ char *help_type);
char *
acpi_db_get_next_token (
- char *string,
- char **next);
+ char *string,
+ char **next);
u32
acpi_db_get_line (
- char *input_buffer);
+ char *input_buffer);
u32
acpi_db_match_command (
- char *user_command);
+ char *user_command);
void
acpi_db_single_thread (
void
acpi_db_generate_statistics (
- acpi_parse_object *root,
- u8 is_method);
+ union acpi_parse_object *root,
+ u8 is_method);
acpi_status
acpi_db_display_statistics (
- char *type_arg);
+ char *type_arg);
acpi_status
acpi_db_classify_one_object (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
void
acpi_db_count_namespace_objects (
void
acpi_db_enumerate_object (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
/*
void
acpi_db_set_output_destination (
- u32 where);
+ u32 where);
void
acpi_db_dump_buffer (
- u32 address);
+ u32 address);
void
acpi_db_dump_object (
- acpi_object *obj_desc,
- u32 level);
+ union acpi_object *obj_desc,
+ u32 level);
void
acpi_db_prep_namestring (
- char *name);
+ char *name);
acpi_status
acpi_db_second_pass_parse (
- acpi_parse_object *root);
+ union acpi_parse_object *root);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_db_local_ns_lookup (
- char *name);
+ char *name);
#endif /* __ACDEBUG_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ds_obj_stack_push (
- void *object,
- acpi_walk_state *walk_state);
+ void *object,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop (
- u32 pop_count,
- acpi_walk_state *walk_state);
+ u32 pop_count,
+ struct acpi_walk_state *walk_state);
void *
acpi_ds_obj_stack_get_value (
- u32 index,
- acpi_walk_state *walk_state);
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop_object (
- acpi_operand_object **object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state);
/* dsopcode - support for late evaluation */
acpi_status
acpi_ds_execute_arguments (
- acpi_namespace_node *node,
- acpi_namespace_node *scope_node,
- u32 aml_length,
- u8 *aml_start);
+ struct acpi_namespace_node *node,
+ struct acpi_namespace_node *scope_node,
+ u32 aml_length,
+ u8 *aml_start);
acpi_status
acpi_ds_get_buffer_field_arguments (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_get_region_arguments (
- acpi_operand_object *rgn_desc);
+ union acpi_operand_object *rgn_desc);
acpi_status
acpi_ds_get_buffer_arguments (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_get_package_arguments (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_init_buffer_field (
- u16 aml_opcode,
- acpi_operand_object *obj_desc,
- acpi_operand_object *buffer_desc,
- acpi_operand_object *offset_desc,
- acpi_operand_object *length_desc,
- acpi_operand_object *result_desc);
+ u16 aml_opcode,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *buffer_desc,
+ union acpi_operand_object *offset_desc,
+ union acpi_operand_object *length_desc,
+ union acpi_operand_object *result_desc);
acpi_status
acpi_ds_eval_buffer_field_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_eval_region_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_eval_data_object_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object *obj_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_initialize_region (
- acpi_handle obj_handle);
+ acpi_handle obj_handle);
/* dsctrl - Parser/Interpreter interface, control stack routines */
acpi_status
acpi_ds_exec_begin_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_exec_end_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
/* dsexec - Parser/Interpreter interface, method execution callbacks */
acpi_status
acpi_ds_get_predicate_value (
- acpi_walk_state *walk_state,
- acpi_operand_object *result_obj);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *result_obj);
acpi_status
acpi_ds_exec_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
acpi_status
acpi_ds_exec_end_op (
- acpi_walk_state *state);
+ struct acpi_walk_state *state);
/* dsfield - Parser/Interpreter interface for AML fields */
acpi_status
acpi_ds_get_field_names (
- acpi_create_field_info *info,
- acpi_walk_state *walk_state,
- acpi_parse_object *arg);
+ struct acpi_create_field_info *info,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg);
acpi_status
acpi_ds_create_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_bank_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_index_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_buffer_field (
- acpi_parse_object *op,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_init_field_objects (
- acpi_parse_object *op,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state);
/* dsload - Parser/Interpreter interface, namespace load callbacks */
acpi_status
acpi_ds_load1_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
acpi_status
acpi_ds_load1_end_op (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_load2_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
acpi_status
acpi_ds_load2_end_op (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_init_callbacks (
- acpi_walk_state *walk_state,
- u32 pass_number);
+ struct acpi_walk_state *walk_state,
+ u32 pass_number);
/* dsmthdat - method data (locals/args) */
acpi_status
acpi_ds_store_object_to_local (
- u16 opcode,
- u32 index,
- acpi_operand_object *src_desc,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *src_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_entry (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_operand_object ***node);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object ***node);
void
acpi_ds_method_data_delete_all (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
u8
acpi_ds_is_method_value (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_object_type
acpi_ds_method_data_get_type (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_operand_object **dest_desc);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **dest_desc);
void
acpi_ds_method_data_delete_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_init_args (
- acpi_operand_object **params,
- u32 max_param_count,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **params,
+ u32 max_param_count,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_node (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_namespace_node **node);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **node);
void
acpi_ds_method_data_init (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_set_value (
- u16 opcode,
- u32 index,
- acpi_operand_object *object,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state);
/* dsmethod - Parser/Interpreter interface - control method parsing */
acpi_status
acpi_ds_parse_method (
- acpi_handle obj_handle);
+ acpi_handle obj_handle);
acpi_status
acpi_ds_call_control_method (
- acpi_thread_state *thread,
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_thread_state *thread,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_restart_control_method (
- acpi_walk_state *walk_state,
- acpi_operand_object *return_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *return_desc);
acpi_status
acpi_ds_terminate_control_method (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_begin_method_execution (
- acpi_namespace_node *method_node,
- acpi_operand_object *obj_desc,
- acpi_namespace_node *calling_method_node);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object *obj_desc,
+ struct acpi_namespace_node *calling_method_node);
/* dsobj - Parser/Interpreter interface - object initialization and conversion */
acpi_status
acpi_ds_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ds_initialize_objects (
- acpi_table_desc *table_desc,
- acpi_namespace_node *start_node);
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *start_node);
acpi_status
acpi_ds_build_internal_buffer_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 buffer_length,
- acpi_operand_object **obj_desc_ptr);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 buffer_length,
+ union acpi_operand_object **obj_desc_ptr);
acpi_status
acpi_ds_build_internal_package_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 package_length,
- acpi_operand_object **obj_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 package_length,
+ union acpi_operand_object **obj_desc);
acpi_status
acpi_ds_build_internal_object (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object **obj_desc_ptr);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object **obj_desc_ptr);
acpi_status
acpi_ds_init_object_from_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u16 opcode,
- acpi_operand_object **obj_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u16 opcode,
+ union acpi_operand_object **obj_desc);
acpi_status
acpi_ds_create_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ union acpi_parse_object *op);
/* dsutils - Parser/Interpreter interface utility routines */
u8
acpi_ds_is_result_used (
- acpi_parse_object *op,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state);
void
acpi_ds_delete_result_if_not_used (
- acpi_parse_object *op,
- acpi_operand_object *result_obj,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ union acpi_operand_object *result_obj,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_operand (
- acpi_walk_state *walk_state,
- acpi_parse_object *arg,
- u32 args_remaining);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg,
+ u32 args_remaining);
acpi_status
acpi_ds_create_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *first_arg);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *first_arg);
acpi_status
acpi_ds_resolve_operands (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
void
acpi_ds_clear_operands (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
acpi_status
acpi_ds_scope_stack_push (
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_walk_state *walk_state);
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_scope_stack_pop (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
void
acpi_ds_scope_stack_clear (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/* dswstate - parser WALK_STATE management routines */
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_create_walk_state (
- acpi_owner_id owner_id,
- acpi_parse_object *origin,
- acpi_operand_object *mth_desc,
- acpi_thread_state *thread);
+ acpi_owner_id owner_id,
+ union acpi_parse_object *origin,
+ union acpi_operand_object *mth_desc,
+ struct acpi_thread_state *thread);
acpi_status
acpi_ds_init_aml_walk (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_namespace_node *method_node,
- u8 *aml_start,
- u32 aml_length,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc,
- u32 pass_number);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *method_node,
+ u8 *aml_start,
+ u32 aml_length,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc,
+ u32 pass_number);
acpi_status
acpi_ds_obj_stack_delete_all (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop_and_delete (
- u32 pop_count,
- acpi_walk_state *walk_state);
+ u32 pop_count,
+ struct acpi_walk_state *walk_state);
void
acpi_ds_delete_walk_state (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_pop_walk_state (
- acpi_thread_state *thread);
+ struct acpi_thread_state *thread);
void
acpi_ds_push_walk_state (
- acpi_walk_state *walk_state,
- acpi_thread_state *thread);
+ struct acpi_walk_state *walk_state,
+ struct acpi_thread_state *thread);
acpi_status
acpi_ds_result_stack_pop (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_stack_push (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_stack_clear (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_get_current_walk_state (
- acpi_thread_state *thread);
+ struct acpi_thread_state *thread);
void
acpi_ds_delete_walk_state_cache (
acpi_status
acpi_ds_result_insert (
- void *object,
- u32 index,
- acpi_walk_state *walk_state);
+ void *object,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_remove (
- acpi_operand_object **object,
- u32 index,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_pop (
- acpi_operand_object **object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_push (
- acpi_operand_object *object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_pop_from_bottom (
- acpi_operand_object **object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state);
#endif /* _ACDISPAT_H_ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u32
acpi_ev_fixed_event_dispatch (
- u32 event);
+ u32 event);
/*
u8
acpi_ev_is_notify_object (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
acpi_status
acpi_ev_acquire_global_lock(
- u16 timeout);
+ u16 timeout);
acpi_status
acpi_ev_release_global_lock(
u32
acpi_ev_get_gpe_register_index (
- u32 gpe_number);
+ u32 gpe_number);
u32
acpi_ev_get_gpe_number_index (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_ev_queue_notify_request (
- acpi_namespace_node *node,
- u32 notify_value);
+ struct acpi_namespace_node *node,
+ u32 notify_value);
void ACPI_SYSTEM_XFACE
acpi_ev_notify_dispatch (
- void *context);
+ void *context);
/*
u32
acpi_ev_gpe_dispatch (
- u32 gpe_number);
+ u32 gpe_number);
u32
acpi_ev_gpe_detect (
acpi_status
acpi_ev_address_space_dispatch (
- acpi_operand_object *region_obj,
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- void *value);
+ union acpi_operand_object *region_obj,
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ void *value);
acpi_status
acpi_ev_addr_handler_helper (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ev_attach_region (
- acpi_operand_object *handler_obj,
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked);
+ union acpi_operand_object *handler_obj,
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked);
void
acpi_ev_detach_region (
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked);
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked);
/*
acpi_status
acpi_ev_system_memory_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_io_space_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_pci_config_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_cmos_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_pci_bar_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_default_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_initialize_region (
- acpi_operand_object *region_obj,
- u8 acpi_ns_locked);
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_locked);
/*
u32
acpi_ev_initialize_sCI (
- u32 program_sCI);
+ u32 program_sCI);
void
acpi_ev_terminate (
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* Runtime configuration of debug print levels */
-extern u32 acpi_dbg_level;
-extern u32 acpi_dbg_layer;
+extern u32 acpi_dbg_level;
+extern u32 acpi_dbg_layer;
/* Procedure nesting level for debug output */
-extern u32 acpi_gbl_nesting_level;
+extern u32 acpi_gbl_nesting_level;
/*****************************************************************************
* of each in the system. Each global points to the actual table.
*
*/
-ACPI_EXTERN u32 acpi_gbl_table_flags;
-ACPI_EXTERN u32 acpi_gbl_rsdt_table_count;
-ACPI_EXTERN rsdp_descriptor *acpi_gbl_RSDP;
-ACPI_EXTERN xsdt_descriptor *acpi_gbl_XSDT;
+ACPI_EXTERN u32 acpi_gbl_table_flags;
+ACPI_EXTERN u32 acpi_gbl_rsdt_table_count;
+ACPI_EXTERN struct rsdp_descriptor *acpi_gbl_RSDP;
+ACPI_EXTERN XSDT_DESCRIPTOR *acpi_gbl_XSDT;
ACPI_EXTERN FADT_DESCRIPTOR *acpi_gbl_FADT;
-ACPI_EXTERN acpi_table_header *acpi_gbl_DSDT;
+ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS;
-ACPI_EXTERN acpi_common_facs acpi_gbl_common_fACS;
+ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
/*
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths
* If we are running a method that exists in a 32-bit ACPI table.
* Use only 32 bits of the Integer for conversion.
*/
-ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
-ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
+ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
+ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
/*
* Since there may be multiple SSDTs and PSDTS, a single pointer is not
/*
* ACPI Table info arrays
*/
-extern acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
-extern ACPI_TABLE_SUPPORT acpi_gbl_acpi_table_data[NUM_ACPI_TABLES];
+extern struct acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
+extern struct acpi_table_support acpi_gbl_acpi_table_data[NUM_ACPI_TABLES];
/*
* Predefined mutex objects. This array contains the
* actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
* (The table maps local handles to the real OS handles)
*/
-ACPI_EXTERN acpi_mutex_info acpi_gbl_acpi_mutex_info [NUM_MTX];
+ACPI_EXTERN struct acpi_mutex_info acpi_gbl_acpi_mutex_info [NUM_MTX];
/*****************************************************************************
****************************************************************************/
-ACPI_EXTERN acpi_memory_list acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
-ACPI_EXTERN acpi_object_notify_handler acpi_gbl_drv_notify;
-ACPI_EXTERN acpi_object_notify_handler acpi_gbl_sys_notify;
-ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
-ACPI_EXTERN acpi_walk_state *acpi_gbl_breakpoint_walk;
-ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
-
-ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count;
-ACPI_EXTERN u32 acpi_gbl_original_mode;
-ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
-ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
-ACPI_EXTERN u32 acpi_gbl_ps_find_count;
-ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
-ACPI_EXTERN u16 acpi_gbl_next_table_owner_id;
-ACPI_EXTERN u16 acpi_gbl_next_method_owner_id;
-ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
-ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
-ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
-ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
-ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
-ACPI_EXTERN u8 acpi_gbl_global_lock_present;
-ACPI_EXTERN u8 acpi_gbl_events_initialized;
-
-extern u8 acpi_gbl_shutdown;
-extern u32 acpi_gbl_startup_flags;
-extern const u8 acpi_gbl_decode_to8bit[8];
-extern const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
-extern const acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
-extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
+ACPI_EXTERN struct acpi_memory_list acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
+ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_drv_notify;
+ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_sys_notify;
+ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
+ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
+ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
+
+ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count;
+ACPI_EXTERN u32 acpi_gbl_original_mode;
+ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
+ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
+ACPI_EXTERN u32 acpi_gbl_ps_find_count;
+ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
+ACPI_EXTERN u16 acpi_gbl_next_table_owner_id;
+ACPI_EXTERN u16 acpi_gbl_next_method_owner_id;
+ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
+ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
+ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
+ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
+ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
+ACPI_EXTERN u8 acpi_gbl_global_lock_present;
+ACPI_EXTERN u8 acpi_gbl_events_initialized;
+
+extern u8 acpi_gbl_shutdown;
+extern u32 acpi_gbl_startup_flags;
+extern const u8 acpi_gbl_decode_to8bit[8];
+extern const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
+extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
+extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
/*****************************************************************************
#define NUM_PREDEFINED_NAMES 9
#endif
-ACPI_EXTERN acpi_namespace_node acpi_gbl_root_node_struct;
-ACPI_EXTERN acpi_namespace_node *acpi_gbl_root_node;
+ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct;
+ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node;
-extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];
-extern const acpi_predefined_names acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
+extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];
+extern const struct acpi_predefined_names acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
#ifdef ACPI_DEBUG_OUTPUT
-ACPI_EXTERN u32 acpi_gbl_current_node_count;
-ACPI_EXTERN u32 acpi_gbl_current_node_size;
-ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
-ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer;
-ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
-ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
+ACPI_EXTERN u32 acpi_gbl_current_node_count;
+ACPI_EXTERN u32 acpi_gbl_current_node_size;
+ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
+ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer;
+ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
+ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
#endif
/*****************************************************************************
****************************************************************************/
-ACPI_EXTERN acpi_thread_state *acpi_gbl_current_walk_list;
+ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
/* Control method single step flag */
-ACPI_EXTERN u8 acpi_gbl_cm_single_step;
+ACPI_EXTERN u8 acpi_gbl_cm_single_step;
/*****************************************************************************
*
****************************************************************************/
-ACPI_EXTERN acpi_parse_object *acpi_gbl_parsed_namespace_root;
+ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
/*****************************************************************************
*
*
****************************************************************************/
-extern acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
-ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
-ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
+extern struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
+ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
+ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
/*****************************************************************************
*
****************************************************************************/
-extern acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
-ACPI_EXTERN acpi_fixed_event_handler acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
+extern struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
+ACPI_EXTERN struct acpi_fixed_event_handler acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
-ACPI_EXTERN acpi_handle acpi_gbl_gpe_obj_handle;
-ACPI_EXTERN u32 acpi_gbl_gpe_register_count;
-ACPI_EXTERN u32 acpi_gbl_gpe_number_max;
-ACPI_EXTERN acpi_gpe_register_info *acpi_gbl_gpe_register_info;
-ACPI_EXTERN acpi_gpe_number_info *acpi_gbl_gpe_number_info;
-ACPI_EXTERN acpi_gpe_block_info acpi_gbl_gpe_block_info[ACPI_MAX_GPE_BLOCKS];
+ACPI_EXTERN acpi_handle acpi_gbl_gpe_obj_handle;
+ACPI_EXTERN u32 acpi_gbl_gpe_register_count;
+ACPI_EXTERN u32 acpi_gbl_gpe_number_max;
+ACPI_EXTERN struct acpi_gpe_register_info *acpi_gbl_gpe_register_info;
+ACPI_EXTERN struct acpi_gpe_number_info *acpi_gbl_gpe_number_info;
+ACPI_EXTERN struct acpi_gpe_block_info acpi_gbl_gpe_block_info[ACPI_MAX_GPE_BLOCKS];
/*
* GPE translation table
* This table is needed because the GPE numbers supported by block 1 do not
* have to be contiguous with the GPE numbers supported by block 0.
*/
-ACPI_EXTERN acpi_gpe_index_info *acpi_gbl_gpe_number_to_index;
+ACPI_EXTERN struct acpi_gpe_index_info *acpi_gbl_gpe_number_to_index;
/*****************************************************************************
****************************************************************************/
-ACPI_EXTERN u8 acpi_gbl_db_output_flags;
+ACPI_EXTERN u8 acpi_gbl_db_output_flags;
#ifdef ACPI_DISASSEMBLER
-ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
-ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
+ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
+ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
#endif
#ifdef ACPI_DEBUGGER
-extern u8 acpi_gbl_method_executing;
-extern u8 acpi_gbl_abort_method;
-extern u8 acpi_gbl_db_terminate_threads;
+extern u8 acpi_gbl_method_executing;
+extern u8 acpi_gbl_abort_method;
+extern u8 acpi_gbl_db_terminate_threads;
-ACPI_EXTERN int optind;
-ACPI_EXTERN char *optarg;
+ACPI_EXTERN int optind;
+ACPI_EXTERN char *optarg;
-ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
-ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
-ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
+ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
+ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
+ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
-ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
-ACPI_EXTERN char acpi_gbl_db_line_buf[80];
-ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
-ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
-ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
-ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
-ACPI_EXTERN char *acpi_gbl_db_buffer;
-ACPI_EXTERN char *acpi_gbl_db_filename;
-ACPI_EXTERN u32 acpi_gbl_db_debug_level;
-ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
-ACPI_EXTERN acpi_table_header *acpi_gbl_db_table_ptr;
-ACPI_EXTERN acpi_namespace_node *acpi_gbl_db_scope_node;
+ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
+ACPI_EXTERN char acpi_gbl_db_line_buf[80];
+ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
+ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
+ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
+ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
+ACPI_EXTERN char *acpi_gbl_db_buffer;
+ACPI_EXTERN char *acpi_gbl_db_filename;
+ACPI_EXTERN u32 acpi_gbl_db_debug_level;
+ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
+ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr;
+ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node;
/*
* Statistic globals
*/
-ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
-ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
-ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
-ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
-ACPI_EXTERN u32 acpi_gbl_num_nodes;
-ACPI_EXTERN u32 acpi_gbl_num_objects;
-
-
-ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
-ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
-ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
-ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
+ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
+ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
+ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
+ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
+ACPI_EXTERN u32 acpi_gbl_num_nodes;
+ACPI_EXTERN u32 acpi_gbl_num_objects;
+
+
+ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
+ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
+ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
+ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
#endif /* ACPI_DEBUGGER */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_hw_set_mode (
- u32 mode);
+ u32 mode);
u32
acpi_hw_get_mode (
/* Register I/O Prototypes */
-acpi_bit_register_info *
+struct acpi_bit_register_info *
acpi_hw_get_bit_register_info (
- u32 register_id);
+ u32 register_id);
acpi_status
acpi_hw_register_read (
- u8 use_lock,
- u32 register_id,
- u32 *return_value);
+ u8 use_lock,
+ u32 register_id,
+ u32 *return_value);
acpi_status
acpi_hw_register_write (
- u8 use_lock,
- u32 register_id,
- u32 value);
+ u8 use_lock,
+ u32 register_id,
+ u32 value);
acpi_status
acpi_hw_low_level_read (
- u32 width,
- u32 *value,
- acpi_generic_address *reg,
- u32 offset);
+ u32 width,
+ u32 *value,
+ struct acpi_generic_address *reg,
+ u32 offset);
acpi_status
acpi_hw_low_level_write (
- u32 width,
- u32 value,
- acpi_generic_address *reg,
- u32 offset);
+ u32 width,
+ u32 value,
+ struct acpi_generic_address *reg,
+ u32 offset);
acpi_status
acpi_hw_clear_acpi_status (
u8
acpi_hw_get_gpe_bit_mask (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_enable_gpe (
- u32 gpe_number);
+ u32 gpe_number);
void
acpi_hw_enable_gpe_for_wakeup (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_disable_gpe (
- u32 gpe_number);
+ u32 gpe_number);
void
acpi_hw_disable_gpe_for_wakeup (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_clear_gpe (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_get_gpe_status (
- u32 gpe_number,
- acpi_event_status *event_status);
+ u32 gpe_number,
+ acpi_event_status *event_status);
acpi_status
acpi_hw_disable_non_wakeup_gpes (
acpi_status
acpi_get_timer_resolution (
- u32 *resolution);
+ u32 *resolution);
acpi_status
acpi_get_timer (
- u32 *ticks);
+ u32 *ticks);
acpi_status
acpi_get_timer_duration (
- u32 start_ticks,
- u32 end_ticks,
- u32 *time_elapsed);
+ u32 start_ticks,
+ u32 end_ticks,
+ u32 *time_elapsed);
#endif /* __ACHWARE_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ex_resolve_operands (
- u16 opcode,
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_check_object_type (
- acpi_object_type type_needed,
- acpi_object_type this_type,
- void *object);
+ acpi_object_type type_needed,
+ acpi_object_type this_type,
+ void *object);
/*
* exxface - External interpreter interfaces
acpi_status
acpi_ex_load_table (
- acpi_table_type table_id);
+ acpi_table_type table_id);
acpi_status
acpi_ex_execute_method (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc);
/*
acpi_status
acpi_ex_convert_to_integer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_convert_to_buffer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_convert_to_string (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- u32 base,
- u32 max_length,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ u32 base,
+ u32 max_length,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_convert_to_target_type (
- acpi_object_type destination_type,
- acpi_operand_object *source_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state);
+ acpi_object_type destination_type,
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state);
u32
acpi_ex_convert_to_ascii (
- acpi_integer integer,
- u32 base,
- u8 *string,
- u8 max_length);
+ acpi_integer integer,
+ u32 base,
+ u8 *string,
+ u8 max_length);
/*
* exfield - ACPI AML (p-code) execution - field manipulation
acpi_status
acpi_ex_extract_from_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length);
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length);
acpi_status
acpi_ex_insert_into_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length);
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length);
acpi_status
acpi_ex_setup_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset);
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset);
acpi_status
acpi_ex_access_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 read_write);
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 read_write);
u8
acpi_ex_register_overflow (
- acpi_operand_object *obj_desc,
- acpi_integer value);
+ union acpi_operand_object *obj_desc,
+ acpi_integer value);
acpi_status
acpi_ex_field_datum_io (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 read_write);
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 read_write);
acpi_status
acpi_ex_write_with_update_rule (
- acpi_operand_object *obj_desc,
- acpi_integer mask,
- acpi_integer field_value,
- u32 field_datum_byte_offset);
+ union acpi_operand_object *obj_desc,
+ acpi_integer mask,
+ acpi_integer field_value,
+ u32 field_datum_byte_offset);
void
acpi_ex_get_buffer_datum(
- acpi_integer *datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset);
+ acpi_integer *datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset);
void
acpi_ex_set_buffer_datum (
- acpi_integer merged_datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset);
+ acpi_integer merged_datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset);
acpi_status
acpi_ex_read_data_from_field (
- acpi_walk_state *walk_state,
- acpi_operand_object *obj_desc,
- acpi_operand_object **ret_buffer_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **ret_buffer_desc);
acpi_status
acpi_ex_write_data_to_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc);
/*
* exmisc - ACPI AML (p-code) execution - specific opcodes
acpi_status
acpi_ex_opcode_3A_0T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_3A_1T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_6A_0T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
u8
acpi_ex_do_match (
- u32 match_op,
- acpi_integer package_value,
- acpi_integer match_value);
+ u32 match_op,
+ acpi_integer package_value,
+ acpi_integer match_value);
acpi_status
acpi_ex_get_object_reference (
- acpi_operand_object *obj_desc,
- acpi_operand_object **return_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **return_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_multiple (
- acpi_walk_state *walk_state,
- acpi_operand_object *operand,
- acpi_object_type *return_type,
- acpi_operand_object **return_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *operand,
+ acpi_object_type *return_type,
+ union acpi_operand_object **return_desc);
acpi_status
acpi_ex_concat_template (
- acpi_operand_object *obj_desc,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_do_concatenate (
- acpi_operand_object *obj_desc,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state);
u8
acpi_ex_do_logical_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1);
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1);
acpi_integer
acpi_ex_do_math_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1);
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1);
acpi_status
acpi_ex_create_mutex (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_processor (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_power_resource (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_region (
- u8 *aml_start,
- u32 aml_length,
- u8 region_space,
- acpi_walk_state *walk_state);
+ u8 *aml_start,
+ u32 aml_length,
+ u8 region_space,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_table_region (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_event (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_alias (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_method (
- u8 *aml_start,
- u32 aml_length,
- acpi_walk_state *walk_state);
+ u8 *aml_start,
+ u32 aml_length,
+ struct acpi_walk_state *walk_state);
/*
acpi_status
acpi_ex_add_table (
- acpi_table_header *table,
- acpi_namespace_node *parent_node,
- acpi_operand_object **ddb_handle);
+ struct acpi_table_header *table,
+ struct acpi_namespace_node *parent_node,
+ union acpi_operand_object **ddb_handle);
acpi_status
acpi_ex_load_op (
- acpi_operand_object *obj_desc,
- acpi_operand_object *target,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *target,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_load_table_op (
- acpi_walk_state *walk_state,
- acpi_operand_object **return_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **return_desc);
acpi_status
acpi_ex_unload_table (
- acpi_operand_object *ddb_handle);
+ union acpi_operand_object *ddb_handle);
/*
acpi_status
acpi_ex_acquire_mutex (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_release_mutex (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
void
acpi_ex_release_all_mutexes (
- acpi_thread_state *thread);
+ struct acpi_thread_state *thread);
void
acpi_ex_unlink_mutex (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
void
acpi_ex_link_mutex (
- acpi_operand_object *obj_desc,
- acpi_thread_state *thread);
+ union acpi_operand_object *obj_desc,
+ struct acpi_thread_state *thread);
/*
* exprep - ACPI AML (p-code) execution - prep utilities
acpi_status
acpi_ex_prep_common_field_object (
- acpi_operand_object *obj_desc,
- u8 field_flags,
- u8 field_attribute,
- u32 field_bit_position,
- u32 field_bit_length);
+ union acpi_operand_object *obj_desc,
+ u8 field_flags,
+ u8 field_attribute,
+ u32 field_bit_position,
+ u32 field_bit_length);
acpi_status
acpi_ex_prep_field_value (
- acpi_create_field_info *info);
+ struct acpi_create_field_info *info);
/*
* exsystem - Interface to OS services
acpi_status
acpi_ex_system_do_notify_op (
- acpi_operand_object *value,
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *value,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_do_suspend(
- u32 time);
+ u32 time);
acpi_status
acpi_ex_system_do_stall (
- u32 time);
+ u32 time);
acpi_status
acpi_ex_system_acquire_mutex(
- acpi_operand_object *time,
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *time,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_release_mutex(
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_signal_event(
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_wait_event(
- acpi_operand_object *time,
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *time,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_reset_event(
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_wait_semaphore (
- acpi_handle semaphore,
- u16 timeout);
+ acpi_handle semaphore,
+ u16 timeout);
/*
acpi_status
acpi_ex_opcode_1A_0T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_0T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_1T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_1T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
* exdyadic - ACPI AML (p-code) execution, dyadic operators
acpi_status
acpi_ex_opcode_2A_0T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_0T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_1T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_2T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
acpi_status
acpi_ex_resolve_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_node_to_value (
- acpi_namespace_node **stack_ptr,
- acpi_walk_state *walk_state);
+ struct acpi_namespace_node **stack_ptr,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_object_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state);
/*
void
acpi_ex_dump_operand (
- acpi_operand_object *entry_desc);
+ union acpi_operand_object *entry_desc);
void
acpi_ex_dump_operands (
- acpi_operand_object **operands,
- acpi_interpreter_mode interpreter_mode,
- char *ident,
- u32 num_levels,
- char *note,
- char *module_name,
- u32 line_number);
+ union acpi_operand_object **operands,
+ acpi_interpreter_mode interpreter_mode,
+ char *ident,
+ u32 num_levels,
+ char *note,
+ char *module_name,
+ u32 line_number);
void
acpi_ex_dump_object_descriptor (
- acpi_operand_object *object,
- u32 flags);
+ union acpi_operand_object *object,
+ u32 flags);
void
acpi_ex_dump_node (
- acpi_namespace_node *node,
- u32 flags);
+ struct acpi_namespace_node *node,
+ u32 flags);
void
acpi_ex_out_string (
- char *title,
- char *value);
+ char *title,
+ char *value);
void
acpi_ex_out_pointer (
- char *title,
- void *value);
+ char *title,
+ void *value);
void
acpi_ex_out_integer (
- char *title,
- u32 value);
+ char *title,
+ u32 value);
void
acpi_ex_out_address (
- char *title,
- acpi_physical_address value);
+ char *title,
+ acpi_physical_address value);
/*
char *
acpi_ex_allocate_name_string (
- u32 prefix_count,
- u32 num_name_segs);
+ u32 prefix_count,
+ u32 num_name_segs);
u32
acpi_ex_good_char (
- u32 character);
+ u32 character);
acpi_status
acpi_ex_name_segment (
- u8 **in_aml_address,
- char *name_string);
+ u8 **in_aml_address,
+ char *name_string);
acpi_status
acpi_ex_get_name_string (
- acpi_object_type data_type,
- u8 *in_aml_address,
- char **out_name_string,
- u32 *out_name_length);
+ acpi_object_type data_type,
+ u8 *in_aml_address,
+ char **out_name_string,
+ u32 *out_name_length);
acpi_status
acpi_ex_do_name (
- acpi_object_type data_type,
- acpi_interpreter_mode load_exec_mode);
+ acpi_object_type data_type,
+ acpi_interpreter_mode load_exec_mode);
/*
acpi_status
acpi_ex_store (
- acpi_operand_object *val_desc,
- acpi_operand_object *dest_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *val_desc,
+ union acpi_operand_object *dest_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_index (
- acpi_operand_object *val_desc,
- acpi_operand_object *dest_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *val_desc,
+ union acpi_operand_object *dest_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_node (
- acpi_operand_object *source_desc,
- acpi_namespace_node *node,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_desc,
+ struct acpi_namespace_node *node,
+ struct acpi_walk_state *walk_state);
/*
acpi_status
acpi_ex_resolve_object (
- acpi_operand_object **source_desc_ptr,
- acpi_object_type target_type,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **source_desc_ptr,
+ acpi_object_type target_type,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc,
- acpi_operand_object **new_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc,
+ union acpi_operand_object **new_desc,
+ struct acpi_walk_state *walk_state);
/*
acpi_status
acpi_ex_store_buffer_to_buffer (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_store_string_to_string (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_integer_to_index_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_integer_to_bank_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_data_to_named_field (
- acpi_operand_object *source_desc,
- acpi_namespace_node *node);
+ union acpi_operand_object *source_desc,
+ struct acpi_namespace_node *node);
acpi_status
acpi_ex_copy_integer_to_buffer_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
/*
* exutils - interpreter/scanner utilities
void
acpi_ex_truncate_for32bit_table (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
u8
acpi_ex_acquire_global_lock (
- u32 rule);
+ u32 rule);
void
acpi_ex_release_global_lock (
- u8 locked);
+ u8 locked);
u32
acpi_ex_digits_needed (
- acpi_integer value,
- u32 base);
+ acpi_integer value,
+ u32 base);
void
acpi_ex_eisa_id_to_string (
- u32 numeric_id,
- char *out_string);
+ u32 numeric_id,
+ char *out_string);
void
acpi_ex_unsigned_integer_to_string (
- acpi_integer value,
- char *out_string);
+ acpi_integer value,
+ char *out_string);
/*
acpi_status
acpi_ex_system_memory_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_system_io_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_pci_config_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_cmos_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_pci_bar_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_embedded_controller_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_sm_bus_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_data_table_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
#endif /* __INTERP_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
-typedef void* acpi_mutex;
-typedef u32 acpi_mutex_handle;
+typedef void * acpi_mutex;
+typedef u32 acpi_mutex_handle;
/* Total number of aml opcodes defined */
/* Names for the mutexes used in the subsystem */
-static char *acpi_gbl_mutex_names[] =
+static char *acpi_gbl_mutex_names[] =
{
"ACPI_MTX_Execute",
"ACPI_MTX_Interpreter",
/* Table for the global mutexes */
-typedef struct acpi_mutex_info
+struct acpi_mutex_info
{
- acpi_mutex mutex;
- u32 use_count;
- u32 owner_id;
-
-} acpi_mutex_info;
+ acpi_mutex mutex;
+ u32 use_count;
+ u32 owner_id;
+};
/* This owner ID means that the mutex is not in use (unlocked) */
#define ACPI_MTX_LOCK 1
-typedef u16 acpi_owner_id;
+typedef u16 acpi_owner_id;
#define ACPI_OWNER_TYPE_TABLE 0x0
#define ACPI_OWNER_TYPE_METHOD 0x1
#define ACPI_FIRST_METHOD_ID 0x0000
* be the first byte in this structure.
*/
-typedef union acpi_name_union
+union acpi_name_union
{
- u32 integer;
- char ascii[4];
-} acpi_name_union;
+ u32 integer;
+ char ascii[4];
+};
-typedef struct acpi_node
+struct acpi_namespace_node
{
- u8 descriptor; /* Used to differentiate object descriptor types */
- u8 type; /* Type associated with this name */
- u16 owner_id;
- acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
+ u8 descriptor; /* Used to differentiate object descriptor types */
+ u8 type; /* Type associated with this name */
+ u16 owner_id;
+ union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
- union acpi_operand_obj *object; /* Pointer to attached ACPI object (optional) */
- struct acpi_node *child; /* first child */
- struct acpi_node *peer; /* Next peer*/
- u16 reference_count; /* Current count of references and children */
- u8 flags;
-
-} acpi_namespace_node;
+ union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */
+ struct acpi_namespace_node *child; /* first child */
+ struct acpi_namespace_node *peer; /* Next peer*/
+ u16 reference_count; /* Current count of references and children */
+ u8 flags;
+};
#define ACPI_ENTRY_NOT_FOUND NULL
/*
* ACPI Table Descriptor. One per ACPI table
*/
-typedef struct acpi_table_desc
-{
- struct acpi_table_desc *prev;
- struct acpi_table_desc *next;
- struct acpi_table_desc *installed_desc;
- acpi_table_header *pointer;
- u8 *aml_start;
- u64 physical_address;
- u32 aml_length;
- acpi_size length;
- u32 count;
- acpi_owner_id table_id;
- u8 type;
- u8 allocation;
- u8 loaded_into_namespace;
-
-} acpi_table_desc;
+struct acpi_table_desc
+{
+ struct acpi_table_desc *prev;
+ struct acpi_table_desc *next;
+ struct acpi_table_desc *installed_desc;
+ struct acpi_table_header *pointer;
+ u8 *aml_start;
+ u64 physical_address;
+ u32 aml_length;
+ acpi_size length;
+ u32 count;
+ acpi_owner_id table_id;
+ u8 type;
+ u8 allocation;
+ u8 loaded_into_namespace;
+};
-typedef struct
+struct acpi_find_context
{
- char *search_for;
- acpi_handle *list;
- u32 *count;
-
-} acpi_find_context;
+ char *search_for;
+ acpi_handle *list;
+ u32 *count;
+};
-typedef struct
+struct acpi_ns_search_data
{
- acpi_namespace_node *node;
-} acpi_ns_search_data;
+ struct acpi_namespace_node *node;
+};
/*
* Predefined Namespace items
*/
-typedef struct
+struct acpi_predefined_names
{
- char *name;
- u8 type;
- char *val;
-
-} acpi_predefined_names;
+ char *name;
+ u8 type;
+ char *val;
+};
/* Object types used during package copies */
/* Info structure used to convert external<->internal namestrings */
-typedef struct acpi_namestring_info
+struct acpi_namestring_info
{
- char *external_name;
- char *next_external_char;
- char *internal_name;
- u32 length;
- u32 num_segments;
- u32 num_carats;
- u8 fully_qualified;
-
-} acpi_namestring_info;
+ char *external_name;
+ char *next_external_char;
+ char *internal_name;
+ u32 length;
+ u32 num_segments;
+ u32 num_carats;
+ u8 fully_qualified;
+};
/* Field creation info */
-typedef struct
-{
- acpi_namespace_node *region_node;
- acpi_namespace_node *field_node;
- acpi_namespace_node *register_node;
- acpi_namespace_node *data_register_node;
- u32 bank_value;
- u32 field_bit_position;
- u32 field_bit_length;
- u8 field_flags;
- u8 attribute;
- u8 field_type;
-
-} acpi_create_field_info;
+struct acpi_create_field_info
+{
+ struct acpi_namespace_node *region_node;
+ struct acpi_namespace_node *field_node;
+ struct acpi_namespace_node *register_node;
+ struct acpi_namespace_node *data_register_node;
+ u32 bank_value;
+ u32 field_bit_position;
+ u32 field_bit_length;
+ u8 field_flags;
+ u8 attribute;
+ u8 field_type;
+};
/*****************************************************************************
/* Information about each GPE register block */
-typedef struct
+struct acpi_gpe_block_info
{
- acpi_generic_address *block_address;
- u16 register_count;
- u8 block_base_number;
-
-} acpi_gpe_block_info;
+ struct acpi_generic_address *block_address;
+ u16 register_count;
+ u8 block_base_number;
+};
/* Information about a particular GPE register pair */
-typedef struct
+struct acpi_gpe_register_info
{
- acpi_generic_address status_address; /* Address of status reg */
- acpi_generic_address enable_address; /* Address of enable reg */
- u8 status; /* Current value of status reg */
- u8 enable; /* Current value of enable reg */
- u8 wake_enable; /* Mask of bits to keep enabled when sleeping */
- u8 base_gpe_number; /* Base GPE number for this register */
-
-} acpi_gpe_register_info;
+ struct acpi_generic_address status_address; /* Address of status reg */
+ struct acpi_generic_address enable_address; /* Address of enable reg */
+ u8 status; /* Current value of status reg */
+ u8 enable; /* Current value of enable reg */
+ u8 wake_enable; /* Mask of bits to keep enabled when sleeping */
+ u8 base_gpe_number; /* Base GPE number for this register */
+};
#define ACPI_GPE_LEVEL_TRIGGERED 1
/* Information about each particular GPE level */
-typedef struct
+struct acpi_gpe_number_info
{
- acpi_namespace_node *method_node; /* Method node for this GPE level */
- acpi_gpe_handler handler; /* Address of handler, if any */
- void *context; /* Context to be passed to handler */
- u8 type; /* Level or Edge */
- u8 bit_mask;
-
-
-} acpi_gpe_number_info;
+ struct acpi_namespace_node *method_node; /* Method node for this GPE level */
+ acpi_gpe_handler handler; /* Address of handler, if any */
+ void *context; /* Context to be passed to handler */
+ u8 type; /* Level or Edge */
+ u8 bit_mask;
+};
-typedef struct
+struct acpi_gpe_index_info
{
- u8 number_index;
-
-} acpi_gpe_index_info;
+ u8 number_index;
+};
/* Information about each particular fixed event */
-typedef struct
+struct acpi_fixed_event_handler
{
- acpi_event_handler handler; /* Address of handler. */
- void *context; /* Context to be passed to handler */
-
-} acpi_fixed_event_handler;
+ acpi_event_handler handler; /* Address of handler. */
+ void *context; /* Context to be passed to handler */
+};
-typedef struct
+struct acpi_fixed_event_info
{
- u8 status_register_id;
- u8 enable_register_id;
- u16 status_bit_mask;
- u16 enable_bit_mask;
-
-} acpi_fixed_event_info;
+ u8 status_register_id;
+ u8 enable_register_id;
+ u16 status_bit_mask;
+ u16 enable_bit_mask;
+};
/* Information used during field processing */
-typedef struct
+struct acpi_field_info
{
- u8 skip_field;
- u8 field_flag;
- u32 pkg_length;
-
-} acpi_field_info;
+ u8 skip_field;
+ u8 field_flag;
+ u32 pkg_length;
+};
/*****************************************************************************
/* Forward declarations */
-struct acpi_walk_state;
+struct acpi_walk_state ;
struct acpi_obj_mutex;
-union acpi_parse_obj;
+union acpi_parse_object ;
#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
- u8 data_type; /* To differentiate various internal objs */\
- u8 flags; \
- u16 value; \
- u16 state; \
- u16 reserved; \
- void *next; \
+ u8 data_type; /* To differentiate various internal objs */\
+ u8 flags; \
+ u16 value; \
+ u16 state; \
+ u16 reserved; \
+ void *next; \
-typedef struct acpi_common_state
+struct acpi_common_state
{
ACPI_STATE_COMMON
-} acpi_common_state;
+};
/*
* Update state - used to traverse complex objects such as packages
*/
-typedef struct acpi_update_state
+struct acpi_update_state
{
ACPI_STATE_COMMON
- union acpi_operand_obj *object;
-
-} acpi_update_state;
+ union acpi_operand_object *object;
+};
/*
* Pkg state - used to traverse nested package structures
*/
-typedef struct acpi_pkg_state
+struct acpi_pkg_state
{
ACPI_STATE_COMMON
- union acpi_operand_obj *source_object;
- union acpi_operand_obj *dest_object;
- struct acpi_walk_state *walk_state;
- void *this_target_obj;
- u32 num_packages;
- u16 index;
-
-} acpi_pkg_state;
+ union acpi_operand_object *source_object;
+ union acpi_operand_object *dest_object;
+ struct acpi_walk_state *walk_state;
+ void *this_target_obj;
+ u32 num_packages;
+ u16 index;
+};
/*
* Control state - one per if/else and while constructs.
* Allows nesting of these constructs
*/
-typedef struct acpi_control_state
+struct acpi_control_state
{
ACPI_STATE_COMMON
- union acpi_parse_obj *predicate_op;
- u8 *aml_predicate_start; /* Start of if/while predicate */
- u8 *package_end; /* End of if/while block */
- u16 opcode;
-
-} acpi_control_state;
+ union acpi_parse_object *predicate_op;
+ u8 *aml_predicate_start; /* Start of if/while predicate */
+ u8 *package_end; /* End of if/while block */
+ u16 opcode;
+};
/*
* Scope state - current scope during namespace lookups
*/
-typedef struct acpi_scope_state
+struct acpi_scope_state
{
ACPI_STATE_COMMON
- acpi_namespace_node *node;
-
-} acpi_scope_state;
+ struct acpi_namespace_node *node;
+};
-typedef struct acpi_pscope_state
+struct acpi_pscope_state
{
ACPI_STATE_COMMON
- union acpi_parse_obj *op; /* current op being parsed */
- u8 *arg_end; /* current argument end */
- u8 *pkg_end; /* current package end */
- u32 arg_list; /* next argument to parse */
- u32 arg_count; /* Number of fixed arguments */
-
-} acpi_pscope_state;
+ union acpi_parse_object *op; /* current op being parsed */
+ u8 *arg_end; /* current argument end */
+ u8 *pkg_end; /* current package end */
+ u32 arg_list; /* next argument to parse */
+ u32 arg_count; /* Number of fixed arguments */
+};
/*
* Thread state - one per thread across multiple walk states. Multiple walk
* states are created when there are nested control methods executing.
*/
-typedef struct acpi_thread_state
+struct acpi_thread_state
{
ACPI_STATE_COMMON
- struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
- union acpi_operand_obj *acquired_mutex_list; /* List of all currently acquired mutexes */
- u32 thread_id; /* Running thread ID */
- u16 current_sync_level; /* Mutex Sync (nested acquire) level */
-
-} acpi_thread_state;
+ struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
+ union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
+ u32 thread_id; /* Running thread ID */
+ u16 current_sync_level; /* Mutex Sync (nested acquire) level */
+};
/*
* Result values - used to accumulate the results of nested
* AML arguments
*/
-typedef struct acpi_result_values
+struct acpi_result_values
{
ACPI_STATE_COMMON
- union acpi_operand_obj *obj_desc [ACPI_OBJ_NUM_OPERANDS];
- u8 num_results;
- u8 last_insert;
-
-} acpi_result_values;
+ union acpi_operand_object *obj_desc [ACPI_OBJ_NUM_OPERANDS];
+ u8 num_results;
+ u8 last_insert;
+};
typedef
acpi_status (*acpi_parse_downwards) (
- struct acpi_walk_state *walk_state,
- union acpi_parse_obj **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
typedef
acpi_status (*acpi_parse_upwards) (
- struct acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
* Notify info - used to pass info to the deferred notify
* handler/dispatcher.
*/
-typedef struct acpi_notify_info
+struct acpi_notify_info
{
ACPI_STATE_COMMON
- acpi_namespace_node *node;
- union acpi_operand_obj *handler_obj;
-
-} acpi_notify_info;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *handler_obj;
+};
/* Generic state is union of structs above */
-typedef union acpi_gen_state
-{
- acpi_common_state common;
- acpi_control_state control;
- acpi_update_state update;
- acpi_scope_state scope;
- acpi_pscope_state parse_scope;
- acpi_pkg_state pkg;
- acpi_thread_state thread;
- acpi_result_values results;
- acpi_notify_info notify;
-
-} acpi_generic_state;
+union acpi_generic_state
+{
+ struct acpi_common_state common;
+ struct acpi_control_state control;
+ struct acpi_update_state update;
+ struct acpi_scope_state scope;
+ struct acpi_pscope_state parse_scope;
+ struct acpi_pkg_state pkg;
+ struct acpi_thread_state thread;
+ struct acpi_result_values results;
+ struct acpi_notify_info notify;
+};
/*****************************************************************************
typedef
acpi_status (*ACPI_EXECUTE_OP) (
- struct acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*****************************************************************************
/*
* AML opcode, name, and argument layout
*/
-typedef struct acpi_opcode_info
+struct acpi_opcode_info
{
#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
- char *name; /* Opcode name (disassembler/debug only) */
+ char *name; /* Opcode name (disassembler/debug only) */
#endif
- u32 parse_args; /* Grammar/Parse time arguments */
- u32 runtime_args; /* Interpret time arguments */
- u32 flags; /* Misc flags */
- u8 object_type; /* Corresponding internal object type */
- u8 class; /* Opcode class */
- u8 type; /* Opcode type */
-
-} acpi_opcode_info;
+ u32 parse_args; /* Grammar/Parse time arguments */
+ u32 runtime_args; /* Interpret time arguments */
+ u32 flags; /* Misc flags */
+ u8 object_type; /* Corresponding internal object type */
+ u8 class; /* Opcode class */
+ u8 type; /* Opcode type */
+};
-typedef union acpi_parse_val
+union acpi_parse_value
{
- acpi_integer integer; /* integer constant (Up to 64 bits) */
- uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
- u32 integer32; /* integer constant, 32 bits only */
- u16 integer16; /* integer constant, 16 bits only */
- u8 integer8; /* integer constant, 8 bits only */
- u32 size; /* bytelist or field size */
- char *string; /* NULL terminated string */
- u8 *buffer; /* buffer or string */
- char *name; /* NULL terminated string */
- union acpi_parse_obj *arg; /* arguments and contained ops */
-
-} acpi_parse_value;
+ acpi_integer integer; /* integer constant (Up to 64 bits) */
+ struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
+ u32 integer32; /* integer constant, 32 bits only */
+ u16 integer16; /* integer constant, 16 bits only */
+ u8 integer8; /* integer constant, 8 bits only */
+ u32 size; /* bytelist or field size */
+ char *string; /* NULL terminated string */
+ u8 *buffer; /* buffer or string */
+ char *name; /* NULL terminated string */
+ union acpi_parse_object *arg; /* arguments and contained ops */
+};
#define ACPI_PARSE_COMMON \
- u8 data_type; /* To differentiate various internal objs */\
- u8 flags; /* Type of Op */\
- u16 aml_opcode; /* AML opcode */\
- u32 aml_offset; /* offset of declaration in AML */\
- union acpi_parse_obj *parent; /* parent op */\
- union acpi_parse_obj *next; /* next op */\
+ u8 data_type; /* To differentiate various internal objs */\
+ u8 flags; /* Type of Op */\
+ u16 aml_opcode; /* AML opcode */\
+ u32 aml_offset; /* offset of declaration in AML */\
+ union acpi_parse_object *parent; /* parent op */\
+ union acpi_parse_object *next; /* next op */\
ACPI_DISASM_ONLY_MEMBERS (\
- u8 disasm_flags; /* Used during AML disassembly */\
- u8 disasm_opcode; /* Subtype used for disassembly */\
- char aml_op_name[16]) /* op name (debug only) */\
- /* NON-DEBUG members below: */\
- acpi_namespace_node *node; /* for use by interpreter */\
- acpi_parse_value value; /* Value or args associated with the opcode */\
+ u8 disasm_flags; /* Used during AML disassembly */\
+ u8 disasm_opcode; /* Subtype used for disassembly */\
+ char aml_op_name[16]) /* op name (debug only) */\
+ /* NON-DEBUG members below: */\
+ struct acpi_namespace_node *node; /* for use by interpreter */\
+ union acpi_parse_value value; /* Value or args associated with the opcode */\
+
#define ACPI_DASM_BUFFER 0x00
#define ACPI_DASM_RESOURCE 0x01
/*
* generic operation (for example: If, While, Store)
*/
-typedef struct acpi_parseobj_common
+struct acpi_parse_obj_common
{
ACPI_PARSE_COMMON
-} acpi_parse_obj_common;
+};
/*
* Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions),
* and bytelists.
*/
-typedef struct acpi_parseobj_named
+struct acpi_parse_obj_named
{
ACPI_PARSE_COMMON
- u8 *path;
- u8 *data; /* AML body or bytelist data */
- u32 length; /* AML length */
- u32 name; /* 4-byte name or zero if no name */
-
-} acpi_parse_obj_named;
+ u8 *path;
+ u8 *data; /* AML body or bytelist data */
+ u32 length; /* AML length */
+ u32 name; /* 4-byte name or zero if no name */
+};
/* The parse node is the fundamental element of the parse tree */
-typedef struct acpi_parseobj_asl
+struct acpi_parse_obj_asl
{
ACPI_PARSE_COMMON
-
- union acpi_parse_obj *child;
-
-
- union acpi_parse_obj *parent_method;
- char *filename;
- char *external_name;
- char *namepath;
- char name_seg[4];
- u32 extra_value;
- u32 column;
- u32 line_number;
- u32 logical_line_number;
- u32 logical_byte_offset;
- u32 end_line;
- u32 end_logical_line;
- u32 acpi_btype;
- u32 aml_length;
- u32 aml_subtree_length;
- u32 final_aml_length;
- u32 final_aml_offset;
- u32 compile_flags;
- u16 parse_opcode;
- u8 aml_opcode_length;
- u8 aml_pkg_len_bytes;
- u8 extra;
- char parse_op_name[12];
-
-} acpi_parse_obj_asl;
+ union acpi_parse_object *child;
+ union acpi_parse_object *parent_method;
+ char *filename;
+ char *external_name;
+ char *namepath;
+ char name_seg[4];
+ u32 extra_value;
+ u32 column;
+ u32 line_number;
+ u32 logical_line_number;
+ u32 logical_byte_offset;
+ u32 end_line;
+ u32 end_logical_line;
+ u32 acpi_btype;
+ u32 aml_length;
+ u32 aml_subtree_length;
+ u32 final_aml_length;
+ u32 final_aml_offset;
+ u32 compile_flags;
+ u16 parse_opcode;
+ u8 aml_opcode_length;
+ u8 aml_pkg_len_bytes;
+ u8 extra;
+ char parse_op_name[12];
+};
-typedef union acpi_parse_obj
+union acpi_parse_object
{
- acpi_parse_obj_common common;
- acpi_parse_obj_named named;
- acpi_parse_obj_asl asl;
-
-} acpi_parse_object;
+ struct acpi_parse_obj_common common;
+ struct acpi_parse_obj_named named;
+ struct acpi_parse_obj_asl asl;
+};
/*
* Parse state - one state per parser invocation and each control
* method.
*/
-typedef struct acpi_parse_state
-{
- u32 aml_size;
- u8 *aml_start; /* first AML byte */
- u8 *aml; /* next AML byte */
- u8 *aml_end; /* (last + 1) AML byte */
- u8 *pkg_start; /* current package begin */
- u8 *pkg_end; /* current package end */
- union acpi_parse_obj *start_op; /* root of parse tree */
- struct acpi_node *start_node;
- union acpi_gen_state *scope; /* current scope */
- union acpi_parse_obj *start_scope;
-
-} acpi_parse_state;
+struct acpi_parse_state
+{
+ u32 aml_size;
+ u8 *aml_start; /* first AML byte */
+ u8 *aml; /* next AML byte */
+ u8 *aml_end; /* (last + 1) AML byte */
+ u8 *pkg_start; /* current package begin */
+ u8 *pkg_end; /* current package end */
+ union acpi_parse_object *start_op; /* root of parse tree */
+ struct acpi_namespace_node *start_node;
+ union acpi_generic_state *scope; /* current scope */
+ union acpi_parse_object *start_scope;
+};
/* Parse object flags */
#define PCI_ROOT_HID_STRING "PNP0A03"
-typedef struct
+struct acpi_bit_register_info
{
- u8 parent_register;
- u8 bit_position;
- u16 access_bit_mask;
-
-} acpi_bit_register_info;
+ u8 parent_register;
+ u8 bit_position;
+ u16 access_bit_mask;
+};
/*
#define ACPI_DEVICE_ID_LENGTH 0x09
-typedef struct
+struct acpi_device_id
{
- char buffer[ACPI_DEVICE_ID_LENGTH];
-
-} acpi_device_id;
+ char buffer[ACPI_DEVICE_ID_LENGTH];
+};
/*****************************************************************************
*
****************************************************************************/
-typedef struct dbmethodinfo
+struct acpi_db_method_info
{
- acpi_handle thread_gate;
- char *name;
- char **args;
- u32 flags;
- u32 num_loops;
- char pathname[128];
+ acpi_handle thread_gate;
+ char *name;
+ char **args;
+ u32 flags;
+ u32 num_loops;
+ char pathname[128];
+};
-} acpi_db_method_info;
+struct acpi_integrity_info
+{
+ u32 nodes;
+ u32 objects;
+};
#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
*
****************************************************************************/
-typedef struct
+struct acpi_debug_print_info
{
- u32 component_id;
- char *proc_name;
- char *module_name;
-
-} acpi_debug_print_info;
+ u32 component_id;
+ char *proc_name;
+ char *module_name;
+};
/* Entry for a memory allocation (debug only) */
#define ACPI_MAX_MODULE_NAME 16
#define ACPI_COMMON_DEBUG_MEM_HEADER \
- struct acpi_debug_mem_block *previous; \
- struct acpi_debug_mem_block *next; \
- u32 size; \
- u32 component; \
- u32 line; \
- char module[ACPI_MAX_MODULE_NAME]; \
- u8 alloc_type;
+ struct acpi_debug_mem_block *previous; \
+ struct acpi_debug_mem_block *next; \
+ u32 size; \
+ u32 component; \
+ u32 line; \
+ char module[ACPI_MAX_MODULE_NAME]; \
+ u8 alloc_type;
-typedef struct
+struct acpi_debug_mem_header
{
ACPI_COMMON_DEBUG_MEM_HEADER
+};
-} acpi_debug_mem_header;
-
-typedef struct acpi_debug_mem_block
+struct acpi_debug_mem_block
{
ACPI_COMMON_DEBUG_MEM_HEADER
- u64 user_space;
-
-} acpi_debug_mem_block;
+ u64 user_space;
+};
#define ACPI_MEM_LIST_GLOBAL 0
#define ACPI_NUM_MEM_LISTS 7
-typedef struct
+struct acpi_memory_list
{
- void *list_head;
- u16 link_offset;
- u16 max_cache_depth;
- u16 cache_depth;
- u16 object_size;
+ void *list_head;
+ u16 link_offset;
+ u16 max_cache_depth;
+ u16 cache_depth;
+ u16 object_size;
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
/* Statistics for debug memory tracking only */
- u32 total_allocated;
- u32 total_freed;
- u32 current_total_size;
- u32 cache_requests;
- u32 cache_hits;
- char *list_name;
+ u32 total_allocated;
+ u32 total_freed;
+ u32 current_total_size;
+ u32 cache_requests;
+ u32 cache_hits;
+ char *list_name;
#endif
-
-} acpi_memory_list;
+};
#endif /* __ACLOCAL_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Full 64-bit address/integer on both 32-bit and 64-bit platforms
*/
#define ACPI_LODWORD(l) ((u32)(u64)(l))
-#define ACPI_HIDWORD(l) ((u32)(((*(uint64_struct *)(void *)(&l))).hi))
+#define ACPI_HIDWORD(l) ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi))
#define ACPI_GET_ADDRESS(a) (a)
#define ACPI_STORE_ADDRESS(a,b) ((a)=(acpi_physical_address)(b))
#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
/*
- * An acpi_namespace_node * can appear in some contexts,
- * where a pointer to an acpi_operand_object can also
+ * An struct acpi_namespace_node * can appear in some contexts,
+ * where a pointer to an union acpi_operand_object can also
* appear. This macro is used to distinguish them.
*
* The "Descriptor" field is the first field in both structures.
*/
-#define ACPI_GET_DESCRIPTOR_TYPE(d) (((acpi_descriptor *)(void *)(d))->descriptor_id)
-#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((acpi_descriptor *)(void *)(d))->descriptor_id = t)
+#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->descriptor_id)
+#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->descriptor_id = t)
/* Macro to test the object type */
-#define ACPI_GET_OBJECT_TYPE(d) (((acpi_operand_object *)(void *)(d))->common.type)
+#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type)
/* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */
* as a local string ("_proc_name) so that it can be also used by the function exit macros below.
*/
-#define ACPI_FUNCTION_NAME(a) acpi_debug_print_info _dbg; \
+#define ACPI_FUNCTION_NAME(a) struct acpi_debug_print_info _dbg; \
_dbg.component_id = _COMPONENT; \
_dbg.proc_name = a; \
_dbg.module_name = _THIS_MODULE;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_init_one_device (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ns_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ns_walk_namespace (
- acpi_object_type type,
- acpi_handle start_object,
- u32 max_depth,
- u8 unlock_before_callback,
- acpi_walk_callback user_function,
- void *context,
- void **return_value);
-
-acpi_namespace_node *
+ acpi_object_type type,
+ acpi_handle start_object,
+ u32 max_depth,
+ u8 unlock_before_callback,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value);
+
+struct acpi_namespace_node *
acpi_ns_get_next_node (
- acpi_object_type type,
- acpi_namespace_node *parent,
- acpi_namespace_node *child);
+ acpi_object_type type,
+ struct acpi_namespace_node *parent,
+ struct acpi_namespace_node *child);
void
acpi_ns_delete_namespace_by_owner (
- u16 table_id);
+ u16 table_id);
/* Namespace loading - nsload */
acpi_status
acpi_ns_one_complete_parse (
- u32 pass_number,
- acpi_table_desc *table_desc);
+ u32 pass_number,
+ struct acpi_table_desc *table_desc);
acpi_status
acpi_ns_parse_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *scope);
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *scope);
acpi_status
acpi_ns_load_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *node);
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *node);
acpi_status
acpi_ns_load_table_by_type (
- acpi_table_type table_type);
+ acpi_table_type table_type);
/*
acpi_status
acpi_ns_lookup (
- acpi_generic_state *scope_info,
- char *name,
- acpi_object_type type,
- acpi_interpreter_mode interpreter_mode,
- u32 flags,
- acpi_walk_state *walk_state,
- acpi_namespace_node **ret_node);
+ union acpi_generic_state *scope_info,
+ char *name,
+ acpi_object_type type,
+ acpi_interpreter_mode interpreter_mode,
+ u32 flags,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **ret_node);
/*
* Named object allocation/deallocation - nsalloc
*/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_create_node (
- u32 name);
+ u32 name);
void
acpi_ns_delete_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_ns_delete_namespace_subtree (
- acpi_namespace_node *parent_handle);
+ struct acpi_namespace_node *parent_handle);
void
acpi_ns_detach_object (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_ns_delete_children (
- acpi_namespace_node *parent);
+ struct acpi_namespace_node *parent);
int
acpi_ns_compare_names (
- char *name1,
- char *name2);
+ char *name1,
+ char *name2);
/*
* Namespace modification - nsmodify
acpi_status
acpi_ns_unload_namespace (
- acpi_handle handle);
+ acpi_handle handle);
acpi_status
acpi_ns_delete_subtree (
- acpi_handle start_handle);
+ acpi_handle start_handle);
/*
void
acpi_ns_dump_tables (
- acpi_handle search_base,
- u32 max_depth);
+ acpi_handle search_base,
+ u32 max_depth);
void
acpi_ns_dump_entry (
- acpi_handle handle,
- u32 debug_level);
+ acpi_handle handle,
+ u32 debug_level);
void
acpi_ns_dump_pathname (
- acpi_handle handle,
- char *msg,
- u32 level,
- u32 component);
+ acpi_handle handle,
+ char *msg,
+ u32 level,
+ u32 component);
void
acpi_ns_print_pathname (
- u32 num_segments,
- char *pathname);
+ u32 num_segments,
+ char *pathname);
acpi_status
acpi_ns_dump_one_device (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
void
acpi_ns_dump_root_devices (
acpi_status
acpi_ns_dump_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
void
acpi_ns_dump_objects (
- acpi_object_type type,
- u8 display_type,
- u32 max_depth,
- u32 ownder_id,
- acpi_handle start_handle);
+ acpi_object_type type,
+ u8 display_type,
+ u32 max_depth,
+ u32 ownder_id,
+ acpi_handle start_handle);
/*
acpi_status
acpi_ns_evaluate_by_handle (
- acpi_namespace_node *prefix_node,
- acpi_operand_object **params,
- acpi_operand_object **return_object);
+ struct acpi_namespace_node *prefix_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object);
acpi_status
acpi_ns_evaluate_by_name (
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object);
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object);
acpi_status
acpi_ns_evaluate_relative (
- acpi_namespace_node *prefix_node,
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object);
+ struct acpi_namespace_node *prefix_node,
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object);
acpi_status
acpi_ns_execute_control_method (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc);
acpi_status
acpi_ns_get_object_value (
- acpi_namespace_node *object_node,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *object_node,
+ union acpi_operand_object **return_obj_desc);
/*
acpi_name
acpi_ns_find_parent_name (
- acpi_namespace_node *node_to_search);
+ struct acpi_namespace_node *node_to_search);
/*
u32
acpi_ns_opens_scope (
- acpi_object_type type);
+ acpi_object_type type);
void
acpi_ns_build_external_path (
- acpi_namespace_node *node,
- acpi_size size,
- char *name_buffer);
+ struct acpi_namespace_node *node,
+ acpi_size size,
+ char *name_buffer);
char *
acpi_ns_get_external_pathname (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
char *
acpi_ns_name_of_current_scope (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ns_handle_to_pathname (
- acpi_handle target_handle,
- acpi_buffer *buffer);
+ acpi_handle target_handle,
+ struct acpi_buffer *buffer);
u8
acpi_ns_pattern_match (
- acpi_namespace_node *obj_node,
- char *search_for);
+ struct acpi_namespace_node *obj_node,
+ char *search_for);
acpi_status
acpi_ns_get_node_by_path (
- char *external_pathname,
- acpi_namespace_node *in_prefix_node,
- u32 flags,
- acpi_namespace_node **out_node);
+ char *external_pathname,
+ struct acpi_namespace_node *in_prefix_node,
+ u32 flags,
+ struct acpi_namespace_node **out_node);
acpi_size
acpi_ns_get_pathname_length (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
/*
acpi_status
acpi_ns_attach_object (
- acpi_namespace_node *node,
- acpi_operand_object *object,
- acpi_object_type type);
+ struct acpi_namespace_node *node,
+ union acpi_operand_object *object,
+ acpi_object_type type);
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_attached_object (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_secondary_object (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ns_attach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void *data);
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void *data);
acpi_status
acpi_ns_detach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler);
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler);
acpi_status
acpi_ns_get_attached_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void **data);
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void **data);
/*
acpi_status
acpi_ns_search_and_enter (
- u32 entry_name,
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_interpreter_mode interpreter_mode,
- acpi_object_type type,
- u32 flags,
- acpi_namespace_node **ret_node);
+ u32 entry_name,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ acpi_interpreter_mode interpreter_mode,
+ acpi_object_type type,
+ u32 flags,
+ struct acpi_namespace_node **ret_node);
acpi_status
acpi_ns_search_node (
- u32 entry_name,
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_namespace_node **ret_node);
+ u32 entry_name,
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_namespace_node **ret_node);
void
acpi_ns_install_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *parent_node,
- acpi_namespace_node *node,
- acpi_object_type type);
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *parent_node,
+ struct acpi_namespace_node *node,
+ acpi_object_type type);
/*
u8
acpi_ns_valid_root_prefix (
- char prefix);
+ char prefix);
u8
acpi_ns_valid_path_separator (
- char sep);
+ char sep);
acpi_object_type
acpi_ns_get_type (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
u32
acpi_ns_local (
- acpi_object_type type);
+ acpi_object_type type);
void
acpi_ns_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *internal_name,
- acpi_status lookup_status);
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *internal_name,
+ acpi_status lookup_status);
void
acpi_ns_report_method_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *message,
- acpi_namespace_node *node,
- char *path,
- acpi_status lookup_status);
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *message,
+ struct acpi_namespace_node *node,
+ char *path,
+ acpi_status lookup_status);
void
acpi_ns_print_node_pathname (
- acpi_namespace_node *node,
- char *msg);
+ struct acpi_namespace_node *node,
+ char *msg);
acpi_status
acpi_ns_build_internal_name (
- acpi_namestring_info *info);
+ struct acpi_namestring_info *info);
void
acpi_ns_get_internal_name_length (
- acpi_namestring_info *info);
+ struct acpi_namestring_info *info);
acpi_status
acpi_ns_internalize_name (
- char *dotted_name,
- char **converted_name);
+ char *dotted_name,
+ char **converted_name);
acpi_status
acpi_ns_externalize_name (
- u32 internal_name_length,
- char *internal_name,
- u32 *converted_name_length,
- char **converted_name);
+ u32 internal_name_length,
+ char *internal_name,
+ u32 *converted_name_length,
+ char **converted_name);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_map_handle_to_node (
- acpi_handle handle);
+ acpi_handle handle);
acpi_handle
acpi_ns_convert_entry_to_handle(
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_ns_terminate (
void);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_parent_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_next_valid_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
#endif /* __ACNAMESP_H__ */
/******************************************************************************
*
- * Name: acobject.h - Definition of acpi_operand_object (Internal object only)
+ * Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
*
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * The acpi_operand_object is used to pass AML operands from the dispatcher
+ * The union acpi_operand_object is used to pass AML operands from the dispatcher
* to the interpreter, and to keep track of the various handlers such as
* address space handlers and notify handlers. The object is a constant
* size in order to allow it to be cached and reused.
* data_type is used to differentiate between internal descriptors, and MUST
* be the first byte in this structure.
*/
-#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
- u8 descriptor; /* To differentiate various internal objs */\
- u8 type; /* acpi_object_type */\
- u16 reference_count; /* For object deletion management */\
- union acpi_operand_obj *next_object; /* Objects linked to parent NS node */\
- u8 flags; \
+#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
+ u8 descriptor; /* To differentiate various internal objs */\
+ u8 type; /* acpi_object_type */\
+ u16 reference_count; /* For object deletion management */\
+ union acpi_operand_object *next_object; /* Objects linked to parent NS node */\
+ u8 flags; \
/* Values for flag byte above */
* "Field Datum" -- a datum from the actual field object
* "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
*/
-#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
- u8 field_flags; /* Access, update, and lock bits */\
- u8 attribute; /* From access_as keyword */\
- u8 access_byte_width; /* Read/Write size in bytes */\
- u32 bit_length; /* Length of field in bits */\
- u32 base_byte_offset; /* Byte offset within containing object */\
- u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
- u8 datum_valid_bits; /* Valid bit in first "Field datum" */\
- u8 end_field_valid_bits; /* Valid bits in the last "field datum" */\
- u8 end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
- u32 value; /* Value to store into the Bank or Index register */\
- acpi_namespace_node *node; /* Link back to parent node */
+#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
+ u8 field_flags; /* Access, update, and lock bits */\
+ u8 attribute; /* From access_as keyword */\
+ u8 access_byte_width; /* Read/Write size in bytes */\
+ u32 bit_length; /* Length of field in bits */\
+ u32 base_byte_offset; /* Byte offset within containing object */\
+ u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
+ u8 datum_valid_bits; /* Valid bit in first "Field datum" */\
+ u8 end_field_valid_bits; /* Valid bits in the last "field datum" */\
+ u8 end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
+ u32 value; /* Value to store into the Bank or Index register */\
+ struct acpi_namespace_node *node; /* Link back to parent node */
/*
* Fields common to both Strings and Buffers
*/
#define ACPI_COMMON_BUFFER_INFO \
- u32 length;
+ u32 length;
/*
* Common fields for objects that support ASL notifications
*/
#define ACPI_COMMON_NOTIFY_INFO \
- union acpi_operand_obj *sys_handler; /* Handler for system notifies */\
- union acpi_operand_obj *drv_handler; /* Handler for driver notifies */\
- union acpi_operand_obj *addr_handler; /* Handler for Address space */
+ union acpi_operand_object *sys_handler; /* Handler for system notifies */\
+ union acpi_operand_object *drv_handler; /* Handler for driver notifies */\
+ union acpi_operand_object *addr_handler; /* Handler for Address space */
/******************************************************************************
*
*****************************************************************************/
-typedef struct acpi_object_common
+struct acpi_object_common
{
ACPI_OBJECT_COMMON_HEADER
+};
-} acpi_object_common;
-
-typedef struct acpi_object_integer
+struct acpi_object_integer
{
ACPI_OBJECT_COMMON_HEADER
+ acpi_integer value;
+};
- acpi_integer value;
-
-} acpi_object_integer;
-
-typedef struct acpi_object_string /* Null terminated, ASCII characters only */
+struct acpi_object_string /* Null terminated, ASCII characters only */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_BUFFER_INFO
- char *pointer; /* String in AML stream or allocated string */
-
-} acpi_object_string;
+ char *pointer; /* String in AML stream or allocated string */
+};
-typedef struct acpi_object_buffer
+struct acpi_object_buffer
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_BUFFER_INFO
- u8 *pointer; /* Buffer in AML stream or allocated buffer */
- acpi_namespace_node *node; /* Link back to parent node */
- u8 *aml_start;
- u32 aml_length;
+ u8 *pointer; /* Buffer in AML stream or allocated buffer */
+ struct acpi_namespace_node *node; /* Link back to parent node */
+ u8 *aml_start;
+ u32 aml_length;
+};
-} acpi_object_buffer;
-
-typedef struct acpi_object_package
+struct acpi_object_package
{
ACPI_OBJECT_COMMON_HEADER
- u32 count; /* # of elements in package */
- u32 aml_length;
- u8 *aml_start;
- acpi_namespace_node *node; /* Link back to parent node */
- union acpi_operand_obj **elements; /* Array of pointers to acpi_objects */
-
-} acpi_object_package;
+ u32 count; /* # of elements in package */
+ u32 aml_length;
+ u8 *aml_start;
+ struct acpi_namespace_node *node; /* Link back to parent node */
+ union acpi_operand_object **elements; /* Array of pointers to acpi_objects */
+};
/******************************************************************************
*
*****************************************************************************/
-typedef struct acpi_object_event
+struct acpi_object_event
{
ACPI_OBJECT_COMMON_HEADER
- void *semaphore;
-
-} acpi_object_event;
+ void *semaphore;
+};
#define INFINITE_CONCURRENCY 0xFF
-typedef struct acpi_object_method
+struct acpi_object_method
{
ACPI_OBJECT_COMMON_HEADER
- u8 method_flags;
- u8 param_count;
-
- u32 aml_length;
-
- void *semaphore;
- u8 *aml_start;
-
- u8 concurrency;
- u8 thread_count;
- acpi_owner_id owning_id;
-
-} acpi_object_method;
-
-
-typedef struct acpi_object_mutex
+ u8 method_flags;
+ u8 param_count;
+ u32 aml_length;
+ void *semaphore;
+ u8 *aml_start;
+ u8 concurrency;
+ u8 thread_count;
+ acpi_owner_id owning_id;
+};
+
+
+struct acpi_object_mutex
{
ACPI_OBJECT_COMMON_HEADER
- u16 sync_level;
- u16 acquisition_depth;
+ u16 sync_level;
+ u16 acquisition_depth;
+ struct acpi_thread_state *owner_thread;
+ void *semaphore;
+ union acpi_operand_object *prev; /* Link for list of acquired mutexes */
+ union acpi_operand_object *next; /* Link for list of acquired mutexes */
+ struct acpi_namespace_node *node; /* containing object */
+};
- struct acpi_thread_state *owner_thread;
- void *semaphore;
- union acpi_operand_obj *prev; /* Link for list of acquired mutexes */
- union acpi_operand_obj *next; /* Link for list of acquired mutexes */
- acpi_namespace_node *node; /* containing object */
-} acpi_object_mutex;
-
-
-typedef struct acpi_object_region
+struct acpi_object_region
{
ACPI_OBJECT_COMMON_HEADER
- u8 space_id;
-
- union acpi_operand_obj *addr_handler; /* Handler for system notifies */
- acpi_namespace_node *node; /* containing object */
- union acpi_operand_obj *next;
- u32 length;
- acpi_physical_address address;
-
-} acpi_object_region;
+ u8 space_id;
+ union acpi_operand_object *addr_handler; /* Handler for system notifies */
+ struct acpi_namespace_node *node; /* containing object */
+ union acpi_operand_object *next;
+ u32 length;
+ acpi_physical_address address;
+};
/******************************************************************************
*
*****************************************************************************/
-typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
+struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
+};
-} acpi_object_notify_common;
-
-typedef struct acpi_object_device
+struct acpi_object_device
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
-} acpi_object_device;
+};
-typedef struct acpi_object_power_resource
+struct acpi_object_power_resource
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
+ u32 system_level;
+ u32 resource_order;
+};
- u32 system_level;
- u32 resource_order;
-
-} acpi_object_power_resource;
-
-typedef struct acpi_object_processor
+struct acpi_object_processor
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
- u32 proc_id;
- u32 length;
- acpi_io_address address;
-
-} acpi_object_processor;
+ u32 proc_id;
+ u32 length;
+ acpi_io_address address;
+};
-typedef struct acpi_object_thermal_zone
+struct acpi_object_thermal_zone
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
-
-} acpi_object_thermal_zone;
+};
/******************************************************************************
*
*****************************************************************************/
-typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
+struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
- union acpi_operand_obj *region_obj; /* Containing Operation Region object */
- /* (REGION/BANK fields only) */
-} acpi_object_field_common;
+ union acpi_operand_object *region_obj; /* Containing Operation Region object */
+ /* (REGION/BANK fields only) */
+};
-typedef struct acpi_object_region_field
+struct acpi_object_region_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
- union acpi_operand_obj *region_obj; /* Containing op_region object */
-
-} acpi_object_region_field;
+ union acpi_operand_object *region_obj; /* Containing op_region object */
+};
-typedef struct acpi_object_bank_field
+struct acpi_object_bank_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
+ union acpi_operand_object *region_obj; /* Containing op_region object */
+ union acpi_operand_object *bank_obj; /* bank_select Register object */
+};
- union acpi_operand_obj *region_obj; /* Containing op_region object */
- union acpi_operand_obj *bank_obj; /* bank_select Register object */
-} acpi_object_bank_field;
-
-
-typedef struct acpi_object_index_field
+struct acpi_object_index_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
* No "region_obj" pointer needed since the Index and Data registers
* are each field definitions unto themselves.
*/
- union acpi_operand_obj *index_obj; /* Index register */
- union acpi_operand_obj *data_obj; /* Data register */
-
-
-} acpi_object_index_field;
+ union acpi_operand_object *index_obj; /* Index register */
+ union acpi_operand_object *data_obj; /* Data register */
+};
/* The buffer_field is different in that it is part of a Buffer, not an op_region */
-typedef struct acpi_object_buffer_field
+struct acpi_object_buffer_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
-
- union acpi_operand_obj *buffer_obj; /* Containing Buffer object */
-
-} acpi_object_buffer_field;
+ union acpi_operand_object *buffer_obj; /* Containing Buffer object */
+};
/******************************************************************************
*
*****************************************************************************/
-typedef struct acpi_object_notify_handler
+struct acpi_object_notify_handler
{
ACPI_OBJECT_COMMON_HEADER
-
- acpi_namespace_node *node; /* Parent device */
- acpi_notify_handler handler;
- void *context;
-
-} acpi_object_notify_handler;
+ struct acpi_namespace_node *node; /* Parent device */
+ acpi_notify_handler handler;
+ void *context;
+};
/* Flags for address handler */
#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1
-typedef struct acpi_object_addr_handler
+struct acpi_object_addr_handler
{
ACPI_OBJECT_COMMON_HEADER
-
- u8 space_id;
- u16 hflags;
- acpi_adr_space_handler handler;
-
- acpi_namespace_node *node; /* Parent device */
- void *context;
- acpi_adr_space_setup setup;
- union acpi_operand_obj *region_list; /* regions using this handler */
- union acpi_operand_obj *next;
-
-} acpi_object_addr_handler;
+ u8 space_id;
+ u16 hflags;
+ acpi_adr_space_handler handler;
+ struct acpi_namespace_node *node; /* Parent device */
+ void *context;
+ acpi_adr_space_setup setup;
+ union acpi_operand_object *region_list; /* regions using this handler */
+ union acpi_operand_object *next;
+};
/******************************************************************************
* The Reference object type is used for these opcodes:
* Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op
*/
-typedef struct acpi_object_reference
+struct acpi_object_reference
{
ACPI_OBJECT_COMMON_HEADER
-
- u8 target_type; /* Used for index_op */
- u16 opcode;
- u32 offset; /* Used for arg_op, local_op, and index_op */
-
- void *object; /* name_op=>HANDLE to obj, index_op=>acpi_operand_object */
- acpi_namespace_node *node;
- union acpi_operand_obj **where;
-
-} acpi_object_reference;
+ u8 target_type; /* Used for index_op */
+ u16 opcode;
+ u32 offset; /* Used for arg_op, local_op, and index_op */
+ void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
+ struct acpi_namespace_node *node;
+ union acpi_operand_object **where;
+};
/*
*
* Currently: Region and field_unit types
*/
-typedef struct acpi_object_extra
+struct acpi_object_extra
{
ACPI_OBJECT_COMMON_HEADER
- u8 byte_fill1;
- u16 word_fill1;
- u32 aml_length;
- u8 *aml_start;
- acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
- void *region_context; /* Region-specific data */
-
-} acpi_object_extra;
+ u8 byte_fill1;
+ u16 word_fill1;
+ u32 aml_length;
+ u8 *aml_start;
+ struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
+ void *region_context; /* Region-specific data */
+};
/* Additional data that can be attached to namespace nodes */
-typedef struct acpi_object_data
+struct acpi_object_data
{
ACPI_OBJECT_COMMON_HEADER
- acpi_object_handler handler;
- void *pointer;
-
-} acpi_object_data;
+ acpi_object_handler handler;
+ void *pointer;
+};
/* Structure used when objects are cached for reuse */
-typedef struct acpi_object_cache_list
+struct acpi_object_cache_list
{
ACPI_OBJECT_COMMON_HEADER
- union acpi_operand_obj *next; /* Link for object cache and internal lists*/
-
-} acpi_object_cache_list;
+ union acpi_operand_object *next; /* Link for object cache and internal lists*/
+};
/******************************************************************************
*
- * acpi_operand_object Descriptor - a giant union of all of the above
+ * union acpi_operand_object Descriptor - a giant union of all of the above
*
*****************************************************************************/
-typedef union acpi_operand_obj
+union acpi_operand_object
{
- acpi_object_common common;
-
- acpi_object_integer integer;
- acpi_object_string string;
- acpi_object_buffer buffer;
- acpi_object_package package;
-
- acpi_object_event event;
- acpi_object_method method;
- acpi_object_mutex mutex;
- acpi_object_region region;
-
- acpi_object_notify_common common_notify;
- acpi_object_device device;
- acpi_object_power_resource power_resource;
- acpi_object_processor processor;
- acpi_object_thermal_zone thermal_zone;
-
- acpi_object_field_common common_field;
- acpi_object_region_field field;
- acpi_object_buffer_field buffer_field;
- acpi_object_bank_field bank_field;
- acpi_object_index_field index_field;
-
- acpi_object_notify_handler notify_handler;
- acpi_object_addr_handler addr_handler;
-
- acpi_object_reference reference;
- acpi_object_extra extra;
- acpi_object_data data;
- acpi_object_cache_list cache;
-
-} acpi_operand_object;
+ struct acpi_object_common common;
+ struct acpi_object_integer integer;
+ struct acpi_object_string string;
+ struct acpi_object_buffer buffer;
+ struct acpi_object_package package;
+ struct acpi_object_event event;
+ struct acpi_object_method method;
+ struct acpi_object_mutex mutex;
+ struct acpi_object_region region;
+ struct acpi_object_notify_common common_notify;
+ struct acpi_object_device device;
+ struct acpi_object_power_resource power_resource;
+ struct acpi_object_processor processor;
+ struct acpi_object_thermal_zone thermal_zone;
+ struct acpi_object_field_common common_field;
+ struct acpi_object_region_field field;
+ struct acpi_object_buffer_field buffer_field;
+ struct acpi_object_bank_field bank_field;
+ struct acpi_object_index_field index_field;
+ struct acpi_object_notify_handler notify_handler;
+ struct acpi_object_addr_handler addr_handler;
+ struct acpi_object_reference reference;
+ struct acpi_object_extra extra;
+ struct acpi_object_data data;
+ struct acpi_object_cache_list cache;
+};
/******************************************************************************
*
- * acpi_descriptor - objects that share a common descriptor identifier
+ * union acpi_descriptor - objects that share a common descriptor identifier
*
*****************************************************************************/
/* Object descriptor types */
-#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
+#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
#define ACPI_DESC_TYPE_STATE 0x20
#define ACPI_DESC_TYPE_STATE_UPDATE 0x21
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x22
#define ACPI_DESC_TYPE_NAMED 0xAA
-typedef union acpi_desc
+union acpi_descriptor
{
- u8 descriptor_id; /* To differentiate various internal objs */\
- acpi_operand_object object;
- acpi_namespace_node node;
- acpi_parse_object op;
-
-} acpi_descriptor;
+ u8 descriptor_id; /* To differentiate various internal objs */\
+ union acpi_operand_object object;
+ struct acpi_namespace_node node;
+ union acpi_parse_object op;
+};
#endif /* _ACOBJECT_H */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_psx_load_table (
- u8 *pcode_addr,
- u32 pcode_length);
+ u8 *pcode_addr,
+ u32 pcode_length);
acpi_status
acpi_psx_execute (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc);
/******************************************************************************
u8 *
acpi_ps_get_next_package_end (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
u32
acpi_ps_get_next_package_length (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
char *
acpi_ps_get_next_namestring (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
void
acpi_ps_get_next_simple_arg (
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object *arg);
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object *arg);
acpi_status
acpi_ps_get_next_namepath (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- acpi_parse_object *arg,
- u8 method_call);
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *arg,
+ u8 method_call);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_next_field (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
acpi_status
acpi_ps_get_next_arg (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object **return_arg);
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object **return_arg);
/* psfind */
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_find_name (
- acpi_parse_object *scope,
- u32 name,
- u32 opcode);
+ union acpi_parse_object *scope,
+ u32 name,
+ u32 opcode);
-acpi_parse_object*
+union acpi_parse_object*
acpi_ps_get_parent (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
/* psopcode - AML Opcode information */
-const acpi_opcode_info *
+const struct acpi_opcode_info *
acpi_ps_get_opcode_info (
- u16 opcode);
+ u16 opcode);
char *
acpi_ps_get_opcode_name (
- u16 opcode);
+ u16 opcode);
/* psparse - top level parsing routines */
u32
acpi_ps_get_opcode_size (
- u32 opcode);
+ u32 opcode);
void
acpi_ps_complete_this_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ps_next_parse_state (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_status callback_status);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_status callback_status);
acpi_status
acpi_ps_find_object (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
void
acpi_ps_delete_parse_tree (
- acpi_parse_object *root);
+ union acpi_parse_object *root);
acpi_status
acpi_ps_parse_loop (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ps_parse_aml (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ps_parse_table (
- u8 *aml,
- u32 aml_size,
- acpi_parse_downwards descending_callback,
- acpi_parse_upwards ascending_callback,
- acpi_parse_object **root_object);
+ u8 *aml,
+ u32 aml_size,
+ acpi_parse_downwards descending_callback,
+ acpi_parse_upwards ascending_callback,
+ union acpi_parse_object **root_object);
u16
acpi_ps_peek_opcode (
- acpi_parse_state *state);
+ struct acpi_parse_state *state);
/* psscope - Scope stack management routines */
acpi_status
acpi_ps_init_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *root);
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *root);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_parent_scope (
- acpi_parse_state *state);
+ struct acpi_parse_state *state);
u8
acpi_ps_has_completed_scope (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
void
acpi_ps_pop_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object **op,
- u32 *arg_list,
- u32 *arg_count);
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object **op,
+ u32 *arg_list,
+ u32 *arg_count);
acpi_status
acpi_ps_push_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *op,
- u32 remaining_args,
- u32 arg_count);
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *op,
+ u32 remaining_args,
+ u32 arg_count);
void
acpi_ps_cleanup_scope (
- acpi_parse_state *state);
+ struct acpi_parse_state *state);
/* pstree - parse tree manipulation routines */
void
acpi_ps_append_arg(
- acpi_parse_object *op,
- acpi_parse_object *arg);
+ union acpi_parse_object *op,
+ union acpi_parse_object *arg);
-acpi_parse_object*
+union acpi_parse_object*
acpi_ps_find (
- acpi_parse_object *scope,
- char *path,
- u16 opcode,
- u32 create);
+ union acpi_parse_object *scope,
+ char *path,
+ u16 opcode,
+ u32 create);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_arg(
- acpi_parse_object *op,
- u32 argn);
+ union acpi_parse_object *op,
+ u32 argn);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_child (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_depth_next (
- acpi_parse_object *origin,
- acpi_parse_object *op);
+ union acpi_parse_object *origin,
+ union acpi_parse_object *op);
/* pswalk - parse tree walk routines */
acpi_status
acpi_ps_walk_parsed_aml (
- acpi_parse_object *start_op,
- acpi_parse_object *end_op,
- acpi_operand_object *mth_desc,
- acpi_namespace_node *start_node,
- acpi_operand_object **params,
- acpi_operand_object **caller_return_desc,
- acpi_owner_id owner_id,
- acpi_parse_downwards descending_callback,
- acpi_parse_upwards ascending_callback);
+ union acpi_parse_object *start_op,
+ union acpi_parse_object *end_op,
+ union acpi_operand_object *mth_desc,
+ struct acpi_namespace_node *start_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **caller_return_desc,
+ acpi_owner_id owner_id,
+ acpi_parse_downwards descending_callback,
+ acpi_parse_upwards ascending_callback);
acpi_status
acpi_ps_get_next_walk_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_parse_upwards ascending_callback);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_parse_upwards ascending_callback);
acpi_status
acpi_ps_delete_completed_op (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/* psutils - parser utilities */
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_create_scope_op (
void);
void
acpi_ps_init_op (
- acpi_parse_object *op,
- u16 opcode);
+ union acpi_parse_object *op,
+ u16 opcode);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_alloc_op (
- u16 opcode);
+ u16 opcode);
void
acpi_ps_free_op (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_ps_delete_parse_cache (
u8
acpi_ps_is_leading_char (
- u32 c);
+ u32 c);
u8
acpi_ps_is_prefix_char (
- u32 c);
+ u32 c);
u32
acpi_ps_get_name(
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_ps_set_name(
- acpi_parse_object *op,
- u32 name);
+ union acpi_parse_object *op,
+ u32 name);
/* psdump - display parser tree */
u32
acpi_ps_sprint_path (
- char *buffer_start,
- u32 buffer_size,
- acpi_parse_object *op);
+ char *buffer_start,
+ u32 buffer_size,
+ union acpi_parse_object *op);
u32
acpi_ps_sprint_op (
- char *buffer_start,
- u32 buffer_size,
- acpi_parse_object *op);
+ char *buffer_start,
+ u32 buffer_size,
+ union acpi_parse_object *op);
void
acpi_ps_show (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
#endif /* __ACPARSER_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define ACPI_SIGNAL_FATAL 0
#define ACPI_SIGNAL_BREAKPOINT 1
-typedef struct acpi_fatal_info
+struct acpi_signal_fatal_info
{
- u32 type;
- u32 code;
- u32 argument;
-
-} acpi_signal_fatal_info;
+ u32 type;
+ u32 code;
+ u32 argument;
+};
/*
typedef u32
(ACPI_SYSTEM_XFACE *OSD_HANDLER) (
- void *context);
+ void *context);
typedef void
(ACPI_SYSTEM_XFACE *OSD_EXECUTION_CALLBACK) (
- void *context);
+ void *context);
/*
acpi_status
acpi_os_get_root_pointer (
- u32 flags,
- acpi_pointer *address);
+ u32 flags,
+ struct acpi_pointer *address);
acpi_status
acpi_os_table_override (
- acpi_table_header *existing_table,
- acpi_table_header **new_table);
+ struct acpi_table_header *existing_table,
+ struct acpi_table_header **new_table);
/*
acpi_status
acpi_os_create_semaphore (
- u32 max_units,
- u32 initial_units,
- acpi_handle *out_handle);
+ u32 max_units,
+ u32 initial_units,
+ acpi_handle *out_handle);
acpi_status
acpi_os_delete_semaphore (
- acpi_handle handle);
+ acpi_handle handle);
acpi_status
acpi_os_wait_semaphore (
- acpi_handle handle,
- u32 units,
- u16 timeout);
+ acpi_handle handle,
+ u32 units,
+ u16 timeout);
acpi_status
acpi_os_signal_semaphore (
- acpi_handle handle,
- u32 units);
+ acpi_handle handle,
+ u32 units);
/*
void *
acpi_os_allocate (
- acpi_size size);
+ acpi_size size);
void
acpi_os_free (
- void * memory);
+ void * memory);
acpi_status
acpi_os_map_memory (
- acpi_physical_address physical_address,
- acpi_size size,
- void **logical_address);
+ acpi_physical_address physical_address,
+ acpi_size size,
+ void **logical_address);
void
acpi_os_unmap_memory (
- void *logical_address,
- acpi_size size);
+ void *logical_address,
+ acpi_size size);
acpi_status
acpi_os_get_physical_address (
- void *logical_address,
- acpi_physical_address *physical_address);
+ void *logical_address,
+ acpi_physical_address *physical_address);
/*
acpi_status
acpi_os_install_interrupt_handler (
- u32 interrupt_number,
+ u32 interrupt_number,
OSD_HANDLER service_routine,
- void *context);
+ void *context);
acpi_status
acpi_os_remove_interrupt_handler (
- u32 interrupt_number,
+ u32 interrupt_number,
OSD_HANDLER service_routine);
acpi_status
acpi_os_queue_for_execution (
- u32 priority,
+ u32 priority,
OSD_EXECUTION_CALLBACK function,
- void *context);
+ void *context);
void
acpi_os_sleep (
- u32 seconds,
- u32 milliseconds);
+ u32 seconds,
+ u32 milliseconds);
void
acpi_os_stall (
- u32 microseconds);
+ u32 microseconds);
/*
acpi_status
acpi_os_read_port (
- acpi_io_address address,
- void *value,
- u32 width);
+ acpi_io_address address,
+ void *value,
+ u32 width);
acpi_status
acpi_os_write_port (
- acpi_io_address address,
- acpi_integer value,
- u32 width);
+ acpi_io_address address,
+ acpi_integer value,
+ u32 width);
/*
acpi_status
acpi_os_read_memory (
- acpi_physical_address address,
- void *value,
- u32 width);
+ acpi_physical_address address,
+ void *value,
+ u32 width);
acpi_status
acpi_os_write_memory (
- acpi_physical_address address,
- acpi_integer value,
- u32 width);
+ acpi_physical_address address,
+ acpi_integer value,
+ u32 width);
/*
acpi_status
acpi_os_read_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- void *value,
- u32 width);
+ struct acpi_pci_id *pci_id,
+ u32 register,
+ void *value,
+ u32 width);
acpi_status
acpi_os_write_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- acpi_integer value,
- u32 width);
+ struct acpi_pci_id *pci_id,
+ u32 register,
+ acpi_integer value,
+ u32 width);
/*
* Interim function needed for PCI IRQ routing
*/
void
acpi_os_derive_pci_id(
- acpi_handle rhandle,
- acpi_handle chandle,
- acpi_pci_id **pci_id);
+ acpi_handle rhandle,
+ acpi_handle chandle,
+ struct acpi_pci_id **pci_id);
/*
* Miscellaneous
u8
acpi_os_readable (
- void *pointer,
- u32 length);
+ void *pointer,
+ u32 length);
u8
acpi_os_writable (
- void *pointer,
- u32 length);
+ void *pointer,
+ u32 length);
u32
acpi_os_get_timer (
acpi_status
acpi_os_signal (
- u32 function,
- void *info);
+ u32 function,
+ void *info);
/*
* Debug print routines
void ACPI_INTERNAL_VAR_XFACE
acpi_os_printf (
- const char *format,
+ const char *format,
...);
void
acpi_os_vprintf (
- const char *format,
+ const char *format,
va_list args);
void
acpi_os_redirect_output (
- void *destination);
+ void *destination);
/*
u32
acpi_os_get_line (
- char *buffer);
+ char *buffer);
/*
void
acpi_os_dbg_assert(
- void *failed_assertion,
- void *file_name,
- u32 line_number,
- char *message);
+ void *failed_assertion,
+ void *file_name,
+ u32 line_number,
+ char *message);
#endif /* __ACPIOSXF_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_enable_subsystem (
- u32 flags);
+ u32 flags);
acpi_status
acpi_initialize_objects (
- u32 flags);
+ u32 flags);
acpi_status
acpi_terminate (
acpi_status
acpi_get_system_info (
- acpi_buffer *ret_buffer);
+ struct acpi_buffer *ret_buffer);
const char *
acpi_format_exception (
- acpi_status exception);
+ acpi_status exception);
acpi_status
acpi_purge_cached_objects (
acpi_status
acpi_install_initialization_handler (
- acpi_init_handler handler,
- u32 function);
+ acpi_init_handler handler,
+ u32 function);
/*
* ACPI Memory manager
void *
acpi_allocate (
- u32 size);
+ u32 size);
void *
acpi_callocate (
- u32 size);
+ u32 size);
void
acpi_free (
- void *address);
+ void *address);
/*
acpi_status
acpi_find_root_pointer (
- u32 flags,
- acpi_pointer *rsdp_address);
+ u32 flags,
+ struct acpi_pointer *rsdp_address);
acpi_status
acpi_load_tables (
acpi_status
acpi_load_table (
- acpi_table_header *table_ptr);
+ struct acpi_table_header *table_ptr);
acpi_status
acpi_unload_table (
- acpi_table_type table_type);
+ acpi_table_type table_type);
acpi_status
acpi_get_table_header (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header *out_table_header);
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header *out_table_header);
acpi_status
acpi_get_table (
- acpi_table_type table_type,
- u32 instance,
- acpi_buffer *ret_buffer);
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_get_firmware_table (
- acpi_string signature,
- u32 instance,
- u32 flags,
- acpi_table_header **table_pointer);
+ acpi_string signature,
+ u32 instance,
+ u32 flags,
+ struct acpi_table_header **table_pointer);
/*
acpi_status
acpi_walk_namespace (
- acpi_object_type type,
- acpi_handle start_object,
- u32 max_depth,
- acpi_walk_callback user_function,
- void *context,
- void * *return_value);
+ acpi_object_type type,
+ acpi_handle start_object,
+ u32 max_depth,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value);
acpi_status
acpi_get_devices (
- char *HID,
- acpi_walk_callback user_function,
- void *context,
- void **return_value);
+ char *HID,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value);
acpi_status
acpi_get_name (
- acpi_handle handle,
- u32 name_type,
- acpi_buffer *ret_path_ptr);
+ acpi_handle handle,
+ u32 name_type,
+ struct acpi_buffer *ret_path_ptr);
acpi_status
acpi_get_handle (
- acpi_handle parent,
- acpi_string pathname,
- acpi_handle *ret_handle);
+ acpi_handle parent,
+ acpi_string pathname,
+ acpi_handle *ret_handle);
acpi_status
acpi_attach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void *data);
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void *data);
acpi_status
acpi_detach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler);
+ acpi_handle obj_handle,
+ acpi_object_handler handler);
acpi_status
acpi_get_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void **data);
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void **data);
/*
acpi_status
acpi_evaluate_object (
- acpi_handle object,
- acpi_string pathname,
- acpi_object_list *parameter_objects,
- acpi_buffer *return_object_buffer);
+ acpi_handle object,
+ acpi_string pathname,
+ struct acpi_object_list *parameter_objects,
+ struct acpi_buffer *return_object_buffer);
acpi_status
acpi_evaluate_object_typed (
- acpi_handle object,
- acpi_string pathname,
- acpi_object_list *external_params,
- acpi_buffer *return_buffer,
- acpi_object_type return_type);
+ acpi_handle object,
+ acpi_string pathname,
+ struct acpi_object_list *external_params,
+ struct acpi_buffer *return_buffer,
+ acpi_object_type return_type);
acpi_status
acpi_get_object_info (
- acpi_handle device,
- acpi_device_info *info);
+ acpi_handle device,
+ struct acpi_device_info *info);
acpi_status
acpi_get_next_object (
- acpi_object_type type,
- acpi_handle parent,
- acpi_handle child,
- acpi_handle *out_handle);
+ acpi_object_type type,
+ acpi_handle parent,
+ acpi_handle child,
+ acpi_handle *out_handle);
acpi_status
acpi_get_type (
- acpi_handle object,
- acpi_object_type *out_type);
+ acpi_handle object,
+ acpi_object_type *out_type);
acpi_status
acpi_get_parent (
- acpi_handle object,
- acpi_handle *out_handle);
+ acpi_handle object,
+ acpi_handle *out_handle);
/*
acpi_status
acpi_install_fixed_event_handler (
- u32 acpi_event,
- acpi_event_handler handler,
- void *context);
+ u32 acpi_event,
+ acpi_event_handler handler,
+ void *context);
acpi_status
acpi_remove_fixed_event_handler (
- u32 acpi_event,
- acpi_event_handler handler);
+ u32 acpi_event,
+ acpi_event_handler handler);
acpi_status
acpi_install_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler,
- void *context);
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler,
+ void *context);
acpi_status
acpi_remove_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler);
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler);
acpi_status
acpi_install_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler,
- acpi_adr_space_setup setup,
- void *context);
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler,
+ acpi_adr_space_setup setup,
+ void *context);
acpi_status
acpi_remove_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler);
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler);
acpi_status
acpi_install_gpe_handler (
- u32 gpe_number,
- u32 type,
- acpi_gpe_handler handler,
- void *context);
+ u32 gpe_number,
+ u32 type,
+ acpi_gpe_handler handler,
+ void *context);
acpi_status
acpi_acquire_global_lock (
- u16 timeout,
- u32 *handle);
+ u16 timeout,
+ u32 *handle);
acpi_status
acpi_release_global_lock (
- u32 handle);
+ u32 handle);
acpi_status
acpi_remove_gpe_handler (
- u32 gpe_number,
- acpi_gpe_handler handler);
+ u32 gpe_number,
+ acpi_gpe_handler handler);
acpi_status
acpi_enable_event (
- u32 acpi_event,
- u32 type,
- u32 flags);
+ u32 acpi_event,
+ u32 type,
+ u32 flags);
acpi_status
acpi_disable_event (
- u32 acpi_event,
- u32 type,
- u32 flags);
+ u32 acpi_event,
+ u32 type,
+ u32 flags);
acpi_status
acpi_clear_event (
- u32 acpi_event,
- u32 type);
+ u32 acpi_event,
+ u32 type);
acpi_status
acpi_get_event_status (
- u32 acpi_event,
- u32 type,
- acpi_event_status *event_status);
+ u32 acpi_event,
+ u32 type,
+ acpi_event_status *event_status);
/*
* Resource interfaces
acpi_status
acpi_get_current_resources(
- acpi_handle device_handle,
- acpi_buffer *ret_buffer);
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_get_possible_resources(
- acpi_handle device_handle,
- acpi_buffer *ret_buffer);
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_set_current_resources (
- acpi_handle device_handle,
- acpi_buffer *in_buffer);
+ acpi_handle device_handle,
+ struct acpi_buffer *in_buffer);
acpi_status
acpi_get_irq_routing_table (
- acpi_handle bus_device_handle,
- acpi_buffer *ret_buffer);
+ acpi_handle bus_device_handle,
+ struct acpi_buffer *ret_buffer);
/*
acpi_status
acpi_get_register (
- u32 register_id,
- u32 *return_value,
- u32 flags);
+ u32 register_id,
+ u32 *return_value,
+ u32 flags);
acpi_status
acpi_set_register (
- u32 register_id,
- u32 value,
- u32 flags);
+ u32 register_id,
+ u32 value,
+ u32 flags);
acpi_status
acpi_set_firmware_waking_vector (
- acpi_physical_address physical_address);
+ acpi_physical_address physical_address);
acpi_status
acpi_get_firmware_waking_vector (
- acpi_physical_address *physical_address);
+ acpi_physical_address *physical_address);
acpi_status
acpi_get_sleep_type_data (
- u8 sleep_state,
- u8 *slp_typ_a,
- u8 *slp_typ_b);
+ u8 sleep_state,
+ u8 *slp_typ_a,
+ u8 *slp_typ_b);
acpi_status
acpi_enter_sleep_state_prep (
- u8 sleep_state);
+ u8 sleep_state);
acpi_status
acpi_enter_sleep_state (
- u8 sleep_state);
+ u8 sleep_state);
acpi_status
acpi_leave_sleep_state (
- u8 sleep_state);
+ u8 sleep_state);
#endif /* __ACXFACE_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_get_prt_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_get_crs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_get_prs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_set_srs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_create_resource_list (
- acpi_operand_object *byte_stream_buffer,
- acpi_buffer *output_buffer);
+ union acpi_operand_object *byte_stream_buffer,
+ struct acpi_buffer *output_buffer);
acpi_status
acpi_rs_create_byte_stream (
- acpi_resource *linked_list_buffer,
- acpi_buffer *output_buffer);
+ struct acpi_resource *linked_list_buffer,
+ struct acpi_buffer *output_buffer);
acpi_status
acpi_rs_create_pci_routing_table (
- acpi_operand_object *package_object,
- acpi_buffer *output_buffer);
+ union acpi_operand_object *package_object,
+ struct acpi_buffer *output_buffer);
/*
*/
void
acpi_rs_dump_irq (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_address16 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_address32 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_address64 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_dma (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_io (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_extended_irq (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_fixed_io (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_fixed_memory32 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_memory24 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_memory32 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_start_depend_fns (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_vendor_specific (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_resource_list (
- acpi_resource *resource);
+ struct acpi_resource *resource);
void
acpi_rs_dump_irq_list (
- u8 *route_table);
+ u8 *route_table);
acpi_status
acpi_rs_get_byte_stream_start (
- u8 *byte_stream_buffer,
- u8 **byte_stream_start,
- u32 *size);
+ u8 *byte_stream_buffer,
+ u8 **byte_stream_start,
+ u32 *size);
acpi_status
acpi_rs_get_list_length (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- acpi_size *size_needed);
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ acpi_size *size_needed);
acpi_status
acpi_rs_get_byte_stream_length (
- acpi_resource *linked_list_buffer,
- acpi_size *size_needed);
+ struct acpi_resource *linked_list_buffer,
+ acpi_size *size_needed);
acpi_status
acpi_rs_get_pci_routing_table_length (
- acpi_operand_object *package_object,
- acpi_size *buffer_size_needed);
+ union acpi_operand_object *package_object,
+ acpi_size *buffer_size_needed);
acpi_status
acpi_rs_byte_stream_to_list (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- u8 *output_buffer);
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ u8 *output_buffer);
acpi_status
acpi_rs_list_to_byte_stream (
- acpi_resource *linked_list,
- acpi_size byte_stream_size_needed,
- u8 *output_buffer);
+ struct acpi_resource *linked_list,
+ acpi_size byte_stream_size_needed,
+ u8 *output_buffer);
acpi_status
acpi_rs_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_fixed_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_fixed_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_dma_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_dma_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_address16_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_address16_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_address32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_address32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_address64_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_address64_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_start_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_end_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_start_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_end_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_memory24_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_memory24_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_memory32_range_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_fixed_memory32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_memory32_range_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_fixed_memory32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_extended_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_extended_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_end_tag_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_end_tag_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_vendor_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_vendor_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
u8
acpi_rs_get_resource_type (
- u8 resource_start_byte);
+ u8 resource_start_byte);
#endif /* __ACRESRC_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define ACPI_WALK_CONST_REQUIRED 3
#define ACPI_WALK_CONST_OPTIONAL 4
-typedef struct acpi_walk_state
+struct acpi_walk_state
{
- u8 data_type; /* To differentiate various internal objs MUST BE FIRST!*/\
- acpi_owner_id owner_id; /* Owner of objects created during the walk */
- u8 last_predicate; /* Result of last predicate */
- u8 current_result; /* */
- u8 next_op_info; /* Info about next_op */
- u8 num_operands; /* Stack pointer for Operands[] array */
- u8 return_used;
- u8 walk_type;
- u16 opcode; /* Current AML opcode */
- u8 scope_depth;
- u8 reserved1;
- u32 arg_count; /* push for fixed or var args */
- u32 aml_offset;
- u32 arg_types;
- u32 method_breakpoint; /* For single stepping */
- u32 user_breakpoint; /* User AML breakpoint */
- u32 parse_flags;
- u32 prev_arg_types;
-
-
- u8 *aml_last_while;
- struct acpi_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
- union acpi_operand_obj **caller_return_desc;
- acpi_generic_state *control_state; /* List of control states (nested IFs) */
- struct acpi_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
- struct acpi_node *method_call_node; /* Called method Node*/
- acpi_parse_object *method_call_op; /* method_call Op if running a method */
- union acpi_operand_obj *method_desc; /* Method descriptor if running a method */
- struct acpi_node *method_node; /* Method Node if running a method */
- acpi_parse_object *op; /* Current parser op */
- union acpi_operand_obj *operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
- const acpi_opcode_info *op_info; /* Info on current opcode */
- acpi_parse_object *origin; /* Start of walk [Obsolete] */
- union acpi_operand_obj **params;
- acpi_parse_state parser_state; /* Current state of parser */
- union acpi_operand_obj *result_obj;
- acpi_generic_state *results; /* Stack of accumulated results */
- union acpi_operand_obj *return_desc; /* Return object, if any */
- acpi_generic_state *scope_info; /* Stack of nested scopes */
-
- acpi_parse_object *prev_op; /* Last op that was processed */
- acpi_parse_object *next_op; /* next op to be processed */
- acpi_parse_downwards descending_callback;
- acpi_parse_upwards ascending_callback;
- acpi_thread_state *thread;
- struct acpi_walk_state *next; /* Next walk_state in list */
-
-
-} acpi_walk_state;
+ u8 data_type; /* To differentiate various internal objs MUST BE FIRST!*/\
+ acpi_owner_id owner_id; /* Owner of objects created during the walk */
+ u8 last_predicate; /* Result of last predicate */
+ u8 current_result; /* */
+ u8 next_op_info; /* Info about next_op */
+ u8 num_operands; /* Stack pointer for Operands[] array */
+ u8 return_used;
+ u8 walk_type;
+ u16 opcode; /* Current AML opcode */
+ u8 scope_depth;
+ u8 reserved1;
+ u32 arg_count; /* push for fixed or var args */
+ u32 aml_offset;
+ u32 arg_types;
+ u32 method_breakpoint; /* For single stepping */
+ u32 user_breakpoint; /* User AML breakpoint */
+ u32 parse_flags;
+ u32 prev_arg_types;
+
+ u8 *aml_last_while;
+ struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
+ union acpi_operand_object **caller_return_desc;
+ union acpi_generic_state *control_state; /* List of control states (nested IFs) */
+ struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
+ struct acpi_namespace_node *method_call_node; /* Called method Node*/
+ union acpi_parse_object *method_call_op; /* method_call Op if running a method */
+ union acpi_operand_object *method_desc; /* Method descriptor if running a method */
+ struct acpi_namespace_node *method_node; /* Method Node if running a method */
+ union acpi_parse_object *op; /* Current parser op */
+ union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
+ const struct acpi_opcode_info *op_info; /* Info on current opcode */
+ union acpi_parse_object *origin; /* Start of walk [Obsolete] */
+ union acpi_operand_object **params;
+ struct acpi_parse_state parser_state; /* Current state of parser */
+ union acpi_operand_object *result_obj;
+ union acpi_generic_state *results; /* Stack of accumulated results */
+ union acpi_operand_object *return_desc; /* Return object, if any */
+ union acpi_generic_state *scope_info; /* Stack of nested scopes */
+
+ union acpi_parse_object *prev_op; /* Last op that was processed */
+ union acpi_parse_object *next_op; /* next op to be processed */
+ acpi_parse_downwards descending_callback;
+ acpi_parse_upwards ascending_callback;
+ struct acpi_thread_state *thread;
+ struct acpi_walk_state *next; /* Next walk_state in list */
+};
/* Info used by acpi_ps_init_objects */
-typedef struct acpi_init_walk_info
+struct acpi_init_walk_info
{
- u16 method_count;
- u16 device_count;
- u16 op_region_count;
- u16 field_count;
- u16 buffer_count;
- u16 package_count;
- u16 op_region_init;
- u16 field_init;
- u16 buffer_init;
- u16 package_init;
- u16 object_count;
- acpi_table_desc *table_desc;
-
-} acpi_init_walk_info;
+ u16 method_count;
+ u16 device_count;
+ u16 op_region_count;
+ u16 field_count;
+ u16 buffer_count;
+ u16 package_count;
+ u16 op_region_init;
+ u16 field_init;
+ u16 buffer_init;
+ u16 package_init;
+ u16 object_count;
+ struct acpi_table_desc *table_desc;
+};
/* Info used by acpi_ns_initialize_devices */
-typedef struct acpi_device_walk_info
+struct acpi_device_walk_info
{
- u16 device_count;
- u16 num_STA;
- u16 num_INI;
- acpi_table_desc *table_desc;
-
-} acpi_device_walk_info;
+ u16 device_count;
+ u16 num_STA;
+ u16 num_INI;
+ struct acpi_table_desc *table_desc;
+};
/* TBD: [Restructure] Merge with struct above */
-typedef struct acpi_walk_info
+struct acpi_walk_info
{
- u32 debug_level;
- u32 owner_id;
- u8 display_type;
-
-} acpi_walk_info;
+ u32 debug_level;
+ u32 owner_id;
+ u8 display_type;
+};
/* Display Types */
#define ACPI_DISPLAY_SUMMARY 0
#define ACPI_DISPLAY_OBJECTS 1
-typedef struct acpi_get_devices_info
+struct acpi_get_devices_info
{
- acpi_walk_callback user_function;
- void *context;
- char *hid;
+ acpi_walk_callback user_function;
+ void *context;
+ char *hid;
+};
-} acpi_get_devices_info;
-
-typedef union acpi_aml_operands
+union acpi_aml_operands
{
- acpi_operand_object *operands[7];
+ union acpi_operand_object *operands[7];
struct
{
- acpi_object_integer *type;
- acpi_object_integer *code;
- acpi_object_integer *argument;
+ struct acpi_object_integer *type;
+ struct acpi_object_integer *code;
+ struct acpi_object_integer *argument;
} fatal;
struct
{
- acpi_operand_object *source;
- acpi_object_integer *index;
- acpi_operand_object *target;
+ union acpi_operand_object *source;
+ struct acpi_object_integer *index;
+ union acpi_operand_object *target;
} index;
struct
{
- acpi_operand_object *source;
- acpi_object_integer *index;
- acpi_object_integer *length;
- acpi_operand_object *target;
+ union acpi_operand_object *source;
+ struct acpi_object_integer *index;
+ struct acpi_object_integer *length;
+ union acpi_operand_object *target;
} mid;
-
-} acpi_aml_operands;
+};
#endif
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_tb_handle_to_object (
- u16 table_id,
- acpi_table_desc **table_desc);
+ u16 table_id,
+ struct acpi_table_desc **table_desc);
/*
* tbconvrt - Table conversion routines
acpi_status
acpi_tb_convert_to_xsdt (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_convert_table_fadt (
acpi_status
acpi_tb_build_common_facs (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
u32
acpi_tb_get_table_count (
- rsdp_descriptor *RSDP,
- acpi_table_header *RSDT);
+ struct rsdp_descriptor *RSDP,
+ struct acpi_table_header *RSDT);
/*
* tbget - Table "get" routines
acpi_status
acpi_tb_get_table (
- acpi_pointer *address,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_table_header (
- acpi_pointer *address,
- acpi_table_header *return_header);
+ struct acpi_pointer *address,
+ struct acpi_table_header *return_header);
acpi_status
acpi_tb_get_table_body (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_this_table (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_table_override (
- acpi_table_header *header,
- acpi_table_desc *table_info);
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_table_ptr (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header **table_ptr_loc);
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header **table_ptr_loc);
acpi_status
acpi_tb_verify_rsdp (
- acpi_pointer *address);
+ struct acpi_pointer *address);
void
acpi_tb_get_rsdt_address (
- acpi_pointer *out_address);
+ struct acpi_pointer *out_address);
acpi_status
acpi_tb_validate_rsdt (
- acpi_table_header *table_ptr);
+ struct acpi_table_header *table_ptr);
acpi_status
acpi_tb_get_required_tables (
acpi_status
acpi_tb_get_primary_table (
- acpi_pointer *address,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_secondary_table (
- acpi_pointer *address,
- acpi_string signature,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ acpi_string signature,
+ struct acpi_table_desc *table_info);
/*
* tbinstall - Table installation
acpi_status
acpi_tb_install_table (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_match_signature (
- char *signature,
- acpi_table_desc *table_info,
- u8 search_type);
+ char *signature,
+ struct acpi_table_desc *table_info,
+ u8 search_type);
acpi_status
acpi_tb_recognize_table (
- acpi_table_desc *table_info,
- u8 search_type);
+ struct acpi_table_desc *table_info,
+ u8 search_type);
acpi_status
acpi_tb_init_table_descriptor (
- acpi_table_type table_type,
- acpi_table_desc *table_info);
+ acpi_table_type table_type,
+ struct acpi_table_desc *table_info);
/*
void
acpi_tb_delete_acpi_table (
- acpi_table_type type);
+ acpi_table_type type);
void
acpi_tb_delete_single_table (
- acpi_table_desc *table_desc);
+ struct acpi_table_desc *table_desc);
-acpi_table_desc *
+struct acpi_table_desc *
acpi_tb_uninstall_table (
- acpi_table_desc *table_desc);
+ struct acpi_table_desc *table_desc);
void
acpi_tb_free_acpi_tables_of_type (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
/*
u8 *
acpi_tb_scan_memory_for_rsdp (
- u8 *start_address,
- u32 length);
+ u8 *start_address,
+ u32 length);
acpi_status
acpi_tb_find_rsdp (
- acpi_table_desc *table_info,
- u32 flags);
+ struct acpi_table_desc *table_info,
+ u32 flags);
/*
acpi_status
acpi_tb_find_table (
- char *signature,
- char *oem_id,
- char *oem_table_id,
- acpi_table_header **table_ptr);
+ char *signature,
+ char *oem_id,
+ char *oem_table_id,
+ struct acpi_table_header **table_ptr);
acpi_status
acpi_tb_verify_table_checksum (
- acpi_table_header *table_header);
+ struct acpi_table_header *table_header);
u8
acpi_tb_checksum (
- void *buffer,
- u32 length);
+ void *buffer,
+ u32 length);
acpi_status
acpi_tb_validate_table_header (
- acpi_table_header *table_header);
+ struct acpi_table_header *table_header);
#endif /* __ACTABLES_H__ */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define DUAL_PIC 0
#define MULTIPLE_APIC 1
-/* values of Type in APIC_HEADER */
+/* values of Type in struct apic_header */
#define APIC_PROC 0
#define APIC_IO 1
* Common table types. The base code can remain
* constant if the underlying tables are changed
*/
-#define RSDT_DESCRIPTOR RSDT_DESCRIPTOR_REV2
-#define xsdt_descriptor XSDT_DESCRIPTOR_REV2
-#define FACS_DESCRIPTOR facs_descriptor_rev2
-#define FADT_DESCRIPTOR fadt_descriptor_rev2
+#define RSDT_DESCRIPTOR struct rsdt_descriptor_rev2
+#define XSDT_DESCRIPTOR struct xsdt_descriptor_rev2
+#define FACS_DESCRIPTOR struct facs_descriptor_rev2
+#define FADT_DESCRIPTOR struct fadt_descriptor_rev2
#pragma pack(1)
* Architecture-independent tables
* The architecture dependent tables are in separate files
*/
-typedef struct /* Root System Descriptor Pointer */
+struct rsdp_descriptor /* Root System Descriptor Pointer */
{
- char signature [8]; /* ACPI signature, contains "RSD PTR " */
- u8 checksum; /* To make sum of struct == 0 */
- char oem_id [6]; /* OEM identification */
- u8 revision; /* Must be 0 for 1.0, 2 for 2.0 */
- u32 rsdt_physical_address; /* 32-bit physical address of RSDT */
- u32 length; /* XSDT Length in bytes including hdr */
- u64 xsdt_physical_address; /* 64-bit physical address of XSDT */
- u8 extended_checksum; /* Checksum of entire table */
- char reserved [3]; /* Reserved field must be 0 */
-
-} rsdp_descriptor;
-
-
-typedef struct /* ACPI common table header */
+ char signature [8]; /* ACPI signature, contains "RSD PTR " */
+ u8 checksum; /* To make sum of struct == 0 */
+ char oem_id [6]; /* OEM identification */
+ u8 revision; /* Must be 0 for 1.0, 2 for 2.0 */
+ u32 rsdt_physical_address; /* 32-bit physical address of RSDT */
+ u32 length; /* XSDT Length in bytes including hdr */
+ u64 xsdt_physical_address; /* 64-bit physical address of XSDT */
+ u8 extended_checksum; /* Checksum of entire table */
+ char reserved [3]; /* Reserved field must be 0 */
+};
+
+
+struct acpi_table_header /* ACPI common table header */
{
- char signature [4]; /* ACPI signature (4 ASCII characters) */
- u32 length; /* Length of table, in bytes, including header */
- u8 revision; /* ACPI Specification minor version # */
- u8 checksum; /* To make sum of entire table == 0 */
- char oem_id [6]; /* OEM identification */
- char oem_table_id [8]; /* OEM table identification */
- u32 oem_revision; /* OEM revision number */
- char asl_compiler_id [4]; /* ASL compiler vendor ID */
- u32 asl_compiler_revision; /* ASL compiler revision number */
-
-} acpi_table_header;
-
-
-typedef struct /* Common FACS for internal use */
+ char signature [4]; /* ACPI signature (4 ASCII characters) */
+ u32 length; /* Length of table, in bytes, including header */
+ u8 revision; /* ACPI Specification minor version # */
+ u8 checksum; /* To make sum of entire table == 0 */
+ char oem_id [6]; /* OEM identification */
+ char oem_table_id [8]; /* OEM table identification */
+ u32 oem_revision; /* OEM revision number */
+ char asl_compiler_id [4]; /* ASL compiler vendor ID */
+ u32 asl_compiler_revision; /* ASL compiler revision number */
+};
+
+
+struct acpi_common_facs /* Common FACS for internal use */
{
- u32 *global_lock;
- u64 *firmware_waking_vector;
- u8 vector_width;
+ u32 *global_lock;
+ u64 *firmware_waking_vector;
+ u8 vector_width;
+};
-} acpi_common_facs;
-
-typedef struct /* APIC Table */
+struct apic_table
{
- acpi_table_header header; /* ACPI table header */
- u32 local_apic_address; /* Physical address for accessing local APICs */
- u32 PCATcompat : 1; /* a one indicates system also has dual 8259s */
- u32 reserved1 : 31;
-
-} APIC_TABLE;
+ struct acpi_table_header header; /* ACPI table header */
+ u32 local_apic_address; /* Physical address for accessing local APICs */
+ u32 PCATcompat : 1; /* a one indicates system also has dual 8259s */
+ u32 reserved1 : 31;
+};
-typedef struct /* APIC Header */
+struct apic_header
{
- u8 type; /* APIC type. Either APIC_PROC or APIC_IO */
- u8 length; /* Length of APIC structure */
-
-} APIC_HEADER;
+ u8 type; /* APIC type. Either APIC_PROC or APIC_IO */
+ u8 length; /* Length of APIC structure */
+};
-typedef struct /* Processor APIC */
+struct processor_apic
{
- APIC_HEADER header;
- u8 processor_apic_id; /* ACPI processor id */
- u8 local_apic_id; /* Processor's local APIC id */
- u32 processor_enabled: 1; /* Processor is usable if set */
- u32 reserved1 : 31;
+ struct apic_header header;
+ u8 processor_apic_id; /* ACPI processor id */
+ u8 local_apic_id; /* Processor's local APIC id */
+ u32 processor_enabled: 1; /* Processor is usable if set */
+ u32 reserved1 : 31;
+};
-} PROCESSOR_APIC;
-
-typedef struct /* IO APIC */
+struct io_apic
{
- APIC_HEADER header;
- u8 io_apic_id; /* I/O APIC ID */
- u8 reserved; /* Reserved - must be zero */
- u32 io_apic_address; /* APIC's physical address */
- u32 vector; /* Interrupt vector index where INTI
+ struct apic_header header;
+ u8 io_apic_id; /* I/O APIC ID */
+ u8 reserved; /* Reserved - must be zero */
+ u32 io_apic_address; /* APIC's physical address */
+ u32 vector; /* Interrupt vector index where INTI
* lines start */
-} IO_APIC;
+};
/*
* IA64 TBD: Modify Smart Battery Description to comply with ACPI IA64
* extensions.
*/
-typedef struct /* Smart Battery Description Table */
+struct smart_battery_description_table
{
- acpi_table_header header;
- u32 warning_level;
- u32 low_level;
- u32 critical_level;
-
-} SMART_BATTERY_DESCRIPTION_TABLE;
+ struct acpi_table_header header;
+ u32 warning_level;
+ u32 low_level;
+ u32 critical_level;
+};
#pragma pack()
#define ACPI_MEM_ALLOCATED 1
#define ACPI_MEM_MAPPED 2
-/* Definitions for the Flags bitfield member of ACPI_TABLE_SUPPORT */
+/* Definitions for the Flags bitfield member of struct acpi_table_support */
#define ACPI_TABLE_SINGLE 0x00
#define ACPI_TABLE_MULTIPLE 0x01
/* Data about each known table type */
-typedef struct _acpi_table_support
+struct acpi_table_support
{
- char *name;
- char *signature;
- void **global_ptr;
- u8 sig_length;
- u8 flags;
-
-} ACPI_TABLE_SUPPORT;
+ char *name;
+ char *signature;
+ void **global_ptr;
+ u8 sig_length;
+ u8 flags;
+};
/*
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
* ACPI 1.0 Root System Description Table (RSDT)
*/
-typedef struct
+struct rsdt_descriptor_rev1
{
- acpi_table_header header; /* ACPI Table header */
- u32 table_offset_entry [1]; /* Array of pointers to other */
+ struct acpi_table_header header; /* ACPI Table header */
+ u32 table_offset_entry [1]; /* Array of pointers to other */
/* ACPI tables */
-} RSDT_DESCRIPTOR_REV1;
+};
/*
* ACPI 1.0 Firmware ACPI Control Structure (FACS)
*/
-typedef struct
+struct facs_descriptor_rev1
{
- char signature[4]; /* ACPI Signature */
- u32 length; /* Length of structure, in bytes */
- u32 hardware_signature; /* Hardware configuration signature */
- u32 firmware_waking_vector; /* ACPI OS waking vector */
- u32 global_lock; /* Global Lock */
- u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
- u32 reserved1 : 31; /* Must be 0 */
- u8 resverved3 [40]; /* Reserved - must be zero */
-
-} facs_descriptor_rev1;
+ char signature[4]; /* ACPI Signature */
+ u32 length; /* Length of structure, in bytes */
+ u32 hardware_signature; /* Hardware configuration signature */
+ u32 firmware_waking_vector; /* ACPI OS waking vector */
+ u32 global_lock; /* Global Lock */
+ u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
+ u32 reserved1 : 31; /* Must be 0 */
+ u8 resverved3 [40]; /* Reserved - must be zero */
+};
/*
* ACPI 1.0 Fixed ACPI Description Table (FADT)
*/
-typedef struct
+struct fadt_descriptor_rev1
{
- acpi_table_header header; /* ACPI Table header */
- u32 firmware_ctrl; /* Physical address of FACS */
- u32 dsdt; /* Physical address of DSDT */
- u8 model; /* System Interrupt Model */
- u8 reserved1; /* Reserved */
- u16 sci_int; /* System vector of SCI interrupt */
- u32 smi_cmd; /* Port address of SMI command port */
- u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
- u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
- u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
- u8 reserved2; /* Reserved - must be zero */
- u32 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
- u32 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
- u32 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
- u32 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
- u32 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
- u32 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
- u32 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
- u32 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
- u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
- u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
- u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
- u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
- u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
- u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
- u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
- u8 reserved3; /* Reserved */
- u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
- u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
- u16 flush_size; /* Size of area read to flush caches */
- u16 flush_stride; /* Stride used in flushing caches */
- u8 duty_offset; /* Bit location of duty cycle field in p_cnt reg */
- u8 duty_width; /* Bit width of duty cycle field in p_cnt reg */
- u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
- u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
- u8 century; /* Index to century in RTC CMOS RAM */
- u8 reserved4; /* Reserved */
- u8 reserved4a; /* Reserved */
- u8 reserved4b; /* Reserved */
- u32 wb_invd : 1; /* The wbinvd instruction works properly */
- u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
- u32 proc_c1 : 1; /* All processors support C1 state */
- u32 plvl2_up : 1; /* C2 state works on MP system */
- u32 pwr_button : 1; /* Power button is handled as a generic feature */
- u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
- u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
- u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
- u32 tmr_val_ext : 1; /* The tmr_val width is 32 bits (0 = 24 bits) */
- u32 reserved5 : 23; /* Reserved - must be zero */
-
-} fadt_descriptor_rev1;
+ struct acpi_table_header header; /* ACPI Table header */
+ u32 firmware_ctrl; /* Physical address of FACS */
+ u32 dsdt; /* Physical address of DSDT */
+ u8 model; /* System Interrupt Model */
+ u8 reserved1; /* Reserved */
+ u16 sci_int; /* System vector of SCI interrupt */
+ u32 smi_cmd; /* Port address of SMI command port */
+ u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
+ u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
+ u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
+ u8 reserved2; /* Reserved - must be zero */
+ u32 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
+ u32 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
+ u32 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
+ u32 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
+ u32 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
+ u32 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
+ u32 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
+ u32 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
+ u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
+ u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
+ u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
+ u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
+ u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
+ u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
+ u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
+ u8 reserved3; /* Reserved */
+ u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
+ u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
+ u16 flush_size; /* Size of area read to flush caches */
+ u16 flush_stride; /* Stride used in flushing caches */
+ u8 duty_offset; /* Bit location of duty cycle field in p_cnt reg */
+ u8 duty_width; /* Bit width of duty cycle field in p_cnt reg */
+ u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
+ u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
+ u8 century; /* Index to century in RTC CMOS RAM */
+ u8 reserved4; /* Reserved */
+ u8 reserved4a; /* Reserved */
+ u8 reserved4b; /* Reserved */
+ u32 wb_invd : 1; /* The wbinvd instruction works properly */
+ u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
+ u32 proc_c1 : 1; /* All processors support C1 state */
+ u32 plvl2_up : 1; /* C2 state works on MP system */
+ u32 pwr_button : 1; /* Power button is handled as a generic feature */
+ u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
+ u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
+ u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
+ u32 tmr_val_ext : 1; /* The tmr_val width is 32 bits (0 = 24 bits) */
+ u32 reserved5 : 23; /* Reserved - must be zero */
+};
#pragma pack()
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
* ACPI 2.0 Root System Description Table (RSDT)
*/
-typedef struct
+struct rsdt_descriptor_rev2
{
- acpi_table_header header; /* ACPI table header */
- u32 table_offset_entry [1]; /* Array of pointers to */
+ struct acpi_table_header header; /* ACPI table header */
+ u32 table_offset_entry [1]; /* Array of pointers to */
/* ACPI table headers */
-} RSDT_DESCRIPTOR_REV2;
+};
/*
* ACPI 2.0 Extended System Description Table (XSDT)
*/
-typedef struct
+struct xsdt_descriptor_rev2
{
- acpi_table_header header; /* ACPI table header */
- u64 table_offset_entry [1]; /* Array of pointers to */
+ struct acpi_table_header header; /* ACPI table header */
+ u64 table_offset_entry [1]; /* Array of pointers to */
/* ACPI table headers */
-} XSDT_DESCRIPTOR_REV2;
+};
/*
* ACPI 2.0 Firmware ACPI Control Structure (FACS)
*/
-typedef struct
+struct facs_descriptor_rev2
{
- char signature[4]; /* ACPI signature */
- u32 length; /* Length of structure, in bytes */
- u32 hardware_signature; /* Hardware configuration signature */
- u32 firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
- u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */
- u32 S4bios_f : 1; /* S4Bios_f - Indicates if S4BIOS support is present */
- u32 reserved1 : 31; /* Must be 0 */
- u64 xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
- u8 version; /* Version of this table */
- u8 reserved3 [31]; /* Reserved - must be zero */
-
-} facs_descriptor_rev2;
+ char signature[4]; /* ACPI signature */
+ u32 length; /* Length of structure, in bytes */
+ u32 hardware_signature; /* Hardware configuration signature */
+ u32 firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
+ u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */
+ u32 S4bios_f : 1; /* S4Bios_f - Indicates if S4BIOS support is present */
+ u32 reserved1 : 31; /* Must be 0 */
+ u64 xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
+ u8 version; /* Version of this table */
+ u8 reserved3 [31]; /* Reserved - must be zero */
+};
/*
* ACPI 2.0 Generic Address Structure (GAS)
*/
-typedef struct
+struct acpi_generic_address
{
- u8 address_space_id; /* Address space where struct or register exists. */
- u8 register_bit_width; /* Size in bits of given register */
- u8 register_bit_offset; /* Bit offset within the register */
- u8 reserved; /* Must be 0 */
- u64 address; /* 64-bit address of struct or register */
-
-} acpi_generic_address;
+ u8 address_space_id; /* Address space where struct or register exists. */
+ u8 register_bit_width; /* Size in bits of given register */
+ u8 register_bit_offset; /* Bit offset within the register */
+ u8 reserved; /* Must be 0 */
+ u64 address; /* 64-bit address of struct or register */
+};
/*
* ACPI 2.0 Fixed ACPI Description Table (FADT)
*/
-typedef struct
+struct fadt_descriptor_rev2
{
- acpi_table_header header; /* ACPI table header */
- u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */
- u32 V1_dsdt; /* 32-bit physical address of DSDT */
- u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/
- u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */
- u16 sci_int; /* System vector of SCI interrupt */
- u32 smi_cmd; /* Port address of SMI command port */
- u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
- u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
- u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
- u8 pstate_cnt; /* Processor performance state control*/
- u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
- u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
- u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
- u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
- u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
- u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
- u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
- u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
- u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
- u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
- u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
- u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
- u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
- u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
- u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
- u8 cst_cnt; /* Support for the _CST object and C States change notification.*/
- u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
- u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
- u16 flush_size; /* Number of flush strides that need to be read */
- u16 flush_stride; /* Processor's memory cache line width, in bytes */
- u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/
- u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/
- u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
- u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
- u8 century; /* Index to century in RTC CMOS RAM */
- u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/
- u8 reserved2; /* Reserved */
- u32 wb_invd : 1; /* The wbinvd instruction works properly */
- u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
- u32 proc_c1 : 1; /* All processors support C1 state */
- u32 plvl2_up : 1; /* C2 state works on MP system */
- u32 pwr_button : 1; /* Power button is handled as a generic feature */
- u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
- u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
- u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
- u32 tmr_val_ext : 1; /* Indicates tmr_val is 32 bits 0=24-bits*/
- u32 dock_cap : 1; /* Supports Docking */
- u32 reset_reg_sup : 1; /* Indicates system supports system reset via the FADT RESET_REG*/
- u32 sealed_case : 1; /* Indicates system has no internal expansion capabilities and case is sealed. */
- u32 headless : 1; /* Indicates system does not have local video capabilities or local input devices.*/
- u32 cpu_sw_sleep : 1; /* Indicates to OSPM that a processor native instruction */
+ struct acpi_table_header header; /* ACPI table header */
+ u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */
+ u32 V1_dsdt; /* 32-bit physical address of DSDT */
+ u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/
+ u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */
+ u16 sci_int; /* System vector of SCI interrupt */
+ u32 smi_cmd; /* Port address of SMI command port */
+ u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
+ u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
+ u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
+ u8 pstate_cnt; /* Processor performance state control*/
+ u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
+ u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
+ u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
+ u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
+ u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
+ u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
+ u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
+ u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
+ u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
+ u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
+ u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
+ u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
+ u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
+ u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
+ u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
+ u8 cst_cnt; /* Support for the _CST object and C States change notification.*/
+ u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
+ u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
+ u16 flush_size; /* Number of flush strides that need to be read */
+ u16 flush_stride; /* Processor's memory cache line width, in bytes */
+ u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/
+ u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/
+ u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
+ u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
+ u8 century; /* Index to century in RTC CMOS RAM */
+ u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/
+ u8 reserved2; /* Reserved */
+ u32 wb_invd : 1; /* The wbinvd instruction works properly */
+ u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
+ u32 proc_c1 : 1; /* All processors support C1 state */
+ u32 plvl2_up : 1; /* C2 state works on MP system */
+ u32 pwr_button : 1; /* Power button is handled as a generic feature */
+ u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
+ u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
+ u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
+ u32 tmr_val_ext : 1; /* Indicates tmr_val is 32 bits 0=24-bits*/
+ u32 dock_cap : 1; /* Supports Docking */
+ u32 reset_reg_sup : 1; /* Indicates system supports system reset via the FADT RESET_REG*/
+ u32 sealed_case : 1; /* Indicates system has no internal expansion capabilities and case is sealed. */
+ u32 headless : 1; /* Indicates system does not have local video capabilities or local input devices.*/
+ u32 cpu_sw_sleep : 1; /* Indicates to OSPM that a processor native instruction */
/* Must be executed after writing the SLP_TYPx register. */
- u32 reserved6 : 18; /* Reserved - must be zero */
-
- acpi_generic_address reset_register; /* Reset register address in GAS format */
- u8 reset_value; /* Value to write to the reset_register port to reset the system. */
- u8 reserved7[3]; /* These three bytes must be zero */
- u64 xfirmware_ctrl; /* 64-bit physical address of FACS */
- u64 Xdsdt; /* 64-bit physical address of DSDT */
- acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */
- acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */
- acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */
- acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */
- acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */
- acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */
- acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */
- acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */
-
-} fadt_descriptor_rev2;
+ u32 reserved6 : 18; /* Reserved - must be zero */
+
+ struct acpi_generic_address reset_register; /* Reset register address in GAS format */
+ u8 reset_value; /* Value to write to the reset_register port to reset the system. */
+ u8 reserved7[3]; /* These three bytes must be zero */
+ u64 xfirmware_ctrl; /* 64-bit physical address of FACS */
+ u64 Xdsdt; /* 64-bit physical address of DSDT */
+ struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */
+ struct acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */
+ struct acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */
+ struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */
+ struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */
+ struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */
+ struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */
+ struct acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */
+};
#pragma pack()
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* Only for clarity in declarations */
-typedef u64 IO_ADDRESS;
+typedef u64 IO_ADDRESS;
#pragma pack(1)
-typedef struct /* Root System Descriptor Pointer */
+struct /* Root System Descriptor Pointer */
{
NATIVE_CHAR signature [8]; /* contains "RSD PTR " */
- u8 checksum; /* to make sum of struct == 0 */
+ u8 checksum; /* to make sum of struct == 0 */
NATIVE_CHAR oem_id [6]; /* OEM identification */
- u8 reserved; /* Must be 0 for 1.0, 2 for 2.0 */
- u64 rsdt_physical_address; /* 64-bit physical address of RSDT */
-} RSDP_DESCRIPTOR_REV071;
+ u8 reserved; /* Must be 0 for 1.0, 2 for 2.0 */
+ u64 rsdt_physical_address; /* 64-bit physical address of RSDT */
+};
/*****************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Root System Description Table */
/*****************************************/
-typedef struct
+struct
{
- acpi_table_header header; /* Table header */
- u32 reserved_pad; /* IA64 alignment, must be 0 */
- u64 table_offset_entry [1]; /* Array of pointers to other */
+ struct acpi_table_header header; /* Table header */
+ u32 reserved_pad; /* IA64 alignment, must be 0 */
+ u64 table_offset_entry [1]; /* Array of pointers to other */
/* tables' headers */
-} RSDT_DESCRIPTOR_REV071;
+};
/*******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Firmware ACPI Control Structure */
/*******************************************/
-typedef struct
+struct
{
NATIVE_CHAR signature[4]; /* signature "FACS" */
- u32 length; /* length of structure, in bytes */
- u32 hardware_signature; /* hardware configuration signature */
- u32 reserved4; /* must be 0 */
- u64 firmware_waking_vector; /* ACPI OS waking vector */
- u64 global_lock; /* Global Lock */
- u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
- u32 reserved1 : 31; /* must be 0 */
- u8 reserved3 [28]; /* reserved - must be zero */
-
-} facs_descriptor_rev071;
+ u32 length; /* length of structure, in bytes */
+ u32 hardware_signature; /* hardware configuration signature */
+ u32 reserved4; /* must be 0 */
+ u64 firmware_waking_vector; /* ACPI OS waking vector */
+ u64 global_lock; /* Global Lock */
+ u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
+ u32 reserved1 : 31; /* must be 0 */
+ u8 reserved3 [28]; /* reserved - must be zero */
+};
/******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Fixed ACPI Description Table */
/******************************************/
-typedef struct
+struct
{
- acpi_table_header header; /* table header */
- u32 reserved_pad; /* IA64 alignment, must be 0 */
- u64 firmware_ctrl; /* 64-bit Physical address of FACS */
- u64 dsdt; /* 64-bit Physical address of DSDT */
- u8 model; /* System Interrupt Model */
- u8 address_space; /* Address Space Bitmask */
- u16 sci_int; /* System vector of SCI interrupt */
- u8 acpi_enable; /* value to write to smi_cmd to enable ACPI */
- u8 acpi_disable; /* value to write to smi_cmd to disable ACPI */
- u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
- u8 reserved2; /* reserved - must be zero */
- u64 smi_cmd; /* Port address of SMI command port */
- u64 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
- u64 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
- u64 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
- u64 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
- u64 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
- u64 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
- u64 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
- u64 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
- u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
- u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
- u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
- u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
- u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
- u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
- u8 gpe1_base; /* offset in gpe model where gpe1 events start */
- u8 reserved3; /* reserved */
- u16 plvl2_lat; /* worst case HW latency to enter/exit C2 state */
- u16 plvl3_lat; /* worst case HW latency to enter/exit C3 state */
- u8 day_alrm; /* index to day-of-month alarm in RTC CMOS RAM */
- u8 mon_alrm; /* index to month-of-year alarm in RTC CMOS RAM */
- u8 century; /* index to century in RTC CMOS RAM */
- u8 reserved4; /* reserved */
- u32 flush_cash : 1; /* PAL_FLUSH_CACHE is correctly supported */
- u32 reserved5 : 1; /* reserved - must be zero */
- u32 proc_c1 : 1; /* all processors support C1 state */
- u32 plvl2_up : 1; /* C2 state works on MP system */
- u32 pwr_button : 1; /* Power button is handled as a generic feature */
- u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
- u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
- u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
- u32 tmr_val_ext : 1; /* tmr_val is 32 bits */
- u32 dock_cap : 1; /* Supports Docking */
- u32 reserved6 : 22; /* reserved - must be zero */
-
-} fadt_descriptor_rev071;
+ struct acpi_table_header header; /* table header */
+ u32 reserved_pad; /* IA64 alignment, must be 0 */
+ u64 firmware_ctrl; /* 64-bit Physical address of FACS */
+ u64 dsdt; /* 64-bit Physical address of DSDT */
+ u8 model; /* System Interrupt Model */
+ u8 address_space; /* Address Space Bitmask */
+ u16 sci_int; /* System vector of SCI interrupt */
+ u8 acpi_enable; /* value to write to smi_cmd to enable ACPI */
+ u8 acpi_disable; /* value to write to smi_cmd to disable ACPI */
+ u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
+ u8 reserved2; /* reserved - must be zero */
+ u64 smi_cmd; /* Port address of SMI command port */
+ u64 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
+ u64 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
+ u64 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
+ u64 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
+ u64 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
+ u64 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
+ u64 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
+ u64 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
+ u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
+ u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
+ u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
+ u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
+ u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
+ u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
+ u8 gpe1_base; /* offset in gpe model where gpe1 events start */
+ u8 reserved3; /* reserved */
+ u16 plvl2_lat; /* worst case HW latency to enter/exit C2 state */
+ u16 plvl3_lat; /* worst case HW latency to enter/exit C3 state */
+ u8 day_alrm; /* index to day-of-month alarm in RTC CMOS RAM */
+ u8 mon_alrm; /* index to month-of-year alarm in RTC CMOS RAM */
+ u8 century; /* index to century in RTC CMOS RAM */
+ u8 reserved4; /* reserved */
+ u32 flush_cash : 1; /* PAL_FLUSH_CACHE is correctly supported */
+ u32 reserved5 : 1; /* reserved - must be zero */
+ u32 proc_c1 : 1; /* all processors support C1 state */
+ u32 plvl2_up : 1; /* C2 state works on MP system */
+ u32 pwr_button : 1; /* Power button is handled as a generic feature */
+ u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
+ u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
+ u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
+ u32 tmr_val_ext : 1; /* tmr_val is 32 bits */
+ u32 dock_cap : 1; /* Supports Docking */
+ u32 reserved6 : 22; /* reserved - must be zero */
+};
#pragma pack()
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*! [End] no source code translation !*/
-typedef s64 acpi_native_int;
-typedef u64 acpi_native_uint;
+typedef s64 acpi_native_int;
+typedef u64 acpi_native_uint;
-typedef u64 acpi_table_ptr;
-typedef u64 acpi_io_address;
-typedef u64 acpi_physical_address;
-typedef u64 acpi_size;
+typedef u64 acpi_table_ptr;
+typedef u64 acpi_io_address;
+typedef u64 acpi_physical_address;
+typedef u64 acpi_size;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000008 /* No hardware alignment support in IA64 */
#define ACPI_USE_NATIVE_DIVIDE /* Native 64-bit integer support */
typedef int INT16;
typedef unsigned long UINT32;
-typedef struct
+struct
{
UINT32 Lo;
UINT32 Hi;
-
-} UINT64;
+};
/*! [End] no source code translation !*/
-typedef u16 acpi_native_uint;
-typedef s16 acpi_native_int;
+typedef u16 acpi_native_uint;
+typedef s16 acpi_native_int;
-typedef u32 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef char *acpi_physical_address;
-typedef u16 acpi_size;
+typedef u32 acpi_table_ptr;
+typedef u32 acpi_io_address;
+typedef char *acpi_physical_address;
+typedef u16 acpi_size;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000002
#define _HW_ALIGNMENT_SUPPORT
/*! [End] no source code translation !*/
-typedef s32 acpi_native_int;
-typedef u32 acpi_native_uint;
+typedef s32 acpi_native_int;
+typedef u32 acpi_native_uint;
-typedef u64 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef u64 acpi_physical_address;
-typedef u32 acpi_size;
+typedef u64 acpi_table_ptr;
+typedef u32 acpi_io_address;
+typedef u64 acpi_physical_address;
+typedef u32 acpi_size;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000004
#define _HW_ALIGNMENT_SUPPORT
/*
* Miscellaneous common types
*/
-typedef u32 UINT32_BIT;
-typedef acpi_native_uint ACPI_PTRDIFF;
+typedef u32 UINT32_BIT;
+typedef acpi_native_uint ACPI_PTRDIFF;
/*
* Pointer overlays to avoid lots of typecasting for
* code that accepts both physical and logical pointers.
*/
-typedef union acpi_ptrs
+union acpi_pointers
{
- acpi_physical_address physical;
- void *logical;
- acpi_table_ptr value;
-
-} acpi_pointers;
+ acpi_physical_address physical;
+ void *logical;
+ acpi_table_ptr value;
+};
-typedef struct acpi_pointer
+struct acpi_pointer
{
- u32 pointer_type;
- union acpi_ptrs pointer;
-
-} acpi_pointer;
+ u32 pointer_type;
+ union acpi_pointers pointer;
+};
/* pointer_types for above */
/*
* Local datatypes
*/
-typedef u32 acpi_status; /* All ACPI Exceptions */
-typedef u32 acpi_name; /* 4-byte ACPI name */
-typedef char* acpi_string; /* Null terminated ASCII string */
-typedef void* acpi_handle; /* Actually a ptr to an Node */
+typedef u32 acpi_status; /* All ACPI Exceptions */
+typedef u32 acpi_name; /* 4-byte ACPI name */
+typedef char * acpi_string; /* Null terminated ASCII string */
+typedef void * acpi_handle; /* Actually a ptr to an Node */
-typedef struct
+struct uint64_struct
{
- u32 lo;
- u32 hi;
+ u32 lo;
+ u32 hi;
+};
-} uint64_struct;
-
-typedef union
+union uint64_overlay
{
- u64 full;
- uint64_struct part;
-
-} uint64_overlay;
+ u64 full;
+ struct uint64_struct part;
+};
-typedef struct
+struct uint32_struct
{
- u32 lo;
- u32 hi;
-
-} uint32_struct;
+ u32 lo;
+ u32 hi;
+};
/*
/* 32-bit integers only, no 64-bit support */
-typedef u32 acpi_integer;
+typedef u32 acpi_integer;
#define ACPI_INTEGER_MAX ACPI_UINT32_MAX
#define ACPI_INTEGER_BIT_SIZE 32
#define ACPI_MAX_BCD_VALUE 99999999
/* 64-bit integers */
-typedef u64 acpi_integer;
+typedef u64 acpi_integer;
#define ACPI_INTEGER_MAX ACPI_UINT64_MAX
#define ACPI_INTEGER_BIT_SIZE 64
#define ACPI_MAX_BCD_VALUE 9999999999999999
/*
* Table types. These values are passed to the table related APIs
*/
-typedef u32 acpi_table_type;
+typedef u32 acpi_table_type;
#define ACPI_TABLE_RSDP (acpi_table_type) 0
#define ACPI_TABLE_DSDT (acpi_table_type) 1
* Types must be kept in sync with the global acpi_ns_properties
* and acpi_ns_type_names arrays.
*/
-typedef u32 acpi_object_type;
+typedef u32 acpi_object_type;
#define ACPI_TYPE_ANY 0x00
#define ACPI_TYPE_INTEGER 0x01 /* Byte/Word/Dword/Zero/One/Ones */
/*
* These are special object types that never appear in
- * a Namespace node, only in an acpi_operand_object
+ * a Namespace node, only in an union acpi_operand_object
*/
#define ACPI_TYPE_LOCAL_EXTRA 0x1B
#define ACPI_TYPE_LOCAL_DATA 0x1C
/*
* acpi_event Types: Fixed & General Purpose
*/
-typedef u32 acpi_event_type;
+typedef u32 acpi_event_type;
#define ACPI_EVENT_FIXED 0
#define ACPI_EVENT_GPE 1
* | +----- Set?
* +----------- <Reserved>
*/
-typedef u32 acpi_event_status;
+typedef u32 acpi_event_status;
#define ACPI_EVENT_FLAG_DISABLED (acpi_event_status) 0x00
#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01
/* Address Space (Operation Region) Types */
-typedef u8 acpi_adr_space_type;
+typedef u8 acpi_adr_space_type;
#define ACPI_ADR_SPACE_SYSTEM_MEMORY (acpi_adr_space_type) 0
#define ACPI_ADR_SPACE_SYSTEM_IO (acpi_adr_space_type) 1
#define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5
#define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6
#define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 7
+#define ACPI_ADR_SPACE_FIXED_HARDWARE (acpi_adr_space_type) 127
/*
/*
* External ACPI object definition
*/
-typedef union acpi_obj
+union acpi_object
{
- acpi_object_type type; /* See definition of acpi_ns_type for values */
+ acpi_object_type type; /* See definition of acpi_ns_type for values */
struct
{
- acpi_object_type type;
- acpi_integer value; /* The actual number */
+ acpi_object_type type;
+ acpi_integer value; /* The actual number */
} integer;
struct
{
- acpi_object_type type;
- u32 length; /* # of bytes in string, excluding trailing null */
- char *pointer; /* points to the string value */
+ acpi_object_type type;
+ u32 length; /* # of bytes in string, excluding trailing null */
+ char *pointer; /* points to the string value */
} string;
struct
{
- acpi_object_type type;
- u32 length; /* # of bytes in buffer */
- u8 *pointer; /* points to the buffer */
+ acpi_object_type type;
+ u32 length; /* # of bytes in buffer */
+ u8 *pointer; /* points to the buffer */
} buffer;
struct
{
- acpi_object_type type;
- u32 fill1;
- acpi_handle handle; /* object reference */
+ acpi_object_type type;
+ u32 fill1;
+ acpi_handle handle; /* object reference */
} reference;
struct
{
- acpi_object_type type;
- u32 count; /* # of elements in package */
- union acpi_obj *elements; /* Pointer to an array of ACPI_OBJECTs */
+ acpi_object_type type;
+ u32 count; /* # of elements in package */
+ union acpi_object *elements; /* Pointer to an array of ACPI_OBJECTs */
} package;
struct
{
- acpi_object_type type;
- u32 proc_id;
- acpi_io_address pblk_address;
- u32 pblk_length;
+ acpi_object_type type;
+ u32 proc_id;
+ acpi_io_address pblk_address;
+ u32 pblk_length;
} processor;
struct
{
- acpi_object_type type;
- u32 system_level;
- u32 resource_order;
+ acpi_object_type type;
+ u32 system_level;
+ u32 resource_order;
} power_resource;
-
-} acpi_object;
+};
/*
* List of objects, used as a parameter list for control method evaluation
*/
-typedef struct acpi_obj_list
+struct acpi_object_list
{
- u32 count;
- acpi_object *pointer;
-
-} acpi_object_list;
+ u32 count;
+ union acpi_object *pointer;
+};
/*
#define ACPI_ALLOCATE_BUFFER (acpi_size) (-1)
#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (-2)
-typedef struct
+struct acpi_buffer
{
- acpi_size length; /* Length in bytes of the buffer */
- void *pointer; /* pointer to buffer */
-
-} acpi_buffer;
+ acpi_size length; /* Length in bytes of the buffer */
+ void *pointer; /* pointer to buffer */
+};
/*
/*
* ACPI Table Info. One per ACPI table _type_
*/
-typedef struct acpi_table_info
+struct acpi_table_info
{
- u32 count;
-
-} acpi_table_info;
+ u32 count;
+};
/*
* System info returned by acpi_get_system_info()
*/
-typedef struct _acpi_sys_info
+struct acpi_system_info
{
- u32 acpi_ca_version;
- u32 flags;
- u32 timer_resolution;
- u32 reserved1;
- u32 reserved2;
- u32 debug_level;
- u32 debug_layer;
- u32 num_table_types;
- acpi_table_info table_info [NUM_ACPI_TABLES];
-
-} acpi_system_info;
+ u32 acpi_ca_version;
+ u32 flags;
+ u32 timer_resolution;
+ u32 reserved1;
+ u32 reserved2;
+ u32 debug_level;
+ u32 debug_layer;
+ u32 num_table_types;
+ struct acpi_table_info table_info [NUM_ACPI_TABLES];
+};
/*
*/
typedef
u32 (*acpi_event_handler) (
- void *context);
+ void *context);
typedef
void (*acpi_gpe_handler) (
- void *context);
+ void *context);
typedef
void (*acpi_notify_handler) (
- acpi_handle device,
- u32 value,
- void *context);
+ acpi_handle device,
+ u32 value,
+ void *context);
typedef
void (*acpi_object_handler) (
- acpi_handle object,
- u32 function,
- void *data);
+ acpi_handle object,
+ u32 function,
+ void *data);
typedef
acpi_status (*acpi_init_handler) (
- acpi_handle object,
- u32 function);
+ acpi_handle object,
+ u32 function);
#define ACPI_INIT_DEVICE_INI 1
typedef
acpi_status (*acpi_adr_space_handler) (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
#define ACPI_DEFAULT_HANDLER NULL
typedef
acpi_status (*acpi_adr_space_setup) (
- acpi_handle region_handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle region_handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
#define ACPI_REGION_ACTIVATE 0
#define ACPI_REGION_DEACTIVATE 1
typedef
acpi_status (*acpi_walk_callback) (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
/* Interrupt handler return values */
#define ACPI_COMMON_OBJ_INFO \
- acpi_object_type type; /* ACPI object type */ \
- acpi_name name /* ACPI object Name */
+ acpi_object_type type; /* ACPI object type */ \
+ acpi_name name /* ACPI object Name */
-typedef struct
+struct acpi_obj_info_header
{
ACPI_COMMON_OBJ_INFO;
-} acpi_obj_info_header;
+};
-typedef struct
+struct acpi_device_info
{
ACPI_COMMON_OBJ_INFO;
- u32 valid; /* Are the next bits legit? */
- char hardware_id[9]; /* _HID value if any */
- char unique_id[9]; /* _UID value if any */
- acpi_integer address; /* _ADR value if any */
- u32 current_status; /* _STA value */
-} acpi_device_info;
+ u32 valid; /* Are the next bits legit? */
+ char hardware_id[9]; /* _HID value if any */
+ char unique_id[9]; /* _UID value if any */
+ acpi_integer address; /* _ADR value if any */
+ u32 current_status; /* _STA value */
+};
/* Context structs for address space handlers */
-typedef struct
+struct acpi_pci_id
{
- u16 segment;
- u16 bus;
- u16 device;
- u16 function;
-} acpi_pci_id;
+ u16 segment;
+ u16 bus;
+ u16 device;
+ u16 function;
+};
-typedef struct
+struct acpi_mem_space_context
{
- u32 length;
- acpi_physical_address address;
- acpi_physical_address mapped_physical_address;
- u8 *mapped_logical_address;
- acpi_size mapped_length;
-} acpi_mem_space_context;
+ u32 length;
+ acpi_physical_address address;
+ acpi_physical_address mapped_physical_address;
+ u8 *mapped_logical_address;
+ acpi_size mapped_length;
+};
/*
/*
* Structures used to describe device resources
*/
-typedef struct
+struct acpi_resource_irq
{
- u32 edge_level;
- u32 active_high_low;
- u32 shared_exclusive;
- u32 number_of_interrupts;
- u32 interrupts[1];
-
-} acpi_resource_irq;
-
-typedef struct
+ u32 edge_level;
+ u32 active_high_low;
+ u32 shared_exclusive;
+ u32 number_of_interrupts;
+ u32 interrupts[1];
+};
+
+struct acpi_resource_dma
{
- u32 type;
- u32 bus_master;
- u32 transfer;
- u32 number_of_channels;
- u32 channels[1];
-
-} acpi_resource_dma;
-
-typedef struct
+ u32 type;
+ u32 bus_master;
+ u32 transfer;
+ u32 number_of_channels;
+ u32 channels[1];
+};
+
+struct acpi_resource_start_dpf
{
- u32 compatibility_priority;
- u32 performance_robustness;
-
-} acpi_resource_start_dpf;
+ u32 compatibility_priority;
+ u32 performance_robustness;
+};
/*
* END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
* needed because it has no fields
*/
-typedef struct
+struct acpi_resource_io
{
- u32 io_decode;
- u32 min_base_address;
- u32 max_base_address;
- u32 alignment;
- u32 range_length;
-
-} acpi_resource_io;
-
-typedef struct
+ u32 io_decode;
+ u32 min_base_address;
+ u32 max_base_address;
+ u32 alignment;
+ u32 range_length;
+};
+
+struct acpi_resource_fixed_io
{
- u32 base_address;
- u32 range_length;
-
-} acpi_resource_fixed_io;
+ u32 base_address;
+ u32 range_length;
+};
-typedef struct
+struct acpi_resource_vendor
{
- u32 length;
- u8 reserved[1];
-
-} acpi_resource_vendor;
+ u32 length;
+ u8 reserved[1];
+};
-typedef struct
+struct acpi_resource_end_tag
{
- u8 checksum;
+ u8 checksum;
+};
-} acpi_resource_end_tag;
-
-typedef struct
+struct acpi_resource_mem24
{
- u32 read_write_attribute;
- u32 min_base_address;
- u32 max_base_address;
- u32 alignment;
- u32 range_length;
-
-} acpi_resource_mem24;
-
-typedef struct
+ u32 read_write_attribute;
+ u32 min_base_address;
+ u32 max_base_address;
+ u32 alignment;
+ u32 range_length;
+};
+
+struct acpi_resource_mem32
{
- u32 read_write_attribute;
- u32 min_base_address;
- u32 max_base_address;
- u32 alignment;
- u32 range_length;
-
-} acpi_resource_mem32;
-
-typedef struct
+ u32 read_write_attribute;
+ u32 min_base_address;
+ u32 max_base_address;
+ u32 alignment;
+ u32 range_length;
+};
+
+struct acpi_resource_fixed_mem32
{
- u32 read_write_attribute;
- u32 range_base_address;
- u32 range_length;
-
-} acpi_resource_fixed_mem32;
+ u32 read_write_attribute;
+ u32 range_base_address;
+ u32 range_length;
+};
-typedef struct
+struct acpi_memory_attribute
{
- u16 cache_attribute;
- u16 read_write_attribute;
+ u16 cache_attribute;
+ u16 read_write_attribute;
+};
-} acpi_memory_attribute;
-
-typedef struct
+struct acpi_io_attribute
{
- u16 range_attribute;
- u16 reserved;
-
-} acpi_io_attribute;
+ u16 range_attribute;
+ u16 reserved;
+};
-typedef struct
+struct acpi_bus_attribute
{
- u16 reserved1;
- u16 reserved2;
+ u16 reserved1;
+ u16 reserved2;
+};
-} acpi_bus_attribute;
-
-typedef union
+union acpi_resource_attribute
{
- acpi_memory_attribute memory;
- acpi_io_attribute io;
- acpi_bus_attribute bus;
-
-} acpi_resource_attribute;
+ struct acpi_memory_attribute memory;
+ struct acpi_io_attribute io;
+ struct acpi_bus_attribute bus;
+};
-typedef struct
+struct acpi_resource_source
{
- u32 index;
- u32 string_length;
- char *string_ptr;
+ u32 index;
+ u32 string_length;
+ char *string_ptr;
+};
-} acpi_resource_source;
-
-typedef struct
+struct acpi_resource_address16
{
- u32 resource_type;
- u32 producer_consumer;
- u32 decode;
- u32 min_address_fixed;
- u32 max_address_fixed;
- acpi_resource_attribute attribute;
- u32 granularity;
- u32 min_address_range;
- u32 max_address_range;
- u32 address_translation_offset;
- u32 address_length;
- acpi_resource_source resource_source;
-
-} acpi_resource_address16;
-
-typedef struct
+ u32 resource_type;
+ u32 producer_consumer;
+ u32 decode;
+ u32 min_address_fixed;
+ u32 max_address_fixed;
+ union acpi_resource_attribute attribute;
+ u32 granularity;
+ u32 min_address_range;
+ u32 max_address_range;
+ u32 address_translation_offset;
+ u32 address_length;
+ struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_address32
{
- u32 resource_type;
- u32 producer_consumer;
- u32 decode;
- u32 min_address_fixed;
- u32 max_address_fixed;
- acpi_resource_attribute attribute;
- u32 granularity;
- u32 min_address_range;
- u32 max_address_range;
- u32 address_translation_offset;
- u32 address_length;
- acpi_resource_source resource_source;
-
-} acpi_resource_address32;
-
-typedef struct
+ u32 resource_type;
+ u32 producer_consumer;
+ u32 decode;
+ u32 min_address_fixed;
+ u32 max_address_fixed;
+ union acpi_resource_attribute attribute;
+ u32 granularity;
+ u32 min_address_range;
+ u32 max_address_range;
+ u32 address_translation_offset;
+ u32 address_length;
+ struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_address64
{
- u32 resource_type;
- u32 producer_consumer;
- u32 decode;
- u32 min_address_fixed;
- u32 max_address_fixed;
- acpi_resource_attribute attribute;
- u64 granularity;
- u64 min_address_range;
- u64 max_address_range;
- u64 address_translation_offset;
- u64 address_length;
- acpi_resource_source resource_source;
-
-} acpi_resource_address64;
-
-typedef struct
+ u32 resource_type;
+ u32 producer_consumer;
+ u32 decode;
+ u32 min_address_fixed;
+ u32 max_address_fixed;
+ union acpi_resource_attribute attribute;
+ u64 granularity;
+ u64 min_address_range;
+ u64 max_address_range;
+ u64 address_translation_offset;
+ u64 address_length;
+ struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_ext_irq
{
- u32 producer_consumer;
- u32 edge_level;
- u32 active_high_low;
- u32 shared_exclusive;
- u32 number_of_interrupts;
- acpi_resource_source resource_source;
- u32 interrupts[1];
-
-} acpi_resource_ext_irq;
+ u32 producer_consumer;
+ u32 edge_level;
+ u32 active_high_low;
+ u32 shared_exclusive;
+ u32 number_of_interrupts;
+ struct acpi_resource_source resource_source;
+ u32 interrupts[1];
+};
/* ACPI_RESOURCE_TYPEs */
#define ACPI_RSTYPE_ADDRESS64 13
#define ACPI_RSTYPE_EXT_IRQ 14
-typedef u32 acpi_resource_type;
+typedef u32 acpi_resource_type;
-typedef union
+union acpi_resource_data
{
- acpi_resource_irq irq;
- acpi_resource_dma dma;
- acpi_resource_start_dpf start_dpf;
- acpi_resource_io io;
- acpi_resource_fixed_io fixed_io;
- acpi_resource_vendor vendor_specific;
- acpi_resource_end_tag end_tag;
- acpi_resource_mem24 memory24;
- acpi_resource_mem32 memory32;
- acpi_resource_fixed_mem32 fixed_memory32;
- acpi_resource_address16 address16;
- acpi_resource_address32 address32;
- acpi_resource_address64 address64;
- acpi_resource_ext_irq extended_irq;
-
-} acpi_resource_data;
-
-typedef struct acpi_resource
+ struct acpi_resource_irq irq;
+ struct acpi_resource_dma dma;
+ struct acpi_resource_start_dpf start_dpf;
+ struct acpi_resource_io io;
+ struct acpi_resource_fixed_io fixed_io;
+ struct acpi_resource_vendor vendor_specific;
+ struct acpi_resource_end_tag end_tag;
+ struct acpi_resource_mem24 memory24;
+ struct acpi_resource_mem32 memory32;
+ struct acpi_resource_fixed_mem32 fixed_memory32;
+ struct acpi_resource_address16 address16;
+ struct acpi_resource_address32 address32;
+ struct acpi_resource_address64 address64;
+ struct acpi_resource_ext_irq extended_irq;
+};
+
+struct acpi_resource
{
- acpi_resource_type id;
- u32 length;
- acpi_resource_data data;
-
-} acpi_resource;
+ acpi_resource_type id;
+ u32 length;
+ union acpi_resource_data data;
+};
#define ACPI_RESOURCE_LENGTH 12
#define ACPI_RESOURCE_LENGTH_NO_DATA 8 /* Id + Length fields */
#define ACPI_SIZEOF_RESOURCE(type) (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (type))
-#define ACPI_NEXT_RESOURCE(res) (acpi_resource *)((u8 *) res + res->length)
+#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length)
#ifdef _HW_ALIGNMENT_SUPPORT
#define ACPI_ALIGN_RESOURCE_SIZE(length) (length)
*/
-typedef struct acpi_pci_routing_table
+struct acpi_pci_routing_table
{
- u32 length;
- u32 pin;
- acpi_integer address; /* here for 64-bit alignment */
- u32 source_index;
- char source[4]; /* pad to 64 bits so sizeof() works in all cases */
-
-} acpi_pci_routing_table;
+ u32 length;
+ u32 pin;
+ acpi_integer address; /* here for 64-bit alignment */
+ u32 source_index;
+ char source[4]; /* pad to 64 bits so sizeof() works in all cases */
+};
/*
* END: of definitions for PCI Routing tables
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
typedef
acpi_status (*acpi_pkg_callback) (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
acpi_status
acpi_ut_walk_package_tree (
- acpi_operand_object *source_object,
- void *target_object,
- acpi_pkg_callback walk_callback,
- void *context);
+ union acpi_operand_object *source_object,
+ void *target_object,
+ acpi_pkg_callback walk_callback,
+ void *context);
-typedef struct acpi_pkg_info
+struct acpi_pkg_info
{
- u8 *free_space;
- acpi_size length;
- u32 object_space;
- u32 num_packages;
-} acpi_pkg_info;
+ u8 *free_space;
+ acpi_size length;
+ u32 object_space;
+ u32 num_packages;
+};
#define REF_INCREMENT (u16) 0
#define REF_DECREMENT (u16) 1
char *
acpi_ut_get_mutex_name (
- u32 mutex_id);
+ u32 mutex_id);
#endif
char *
acpi_ut_get_type_name (
- acpi_object_type type);
+ acpi_object_type type);
char *
acpi_ut_get_object_type_name (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
char *
acpi_ut_get_region_name (
- u8 space_id);
+ u8 space_id);
char *
acpi_ut_get_event_name (
- u32 event_id);
+ u32 event_id);
char
acpi_ut_hex_to_ascii_char (
- acpi_integer integer,
- u32 position);
+ acpi_integer integer,
+ u32 position);
u8
acpi_ut_valid_object_type (
- acpi_object_type type);
+ acpi_object_type type);
acpi_owner_id
acpi_ut_allocate_owner_id (
- u32 id_type);
+ u32 id_type);
/*
acpi_size
acpi_ut_strlen (
- const char *string);
+ const char *string);
char *
acpi_ut_strcpy (
- char *dst_string,
- const char *src_string);
+ char *dst_string,
+ const char *src_string);
char *
acpi_ut_strncpy (
- char *dst_string,
- const char *src_string,
- acpi_size count);
+ char *dst_string,
+ const char *src_string,
+ acpi_size count);
int
acpi_ut_strncmp (
- const char *string1,
- const char *string2,
- acpi_size count);
+ const char *string1,
+ const char *string2,
+ acpi_size count);
int
acpi_ut_strcmp (
- const char *string1,
- const char *string2);
+ const char *string1,
+ const char *string2);
char *
acpi_ut_strcat (
- char *dst_string,
- const char *src_string);
+ char *dst_string,
+ const char *src_string);
char *
acpi_ut_strncat (
- char *dst_string,
- const char *src_string,
- acpi_size count);
+ char *dst_string,
+ const char *src_string,
+ acpi_size count);
u32
acpi_ut_strtoul (
- const char *string,
- char **terminator,
- u32 base);
+ const char *string,
+ char **terminator,
+ u32 base);
char *
acpi_ut_strstr (
- char *string1,
- char *string2);
+ char *string1,
+ char *string2);
void *
acpi_ut_memcpy (
- void *dest,
- const void *src,
- acpi_size count);
+ void *dest,
+ const void *src,
+ acpi_size count);
void *
acpi_ut_memset (
- void *dest,
- acpi_native_uint value,
- acpi_size count);
+ void *dest,
+ acpi_native_uint value,
+ acpi_size count);
int
acpi_ut_to_upper (
- int c);
+ int c);
int
acpi_ut_to_lower (
- int c);
+ int c);
extern const u8 _acpi_ctype[];
acpi_status
acpi_ut_build_simple_object(
- acpi_operand_object *obj,
- acpi_object *user_obj,
- u8 *data_space,
- u32 *buffer_space_used);
+ union acpi_operand_object *obj,
+ union acpi_object *user_obj,
+ u8 *data_space,
+ u32 *buffer_space_used);
acpi_status
acpi_ut_build_package_object (
- acpi_operand_object *obj,
- u8 *buffer,
- u32 *space_used);
+ union acpi_operand_object *obj,
+ u8 *buffer,
+ u32 *space_used);
acpi_status
acpi_ut_copy_ielement_to_eelement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
acpi_status
acpi_ut_copy_ielement_to_ielement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
acpi_status
acpi_ut_copy_iobject_to_eobject (
- acpi_operand_object *obj,
- acpi_buffer *ret_buffer);
+ union acpi_operand_object *obj,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_ut_copy_esimple_to_isimple(
- acpi_object *user_obj,
- acpi_operand_object **return_obj);
+ union acpi_object *user_obj,
+ union acpi_operand_object **return_obj);
acpi_status
acpi_ut_copy_eobject_to_iobject (
- acpi_object *obj,
- acpi_operand_object **internal_obj);
+ union acpi_object *obj,
+ union acpi_operand_object **internal_obj);
acpi_status
acpi_ut_copy_isimple_to_isimple (
- acpi_operand_object *source_obj,
- acpi_operand_object *dest_obj);
+ union acpi_operand_object *source_obj,
+ union acpi_operand_object *dest_obj);
acpi_status
acpi_ut_copy_ipackage_to_ipackage (
- acpi_operand_object *source_obj,
- acpi_operand_object *dest_obj,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_obj,
+ union acpi_operand_object *dest_obj,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ut_copy_simple_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc);
acpi_status
acpi_ut_copy_iobject_to_iobject (
- acpi_operand_object *source_desc,
- acpi_operand_object **dest_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **dest_desc,
+ struct acpi_walk_state *walk_state);
/*
acpi_status
acpi_ut_update_object_reference (
- acpi_operand_object *object,
- u16 action);
+ union acpi_operand_object *object,
+ u16 action);
/*
void
acpi_ut_trace (
- u32 line_number,
- acpi_debug_print_info *dbg_info);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info);
void
acpi_ut_trace_ptr (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- void *pointer);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ void *pointer);
void
acpi_ut_trace_u32 (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u32 integer);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u32 integer);
void
acpi_ut_trace_str (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *string);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *string);
void
acpi_ut_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info);
void
acpi_ut_status_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_status status);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_status status);
void
acpi_ut_value_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_integer value);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_integer value);
void
acpi_ut_ptr_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u8 *ptr);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u8 *ptr);
void
acpi_ut_report_info (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
void
acpi_ut_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
void
acpi_ut_report_warning (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
void
acpi_ut_dump_buffer (
- u8 *buffer,
- u32 count,
- u32 display,
- u32 component_id);
+ u8 *buffer,
+ u32 count,
+ u32 display,
+ u32 component_id);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...) ACPI_PRINTF_LIKE_FUNC;
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print_raw (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...) ACPI_PRINTF_LIKE_FUNC;
void
acpi_ut_delete_internal_obj (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_delete_internal_package_object (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_delete_internal_simple_object (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_delete_internal_object_list (
- acpi_operand_object **obj_list);
+ union acpi_operand_object **obj_list);
/*
acpi_status
acpi_ut_evaluate_object (
- acpi_namespace_node *prefix_node,
- char *path,
- u32 expected_return_btypes,
- acpi_operand_object **return_desc);
+ struct acpi_namespace_node *prefix_node,
+ char *path,
+ u32 expected_return_btypes,
+ union acpi_operand_object **return_desc);
acpi_status
acpi_ut_evaluate_numeric_object (
- char *object_name,
- acpi_namespace_node *device_node,
- acpi_integer *address);
+ char *object_name,
+ struct acpi_namespace_node *device_node,
+ acpi_integer *address);
acpi_status
acpi_ut_execute_HID (
- acpi_namespace_node *device_node,
- acpi_device_id *hid);
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *hid);
acpi_status
acpi_ut_execute_CID (
- acpi_namespace_node *device_node,
- acpi_device_id *cid);
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *cid);
acpi_status
acpi_ut_execute_STA (
- acpi_namespace_node *device_node,
- u32 *status_flags);
+ struct acpi_namespace_node *device_node,
+ u32 *status_flags);
acpi_status
acpi_ut_execute_UID (
- acpi_namespace_node *device_node,
- acpi_device_id *uid);
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *uid);
/*
acpi_status
acpi_ut_create_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
acpi_status
acpi_ut_delete_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
acpi_status
acpi_ut_acquire_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
acpi_status
acpi_ut_release_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
/*
* ut_object - internal object create/delete/cache routines
*/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_internal_object_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id,
- acpi_object_type type);
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ acpi_object_type type);
void *
acpi_ut_allocate_object_desc_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_THIS_MODULE,__LINE__,_COMPONENT)
void
acpi_ut_delete_object_desc (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
u8
acpi_ut_valid_internal_object (
- void *object);
+ void *object);
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_buffer_object (
- acpi_size buffer_size);
+ acpi_size buffer_size);
/*
void
acpi_ut_add_reference (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_remove_reference (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
/*
* ut_size - Object size routines
acpi_status
acpi_ut_get_simple_object_size (
- acpi_operand_object *obj,
- acpi_size *obj_length);
+ union acpi_operand_object *obj,
+ acpi_size *obj_length);
acpi_status
acpi_ut_get_package_object_size (
- acpi_operand_object *obj,
- acpi_size *obj_length);
+ union acpi_operand_object *obj,
+ acpi_size *obj_length);
acpi_status
acpi_ut_get_object_size(
- acpi_operand_object *obj,
- acpi_size *obj_length);
+ union acpi_operand_object *obj,
+ acpi_size *obj_length);
acpi_status
acpi_ut_get_element_length (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
/*
void
acpi_ut_push_generic_state (
- acpi_generic_state **list_head,
- acpi_generic_state *state);
+ union acpi_generic_state **list_head,
+ union acpi_generic_state *state);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_pop_generic_state (
- acpi_generic_state **list_head);
+ union acpi_generic_state **list_head);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_generic_state (
void);
-acpi_thread_state *
+struct acpi_thread_state *
acpi_ut_create_thread_state (
void);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_update_state (
- acpi_operand_object *object,
- u16 action);
+ union acpi_operand_object *object,
+ u16 action);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_pkg_state (
- void *internal_object,
- void *external_object,
- u16 index);
+ void *internal_object,
+ void *external_object,
+ u16 index);
acpi_status
acpi_ut_create_update_state_and_push (
- acpi_operand_object *object,
- u16 action,
- acpi_generic_state **state_list);
+ union acpi_operand_object *object,
+ u16 action,
+ union acpi_generic_state **state_list);
acpi_status
acpi_ut_create_pkg_state_and_push (
- void *internal_object,
- void *external_object,
- u16 index,
- acpi_generic_state **state_list);
+ void *internal_object,
+ void *external_object,
+ u16 index,
+ union acpi_generic_state **state_list);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_control_state (
void);
void
acpi_ut_delete_generic_state (
- acpi_generic_state *state);
+ union acpi_generic_state *state);
void
acpi_ut_delete_generic_state_cache (
void
acpi_ut_print_string (
- char *string,
- u8 max_length);
+ char *string,
+ u8 max_length);
acpi_status
acpi_ut_divide (
- acpi_integer *in_dividend,
- acpi_integer *in_divisor,
- acpi_integer *out_quotient,
- acpi_integer *out_remainder);
+ acpi_integer *in_dividend,
+ acpi_integer *in_divisor,
+ acpi_integer *out_quotient,
+ acpi_integer *out_remainder);
acpi_status
acpi_ut_short_divide (
- acpi_integer *in_dividend,
- u32 divisor,
- acpi_integer *out_quotient,
- u32 *out_remainder);
+ acpi_integer *in_dividend,
+ u32 divisor,
+ acpi_integer *out_quotient,
+ u32 *out_remainder);
u8
acpi_ut_valid_acpi_name (
- u32 name);
+ u32 name);
u8
acpi_ut_valid_acpi_character (
- char character);
+ char character);
acpi_status
acpi_ut_strtoul64 (
- char *string,
- u32 base,
- acpi_integer *ret_integer);
+ char *string,
+ u32 base,
+ acpi_integer *ret_integer);
char *
acpi_ut_strupr (
- char *src_string);
+ char *src_string);
u8 *
acpi_ut_get_resource_end_tag (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
u8
acpi_ut_generate_checksum (
- u8 *buffer,
- u32 length);
+ u8 *buffer,
+ u32 length);
u32
acpi_ut_dword_byte_swap (
- u32 value);
+ u32 value);
void
acpi_ut_set_integer_width (
- u8 revision);
+ u8 revision);
#ifdef ACPI_DEBUG_OUTPUT
void
acpi_ut_display_init_pathname (
- u8 type,
- acpi_namespace_node *obj_handle,
- char *path);
+ u8 type,
+ struct acpi_namespace_node *obj_handle,
+ char *path);
#endif
void *
acpi_ut_acquire_from_cache (
- u32 list_id);
+ u32 list_id);
void
acpi_ut_release_to_cache (
- u32 list_id,
- void *object);
+ u32 list_id,
+ void *object);
void
acpi_ut_delete_generic_cache (
- u32 list_id);
+ u32 list_id);
acpi_status
acpi_ut_validate_buffer (
- acpi_buffer *buffer);
+ struct acpi_buffer *buffer);
acpi_status
acpi_ut_initialize_buffer (
- acpi_buffer *buffer,
- acpi_size required_length);
+ struct acpi_buffer *buffer,
+ acpi_size required_length);
/* Memory allocation functions */
void *
acpi_ut_allocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
void *
acpi_ut_callocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
void *
acpi_ut_allocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
void *
acpi_ut_callocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
void
acpi_ut_free_and_track (
- void *address,
- u32 component,
- char *module,
- u32 line);
+ void *address,
+ u32 component,
+ char *module,
+ u32 line);
-acpi_debug_mem_block *
+struct acpi_debug_mem_block *
acpi_ut_find_allocation (
- u32 list_id,
- void *allocation);
+ u32 list_id,
+ void *allocation);
acpi_status
acpi_ut_track_allocation (
- u32 list_id,
- acpi_debug_mem_block *address,
- acpi_size size,
- u8 alloc_type,
- u32 component,
- char *module,
- u32 line);
+ u32 list_id,
+ struct acpi_debug_mem_block *address,
+ acpi_size size,
+ u8 alloc_type,
+ u32 component,
+ char *module,
+ u32 line);
acpi_status
acpi_ut_remove_allocation (
- u32 list_id,
- acpi_debug_mem_block *address,
- u32 component,
- char *module,
- u32 line);
+ u32 list_id,
+ struct acpi_debug_mem_block *address,
+ u32 component,
+ char *module,
+ u32 line);
void
acpi_ut_dump_allocation_info (
void
acpi_ut_dump_allocations (
- u32 component,
- char *module);
+ u32 component,
+ char *module);
#endif
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define ASL_RDESC_END_TAG_SIZE 0x01
-typedef struct asl_resource_node
+struct asl_resource_node
{
- u32 buffer_length;
- void *buffer;
- struct asl_resource_node *next;
-
-} asl_resource_node;
+ u32 buffer_length;
+ void *buffer;
+ struct asl_resource_node *next;
+};
/*
*/
#pragma pack(1)
-typedef struct asl_irq_format_desc
+struct asl_irq_format_desc
{
- u8 descriptor_type;
- u16 irq_mask;
- u8 flags;
-
-} asl_irq_format_desc;
+ u8 descriptor_type;
+ u16 irq_mask;
+ u8 flags;
+};
-typedef struct asl_irq_noflags_desc
+struct asl_irq_noflags_desc
{
- u8 descriptor_type;
- u16 irq_mask;
-
-} asl_irq_noflags_desc;
+ u8 descriptor_type;
+ u16 irq_mask;
+};
-typedef struct asl_dma_format_desc
+struct asl_dma_format_desc
{
- u8 descriptor_type;
- u8 dma_channel_mask;
- u8 flags;
+ u8 descriptor_type;
+ u8 dma_channel_mask;
+ u8 flags;
+};
-} asl_dma_format_desc;
-
-typedef struct asl_start_dependent_desc
+struct asl_start_dependent_desc
{
- u8 descriptor_type;
- u8 flags;
-
-} asl_start_dependent_desc;
+ u8 descriptor_type;
+ u8 flags;
+};
-typedef struct asl_start_dependent_noprio_desc
+struct asl_start_dependent_noprio_desc
{
- u8 descriptor_type;
+ u8 descriptor_type;
+};
-} asl_start_dependent_noprio_desc;
-
-typedef struct asl_end_dependent_desc
+struct asl_end_dependent_desc
{
- u8 descriptor_type;
-
-} asl_end_dependent_desc;
+ u8 descriptor_type;
+};
-typedef struct asl_io_port_desc
+struct asl_io_port_desc
{
- u8 descriptor_type;
- u8 information;
- u16 address_min;
- u16 address_max;
- u8 alignment;
- u8 length;
+ u8 descriptor_type;
+ u8 information;
+ u16 address_min;
+ u16 address_max;
+ u8 alignment;
+ u8 length;
+};
-} asl_io_port_desc;
-
-typedef struct asl_fixed_io_port_desc
+struct asl_fixed_io_port_desc
{
- u8 descriptor_type;
- u16 base_address;
- u8 length;
-
-} asl_fixed_io_port_desc;
+ u8 descriptor_type;
+ u16 base_address;
+ u8 length;
+};
-typedef struct asl_small_vendor_desc
+struct asl_small_vendor_desc
{
- u8 descriptor_type;
- u8 vendor_defined[7];
+ u8 descriptor_type;
+ u8 vendor_defined[7];
+};
-} asl_small_vendor_desc;
-
-typedef struct asl_end_tag_desc
+struct asl_end_tag_desc
{
- u8 descriptor_type;
- u8 checksum;
-
-} asl_end_tag_desc;
+ u8 descriptor_type;
+ u8 checksum;
+};
/* LARGE descriptors */
-typedef struct asl_memory_24_desc
+struct asl_memory_24_desc
{
- u8 descriptor_type;
- u16 length;
- u8 information;
- u16 address_min;
- u16 address_max;
- u16 alignment;
- u16 range_length;
+ u8 descriptor_type;
+ u16 length;
+ u8 information;
+ u16 address_min;
+ u16 address_max;
+ u16 alignment;
+ u16 range_length;
+};
-} asl_memory_24_desc;
-
-typedef struct asl_large_vendor_desc
+struct asl_large_vendor_desc
{
- u8 descriptor_type;
- u16 length;
- u8 vendor_defined[1];
-
-} asl_large_vendor_desc;
+ u8 descriptor_type;
+ u16 length;
+ u8 vendor_defined[1];
+};
-typedef struct asl_memory_32_desc
+struct asl_memory_32_desc
{
- u8 descriptor_type;
- u16 length;
- u8 information;
- u32 address_min;
- u32 address_max;
- u32 alignment;
- u32 range_length;
+ u8 descriptor_type;
+ u16 length;
+ u8 information;
+ u32 address_min;
+ u32 address_max;
+ u32 alignment;
+ u32 range_length;
+};
-} asl_memory_32_desc;
-
-typedef struct asl_fixed_memory_32_desc
+struct asl_fixed_memory_32_desc
{
- u8 descriptor_type;
- u16 length;
- u8 information;
- u32 base_address;
- u32 range_length;
-
-} asl_fixed_memory_32_desc;
+ u8 descriptor_type;
+ u16 length;
+ u8 information;
+ u32 base_address;
+ u32 range_length;
+};
-typedef struct asl_qword_address_desc
+struct asl_qword_address_desc
{
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
- u8 flags;
- u8 specific_flags;
- u64 granularity;
- u64 address_min;
- u64 address_max;
- u64 translation_offset;
- u64 address_length;
- u8 optional_fields[2];
-
-} asl_qword_address_desc;
-
-
-typedef struct asl_dword_address_desc
+ u8 descriptor_type;
+ u16 length;
+ u8 resource_type;
+ u8 flags;
+ u8 specific_flags;
+ u64 granularity;
+ u64 address_min;
+ u64 address_max;
+ u64 translation_offset;
+ u64 address_length;
+ u8 optional_fields[2];
+};
+
+
+struct asl_dword_address_desc
{
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
- u8 flags;
- u8 specific_flags;
- u32 granularity;
- u32 address_min;
- u32 address_max;
- u32 translation_offset;
- u32 address_length;
- u8 optional_fields[2];
-
-} asl_dword_address_desc;
-
-
-typedef struct asl_word_address_desc
+ u8 descriptor_type;
+ u16 length;
+ u8 resource_type;
+ u8 flags;
+ u8 specific_flags;
+ u32 granularity;
+ u32 address_min;
+ u32 address_max;
+ u32 translation_offset;
+ u32 address_length;
+ u8 optional_fields[2];
+};
+
+
+struct asl_word_address_desc
{
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
- u8 flags;
- u8 specific_flags;
- u16 granularity;
- u16 address_min;
- u16 address_max;
- u16 translation_offset;
- u16 address_length;
- u8 optional_fields[2];
-
-} asl_word_address_desc;
-
-
-typedef struct asl_extended_xrupt_desc
+ u8 descriptor_type;
+ u16 length;
+ u8 resource_type;
+ u8 flags;
+ u8 specific_flags;
+ u16 granularity;
+ u16 address_min;
+ u16 address_max;
+ u16 translation_offset;
+ u16 address_length;
+ u8 optional_fields[2];
+};
+
+
+struct asl_extended_xrupt_desc
{
- u8 descriptor_type;
- u16 length;
- u8 flags;
- u8 table_length;
- u32 interrupt_number[1];
+ u8 descriptor_type;
+ u16 length;
+ u8 flags;
+ u8 table_length;
+ u32 interrupt_number[1];
/* res_source_index, res_source optional fields follow */
+};
-} asl_extended_xrupt_desc;
-
-typedef struct asl_general_register_desc
+struct asl_general_register_desc
{
- u8 descriptor_type;
- u16 length;
- u8 address_space_id;
- u8 bit_width;
- u8 bit_offset;
- u8 reserved;
- u64 address;
-
-} asl_general_register_desc;
+ u8 descriptor_type;
+ u16 length;
+ u8 address_space_id;
+ u8 bit_width;
+ u8 bit_offset;
+ u8 reserved;
+ u64 address;
+};
/* restore default alignment */
/* Union of all resource descriptors, sow we can allocate the worst case */
-typedef union asl_resource_desc
+union asl_resource_desc
{
- asl_irq_format_desc irq;
- asl_dma_format_desc dma;
- asl_start_dependent_desc std;
- asl_end_dependent_desc end;
- asl_io_port_desc iop;
- asl_fixed_io_port_desc fio;
- asl_small_vendor_desc smv;
- asl_end_tag_desc et;
-
- asl_memory_24_desc M24;
- asl_large_vendor_desc lgv;
- asl_memory_32_desc M32;
- asl_fixed_memory_32_desc F32;
- asl_qword_address_desc qas;
- asl_dword_address_desc das;
- asl_word_address_desc was;
- asl_extended_xrupt_desc exx;
- asl_general_register_desc grg;
- u32 u32_item;
- u16 u16_item;
- u8 U8item;
-
-} asl_resource_desc;
+ struct asl_irq_format_desc irq;
+ struct asl_dma_format_desc dma;
+ struct asl_start_dependent_desc std;
+ struct asl_end_dependent_desc end;
+ struct asl_io_port_desc iop;
+ struct asl_fixed_io_port_desc fio;
+ struct asl_small_vendor_desc smv;
+ struct asl_end_tag_desc et;
+
+ struct asl_memory_24_desc M24;
+ struct asl_large_vendor_desc lgv;
+ struct asl_memory_32_desc M32;
+ struct asl_fixed_memory_32_desc F32;
+ struct asl_qword_address_desc qas;
+ struct asl_dword_address_desc das;
+ struct asl_word_address_desc was;
+ struct asl_extended_xrupt_desc exx;
+ struct asl_general_register_desc grg;
+ u32 u32_item;
+ u16 u16_item;
+ u8 U8item;
+};
#endif
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_root_initialize (void)
{
- acpi_status status;
- const acpi_predefined_names *init_val = NULL;
- acpi_namespace_node *new_node;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ const struct acpi_predefined_names *init_val = NULL;
+ struct acpi_namespace_node *new_node;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ns_root_initialize");
acpi_status
acpi_ns_lookup (
- acpi_generic_state *scope_info,
- char *pathname,
- acpi_object_type type,
- acpi_interpreter_mode interpreter_mode,
- u32 flags,
- acpi_walk_state *walk_state,
- acpi_namespace_node **return_node)
+ union acpi_generic_state *scope_info,
+ char *pathname,
+ acpi_object_type type,
+ acpi_interpreter_mode interpreter_mode,
+ u32 flags,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **return_node)
{
- acpi_status status;
- char *path = pathname;
- acpi_namespace_node *prefix_node;
- acpi_namespace_node *current_node = NULL;
- acpi_namespace_node *this_node = NULL;
- u32 num_segments;
- u32 num_carats;
- acpi_name simple_name;
- acpi_object_type type_to_check_for;
- acpi_object_type this_search_type;
- u32 search_parent_flag = ACPI_NS_SEARCH_PARENT;
- u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND |
+ acpi_status status;
+ char *path = pathname;
+ struct acpi_namespace_node *prefix_node;
+ struct acpi_namespace_node *current_node = NULL;
+ struct acpi_namespace_node *this_node = NULL;
+ u32 num_segments;
+ u32 num_carats;
+ acpi_name simple_name;
+ acpi_object_type type_to_check_for;
+ acpi_object_type this_search_type;
+ u32 search_parent_flag = ACPI_NS_SEARCH_PARENT;
+ u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND |
ACPI_NS_SEARCH_PARENT);
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_create_node (
- u32 name)
+ u32 name)
{
- acpi_namespace_node *node;
+ struct acpi_namespace_node *node;
ACPI_FUNCTION_TRACE ("ns_create_node");
- node = ACPI_MEM_CALLOCATE (sizeof (acpi_namespace_node));
+ node = ACPI_MEM_CALLOCATE (sizeof (struct acpi_namespace_node));
if (!node) {
return_PTR (NULL);
}
void
acpi_ns_delete_node (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_namespace_node *parent_node;
- acpi_namespace_node *prev_node;
- acpi_namespace_node *next_node;
+ struct acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *prev_node;
+ struct acpi_namespace_node *next_node;
ACPI_FUNCTION_TRACE_PTR ("ns_delete_node", node);
int
acpi_ns_compare_names (
- char *name1,
- char *name2)
+ char *name1,
+ char *name2)
{
- char reversed_name1[ACPI_NAME_SIZE];
- char reversed_name2[ACPI_NAME_SIZE];
- u32 i;
- u32 j;
+ char reversed_name1[ACPI_NAME_SIZE];
+ char reversed_name2[ACPI_NAME_SIZE];
+ u32 i;
+ u32 j;
/*
void
acpi_ns_install_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *parent_node, /* Parent */
- acpi_namespace_node *node, /* New Child*/
- acpi_object_type type)
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *parent_node, /* Parent */
+ struct acpi_namespace_node *node, /* New Child*/
+ acpi_object_type type)
{
- u16 owner_id = TABLE_ID_DSDT;
- acpi_namespace_node *child_node;
+ u16 owner_id = TABLE_ID_DSDT;
+ struct acpi_namespace_node *child_node;
#ifdef ACPI_ALPHABETIC_NAMESPACE
- acpi_namespace_node *previous_child_node;
+ struct acpi_namespace_node *previous_child_node;
#endif
void
acpi_ns_delete_children (
- acpi_namespace_node *parent_node)
+ struct acpi_namespace_node *parent_node)
{
- acpi_namespace_node *child_node;
- acpi_namespace_node *next_node;
- u8 flags;
+ struct acpi_namespace_node *child_node;
+ struct acpi_namespace_node *next_node;
+ u8 flags;
ACPI_FUNCTION_TRACE_PTR ("ns_delete_children", parent_node);
void
acpi_ns_delete_namespace_subtree (
- acpi_namespace_node *parent_node)
+ struct acpi_namespace_node *parent_node)
{
- acpi_namespace_node *child_node = NULL;
- u32 level = 1;
+ struct acpi_namespace_node *child_node = NULL;
+ u32 level = 1;
ACPI_FUNCTION_TRACE ("ns_delete_namespace_subtree");
static void
acpi_ns_remove_reference (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_namespace_node *parent_node;
- acpi_namespace_node *this_node;
+ struct acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *this_node;
ACPI_FUNCTION_ENTRY ();
void
acpi_ns_delete_namespace_by_owner (
- u16 owner_id)
+ u16 owner_id)
{
- acpi_namespace_node *child_node;
- acpi_namespace_node *deletion_node;
- u32 level;
- acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *child_node;
+ struct acpi_namespace_node *deletion_node;
+ u32 level;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_TRACE_U32 ("ns_delete_namespace_by_owner", owner_id);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ns_print_pathname (
- u32 num_segments,
- char *pathname)
+ u32 num_segments,
+ char *pathname)
{
ACPI_FUNCTION_NAME ("ns_print_pathname");
void
acpi_ns_dump_pathname (
- acpi_handle handle,
- char *msg,
- u32 level,
- u32 component)
+ acpi_handle handle,
+ char *msg,
+ u32 level,
+ u32 component)
{
ACPI_FUNCTION_TRACE ("ns_dump_pathname");
acpi_status
acpi_ns_dump_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_walk_info *info = (acpi_walk_info *) context;
- acpi_namespace_node *this_node;
- acpi_operand_object *obj_desc = NULL;
- acpi_object_type obj_type;
- acpi_object_type type;
- u32 bytes_to_dump;
- u32 dbg_level;
- u32 i;
+ struct acpi_walk_info *info = (struct acpi_walk_info *) context;
+ struct acpi_namespace_node *this_node;
+ union acpi_operand_object *obj_desc = NULL;
+ acpi_object_type obj_type;
+ acpi_object_type type;
+ u32 bytes_to_dump;
+ u32 dbg_level;
+ u32 i;
ACPI_FUNCTION_NAME ("ns_dump_one_object");
case ACPI_TYPE_LOCAL_ALIAS:
- acpi_os_printf ("Target %4.4s (%p)\n", ((acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
+ acpi_os_printf ("Target %4.4s (%p)\n", ((struct acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
break;
default:
case ACPI_DESC_TYPE_NAMED:
acpi_os_printf ("(Ptr to Node)\n");
- bytes_to_dump = sizeof (acpi_namespace_node);
+ bytes_to_dump = sizeof (struct acpi_namespace_node);
break;
else {
acpi_os_printf ("(Ptr to ACPI Object type %s, %X)\n",
acpi_ut_get_type_name (obj_type), obj_type);
- bytes_to_dump = sizeof (acpi_operand_object);
+ bytes_to_dump = sizeof (union acpi_operand_object);
}
break;
break;
case ACPI_TYPE_BUFFER_FIELD:
- obj_desc = (acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
+ obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
break;
case ACPI_TYPE_PACKAGE:
void
acpi_ns_dump_objects (
- acpi_object_type type,
- u8 display_type,
- u32 max_depth,
- u32 owner_id,
- acpi_handle start_handle)
+ acpi_object_type type,
+ u8 display_type,
+ u32 max_depth,
+ u32 owner_id,
+ acpi_handle start_handle)
{
- acpi_walk_info info;
+ struct acpi_walk_info info;
ACPI_FUNCTION_ENTRY ();
void
acpi_ns_dump_tables (
- acpi_handle search_base,
- u32 max_depth)
+ acpi_handle search_base,
+ u32 max_depth)
{
- acpi_handle search_handle = search_base;
+ acpi_handle search_handle = search_base;
ACPI_FUNCTION_TRACE ("ns_dump_tables");
void
acpi_ns_dump_entry (
- acpi_handle handle,
- u32 debug_level)
+ acpi_handle handle,
+ u32 debug_level)
{
- acpi_walk_info info;
+ struct acpi_walk_info info;
ACPI_FUNCTION_ENTRY ();
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_dump_one_device (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_device_info info;
- acpi_status status;
- u32 i;
+ struct acpi_device_info info;
+ acpi_status status;
+ u32 i;
ACPI_FUNCTION_NAME ("ns_dump_one_device");
void
acpi_ns_dump_root_devices (void)
{
- acpi_handle sys_bus_handle;
- acpi_status status;
+ acpi_handle sys_bus_handle;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ns_dump_root_devices");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_evaluate_relative (
- acpi_namespace_node *handle,
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object)
+ struct acpi_namespace_node *handle,
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object)
{
- acpi_namespace_node *prefix_node;
- acpi_status status;
- acpi_namespace_node *node = NULL;
- char *internal_path = NULL;
- acpi_generic_state scope_info;
+ struct acpi_namespace_node *prefix_node;
+ acpi_status status;
+ struct acpi_namespace_node *node = NULL;
+ char *internal_path = NULL;
+ union acpi_generic_state scope_info;
ACPI_FUNCTION_TRACE ("ns_evaluate_relative");
acpi_status
acpi_ns_evaluate_by_name (
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object)
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object)
{
- acpi_status status;
- acpi_namespace_node *node = NULL;
- char *internal_path = NULL;
+ acpi_status status;
+ struct acpi_namespace_node *node = NULL;
+ char *internal_path = NULL;
ACPI_FUNCTION_TRACE ("ns_evaluate_by_name");
acpi_status
acpi_ns_evaluate_by_handle (
- acpi_namespace_node *handle,
- acpi_operand_object **params,
- acpi_operand_object **return_object)
+ struct acpi_namespace_node *handle,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object)
{
- acpi_namespace_node *node;
- acpi_status status;
- acpi_operand_object *local_return_object;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ union acpi_operand_object *local_return_object;
ACPI_FUNCTION_TRACE ("ns_evaluate_by_handle");
acpi_status
acpi_ns_execute_control_method (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc)
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ns_execute_control_method");
acpi_status
acpi_ns_get_object_value (
- acpi_namespace_node *node,
- acpi_operand_object **return_obj_desc)
+ struct acpi_namespace_node *node,
+ union acpi_operand_object **return_obj_desc)
{
- acpi_status status = AE_OK;
- acpi_namespace_node *resolved_node = node;
+ acpi_status status = AE_OK;
+ struct acpi_namespace_node *resolved_node = node;
ACPI_FUNCTION_TRACE ("ns_get_object_value");
if (ACPI_SUCCESS (status)) {
status = AE_CTRL_RETURN_VALUE;
- *return_obj_desc = ACPI_CAST_PTR (acpi_operand_object, resolved_node);
+ *return_obj_desc = ACPI_CAST_PTR (union acpi_operand_object, resolved_node);
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Returning object %p [%s]\n",
*return_obj_desc, acpi_ut_get_object_type_name (*return_obj_desc)));
}
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_ns_initialize_objects (
void)
{
- acpi_status status;
- acpi_init_walk_info info;
+ acpi_status status;
+ struct acpi_init_walk_info info;
ACPI_FUNCTION_TRACE ("ns_initialize_objects");
/* Set all init info to zero */
- ACPI_MEMSET (&info, 0, sizeof (acpi_init_walk_info));
+ ACPI_MEMSET (&info, 0, sizeof (struct acpi_init_walk_info));
/* Walk entire namespace from the supplied root */
acpi_ns_initialize_devices (
void)
{
- acpi_status status;
- acpi_device_walk_info info;
+ acpi_status status;
+ struct acpi_device_walk_info info;
ACPI_FUNCTION_TRACE ("ns_initialize_devices");
acpi_status
acpi_ns_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_object_type type;
- acpi_status status;
- acpi_init_walk_info *info = (acpi_init_walk_info *) context;
- acpi_namespace_node *node = (acpi_namespace_node *) obj_handle;
- acpi_operand_object *obj_desc;
+ acpi_object_type type;
+ acpi_status status;
+ struct acpi_init_walk_info *info = (struct acpi_init_walk_info *) context;
+ struct acpi_namespace_node *node = (struct acpi_namespace_node *) obj_handle;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_NAME ("ns_init_one_object");
acpi_status
acpi_ns_init_one_device (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_namespace_node *node;
- u32 flags;
- acpi_device_walk_info *info = (acpi_device_walk_info *) context;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ u32 flags;
+ struct acpi_device_walk_info *info = (struct acpi_device_walk_info *) context;
ACPI_FUNCTION_TRACE ("ns_init_one_device");
/* Ignore error and move on to next device */
#ifdef ACPI_DEBUG_OUTPUT
- char *scope_name = acpi_ns_get_external_pathname (obj_handle);
+ char *scope_name = acpi_ns_get_external_pathname (obj_handle);
ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n",
scope_name, acpi_format_exception (status)));
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_load_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *node)
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *node)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_load_table");
acpi_status
acpi_ns_load_table_by_type (
- acpi_table_type table_type)
+ acpi_table_type table_type)
{
- u32 i;
- acpi_status status;
- acpi_table_desc *table_desc;
+ u32 i;
+ acpi_status status;
+ struct acpi_table_desc *table_desc;
ACPI_FUNCTION_TRACE ("ns_load_table_by_type");
acpi_ns_load_namespace (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_load_name_space");
acpi_status
acpi_ns_delete_subtree (
- acpi_handle start_handle)
+ acpi_handle start_handle)
{
- acpi_status status;
- acpi_handle child_handle;
- acpi_handle parent_handle;
- acpi_handle next_child_handle;
- acpi_handle dummy;
- u32 level;
+ acpi_status status;
+ acpi_handle child_handle;
+ acpi_handle parent_handle;
+ acpi_handle next_child_handle;
+ acpi_handle dummy;
+ u32 level;
ACPI_FUNCTION_TRACE ("ns_delete_subtree");
acpi_status
acpi_ns_unload_namespace (
- acpi_handle handle)
+ acpi_handle handle)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_unload_name_space");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ns_build_external_path (
- acpi_namespace_node *node,
- acpi_size size,
- char *name_buffer)
+ struct acpi_namespace_node *node,
+ acpi_size size,
+ char *name_buffer)
{
- acpi_size index;
- acpi_namespace_node *parent_node;
+ acpi_size index;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_NAME ("ns_build_external_path");
char *
acpi_ns_get_external_pathname (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- char *name_buffer;
- acpi_size size;
+ char *name_buffer;
+ acpi_size size;
ACPI_FUNCTION_TRACE_PTR ("ns_get_external_pathname", node);
acpi_size
acpi_ns_get_pathname_length (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_size size;
- acpi_namespace_node *next_node;
+ acpi_size size;
+ struct acpi_namespace_node *next_node;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ns_handle_to_pathname (
- acpi_handle target_handle,
- acpi_buffer *buffer)
+ acpi_handle target_handle,
+ struct acpi_buffer *buffer)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_size required_size;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_size required_size;
ACPI_FUNCTION_TRACE_PTR ("ns_handle_to_pathname", target_handle);
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_attach_object (
- acpi_namespace_node *node,
- acpi_operand_object *object,
- acpi_object_type type)
+ struct acpi_namespace_node *node,
+ union acpi_operand_object *object,
+ acpi_object_type type)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *last_obj_desc;
- acpi_object_type object_type = ACPI_TYPE_ANY;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *last_obj_desc;
+ acpi_object_type object_type = ACPI_TYPE_ANY;
ACPI_FUNCTION_TRACE ("ns_attach_object");
* we will use that (attached) object
*/
else if ((ACPI_GET_DESCRIPTOR_TYPE (object) == ACPI_DESC_TYPE_NAMED) &&
- ((acpi_namespace_node *) object)->object) {
+ ((struct acpi_namespace_node *) object)->object) {
/*
* Value passed is a name handle and that name has a
* non-null value. Use that name's value and type.
*/
- obj_desc = ((acpi_namespace_node *) object)->object;
- object_type = ((acpi_namespace_node *) object)->type;
+ obj_desc = ((struct acpi_namespace_node *) object)->object;
+ object_type = ((struct acpi_namespace_node *) object)->type;
}
/*
* it first
*/
else {
- obj_desc = (acpi_operand_object *) object;
+ obj_desc = (union acpi_operand_object *) object;
/* Use the given type */
void
acpi_ns_detach_object (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_operand_object *obj_desc;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ns_detach_object");
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_attached_object (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
ACPI_FUNCTION_TRACE_PTR ("ns_get_attached_object", node);
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_secondary_object (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
ACPI_FUNCTION_TRACE_PTR ("ns_get_secondary_object", obj_desc);
acpi_status
acpi_ns_attach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void *data)
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void *data)
{
- acpi_operand_object *prev_obj_desc;
- acpi_operand_object *obj_desc;
- acpi_operand_object *data_desc;
+ union acpi_operand_object *prev_obj_desc;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *data_desc;
/* We only allow one attachment per handler */
acpi_status
acpi_ns_detach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler)
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *prev_obj_desc;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *prev_obj_desc;
prev_obj_desc = NULL;
acpi_status
acpi_ns_get_attached_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void **data)
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void **data)
{
- acpi_operand_object *obj_desc;
+ union acpi_operand_object *obj_desc;
obj_desc = node->object;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_one_complete_parse (
- u32 pass_number,
- acpi_table_desc *table_desc)
+ u32 pass_number,
+ struct acpi_table_desc *table_desc)
{
- acpi_parse_object *parse_root;
- acpi_status status;
- acpi_walk_state *walk_state;
+ union acpi_parse_object *parse_root;
+ acpi_status status;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE ("ns_one_complete_parse");
acpi_status
acpi_ns_parse_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *start_node)
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *start_node)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_parse_table");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ns_search_node (
- u32 target_name,
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_namespace_node **return_node)
+ u32 target_name,
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_namespace_node **return_node)
{
- acpi_namespace_node *next_node;
+ struct acpi_namespace_node *next_node;
ACPI_FUNCTION_TRACE ("ns_search_node");
#ifdef ACPI_DEBUG_OUTPUT
if (ACPI_LV_NAMES & acpi_dbg_level) {
- char *scope_name;
+ char *scope_name;
scope_name = acpi_ns_get_external_pathname (node);
if (scope_name) {
static acpi_status
acpi_ns_search_parent_tree (
- u32 target_name,
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_namespace_node **return_node)
+ u32 target_name,
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_namespace_node **return_node)
{
- acpi_status status;
- acpi_namespace_node *parent_node;
+ acpi_status status;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_TRACE ("ns_search_parent_tree");
acpi_status
acpi_ns_search_and_enter (
- u32 target_name,
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_interpreter_mode interpreter_mode,
- acpi_object_type type,
- u32 flags,
- acpi_namespace_node **return_node)
+ u32 target_name,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ acpi_interpreter_mode interpreter_mode,
+ acpi_object_type type,
+ u32 flags,
+ struct acpi_namespace_node **return_node)
{
- acpi_status status;
- acpi_namespace_node *new_node;
+ acpi_status status;
+ struct acpi_namespace_node *new_node;
ACPI_FUNCTION_TRACE ("ns_search_and_enter");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ns_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *internal_name,
- acpi_status lookup_status)
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *internal_name,
+ acpi_status lookup_status)
{
- acpi_status status;
- char *name;
+ acpi_status status;
+ char *name;
/* Convert path to external format */
void
acpi_ns_report_method_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *message,
- acpi_namespace_node *prefix_node,
- char *path,
- acpi_status method_status)
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *message,
+ struct acpi_namespace_node *prefix_node,
+ char *path,
+ acpi_status method_status)
{
- acpi_status status;
- acpi_namespace_node *node = prefix_node;
+ acpi_status status;
+ struct acpi_namespace_node *node = prefix_node;
if (path) {
void
acpi_ns_print_node_pathname (
- acpi_namespace_node *node,
- char *msg)
+ struct acpi_namespace_node *node,
+ char *msg)
{
- acpi_buffer buffer;
- acpi_status status;
+ struct acpi_buffer buffer;
+ acpi_status status;
/* Convert handle to a full pathname and print it (with supplied message) */
u8
acpi_ns_valid_root_prefix (
- char prefix)
+ char prefix)
{
return ((u8) (prefix == '\\'));
u8
acpi_ns_valid_path_separator (
- char sep)
+ char sep)
{
return ((u8) (sep == '.'));
acpi_object_type
acpi_ns_get_type (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
ACPI_FUNCTION_TRACE ("ns_get_type");
u32
acpi_ns_local (
- acpi_object_type type)
+ acpi_object_type type)
{
ACPI_FUNCTION_TRACE ("ns_local");
void
acpi_ns_get_internal_name_length (
- acpi_namestring_info *info)
+ struct acpi_namestring_info *info)
{
- char *next_external_char;
- u32 i;
+ char *next_external_char;
+ u32 i;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ns_build_internal_name (
- acpi_namestring_info *info)
+ struct acpi_namestring_info *info)
{
- u32 num_segments = info->num_segments;
- char *internal_name = info->internal_name;
- char *external_name = info->next_external_char;
- char *result = NULL;
- acpi_native_uint i;
+ u32 num_segments = info->num_segments;
+ char *internal_name = info->internal_name;
+ char *external_name = info->next_external_char;
+ char *result = NULL;
+ acpi_native_uint i;
ACPI_FUNCTION_TRACE ("ns_build_internal_name");
acpi_status
acpi_ns_internalize_name (
- char *external_name,
- char **converted_name)
+ char *external_name,
+ char **converted_name)
{
- char *internal_name;
- acpi_namestring_info info;
- acpi_status status;
+ char *internal_name;
+ struct acpi_namestring_info info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_internalize_name");
acpi_status
acpi_ns_externalize_name (
- u32 internal_name_length,
- char *internal_name,
- u32 *converted_name_length,
- char **converted_name)
+ u32 internal_name_length,
+ char *internal_name,
+ u32 *converted_name_length,
+ char **converted_name)
{
- acpi_native_uint names_index = 0;
- acpi_native_uint num_segments = 0;
- acpi_native_uint required_length;
- acpi_native_uint prefix_length = 0;
- acpi_native_uint i = 0;
- acpi_native_uint j = 0;
+ acpi_native_uint names_index = 0;
+ acpi_native_uint num_segments = 0;
+ acpi_native_uint required_length;
+ acpi_native_uint prefix_length = 0;
+ acpi_native_uint i = 0;
+ acpi_native_uint j = 0;
ACPI_FUNCTION_TRACE ("ns_externalize_name");
*
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_map_handle_to_node (
- acpi_handle handle)
+ acpi_handle handle)
{
ACPI_FUNCTION_ENTRY ();
return (NULL);
}
- return ((acpi_namespace_node *) handle);
+ return ((struct acpi_namespace_node *) handle);
}
acpi_handle
acpi_ns_convert_entry_to_handle (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
void
acpi_ns_terminate (void)
{
- acpi_operand_object *obj_desc;
- acpi_namespace_node *this_node;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *this_node;
ACPI_FUNCTION_TRACE ("ns_terminate");
u32
acpi_ns_opens_scope (
- acpi_object_type type)
+ acpi_object_type type)
{
ACPI_FUNCTION_TRACE_STR ("ns_opens_scope", acpi_ut_get_type_name (type));
acpi_status
acpi_ns_get_node_by_path (
- char *pathname,
- acpi_namespace_node *start_node,
- u32 flags,
- acpi_namespace_node **return_node)
+ char *pathname,
+ struct acpi_namespace_node *start_node,
+ u32 flags,
+ struct acpi_namespace_node **return_node)
{
- acpi_generic_state scope_info;
- acpi_status status;
- char *internal_path = NULL;
+ union acpi_generic_state scope_info;
+ acpi_status status;
+ char *internal_path = NULL;
ACPI_FUNCTION_TRACE_PTR ("ns_get_node_by_path", pathname);
acpi_name
acpi_ns_find_parent_name (
- acpi_namespace_node *child_node)
+ struct acpi_namespace_node *child_node)
{
- acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_TRACE ("ns_find_parent_name");
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_parent_node (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
ACPI_FUNCTION_ENTRY ();
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_next_valid_node (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
/* If we are at the end of this peer list, return NULL */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* child_node - Previous child that was found.
* The NEXT child will be returned
*
- * RETURN: acpi_namespace_node - Pointer to the NEXT child or NULL if
+ * RETURN: struct acpi_namespace_node - Pointer to the NEXT child or NULL if
* none is found.
*
* DESCRIPTION: Return the next peer node within the namespace. If Handle
*
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_next_node (
- acpi_object_type type,
- acpi_namespace_node *parent_node,
- acpi_namespace_node *child_node)
+ acpi_object_type type,
+ struct acpi_namespace_node *parent_node,
+ struct acpi_namespace_node *child_node)
{
- acpi_namespace_node *next_node = NULL;
+ struct acpi_namespace_node *next_node = NULL;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ns_walk_namespace (
- acpi_object_type type,
- acpi_handle start_node,
- u32 max_depth,
- u8 unlock_before_callback,
- acpi_walk_callback user_function,
- void *context,
- void **return_value)
+ acpi_object_type type,
+ acpi_handle start_node,
+ u32 max_depth,
+ u8 unlock_before_callback,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_namespace_node *child_node;
- acpi_namespace_node *parent_node;
- acpi_object_type child_type;
- u32 level;
+ acpi_status status;
+ struct acpi_namespace_node *child_node;
+ struct acpi_namespace_node *parent_node;
+ acpi_object_type child_type;
+ u32 level;
ACPI_FUNCTION_TRACE ("ns_walk_namespace");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_evaluate_object_typed (
- acpi_handle handle,
- acpi_string pathname,
- acpi_object_list *external_params,
- acpi_buffer *return_buffer,
- acpi_object_type return_type)
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *external_params,
+ struct acpi_buffer *return_buffer,
+ acpi_object_type return_type)
{
- acpi_status status;
- u8 must_free = FALSE;
+ acpi_status status;
+ u8 must_free = FALSE;
ACPI_FUNCTION_TRACE ("acpi_evaluate_object_typed");
/* Examine the object type returned from evaluate_object */
- if (((acpi_object *) return_buffer->pointer)->type == return_type) {
+ if (((union acpi_object *) return_buffer->pointer)->type == return_type) {
return_ACPI_STATUS (AE_OK);
}
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Incorrect return type [%s] requested [%s]\n",
- acpi_ut_get_type_name (((acpi_object *) return_buffer->pointer)->type),
+ acpi_ut_get_type_name (((union acpi_object *) return_buffer->pointer)->type),
acpi_ut_get_type_name (return_type)));
if (must_free) {
acpi_status
acpi_evaluate_object (
- acpi_handle handle,
- acpi_string pathname,
- acpi_object_list *external_params,
- acpi_buffer *return_buffer)
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *external_params,
+ struct acpi_buffer *return_buffer)
{
- acpi_status status;
- acpi_operand_object **internal_params = NULL;
- acpi_operand_object *internal_return_obj = NULL;
- acpi_size buffer_space_needed;
- u32 i;
+ acpi_status status;
+ union acpi_operand_object **internal_params = NULL;
+ union acpi_operand_object *internal_return_obj = NULL;
+ acpi_size buffer_space_needed;
+ u32 i;
ACPI_FUNCTION_TRACE ("acpi_evaluate_object");
acpi_status
acpi_walk_namespace (
- acpi_object_type type,
- acpi_handle start_object,
- u32 max_depth,
- acpi_walk_callback user_function,
- void *context,
- void **return_value)
+ acpi_object_type type,
+ acpi_handle start_object,
+ u32 max_depth,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_walk_namespace");
static acpi_status
acpi_ns_get_device_callback (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_namespace_node *node;
- u32 flags;
- acpi_device_id hid;
- acpi_device_id cid;
- acpi_get_devices_info *info;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ u32 flags;
+ struct acpi_device_id hid;
+ struct acpi_device_id cid;
+ struct acpi_get_devices_info *info;
info = context;
acpi_status
acpi_get_devices (
- char *HID,
- acpi_walk_callback user_function,
- void *context,
- void **return_value)
+ char *HID,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_get_devices_info info;
+ acpi_status status;
+ struct acpi_get_devices_info info;
ACPI_FUNCTION_TRACE ("acpi_get_devices");
acpi_status
acpi_attach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void *data)
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void *data)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter validation */
acpi_status
acpi_detach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler)
+ acpi_handle obj_handle,
+ acpi_object_handler handler)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter validation */
acpi_status
acpi_get_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void **data)
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void **data)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter validation */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_get_handle (
- acpi_handle parent,
- acpi_string pathname,
- acpi_handle *ret_handle)
+ acpi_handle parent,
+ acpi_string pathname,
+ acpi_handle *ret_handle)
{
- acpi_status status;
- acpi_namespace_node *node = NULL;
- acpi_namespace_node *prefix_node = NULL;
+ acpi_status status;
+ struct acpi_namespace_node *node = NULL;
+ struct acpi_namespace_node *prefix_node = NULL;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_get_name (
- acpi_handle handle,
- u32 name_type,
- acpi_buffer *buffer)
+ acpi_handle handle,
+ u32 name_type,
+ struct acpi_buffer *buffer)
{
- acpi_status status;
- acpi_namespace_node *node;
+ acpi_status status;
+ struct acpi_namespace_node *node;
/* Parameter validation */
acpi_status
acpi_get_object_info (
- acpi_handle handle,
- acpi_device_info *info)
+ acpi_handle handle,
+ struct acpi_device_info *info)
{
- acpi_device_id hid;
- acpi_device_id uid;
- acpi_status status;
- u32 device_status = 0;
- acpi_integer address = 0;
- acpi_namespace_node *node;
+ struct acpi_device_id hid;
+ struct acpi_device_id uid;
+ acpi_status status;
+ u32 device_status = 0;
+ acpi_integer address = 0;
+ struct acpi_namespace_node *node;
/* Parameter validation */
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_get_type (
- acpi_handle handle,
- acpi_object_type *ret_type)
+ acpi_handle handle,
+ acpi_object_type *ret_type)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter Validation */
acpi_status
acpi_get_parent (
- acpi_handle handle,
- acpi_handle *ret_handle)
+ acpi_handle handle,
+ acpi_handle *ret_handle)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
if (!ret_handle) {
acpi_status
acpi_get_next_object (
- acpi_object_type type,
- acpi_handle parent,
- acpi_handle child,
- acpi_handle *ret_handle)
+ acpi_object_type type,
+ acpi_handle parent,
+ acpi_handle child,
+ acpi_handle *ret_handle)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_namespace_node *parent_node = NULL;
- acpi_namespace_node *child_node = NULL;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ struct acpi_namespace_node *parent_node = NULL;
+ struct acpi_namespace_node *child_node = NULL;
/* Parameter validation */
}
acpi_status
-acpi_os_get_root_pointer(u32 flags, acpi_pointer *addr)
+acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
{
#ifdef CONFIG_ACPI_EFI
addr->pointer_type = ACPI_PHYSICAL_POINTER;
}
acpi_status
-acpi_os_table_override (acpi_table_header *existing_table, acpi_table_header **new_table)
+acpi_os_table_override (struct acpi_table_header *existing_table,
+ struct acpi_table_header **new_table)
{
if (!existing_table || !new_table)
return AE_BAD_PARAMETER;
acpi_status
acpi_os_read_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- void *value,
- u32 width)
+ struct acpi_pci_id *pci_id,
+ u32 reg,
+ void *value,
+ u32 width)
{
int result = 0;
int size = 0;
acpi_status
acpi_os_write_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- acpi_integer value,
- u32 width)
+ struct acpi_pci_id *pci_id,
+ u32 reg,
+ acpi_integer value,
+ u32 width)
{
int result = 0;
int size = 0;
/* TODO: Change code to take advantage of driver model more */
void
acpi_os_derive_pci_id (
- acpi_handle rhandle, /* upper bound */
- acpi_handle chandle, /* current node */
- acpi_pci_id **id)
-{
- acpi_handle handle;
- acpi_pci_id *pci_id = *id;
- acpi_status status;
- unsigned long temp;
- acpi_object_type type;
- u8 tu8;
+ acpi_handle rhandle, /* upper bound */
+ acpi_handle chandle, /* current node */
+ struct acpi_pci_id **id)
+{
+ acpi_handle handle;
+ struct acpi_pci_id *pci_id = *id;
+ acpi_status status;
+ unsigned long temp;
+ acpi_object_type type;
+ u8 tu8;
acpi_get_parent(chandle, &handle);
if (handle != rhandle) {
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u32
acpi_ps_get_next_package_length (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u32 encoded_length;
- u32 length = 0;
+ u32 encoded_length;
+ u32 length = 0;
ACPI_FUNCTION_TRACE ("ps_get_next_package_length");
u8 *
acpi_ps_get_next_package_end (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u8 *start = parser_state->aml;
- acpi_native_uint length;
+ u8 *start = parser_state->aml;
+ acpi_native_uint length;
ACPI_FUNCTION_TRACE ("ps_get_next_package_end");
char *
acpi_ps_get_next_namestring (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u8 *start = parser_state->aml;
- u8 *end = parser_state->aml;
+ u8 *start = parser_state->aml;
+ u8 *end = parser_state->aml;
ACPI_FUNCTION_TRACE ("ps_get_next_namestring");
acpi_status
acpi_ps_get_next_namepath (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- acpi_parse_object *arg,
- u8 method_call)
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *arg,
+ u8 method_call)
{
- char *path;
- acpi_parse_object *name_op;
- acpi_status status = AE_OK;
- acpi_operand_object *method_desc;
- acpi_namespace_node *node;
- acpi_generic_state scope_info;
+ char *path;
+ union acpi_parse_object *name_op;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *method_desc;
+ struct acpi_namespace_node *node;
+ union acpi_generic_state scope_info;
ACPI_FUNCTION_TRACE ("ps_get_next_namepath");
void
acpi_ps_get_next_simple_arg (
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object *arg)
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object *arg)
{
ACPI_FUNCTION_TRACE_U32 ("ps_get_next_simple_arg", arg_type);
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_next_field (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u32 aml_offset = ACPI_PTR_DIFF (parser_state->aml,
+ u32 aml_offset = ACPI_PTR_DIFF (parser_state->aml,
parser_state->aml_start);
- acpi_parse_object *field;
- u16 opcode;
- u32 name;
+ union acpi_parse_object *field;
+ u16 opcode;
+ u32 name;
ACPI_FUNCTION_TRACE ("ps_get_next_field");
acpi_status
acpi_ps_get_next_arg (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object **return_arg)
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object **return_arg)
{
- acpi_parse_object *arg = NULL;
- acpi_parse_object *prev = NULL;
- acpi_parse_object *field;
- u32 subop;
- acpi_status status = AE_OK;
+ union acpi_parse_object *arg = NULL;
+ union acpi_parse_object *prev = NULL;
+ union acpi_parse_object *field;
+ u32 subop;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ps_get_next_arg", parser_state);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
-const acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
+const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
{
/*! [Begin] no source code translation */
/* Index Name Parser Args Interpreter Args ObjectType Class Type Flags */
*
******************************************************************************/
-const acpi_opcode_info *
+const struct acpi_opcode_info *
acpi_ps_get_opcode_info (
- u16 opcode)
+ u16 opcode)
{
ACPI_FUNCTION_NAME ("ps_get_opcode_info");
char *
acpi_ps_get_opcode_name (
- u16 opcode)
+ u16 opcode)
{
#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
- const acpi_opcode_info *op;
+ const struct acpi_opcode_info *op;
op = acpi_ps_get_opcode_info (opcode);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
ACPI_MODULE_NAME ("psparse")
-static u32 acpi_gbl_depth = 0;
+static u32 acpi_gbl_depth = 0;
/*******************************************************************************
u32
acpi_ps_get_opcode_size (
- u32 opcode)
+ u32 opcode)
{
/* Extended (2-byte) opcode if > 255 */
u16
acpi_ps_peek_opcode (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u8 *aml;
- u16 opcode;
+ u8 *aml;
+ u16 opcode;
aml = parser_state->aml;
void
acpi_ps_complete_this_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_parse_object *prev;
- acpi_parse_object *next;
- const acpi_opcode_info *parent_info;
- acpi_parse_object *replacement_op = NULL;
+ union acpi_parse_object *prev;
+ union acpi_parse_object *next;
+ const struct acpi_opcode_info *parent_info;
+ union acpi_parse_object *replacement_op = NULL;
ACPI_FUNCTION_TRACE_PTR ("ps_complete_this_op", op);
acpi_status
acpi_ps_next_parse_state (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_status callback_status)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_status callback_status)
{
- acpi_parse_state *parser_state = &walk_state->parser_state;
- acpi_status status = AE_CTRL_PENDING;
+ struct acpi_parse_state *parser_state = &walk_state->parser_state;
+ acpi_status status = AE_CTRL_PENDING;
ACPI_FUNCTION_TRACE_PTR ("ps_next_parse_state", op);
acpi_status
acpi_ps_parse_loop (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_parse_object *op = NULL; /* current op */
- acpi_parse_object *arg = NULL;
- acpi_parse_object pre_op;
- acpi_parse_state *parser_state;
- u8 *aml_op_start = NULL;
+ acpi_status status = AE_OK;
+ union acpi_parse_object *op = NULL; /* current op */
+ union acpi_parse_object *arg = NULL;
+ union acpi_parse_object pre_op;
+ struct acpi_parse_state *parser_state;
+ u8 *aml_op_start = NULL;
ACPI_FUNCTION_TRACE_PTR ("ps_parse_loop", walk_state);
acpi_status
acpi_ps_parse_aml (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_status terminate_status;
- acpi_thread_state *thread;
- acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list;
- acpi_walk_state *previous_walk_state;
+ acpi_status status;
+ acpi_status terminate_status;
+ struct acpi_thread_state *thread;
+ struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list;
+ struct acpi_walk_state *previous_walk_state;
ACPI_FUNCTION_TRACE ("ps_parse_aml");
/* Normal exit */
acpi_ex_release_all_mutexes (thread);
- acpi_ut_delete_generic_state (ACPI_CAST_PTR (acpi_generic_state, thread));
+ acpi_ut_delete_generic_state (ACPI_CAST_PTR (union acpi_generic_state, thread));
acpi_gbl_current_walk_list = prev_walk_list;
return_ACPI_STATUS (status);
}
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_parent_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
return (parser_state->scope->parse_scope.op);
}
u8
acpi_ps_has_completed_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
return ((u8) ((parser_state->aml >= parser_state->scope->parse_scope.arg_end ||
!parser_state->scope->parse_scope.arg_count)));
acpi_status
acpi_ps_init_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *root_op)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *root_op)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
ACPI_FUNCTION_TRACE_PTR ("ps_init_scope", root_op);
acpi_status
acpi_ps_push_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *op,
- u32 remaining_args,
- u32 arg_count)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *op,
+ u32 remaining_args,
+ u32 arg_count)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
ACPI_FUNCTION_TRACE_PTR ("ps_push_scope", op);
void
acpi_ps_pop_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object **op,
- u32 *arg_list,
- u32 *arg_count)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object **op,
+ u32 *arg_list,
+ u32 *arg_count)
{
- acpi_generic_state *scope = parser_state->scope;
+ union acpi_generic_state *scope = parser_state->scope;
ACPI_FUNCTION_TRACE ("ps_pop_scope");
void
acpi_ps_cleanup_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
ACPI_FUNCTION_TRACE_PTR ("ps_cleanup_scope", parser_state);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_arg (
- acpi_parse_object *op,
- u32 argn)
+ union acpi_parse_object *op,
+ u32 argn)
{
- acpi_parse_object *arg = NULL;
- const acpi_opcode_info *op_info;
+ union acpi_parse_object *arg = NULL;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_ENTRY ();
void
acpi_ps_append_arg (
- acpi_parse_object *op,
- acpi_parse_object *arg)
+ union acpi_parse_object *op,
+ union acpi_parse_object *arg)
{
- acpi_parse_object *prev_arg;
- const acpi_opcode_info *op_info;
+ union acpi_parse_object *prev_arg;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_ENTRY ();
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_child (
- acpi_parse_object *op)
+ union acpi_parse_object *op)
{
- acpi_parse_object *child = NULL;
+ union acpi_parse_object *child = NULL;
ACPI_FUNCTION_ENTRY ();
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_depth_next (
- acpi_parse_object *origin,
- acpi_parse_object *op)
+ union acpi_parse_object *origin,
+ union acpi_parse_object *op)
{
- acpi_parse_object *next = NULL;
- acpi_parse_object *parent;
- acpi_parse_object *arg;
+ union acpi_parse_object *next = NULL;
+ union acpi_parse_object *parent;
+ union acpi_parse_object *arg;
ACPI_FUNCTION_ENTRY ();
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_create_scope_op (
void)
{
- acpi_parse_object *scope_op;
+ union acpi_parse_object *scope_op;
scope_op = acpi_ps_alloc_op (AML_SCOPE_OP);
void
acpi_ps_init_op (
- acpi_parse_object *op,
- u16 opcode)
+ union acpi_parse_object *op,
+ u16 opcode)
{
ACPI_FUNCTION_ENTRY ();
*
******************************************************************************/
-acpi_parse_object*
+union acpi_parse_object*
acpi_ps_alloc_op (
- u16 opcode)
+ u16 opcode)
{
- acpi_parse_object *op = NULL;
- u32 size;
- u8 flags;
- const acpi_opcode_info *op_info;
+ union acpi_parse_object *op = NULL;
+ u32 size;
+ u8 flags;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_ENTRY ();
/* Allocate the minimum required size object */
if (op_info->flags & AML_DEFER) {
- size = sizeof (acpi_parse_obj_named);
+ size = sizeof (struct acpi_parse_obj_named);
flags = ACPI_PARSEOP_DEFERRED;
}
else if (op_info->flags & AML_NAMED) {
- size = sizeof (acpi_parse_obj_named);
+ size = sizeof (struct acpi_parse_obj_named);
flags = ACPI_PARSEOP_NAMED;
}
else if (opcode == AML_INT_BYTELIST_OP) {
- size = sizeof (acpi_parse_obj_named);
+ size = sizeof (struct acpi_parse_obj_named);
flags = ACPI_PARSEOP_BYTELIST;
}
else {
- size = sizeof (acpi_parse_obj_common);
+ size = sizeof (struct acpi_parse_obj_common);
flags = ACPI_PARSEOP_GENERIC;
}
- if (size == sizeof (acpi_parse_obj_common)) {
+ if (size == sizeof (struct acpi_parse_obj_common)) {
/*
* The generic op is by far the most common (16 to 1)
*/
void
acpi_ps_free_op (
- acpi_parse_object *op)
+ union acpi_parse_object *op)
{
ACPI_FUNCTION_NAME ("ps_free_op");
*/
u8
acpi_ps_is_leading_char (
- u32 c)
+ u32 c)
{
return ((u8) (c == '_' || (c >= 'A' && c <= 'Z')));
}
*/
u8
acpi_ps_is_prefix_char (
- u32 c)
+ u32 c)
{
return ((u8) (c == '\\' || c == '^'));
}
*/
u32
acpi_ps_get_name (
- acpi_parse_object *op)
+ union acpi_parse_object *op)
{
*/
void
acpi_ps_set_name (
- acpi_parse_object *op,
- u32 name)
+ union acpi_parse_object *op,
+ u32 name)
{
/* The "generic" object has no name associated with it */
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ps_get_next_walk_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_parse_upwards ascending_callback)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_parse_upwards ascending_callback)
{
- acpi_parse_object *next;
- acpi_parse_object *parent;
- acpi_parse_object *grand_parent;
- acpi_status status;
+ union acpi_parse_object *next;
+ union acpi_parse_object *parent;
+ union acpi_parse_object *grand_parent;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ps_get_next_walk_op", op);
acpi_status
acpi_ps_delete_completed_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
acpi_ps_free_op (walk_state->op);
void
acpi_ps_delete_parse_tree (
- acpi_parse_object *subtree_root)
+ union acpi_parse_object *subtree_root)
{
- acpi_walk_state *walk_state;
- acpi_thread_state *thread;
- acpi_status status;
+ struct acpi_walk_state *walk_state;
+ struct acpi_thread_state *thread;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ps_delete_parse_tree", subtree_root);
/* We are done with this walk */
- acpi_ut_delete_generic_state (ACPI_CAST_PTR (acpi_generic_state, thread));
+ acpi_ut_delete_generic_state (ACPI_CAST_PTR (union acpi_generic_state, thread));
acpi_ds_delete_walk_state (walk_state);
return_VOID;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_psx_execute (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc)
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- u32 i;
- acpi_parse_object *op;
- acpi_walk_state *walk_state;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ u32 i;
+ union acpi_parse_object *op;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE ("psx_execute");
ACPI_MODULE_NAME ("pci_bind")
struct acpi_pci_data {
- acpi_pci_id id;
+ struct acpi_pci_id id;
struct pci_bus *bus;
struct pci_dev *dev;
};
acpi_status
acpi_os_get_pci_id (
acpi_handle handle,
- acpi_pci_id *id)
+ struct acpi_pci_id *id)
{
int result = 0;
acpi_status status = AE_OK;
struct acpi_pci_data *data = NULL;
struct acpi_pci_data *pdata = NULL;
char pathname[ACPI_PATHNAME_MAX] = {0};
- acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
+ struct acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
acpi_handle handle = NULL;
ACPI_FUNCTION_TRACE("acpi_pci_bind");
int
acpi_pci_bind_root (
struct acpi_device *device,
- acpi_pci_id *id,
+ struct acpi_pci_id *id,
struct pci_bus *bus)
{
int result = 0;
acpi_status status = AE_OK;
struct acpi_pci_data *data = NULL;
char pathname[ACPI_PATHNAME_MAX] = {0};
- acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
+ struct acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
ACPI_FUNCTION_TRACE("acpi_pci_bind_root");
static int
acpi_pci_irq_add_entry (
- acpi_handle handle,
- int segment,
- int bus,
- acpi_pci_routing_table *prt)
+ acpi_handle handle,
+ int segment,
+ int bus,
+ struct acpi_pci_routing_table *prt)
{
struct acpi_prt_entry *entry = NULL;
int segment,
int bus)
{
- acpi_status status = AE_OK;
- char pathname[ACPI_PATHNAME_MAX] = {0};
- acpi_buffer buffer = {0, NULL};
- acpi_pci_routing_table *prt = NULL;
- acpi_pci_routing_table *entry = NULL;
- static int first_time = 1;
+ acpi_status status = AE_OK;
+ char pathname[ACPI_PATHNAME_MAX] = {0};
+ struct acpi_buffer buffer = {0, NULL};
+ struct acpi_pci_routing_table *prt = NULL;
+ struct acpi_pci_routing_table *entry = NULL;
+ static int first_time = 1;
ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt");
while (entry && (entry->length > 0)) {
acpi_pci_irq_add_entry(handle, segment, bus, entry);
- entry = (acpi_pci_routing_table *)
+ entry = (struct acpi_pci_routing_table *)
((unsigned long) entry + entry->length);
}
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_resource *resource = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_resource *resource = NULL;
int i = 0;
ACPI_FUNCTION_TRACE("acpi_pci_link_get_possible");
goto end;
}
- resource = (acpi_resource *) buffer.pointer;
+ resource = (struct acpi_resource *) buffer.pointer;
/* skip past dependent function resource (if present) */
if (resource->id == ACPI_RSTYPE_START_DPF)
switch (resource->id) {
case ACPI_RSTYPE_IRQ:
{
- acpi_resource_irq *p = &resource->data.irq;
+ struct acpi_resource_irq *p = &resource->data.irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Blank IRQ resource\n"));
result = -ENODEV;
}
case ACPI_RSTYPE_EXT_IRQ:
{
- acpi_resource_ext_irq *p = &resource->data.extended_irq;
+ struct acpi_resource_ext_irq *p = &resource->data.extended_irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank IRQ resource\n"));
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_resource *resource = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_resource *resource = NULL;
int irq = 0;
ACPI_FUNCTION_TRACE("acpi_pci_link_get_current");
result = -ENODEV;
goto end;
}
- resource = (acpi_resource *) buffer.pointer;
+ resource = (struct acpi_resource *) buffer.pointer;
switch (resource->id) {
case ACPI_RSTYPE_IRQ:
{
- acpi_resource_irq *p = &resource->data.irq;
+ struct acpi_resource_irq *p = &resource->data.irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank IRQ resource\n"));
}
case ACPI_RSTYPE_EXT_IRQ:
{
- acpi_resource_ext_irq *p = &resource->data.extended_irq;
+ struct acpi_resource_ext_irq *p = &resource->data.extended_irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank IRQ resource\n"));
int result = 0;
acpi_status status = AE_OK;
struct {
- acpi_resource res;
- acpi_resource end;
+ struct acpi_resource res;
+ struct acpi_resource end;
} resource;
- acpi_buffer buffer = {sizeof(resource)+1, &resource};
+ struct acpi_buffer buffer = {sizeof(resource)+1, &resource};
int i = 0;
int valid = 0;
/* NOTE: PCI interrupts are always level / active_low / shared. */
resource.res.id = ACPI_RSTYPE_IRQ;
- resource.res.length = sizeof(acpi_resource);
+ resource.res.length = sizeof(struct acpi_resource);
resource.res.data.irq.edge_level = ACPI_LEVEL_SENSITIVE;
resource.res.data.irq.active_high_low = ACPI_ACTIVE_LOW;
resource.res.data.irq.shared_exclusive = ACPI_SHARED;
struct acpi_pci_root {
struct list_head node;
acpi_handle handle;
- acpi_pci_id id;
+ struct acpi_pci_id id;
struct pci_bus *bus;
u64 mem_tra;
u64 io_tra;
void
acpi_pci_get_translations (
- acpi_pci_id *id,
+ struct acpi_pci_id *id,
u64 *mem_tra,
u64 *io_tra)
{
static u64
acpi_pci_root_bus_tra (
- acpi_resource *resource,
- int type)
+ struct acpi_resource *resource,
+ int type)
{
- acpi_resource_address16 *address16;
- acpi_resource_address32 *address32;
- acpi_resource_address64 *address64;
+ struct acpi_resource_address16 *address16;
+ struct acpi_resource_address32 *address32;
+ struct acpi_resource_address64 *address64;
while (1) {
switch (resource->id) {
return 0;
case ACPI_RSTYPE_ADDRESS16:
- address16 = (acpi_resource_address16 *) &resource->data;
+ address16 = (struct acpi_resource_address16 *) &resource->data;
if (type == address16->resource_type) {
return address16->address_translation_offset;
}
break;
case ACPI_RSTYPE_ADDRESS32:
- address32 = (acpi_resource_address32 *) &resource->data;
+ address32 = (struct acpi_resource_address32 *) &resource->data;
if (type == address32->resource_type) {
return address32->address_translation_offset;
}
break;
case ACPI_RSTYPE_ADDRESS64:
- address64 = (acpi_resource_address64 *) &resource->data;
+ address64 = (struct acpi_resource_address64 *) &resource->data;
if (type == address64->resource_type) {
return address64->address_translation_offset;
}
break;
}
- resource = ACPI_PTR_ADD (acpi_resource,
+ resource = ACPI_PTR_ADD (struct acpi_resource,
resource, resource->length);
}
struct acpi_pci_root *root)
{
acpi_status status;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
ACPI_FUNCTION_TRACE("acpi_pci_evaluate_crs");
if (ACPI_FAILURE(status))
return_VALUE(-ENODEV);
- root->io_tra = acpi_pci_root_bus_tra ((acpi_resource *)
+ root->io_tra = acpi_pci_root_bus_tra ((struct acpi_resource *)
buffer.pointer, ACPI_IO_RANGE);
- root->mem_tra = acpi_pci_root_bus_tra ((acpi_resource *)
+ root->mem_tra = acpi_pci_root_bus_tra ((struct acpi_resource *)
buffer.pointer, ACPI_MEMORY_RANGE);
acpi_os_free(buffer.pointer);
int result = 0;
acpi_status status = AE_OK;
struct acpi_power_resource *resource = NULL;
- acpi_object acpi_object;
- acpi_buffer buffer = {sizeof(acpi_object), &acpi_object};
+ union acpi_object acpi_object;
+ struct acpi_buffer buffer = {sizeof(acpi_object), &acpi_object};
ACPI_FUNCTION_TRACE("acpi_power_add");
{
int result = 0;
acpi_status status = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_object *pct = NULL;
- acpi_object obj = {0};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ union acpi_object *pct = NULL;
+ union acpi_object obj = {0};
struct acpi_pct_register *reg = NULL;
ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control");
return_VALUE(-ENODEV);
}
- pct = (acpi_object *) buffer.pointer;
+ pct = (union acpi_object *) buffer.pointer;
if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
|| (pct->package.count != 2)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n"));
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_buffer format = {sizeof("NNNNNN"), "NNNNNN"};
- acpi_buffer state = {0, NULL};
- acpi_object *pss = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer format = {sizeof("NNNNNN"), "NNNNNN"};
+ struct acpi_buffer state = {0, NULL};
+ union acpi_object *pss = NULL;
int i = 0;
ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states");
return_VALUE(-ENODEV);
}
- pss = (acpi_object *) buffer.pointer;
+ pss = (union acpi_object *) buffer.pointer;
if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n"));
result = -EFAULT;
struct acpi_processor *pr)
{
acpi_status status = 0;
- acpi_object object = {0};
- acpi_buffer buffer = {sizeof(acpi_object), &object};
+ union acpi_object object = {0};
+ struct acpi_buffer buffer = {sizeof(union acpi_object), &object};
static int cpu_count = 0;
ACPI_FUNCTION_TRACE("acpi_processor_get_info");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_address16_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u8 *temp_ptr;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address16);
- u32 index;
- u16 temp16;
- u8 temp8;
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u8 *temp_ptr;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address16);
+ u32 index;
+ u16 temp16;
+ u8 temp8;
ACPI_FUNCTION_TRACE ("rs_address16_resource");
acpi_status
acpi_rs_address16_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u8 *length_field;
- u8 temp8;
- char *temp_pointer = NULL;
- acpi_size actual_bytes;
+ u8 *buffer = *output_buffer;
+ u8 *length_field;
+ u8 temp8;
+ char *temp_pointer = NULL;
+ acpi_size actual_bytes;
ACPI_FUNCTION_TRACE ("rs_address16_stream");
acpi_status
acpi_rs_address32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer;
- acpi_resource *output_struct= (void *) *output_buffer;
- u16 temp16;
- u8 temp8;
- u8 *temp_ptr;
- acpi_size struct_size;
- u32 index;
+ u8 *buffer;
+ struct acpi_resource *output_struct= (void *) *output_buffer;
+ u16 temp16;
+ u8 temp8;
+ u8 *temp_ptr;
+ acpi_size struct_size;
+ u32 index;
ACPI_FUNCTION_TRACE ("rs_address32_resource");
buffer = byte_stream_buffer;
- struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address32);
+ struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address32);
/*
* Point past the Descriptor to get the number of bytes consumed
acpi_status
acpi_rs_address32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer;
- u16 *length_field;
- u8 temp8;
- char *temp_pointer;
+ u8 *buffer;
+ u16 *length_field;
+ u8 temp8;
+ char *temp_pointer;
ACPI_FUNCTION_TRACE ("rs_address32_stream");
acpi_status
acpi_rs_address64_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16;
- u8 temp8;
- u8 *temp_ptr;
- acpi_size struct_size;
- u32 index;
+ u8 *buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16;
+ u8 temp8;
+ u8 *temp_ptr;
+ acpi_size struct_size;
+ u32 index;
ACPI_FUNCTION_TRACE ("rs_address64_resource");
buffer = byte_stream_buffer;
- struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address64);
+ struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address64);
/*
* Point past the Descriptor to get the number of bytes consumed
acpi_status
acpi_rs_address64_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer;
- u16 *length_field;
- u8 temp8;
- char *temp_pointer;
+ u8 *buffer;
+ u16 *length_field;
+ u8 temp8;
+ char *temp_pointer;
ACPI_FUNCTION_TRACE ("rs_address64_stream");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_get_byte_stream_length (
- acpi_resource *linked_list,
- acpi_size *size_needed)
+ struct acpi_resource *linked_list,
+ acpi_size *size_needed)
{
- acpi_size byte_stream_size_needed = 0;
- acpi_size segment_size;
- acpi_resource_ext_irq *ex_irq = NULL;
- u8 done = FALSE;
+ acpi_size byte_stream_size_needed = 0;
+ acpi_size segment_size;
+ struct acpi_resource_ext_irq *ex_irq = NULL;
+ u8 done = FALSE;
ACPI_FUNCTION_TRACE ("rs_get_byte_stream_length");
/*
* Point to the next object
*/
- linked_list = ACPI_PTR_ADD (acpi_resource,
+ linked_list = ACPI_PTR_ADD (struct acpi_resource,
linked_list, linked_list->length);
}
acpi_status
acpi_rs_get_list_length (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- acpi_size *size_needed)
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ acpi_size *size_needed)
{
- u32 buffer_size = 0;
- u32 bytes_parsed = 0;
- u8 number_of_interrupts = 0;
- u8 number_of_channels = 0;
- u8 resource_type;
- u32 structure_size;
- u32 bytes_consumed;
- u8 *buffer;
- u8 temp8;
- u16 temp16;
- u8 index;
- u8 additional_bytes;
+ u32 buffer_size = 0;
+ u32 bytes_parsed = 0;
+ u8 number_of_interrupts = 0;
+ u8 number_of_channels = 0;
+ u8 resource_type;
+ u32 structure_size;
+ u32 bytes_consumed;
+ u8 *buffer;
+ u8 temp8;
+ u16 temp16;
+ u8 index;
+ u8 additional_bytes;
ACPI_FUNCTION_TRACE ("rs_get_list_length");
*/
bytes_consumed = 12;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem24);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem24);
break;
*/
temp16 = (u16) ACPI_ROUND_UP_to_32_bITS (temp16);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor) +
(temp16 * sizeof (u8));
break;
bytes_consumed = 20;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem32);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem32);
break;
*/
bytes_consumed = 12;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_mem32);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_mem32);
break;
*/
temp8 = (u8) ACPI_ROUND_UP_to_64_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address64) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address64) +
(temp8 * sizeof (u8));
break;
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address32) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address32) +
(temp8 * sizeof (u8));
break;
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address16) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address16) +
(temp8 * sizeof (u8));
break;
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_ext_irq) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_ext_irq) +
(additional_bytes * sizeof (u8)) +
(temp8 * sizeof (u8));
break;
temp16 >>= 1;
}
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io) +
(number_of_interrupts * sizeof (u32));
break;
temp8 >>= 1;
}
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_dma) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_dma) +
(number_of_channels * sizeof (u32));
break;
bytes_consumed = 1;
}
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_start_dpf);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_start_dpf);
break;
* IO Port Resource
*/
bytes_consumed = 8;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io);
break;
* Fixed IO Port Resource
*/
bytes_consumed = 4;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_io);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_io);
break;
* Ensure a 32-bit boundary for the structure
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor) +
(temp8 * sizeof (u8));
break;
acpi_status
acpi_rs_get_pci_routing_table_length (
- acpi_operand_object *package_object,
- acpi_size *buffer_size_needed)
+ union acpi_operand_object *package_object,
+ acpi_size *buffer_size_needed)
{
- u32 number_of_elements;
- acpi_size temp_size_needed = 0;
- acpi_operand_object **top_object_list;
- u32 index;
- acpi_operand_object *package_element;
- acpi_operand_object **sub_object_list;
- u8 name_found;
- u32 table_index;
+ u32 number_of_elements;
+ acpi_size temp_size_needed = 0;
+ union acpi_operand_object **top_object_list;
+ u32 index;
+ union acpi_operand_object *package_element;
+ union acpi_operand_object **sub_object_list;
+ u8 name_found;
+ u32 table_index;
ACPI_FUNCTION_TRACE ("rs_get_pci_routing_table_length");
}
}
- temp_size_needed += (sizeof (acpi_pci_routing_table) - 4);
+ temp_size_needed += (sizeof (struct acpi_pci_routing_table) - 4);
/*
* Was a String type found?
temp_size_needed = ACPI_ROUND_UP_to_64_bITS (temp_size_needed);
/*
- * Point to the next acpi_operand_object
+ * Point to the next union acpi_operand_object
*/
top_object_list++;
}
/*
* Adding an extra element to the end of the list, essentially a NULL terminator
*/
- *buffer_size_needed = temp_size_needed + sizeof (acpi_pci_routing_table);
+ *buffer_size_needed = temp_size_needed + sizeof (struct acpi_pci_routing_table);
return_ACPI_STATUS (AE_OK);
}
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_create_resource_list (
- acpi_operand_object *byte_stream_buffer,
- acpi_buffer *output_buffer)
+ union acpi_operand_object *byte_stream_buffer,
+ struct acpi_buffer *output_buffer)
{
- acpi_status status;
- u8 *byte_stream_start;
- acpi_size list_size_needed = 0;
- u32 byte_stream_buffer_length;
+ acpi_status status;
+ u8 *byte_stream_start;
+ acpi_size list_size_needed = 0;
+ u32 byte_stream_buffer_length;
ACPI_FUNCTION_TRACE ("rs_create_resource_list");
*
* FUNCTION: acpi_rs_create_pci_routing_table
*
- * PARAMETERS: package_object - Pointer to an acpi_operand_object
+ * PARAMETERS: package_object - Pointer to an union acpi_operand_object
* package
* output_buffer - Pointer to the user's buffer
*
* AE_BUFFER_OVERFLOW and output_buffer->Length will point
* to the size buffer needed.
*
- * DESCRIPTION: Takes the acpi_operand_object package and creates a
+ * DESCRIPTION: Takes the union acpi_operand_object package and creates a
* linked list of PCI interrupt descriptions
*
* NOTE: It is the caller's responsibility to ensure that the start of the
acpi_status
acpi_rs_create_pci_routing_table (
- acpi_operand_object *package_object,
- acpi_buffer *output_buffer)
+ union acpi_operand_object *package_object,
+ struct acpi_buffer *output_buffer)
{
- u8 *buffer;
- acpi_operand_object **top_object_list;
- acpi_operand_object **sub_object_list;
- acpi_operand_object *obj_desc;
- acpi_size buffer_size_needed = 0;
- u32 number_of_elements;
- u32 index;
- acpi_pci_routing_table *user_prt;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_buffer path_buffer;
+ u8 *buffer;
+ union acpi_operand_object **top_object_list;
+ union acpi_operand_object **sub_object_list;
+ union acpi_operand_object *obj_desc;
+ acpi_size buffer_size_needed = 0;
+ u32 number_of_elements;
+ u32 index;
+ struct acpi_pci_routing_table *user_prt;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ struct acpi_buffer path_buffer;
ACPI_FUNCTION_TRACE ("rs_create_pci_routing_table");
top_object_list = package_object->package.elements;
number_of_elements = package_object->package.count;
buffer = output_buffer->pointer;
- user_prt = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ user_prt = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
for (index = 0; index < number_of_elements; index++) {
/*
* be zero because we cleared the return buffer earlier
*/
buffer += user_prt->length;
- user_prt = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ user_prt = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
/*
* Fill in the Length field with the information we have at this point.
* The minus four is to subtract the size of the u8 Source[4] member
* because it is added below.
*/
- user_prt->length = (sizeof (acpi_pci_routing_table) - 4);
+ user_prt->length = (sizeof (struct acpi_pci_routing_table) - 4);
/*
* Each element of the top-level package must also be a package
return_ACPI_STATUS (AE_BAD_DATA);
}
- /* Point to the next acpi_operand_object in the top level package */
+ /* Point to the next union acpi_operand_object in the top level package */
top_object_list++;
}
acpi_status
acpi_rs_create_byte_stream (
- acpi_resource *linked_list_buffer,
- acpi_buffer *output_buffer)
+ struct acpi_resource *linked_list_buffer,
+ struct acpi_buffer *output_buffer)
{
- acpi_status status;
- acpi_size byte_stream_size_needed = 0;
+ acpi_status status;
+ acpi_size byte_stream_size_needed = 0;
ACPI_FUNCTION_TRACE ("rs_create_byte_stream");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_rs_dump_irq (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_irq *irq_data = (acpi_resource_irq *) data;
- u8 index = 0;
+ struct acpi_resource_irq *irq_data = (struct acpi_resource_irq *) data;
+ u8 index = 0;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_dma (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_dma *dma_data = (acpi_resource_dma *) data;
- u8 index = 0;
+ struct acpi_resource_dma *dma_data = (struct acpi_resource_dma *) data;
+ u8 index = 0;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_start_depend_fns (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_start_dpf *sdf_data = (acpi_resource_start_dpf *) data;
+ struct acpi_resource_start_dpf *sdf_data = (struct acpi_resource_start_dpf *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_io (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_io *io_data = (acpi_resource_io *) data;
+ struct acpi_resource_io *io_data = (struct acpi_resource_io *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_fixed_io (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_fixed_io *fixed_io_data = (acpi_resource_fixed_io *) data;
+ struct acpi_resource_fixed_io *fixed_io_data = (struct acpi_resource_fixed_io *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_vendor_specific (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_vendor *vendor_data = (acpi_resource_vendor *) data;
- u16 index = 0;
+ struct acpi_resource_vendor *vendor_data = (struct acpi_resource_vendor *) data;
+ u16 index = 0;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_memory24 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_mem24 *memory24_data = (acpi_resource_mem24 *) data;
+ struct acpi_resource_mem24 *memory24_data = (struct acpi_resource_mem24 *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_memory32 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_mem32 *memory32_data = (acpi_resource_mem32 *) data;
+ struct acpi_resource_mem32 *memory32_data = (struct acpi_resource_mem32 *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_fixed_memory32 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_fixed_mem32 *fixed_memory32_data = (acpi_resource_fixed_mem32 *) data;
+ struct acpi_resource_fixed_mem32 *fixed_memory32_data = (struct acpi_resource_fixed_mem32 *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_address16 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_address16 *address16_data = (acpi_resource_address16 *) data;
+ struct acpi_resource_address16 *address16_data = (struct acpi_resource_address16 *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_address32 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_address32 *address32_data = (acpi_resource_address32 *) data;
+ struct acpi_resource_address32 *address32_data = (struct acpi_resource_address32 *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_address64 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_address64 *address64_data = (acpi_resource_address64 *) data;
+ struct acpi_resource_address64 *address64_data = (struct acpi_resource_address64 *) data;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_extended_irq (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_ext_irq *ext_irq_data = (acpi_resource_ext_irq *) data;
- u8 index = 0;
+ struct acpi_resource_ext_irq *ext_irq_data = (struct acpi_resource_ext_irq *) data;
+ u8 index = 0;
ACPI_FUNCTION_ENTRY ();
void
acpi_rs_dump_resource_list (
- acpi_resource *resource)
+ struct acpi_resource *resource)
{
- u8 count = 0;
- u8 done = FALSE;
+ u8 count = 0;
+ u8 done = FALSE;
ACPI_FUNCTION_ENTRY ();
}
- resource = ACPI_PTR_ADD (acpi_resource, resource, resource->length);
+ resource = ACPI_PTR_ADD (struct acpi_resource, resource, resource->length);
}
}
void
acpi_rs_dump_irq_list (
- u8 *route_table)
+ u8 *route_table)
{
- u8 *buffer = route_table;
- u8 count = 0;
- u8 done = FALSE;
- acpi_pci_routing_table *prt_element;
+ u8 *buffer = route_table;
+ u8 count = 0;
+ u8 done = FALSE;
+ struct acpi_pci_routing_table *prt_element;
ACPI_FUNCTION_ENTRY ();
if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
- prt_element = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
while (!done) {
acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
buffer += prt_element->length;
- prt_element = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
if(0 == prt_element->length) {
done = TRUE;
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io);
ACPI_FUNCTION_TRACE ("rs_io_resource");
acpi_status
acpi_rs_fixed_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_io);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_io);
ACPI_FUNCTION_TRACE ("rs_fixed_io_resource");
acpi_status
acpi_rs_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_io_stream");
acpi_status
acpi_rs_fixed_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_fixed_io_stream");
acpi_status
acpi_rs_dma_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u8 temp8 = 0;
- u8 index;
- u8 i;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_dma);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u8 temp8 = 0;
+ u8 index;
+ u8 i;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_dma);
ACPI_FUNCTION_TRACE ("rs_dma_resource");
acpi_status
acpi_rs_dma_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
ACPI_FUNCTION_TRACE ("rs_dma_stream");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
- u8 i;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_irq);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
+ u8 i;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_irq);
ACPI_FUNCTION_TRACE ("rs_irq_resource");
acpi_status
acpi_rs_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
- u8 IRqinfo_byte_needed;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
+ u8 IRqinfo_byte_needed;
ACPI_FUNCTION_TRACE ("rs_irq_stream");
acpi_status
acpi_rs_extended_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 *temp_ptr;
- u8 index;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_ext_irq);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 *temp_ptr;
+ u8 index;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_ext_irq);
ACPI_FUNCTION_TRACE ("rs_extended_irq_resource");
acpi_status
acpi_rs_extended_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 *length_field;
- u8 temp8 = 0;
- u8 index;
- char *temp_pointer = NULL;
+ u8 *buffer = *output_buffer;
+ u16 *length_field;
+ u8 temp8 = 0;
+ u8 index;
+ char *temp_pointer = NULL;
ACPI_FUNCTION_TRACE ("rs_extended_irq_stream");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u8
acpi_rs_get_resource_type (
- u8 resource_start_byte)
+ u8 resource_start_byte)
{
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_rs_byte_stream_to_list (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- u8 *output_buffer)
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ u8 *output_buffer)
{
- acpi_status status;
- acpi_size bytes_parsed = 0;
- u8 resource_type = 0;
- acpi_size bytes_consumed = 0;
- u8 *buffer = output_buffer;
- acpi_size structure_size = 0;
- u8 end_tag_processed = FALSE;
- acpi_resource *resource;
+ acpi_status status;
+ acpi_size bytes_parsed = 0;
+ u8 resource_type = 0;
+ acpi_size bytes_consumed = 0;
+ u8 *buffer = output_buffer;
+ acpi_size structure_size = 0;
+ u8 end_tag_processed = FALSE;
+ struct acpi_resource *resource;
ACPI_FUNCTION_TRACE ("rs_byte_stream_to_list");
/*
* Set the Buffer to the next structure
*/
- resource = ACPI_CAST_PTR (acpi_resource, buffer);
+ resource = ACPI_CAST_PTR (struct acpi_resource, buffer);
resource->length = ACPI_ALIGN_RESOURCE_SIZE(resource->length);
buffer += ACPI_ALIGN_RESOURCE_SIZE(structure_size);
acpi_status
acpi_rs_list_to_byte_stream (
- acpi_resource *linked_list,
- acpi_size byte_stream_size_needed,
- u8 *output_buffer)
+ struct acpi_resource *linked_list,
+ acpi_size byte_stream_size_needed,
+ u8 *output_buffer)
{
- acpi_status status;
- u8 *buffer = output_buffer;
- acpi_size bytes_consumed = 0;
- u8 done = FALSE;
+ acpi_status status;
+ u8 *buffer = output_buffer;
+ acpi_size bytes_consumed = 0;
+ u8 done = FALSE;
ACPI_FUNCTION_TRACE ("rs_list_to_byte_stream");
/*
* Point to the next object
*/
- linked_list = ACPI_PTR_ADD (acpi_resource,
+ linked_list = ACPI_PTR_ADD (struct acpi_resource,
linked_list, linked_list->length);
}
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_memory24_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem24);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem24);
ACPI_FUNCTION_TRACE ("rs_memory24_resource");
acpi_status
acpi_rs_memory24_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_memory24_stream");
acpi_status
acpi_rs_memory32_range_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem32);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem32);
ACPI_FUNCTION_TRACE ("rs_memory32_range_resource");
acpi_status
acpi_rs_fixed_memory32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_mem32);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_mem32);
ACPI_FUNCTION_TRACE ("rs_fixed_memory32_resource");
acpi_status
acpi_rs_memory32_range_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_memory32_range_stream");
acpi_status
acpi_rs_fixed_memory32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_fixed_memory32_stream");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_end_tag_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- acpi_resource *output_struct = (void *) *output_buffer;
- acpi_size struct_size = ACPI_RESOURCE_LENGTH;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ acpi_size struct_size = ACPI_RESOURCE_LENGTH;
ACPI_FUNCTION_TRACE ("rs_end_tag_resource");
acpi_status
acpi_rs_end_tag_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_end_tag_stream");
acpi_status
acpi_rs_vendor_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor);
ACPI_FUNCTION_TRACE ("rs_vendor_resource");
acpi_status
acpi_rs_vendor_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
ACPI_FUNCTION_TRACE ("rs_vendor_stream");
acpi_status
acpi_rs_start_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_start_dpf);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_start_dpf);
ACPI_FUNCTION_TRACE ("rs_start_depend_fns_resource");
acpi_status
acpi_rs_end_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- acpi_resource *output_struct = (void *) *output_buffer;
- acpi_size struct_size = ACPI_RESOURCE_LENGTH;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ acpi_size struct_size = ACPI_RESOURCE_LENGTH;
ACPI_FUNCTION_TRACE ("rs_end_depend_fns_resource");
acpi_status
acpi_rs_start_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_start_depend_fns_stream");
acpi_status
acpi_rs_end_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
+ u8 *buffer = *output_buffer;
ACPI_FUNCTION_TRACE ("rs_end_depend_fns_stream");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_rs_get_prt_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("rs_get_prt_method_data");
acpi_status
acpi_rs_get_crs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("rs_get_crs_method_data");
acpi_status
acpi_rs_get_prs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("rs_get_prs_method_data");
acpi_status
acpi_rs_set_srs_method_data (
- acpi_handle handle,
- acpi_buffer *in_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *in_buffer)
{
- acpi_operand_object *params[2];
- acpi_status status;
- acpi_buffer buffer;
+ union acpi_operand_object *params[2];
+ acpi_status status;
+ struct acpi_buffer buffer;
ACPI_FUNCTION_TRACE ("rs_set_srs_method_data");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_get_irq_routing_table (
- acpi_handle device_handle,
- acpi_buffer *ret_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_irq_routing_table ");
acpi_status
acpi_get_current_resources (
- acpi_handle device_handle,
- acpi_buffer *ret_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_current_resources");
acpi_status
acpi_get_possible_resources (
- acpi_handle device_handle,
- acpi_buffer *ret_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_possible_resources");
acpi_status
acpi_set_current_resources (
- acpi_handle device_handle,
- acpi_buffer *in_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *in_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_set_current_resources");
struct acpi_driver *driver)
{
int error = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
if (device->flags.hardware_id)
if (strstr(driver->ids, device->pnp.hardware_id))
goto Done;
if (device->flags.compatible_ids) {
- acpi_status status = AE_OK;
- acpi_object *object = NULL;
- char cid[256] = {};
+ acpi_status status = AE_OK;
+ union acpi_object *object = NULL;
+ char cid[256] = {};
status = acpi_evaluate_object(device->handle, "_CID", NULL,
&buffer);
if (ACPI_FAILURE(status) || !buffer.pointer)
return -ENOENT;
- object = (acpi_object *) buffer.pointer;
+ object = (union acpi_object *) buffer.pointer;
switch (object->type) {
case ACPI_TYPE_INTEGER:
static void acpi_device_get_busid(struct acpi_device * device, acpi_handle handle, int type)
{
char bus_id[5] = {'?',0};
- acpi_buffer buffer = {sizeof(bus_id), bus_id};
+ struct acpi_buffer buffer = {sizeof(bus_id), bus_id};
int i = 0;
/*
static void acpi_device_set_id(struct acpi_device * device, struct acpi_device * parent,
acpi_handle handle, int type)
{
- acpi_device_info info;
+ struct acpi_device_info info;
char *hid = NULL;
char *uid = NULL;
acpi_status status;
loff_t *ppos)
{
acpi_status status = AE_OK;
- acpi_buffer dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
void *data = 0;
size_t size = 0;
loff_t *ppos)
{
acpi_status status = AE_OK;
- acpi_buffer fadt = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer fadt = {ACPI_ALLOCATE_BUFFER, NULL};
void *data = 0;
size_t size = 0;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
u32
acpi_tb_get_table_count (
- rsdp_descriptor *RSDP,
- acpi_table_header *RSDT)
+ struct rsdp_descriptor *RSDP,
+ struct acpi_table_header *RSDT)
{
- u32 pointer_size;
+ u32 pointer_size;
ACPI_FUNCTION_ENTRY ();
* pointers contained within the RSDT/XSDT. The size of the pointers
* is architecture-dependent.
*/
- return ((RSDT->length - sizeof (acpi_table_header)) / pointer_size);
+ return ((RSDT->length - sizeof (struct acpi_table_header)) / pointer_size);
}
acpi_status
acpi_tb_convert_to_xsdt (
- acpi_table_desc *table_info)
+ struct acpi_table_desc *table_info)
{
- acpi_size table_size;
- u32 i;
- xsdt_descriptor *new_table;
+ acpi_size table_size;
+ u32 i;
+ XSDT_DESCRIPTOR *new_table;
ACPI_FUNCTION_ENTRY ();
/* Compute size of the converted XSDT */
table_size = ((acpi_size) acpi_gbl_rsdt_table_count * sizeof (u64)) +
- sizeof (acpi_table_header);
+ sizeof (struct acpi_table_header);
/* Allocate an XSDT */
/* Copy the header and set the length */
- ACPI_MEMCPY (new_table, table_info->pointer, sizeof (acpi_table_header));
+ ACPI_MEMCPY (new_table, table_info->pointer, sizeof (struct acpi_table_header));
new_table->header.length = (u32) table_size;
/* Copy the table pointers */
for (i = 0; i < acpi_gbl_rsdt_table_count; i++) {
if (acpi_gbl_RSDP->revision < 2) {
ACPI_STORE_ADDRESS (new_table->table_offset_entry[i],
- ((RSDT_DESCRIPTOR_REV1 *) table_info->pointer)->table_offset_entry[i]);
+ ((struct rsdt_descriptor_rev1 *) table_info->pointer)->table_offset_entry[i]);
}
else {
new_table->table_offset_entry[i] =
- ((xsdt_descriptor *) table_info->pointer)->table_offset_entry[i];
+ ((XSDT_DESCRIPTOR *) table_info->pointer)->table_offset_entry[i];
}
}
/* Point the table descriptor to the new table */
- table_info->pointer = (acpi_table_header *) new_table;
+ table_info->pointer = (struct acpi_table_header *) new_table;
table_info->length = table_size;
table_info->allocation = ACPI_MEM_ALLOCATED;
static void
acpi_tb_convert_fadt1 (
- fadt_descriptor_rev2 *local_fadt,
- fadt_descriptor_rev1 *original_fadt)
+ struct fadt_descriptor_rev2 *local_fadt,
+ struct fadt_descriptor_rev1 *original_fadt)
{
* The 2.0 table is an extension of the 1.0 table, so the entire 1.0
* table can be copied first, then expand some fields to 64 bits.
*/
- ACPI_MEMCPY (local_fadt, original_fadt, sizeof (fadt_descriptor_rev1));
+ ACPI_MEMCPY (local_fadt, original_fadt, sizeof (struct fadt_descriptor_rev1));
/* Convert table pointers to 64-bit fields */
static void
acpi_tb_convert_fadt2 (
- fadt_descriptor_rev2 *local_fadt,
- fadt_descriptor_rev2 *original_fadt)
+ struct fadt_descriptor_rev2 *local_fadt,
+ struct fadt_descriptor_rev2 *original_fadt)
{
/* We have an ACPI 2.0 FADT but we must copy it to our local buffer */
- ACPI_MEMCPY (local_fadt, original_fadt, sizeof (fadt_descriptor_rev2));
+ ACPI_MEMCPY (local_fadt, original_fadt, sizeof (struct fadt_descriptor_rev2));
/*
* "X" fields are optional extensions to the original V1.0 fields, so
acpi_status
acpi_tb_convert_table_fadt (void)
{
- fadt_descriptor_rev2 *local_fadt;
- acpi_table_desc *table_desc;
+ struct fadt_descriptor_rev2 *local_fadt;
+ struct acpi_table_desc *table_desc;
ACPI_FUNCTION_TRACE ("tb_convert_table_fadt");
* acpi_gbl_FADT is valid
* Allocate and zero the 2.0 FADT buffer
*/
- local_fadt = ACPI_MEM_CALLOCATE (sizeof (fadt_descriptor_rev2));
+ local_fadt = ACPI_MEM_CALLOCATE (sizeof (struct fadt_descriptor_rev2));
if (local_fadt == NULL) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
* FADT length and version validation. The table must be at least as
* long as the version 1.0 FADT
*/
- if (acpi_gbl_FADT->header.length < sizeof (fadt_descriptor_rev1)) {
+ if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev1)) {
ACPI_REPORT_ERROR (("Invalid FADT table length: 0x%X\n", acpi_gbl_FADT->header.length));
return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
}
if (acpi_gbl_FADT->header.revision >= FADT2_REVISION_ID) {
- if (acpi_gbl_FADT->header.length < sizeof (fadt_descriptor_rev2)) {
+ if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev2)) {
/* Length is too short to be a V2.0 table */
ACPI_REPORT_WARNING (("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n",
/* Install the new table */
- table_desc->pointer = (acpi_table_header *) acpi_gbl_FADT;
+ table_desc->pointer = (struct acpi_table_header *) acpi_gbl_FADT;
table_desc->allocation = ACPI_MEM_ALLOCATED;
- table_desc->length = sizeof (fadt_descriptor_rev2);
+ table_desc->length = sizeof (struct fadt_descriptor_rev2);
/* Dump the entire FADT */
acpi_status
acpi_tb_build_common_facs (
- acpi_table_desc *table_info)
+ struct acpi_table_desc *table_info)
{
ACPI_FUNCTION_TRACE ("tb_build_common_facs");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_tb_get_table (
- acpi_pointer *address,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
- acpi_table_header header;
+ acpi_status status;
+ struct acpi_table_header header;
ACPI_FUNCTION_TRACE ("tb_get_table");
acpi_status
acpi_tb_get_table_header (
- acpi_pointer *address,
- acpi_table_header *return_header)
+ struct acpi_pointer *address,
+ struct acpi_table_header *return_header)
{
- acpi_status status = AE_OK;
- acpi_table_header *header = NULL;
+ acpi_status status = AE_OK;
+ struct acpi_table_header *header = NULL;
ACPI_FUNCTION_TRACE ("tb_get_table_header");
/* Pointer matches processor mode, copy the header */
- ACPI_MEMCPY (return_header, address->pointer.logical, sizeof (acpi_table_header));
+ ACPI_MEMCPY (return_header, address->pointer.logical, sizeof (struct acpi_table_header));
break;
/* Create a logical address for the physical pointer*/
- status = acpi_os_map_memory (address->pointer.physical, sizeof (acpi_table_header),
+ status = acpi_os_map_memory (address->pointer.physical, sizeof (struct acpi_table_header),
(void **) &header);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n",
ACPI_HIDWORD (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical),
- sizeof (acpi_table_header)));
+ sizeof (struct acpi_table_header)));
return_ACPI_STATUS (status);
}
/* Copy header and delete mapping */
- ACPI_MEMCPY (return_header, header, sizeof (acpi_table_header));
- acpi_os_unmap_memory (header, sizeof (acpi_table_header));
+ ACPI_MEMCPY (return_header, header, sizeof (struct acpi_table_header));
+ acpi_os_unmap_memory (header, sizeof (struct acpi_table_header));
break;
acpi_status
acpi_tb_get_table_body (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("tb_get_table_body");
acpi_status
acpi_tb_table_override (
- acpi_table_header *header,
- acpi_table_desc *table_info)
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info)
{
- acpi_table_header *new_table;
- acpi_status status;
- acpi_pointer address;
+ struct acpi_table_header *new_table;
+ acpi_status status;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("tb_table_override");
acpi_status
acpi_tb_get_this_table (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info)
{
- acpi_table_header *full_table = NULL;
- u8 allocation;
- acpi_status status = AE_OK;
+ struct acpi_table_header *full_table = NULL;
+ u8 allocation;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("tb_get_this_table");
acpi_status
acpi_tb_get_table_ptr (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header **table_ptr_loc)
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header **table_ptr_loc)
{
- acpi_table_desc *table_desc;
- u32 i;
+ struct acpi_table_desc *table_desc;
+ u32 i;
ACPI_FUNCTION_TRACE ("tb_get_table_ptr");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_tb_get_primary_table (
- acpi_pointer *address,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
- acpi_table_header header;
+ acpi_status status;
+ struct acpi_table_header header;
ACPI_FUNCTION_TRACE ("tb_get_primary_table");
/* Clear the table_info */
- ACPI_MEMSET (table_info, 0, sizeof (acpi_table_desc));
+ ACPI_MEMSET (table_info, 0, sizeof (struct acpi_table_desc));
/*
* Check the table signature and make sure it is recognized.
acpi_status
acpi_tb_get_secondary_table (
- acpi_pointer *address,
- acpi_string signature,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ acpi_string signature,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
- acpi_table_header header;
+ acpi_status status;
+ struct acpi_table_header header;
ACPI_FUNCTION_TRACE_STR ("tb_get_secondary_table", signature);
acpi_tb_get_required_tables (
void)
{
- acpi_status status = AE_OK;
- u32 i;
- acpi_table_desc table_info;
- acpi_pointer address;
+ acpi_status status = AE_OK;
+ u32 i;
+ struct acpi_table_desc table_info;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("tb_get_required_tables");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_tb_match_signature (
- char *signature,
- acpi_table_desc *table_info,
- u8 search_type)
+ char *signature,
+ struct acpi_table_desc *table_info,
+ u8 search_type)
{
- acpi_native_uint i;
+ acpi_native_uint i;
ACPI_FUNCTION_TRACE ("tb_match_signature");
acpi_status
acpi_tb_install_table (
- acpi_table_desc *table_info)
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("tb_install_table");
acpi_status
acpi_tb_recognize_table (
- acpi_table_desc *table_info,
- u8 search_type)
+ struct acpi_table_desc *table_info,
+ u8 search_type)
{
- acpi_table_header *table_header;
- acpi_status status;
+ struct acpi_table_header *table_header;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("tb_recognize_table");
/* Ensure that we have a valid table pointer */
- table_header = (acpi_table_header *) table_info->pointer;
+ table_header = (struct acpi_table_header *) table_info->pointer;
if (!table_header) {
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
acpi_status
acpi_tb_init_table_descriptor (
- acpi_table_type table_type,
- acpi_table_desc *table_info)
+ acpi_table_type table_type,
+ struct acpi_table_desc *table_info)
{
- acpi_table_desc *list_head;
- acpi_table_desc *table_desc;
+ struct acpi_table_desc *list_head;
+ struct acpi_table_desc *table_desc;
ACPI_FUNCTION_TRACE_U32 ("tb_init_table_descriptor", table_type);
* the new table in to the list of tables of this type.
*/
if (list_head->pointer) {
- table_desc = ACPI_MEM_CALLOCATE (sizeof (acpi_table_desc));
+ table_desc = ACPI_MEM_CALLOCATE (sizeof (struct acpi_table_desc));
if (!table_desc) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
table_desc->allocation = table_info->allocation;
table_desc->aml_start = (u8 *) (table_desc->pointer + 1),
table_desc->aml_length = (u32) (table_desc->length -
- (u32) sizeof (acpi_table_header));
+ (u32) sizeof (struct acpi_table_header));
table_desc->table_id = acpi_ut_allocate_owner_id (ACPI_OWNER_TYPE_TABLE);
table_desc->loaded_into_namespace = FALSE;
void
acpi_tb_delete_acpi_tables (void)
{
- acpi_table_type type;
+ acpi_table_type type;
/*
void
acpi_tb_delete_acpi_table (
- acpi_table_type type)
+ acpi_table_type type)
{
ACPI_FUNCTION_TRACE_U32 ("tb_delete_acpi_table", type);
void
acpi_tb_free_acpi_tables_of_type (
- acpi_table_desc *list_head)
+ struct acpi_table_desc *list_head)
{
- acpi_table_desc *table_desc;
- u32 count;
- u32 i;
+ struct acpi_table_desc *table_desc;
+ u32 count;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("tb_free_acpi_tables_of_type", list_head);
void
acpi_tb_delete_single_table (
- acpi_table_desc *table_desc)
+ struct acpi_table_desc *table_desc)
{
if (!table_desc) {
*
******************************************************************************/
-acpi_table_desc *
+struct acpi_table_desc *
acpi_tb_uninstall_table (
- acpi_table_desc *table_desc)
+ struct acpi_table_desc *table_desc)
{
- acpi_table_desc *next_desc;
+ struct acpi_table_desc *next_desc;
ACPI_FUNCTION_TRACE_PTR ("acpi_tb_uninstall_table", table_desc);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_tb_verify_rsdp (
- acpi_pointer *address)
+ struct acpi_pointer *address)
{
- acpi_table_desc table_info;
- acpi_status status;
- rsdp_descriptor *rsdp;
+ struct acpi_table_desc table_info;
+ acpi_status status;
+ struct rsdp_descriptor *rsdp;
ACPI_FUNCTION_TRACE ("tb_verify_rsdp");
/*
* Obtain access to the RSDP structure
*/
- status = acpi_os_map_memory (address->pointer.physical, sizeof (rsdp_descriptor),
+ status = acpi_os_map_memory (address->pointer.physical, sizeof (struct rsdp_descriptor),
(void **) &rsdp);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
/* The RSDP supplied is OK */
- table_info.pointer = ACPI_CAST_PTR (acpi_table_header, rsdp);
- table_info.length = sizeof (rsdp_descriptor);
+ table_info.pointer = ACPI_CAST_PTR (struct acpi_table_header, rsdp);
+ table_info.length = sizeof (struct rsdp_descriptor);
table_info.allocation = ACPI_MEM_MAPPED;
/* Save the table pointers and allocation info */
/* Save the RSDP in a global for easy access */
- acpi_gbl_RSDP = ACPI_CAST_PTR (rsdp_descriptor, table_info.pointer);
+ acpi_gbl_RSDP = ACPI_CAST_PTR (struct rsdp_descriptor, table_info.pointer);
return_ACPI_STATUS (status);
cleanup:
if (acpi_gbl_table_flags & ACPI_PHYSICAL_POINTER) {
- acpi_os_unmap_memory (rsdp, sizeof (rsdp_descriptor));
+ acpi_os_unmap_memory (rsdp, sizeof (struct rsdp_descriptor));
}
return_ACPI_STATUS (status);
}
void
acpi_tb_get_rsdt_address (
- acpi_pointer *out_address)
+ struct acpi_pointer *out_address)
{
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_tb_validate_rsdt (
- acpi_table_header *table_ptr)
+ struct acpi_table_header *table_ptr)
{
- int no_match;
+ int no_match;
ACPI_FUNCTION_NAME ("tb_validate_rsdt");
acpi_tb_get_table_rsdt (
void)
{
- acpi_table_desc table_info;
- acpi_status status;
- acpi_pointer address;
+ struct acpi_table_desc table_info;
+ acpi_status status;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("tb_get_table_rsdt");
return_ACPI_STATUS (status);
}
- acpi_gbl_XSDT = (xsdt_descriptor *) table_info.pointer;
+ acpi_gbl_XSDT = (XSDT_DESCRIPTOR *) table_info.pointer;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "XSDT located at %p\n", acpi_gbl_XSDT));
return_ACPI_STATUS (status);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_tb_handle_to_object (
- u16 table_id,
- acpi_table_desc **table_desc)
+ u16 table_id,
+ struct acpi_table_desc **table_desc)
{
- u32 i;
- acpi_table_desc *list_head;
+ u32 i;
+ struct acpi_table_desc *list_head;
ACPI_FUNCTION_NAME ("tb_handle_to_object");
acpi_status
acpi_tb_validate_table_header (
- acpi_table_header *table_header)
+ struct acpi_table_header *table_header)
{
- acpi_name signature;
+ acpi_name signature;
ACPI_FUNCTION_NAME ("tb_validate_table_header");
/* Verify that this is a valid address */
- if (!acpi_os_readable (table_header, sizeof (acpi_table_header))) {
+ if (!acpi_os_readable (table_header, sizeof (struct acpi_table_header))) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Cannot read table header at %p\n", table_header));
return (AE_BAD_ADDRESS);
ACPI_REPORT_WARNING (("Invalid table signature found: [%4.4s]\n",
(char *) &signature));
- ACPI_DUMP_BUFFER (table_header, sizeof (acpi_table_header));
+ ACPI_DUMP_BUFFER (table_header, sizeof (struct acpi_table_header));
return (AE_BAD_SIGNATURE);
}
/* Validate the table length */
- if (table_header->length < sizeof (acpi_table_header)) {
+ if (table_header->length < sizeof (struct acpi_table_header)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Invalid length in table header %p name %4.4s\n",
table_header, (char *) &signature));
ACPI_REPORT_WARNING (("Invalid table header length (0x%X) found\n",
(u32) table_header->length));
- ACPI_DUMP_BUFFER (table_header, sizeof (acpi_table_header));
+ ACPI_DUMP_BUFFER (table_header, sizeof (struct acpi_table_header));
return (AE_BAD_HEADER);
}
acpi_status
acpi_tb_verify_table_checksum (
- acpi_table_header *table_header)
+ struct acpi_table_header *table_header)
{
- u8 checksum;
- acpi_status status = AE_OK;
+ u8 checksum;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("tb_verify_table_checksum");
u8
acpi_tb_checksum (
- void *buffer,
- u32 length)
+ void *buffer,
+ u32 length)
{
- const u8 *limit;
- const u8 *rover;
- u8 sum = 0;
+ const u8 *limit;
+ const u8 *rover;
+ u8 sum = 0;
if (buffer && length) {
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_load_tables (void)
{
- acpi_pointer rsdp_address;
- acpi_status status;
+ struct acpi_pointer rsdp_address;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_load_tables");
acpi_status
acpi_load_table (
- acpi_table_header *table_ptr)
+ struct acpi_table_header *table_ptr)
{
- acpi_status status;
- acpi_table_desc table_info;
- acpi_pointer address;
+ acpi_status status;
+ struct acpi_table_desc table_info;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("acpi_load_table");
acpi_status
acpi_unload_table (
- acpi_table_type table_type)
+ acpi_table_type table_type)
{
- acpi_table_desc *list_head;
+ struct acpi_table_desc *list_head;
ACPI_FUNCTION_TRACE ("acpi_unload_table");
* Instance - the non zero instance of the table, allows
* support for multiple tables of the same type
* see acpi_gbl_acpi_table_flag
- * out_table_header - pointer to the acpi_table_header if successful
+ * out_table_header - pointer to the struct acpi_table_header if successful
*
* DESCRIPTION: This function is called to get an ACPI table header. The caller
* supplies an pointer to a data area sufficient to contain an ACPI
- * acpi_table_header structure.
+ * struct acpi_table_header structure.
*
* The header contains a length field that can be used to determine
* the size of the buffer needed to contain the entire table. This
acpi_status
acpi_get_table_header (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header *out_table_header)
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header *out_table_header)
{
- acpi_table_header *tbl_ptr;
- acpi_status status;
+ struct acpi_table_header *tbl_ptr;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_table_header");
* Copy the header to the caller's buffer
*/
ACPI_MEMCPY ((void *) out_table_header, (void *) tbl_ptr,
- sizeof (acpi_table_header));
+ sizeof (struct acpi_table_header));
return_ACPI_STATUS (status);
}
acpi_status
acpi_get_table (
- acpi_table_type table_type,
- u32 instance,
- acpi_buffer *ret_buffer)
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_buffer *ret_buffer)
{
- acpi_table_header *tbl_ptr;
- acpi_status status;
- acpi_size table_length;
+ struct acpi_table_header *tbl_ptr;
+ acpi_status status;
+ acpi_size table_length;
ACPI_FUNCTION_TRACE ("acpi_get_table");
/*
* RSD PTR is the only "table" without a header
*/
- table_length = sizeof (rsdp_descriptor);
+ table_length = sizeof (struct rsdp_descriptor);
}
else {
table_length = (acpi_size) tbl_ptr->length;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_tb_find_table (
- char *signature,
- char *oem_id,
- char *oem_table_id,
- acpi_table_header **table_ptr)
+ char *signature,
+ char *oem_id,
+ char *oem_table_id,
+ struct acpi_table_header **table_ptr)
{
- acpi_status status;
- acpi_table_header *table;
+ acpi_status status;
+ struct acpi_table_header *table;
ACPI_FUNCTION_TRACE ("tb_find_table");
acpi_status
acpi_get_firmware_table (
- acpi_string signature,
- u32 instance,
- u32 flags,
- acpi_table_header **table_pointer)
+ acpi_string signature,
+ u32 instance,
+ u32 flags,
+ struct acpi_table_header **table_pointer)
{
- acpi_pointer rsdp_address;
- acpi_pointer address;
- acpi_status status;
- acpi_table_header header;
- acpi_table_desc table_info;
- acpi_table_desc rsdt_info;
- u32 table_count;
- u32 i;
- u32 j;
+ struct acpi_pointer rsdp_address;
+ struct acpi_pointer address;
+ acpi_status status;
+ struct acpi_table_header header;
+ struct acpi_table_desc table_info;
+ struct acpi_table_desc rsdt_info;
+ u32 table_count;
+ u32 i;
+ u32 j;
ACPI_FUNCTION_TRACE ("acpi_get_firmware_table");
/* Map and validate the RSDP */
if ((flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING) {
- status = acpi_os_map_memory (rsdp_address.pointer.physical, sizeof (rsdp_descriptor),
+ status = acpi_os_map_memory (rsdp_address.pointer.physical, sizeof (struct rsdp_descriptor),
(void **) &acpi_gbl_RSDP);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
else {
address.pointer.value =
- ((xsdt_descriptor *) rsdt_info.pointer)->table_offset_entry[i];
+ ((XSDT_DESCRIPTOR *) rsdt_info.pointer)->table_offset_entry[i];
}
/* Get the table header */
acpi_status
acpi_find_root_pointer (
- u32 flags,
- acpi_pointer *rsdp_address)
+ u32 flags,
+ struct acpi_pointer *rsdp_address)
{
- acpi_table_desc table_info;
- acpi_status status;
+ struct acpi_table_desc table_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_find_root_pointer");
u8 *
acpi_tb_scan_memory_for_rsdp (
- u8 *start_address,
- u32 length)
+ u8 *start_address,
+ u32 length)
{
- u32 offset;
- u8 *mem_rover;
+ u32 offset;
+ u8 *mem_rover;
ACPI_FUNCTION_TRACE ("tb_scan_memory_for_rsdp");
acpi_status
acpi_tb_find_rsdp (
- acpi_table_desc *table_info,
- u32 flags)
+ struct acpi_table_desc *table_info,
+ u32 flags)
{
- u8 *table_ptr;
- u8 *mem_rover;
- u64 phys_addr;
- acpi_status status = AE_OK;
+ u8 *table_ptr;
+ u8 *mem_rover;
+ u64 phys_addr;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("tb_find_rsdp");
int mode)
{
acpi_status status = AE_OK;
- acpi_object arg0 = {ACPI_TYPE_INTEGER};
- acpi_object_list arg_list= {1, &arg0};
+ union acpi_object arg0 = {ACPI_TYPE_INTEGER};
+ struct acpi_object_list arg_list = {1, &arg0};
acpi_handle handle = NULL;
ACPI_FUNCTION_TRACE("acpi_thermal_set_cooling_mode");
static int
write_acpi_int(const char* methodName, int val)
{
- acpi_object_list params;
- acpi_object in_objs[1];
+ struct acpi_object_list params;
+ union acpi_object in_objs[1];
acpi_status status;
params.count = sizeof(in_objs)/sizeof(in_objs[0]);
static acpi_status
hci_raw(const u32 in[HCI_WORDS], u32 out[HCI_WORDS])
{
- acpi_object_list params;
- acpi_object in_objs[HCI_WORDS];
- acpi_buffer results;
- acpi_object out_objs[HCI_WORDS+1];
+ struct acpi_object_list params;
+ union acpi_object in_objs[HCI_WORDS];
+ struct acpi_buffer results;
+ union acpi_object out_objs[HCI_WORDS+1];
acpi_status status;
int i;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ut_release_to_cache (
- u32 list_id,
- void *object)
+ u32 list_id,
+ void *object)
{
- acpi_memory_list *cache_info;
+ struct acpi_memory_list *cache_info;
ACPI_FUNCTION_ENTRY ();
void *
acpi_ut_acquire_from_cache (
- u32 list_id)
+ u32 list_id)
{
- acpi_memory_list *cache_info;
- void *object;
+ struct acpi_memory_list *cache_info;
+ void *object;
ACPI_FUNCTION_NAME ("ut_acquire_from_cache");
void
acpi_ut_delete_generic_cache (
- u32 list_id)
+ u32 list_id)
{
- acpi_memory_list *cache_info;
- char *next;
+ struct acpi_memory_list *cache_info;
+ char *next;
ACPI_FUNCTION_ENTRY ();
*
* RETURN: Status
*
- * DESCRIPTION: Perform parameter validation checks on an acpi_buffer
+ * DESCRIPTION: Perform parameter validation checks on an struct acpi_buffer
*
******************************************************************************/
acpi_status
acpi_ut_validate_buffer (
- acpi_buffer *buffer)
+ struct acpi_buffer *buffer)
{
/* Obviously, the structure pointer must be valid */
acpi_status
acpi_ut_initialize_buffer (
- acpi_buffer *buffer,
- acpi_size required_length)
+ struct acpi_buffer *buffer,
+ acpi_size required_length)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
switch (buffer->length) {
void *
acpi_ut_allocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- void *allocation;
+ void *allocation;
ACPI_FUNCTION_TRACE_U32 ("ut_allocate", size);
void *
acpi_ut_callocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- void *allocation;
+ void *allocation;
ACPI_FUNCTION_TRACE_U32 ("ut_callocate", size);
void *
acpi_ut_allocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_debug_mem_block *allocation;
- acpi_status status;
+ struct acpi_debug_mem_block *allocation;
+ acpi_status status;
- allocation = acpi_ut_allocate (size + sizeof (acpi_debug_mem_block), component,
+ allocation = acpi_ut_allocate (size + sizeof (struct acpi_debug_mem_block), component,
module, line);
if (!allocation) {
return (NULL);
void *
acpi_ut_callocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_debug_mem_block *allocation;
- acpi_status status;
+ struct acpi_debug_mem_block *allocation;
+ acpi_status status;
- allocation = acpi_ut_callocate (size + sizeof (acpi_debug_mem_block), component,
+ allocation = acpi_ut_callocate (size + sizeof (struct acpi_debug_mem_block), component,
module, line);
if (!allocation) {
/* Report allocation error */
void
acpi_ut_free_and_track (
- void *allocation,
- u32 component,
- char *module,
- u32 line)
+ void *allocation,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_debug_mem_block *debug_block;
- acpi_status status;
+ struct acpi_debug_mem_block *debug_block;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ut_free", allocation);
return_VOID;
}
- debug_block = ACPI_CAST_PTR (acpi_debug_mem_block,
- (((char *) allocation) - sizeof (acpi_debug_mem_header)));
+ debug_block = ACPI_CAST_PTR (struct acpi_debug_mem_block,
+ (((char *) allocation) - sizeof (struct acpi_debug_mem_header)));
acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].total_freed++;
acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].current_total_size -= debug_block->size;
*
******************************************************************************/
-acpi_debug_mem_block *
+struct acpi_debug_mem_block *
acpi_ut_find_allocation (
- u32 list_id,
- void *allocation)
+ u32 list_id,
+ void *allocation)
{
- acpi_debug_mem_block *element;
+ struct acpi_debug_mem_block *element;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ut_track_allocation (
- u32 list_id,
- acpi_debug_mem_block *allocation,
- acpi_size size,
- u8 alloc_type,
- u32 component,
- char *module,
- u32 line)
+ u32 list_id,
+ struct acpi_debug_mem_block *allocation,
+ acpi_size size,
+ u8 alloc_type,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_memory_list *mem_list;
- acpi_debug_mem_block *element;
- acpi_status status = AE_OK;
+ struct acpi_memory_list *mem_list;
+ struct acpi_debug_mem_block *element;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ut_track_allocation", allocation);
/* Insert at list head */
if (mem_list->list_head) {
- ((acpi_debug_mem_block *)(mem_list->list_head))->previous = allocation;
+ ((struct acpi_debug_mem_block *)(mem_list->list_head))->previous = allocation;
}
allocation->next = mem_list->list_head;
acpi_status
acpi_ut_remove_allocation (
- u32 list_id,
- acpi_debug_mem_block *allocation,
- u32 component,
- char *module,
- u32 line)
+ u32 list_id,
+ struct acpi_debug_mem_block *allocation,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_memory_list *mem_list;
- acpi_status status;
+ struct acpi_memory_list *mem_list;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_remove_allocation");
void)
{
/*
- acpi_memory_list *mem_list;
+ struct acpi_memory_list *mem_list;
*/
ACPI_FUNCTION_TRACE ("ut_dump_allocation_info");
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
("%30s: %4d (%3d Kb)\n", "Max Nodes",
acpi_gbl_max_concurrent_node_count,
- ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * sizeof (acpi_namespace_node)))));
+ ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * sizeof (struct acpi_namespace_node)))));
*/
return_VOID;
}
void
acpi_ut_dump_allocations (
- u32 component,
- char *module)
+ u32 component,
+ char *module)
{
- acpi_debug_mem_block *element;
- acpi_descriptor *descriptor;
- u32 num_outstanding = 0;
+ struct acpi_debug_mem_block *element;
+ union acpi_descriptor *descriptor;
+ u32 num_outstanding = 0;
ACPI_FUNCTION_TRACE ("ut_dump_allocations");
((module == NULL) || (0 == ACPI_STRCMP (module, element->module)))) {
/* Ignore allocated objects that are in a cache */
- descriptor = ACPI_CAST_PTR (acpi_descriptor, &element->user_space);
+ descriptor = ACPI_CAST_PTR (union acpi_descriptor, &element->user_space);
if (descriptor->descriptor_id != ACPI_DESC_TYPE_CACHED) {
acpi_os_printf ("%p Len %04X %9.9s-%d ",
descriptor, element->size, element->module,
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static acpi_status
acpi_ut_copy_isimple_to_esimple (
- acpi_operand_object *internal_object,
- acpi_object *external_object,
- u8 *data_space,
- acpi_size *buffer_space_used)
+ union acpi_operand_object *internal_object,
+ union acpi_object *external_object,
+ u8 *data_space,
+ acpi_size *buffer_space_used)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ut_copy_isimple_to_esimple");
/* Always clear the external object */
- ACPI_MEMSET (external_object, 0, sizeof (acpi_object));
+ ACPI_MEMSET (external_object, 0, sizeof (union acpi_object));
/*
* In general, the external object will be the same type as
acpi_status
acpi_ut_copy_ielement_to_eelement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context)
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context)
{
- acpi_status status = AE_OK;
- acpi_pkg_info *info = (acpi_pkg_info *) context;
- acpi_size object_space;
- u32 this_index;
- acpi_object *target_object;
+ acpi_status status = AE_OK;
+ struct acpi_pkg_info *info = (struct acpi_pkg_info *) context;
+ acpi_size object_space;
+ u32 this_index;
+ union acpi_object *target_object;
ACPI_FUNCTION_ENTRY ();
this_index = state->pkg.index;
- target_object = (acpi_object *)
- &((acpi_object *)(state->pkg.dest_object))->package.elements[this_index];
+ target_object = (union acpi_object *)
+ &((union acpi_object *)(state->pkg.dest_object))->package.elements[this_index];
switch (object_type) {
case ACPI_COPY_TYPE_SIMPLE:
*/
target_object->type = ACPI_TYPE_PACKAGE;
target_object->package.count = source_object->package.count;
- target_object->package.elements = ACPI_CAST_PTR (acpi_object, info->free_space);
+ target_object->package.elements = ACPI_CAST_PTR (union acpi_object, info->free_space);
/*
* Pass the new package object back to the package walk routine
* update the buffer length counter
*/
object_space = ACPI_ROUND_UP_TO_NATIVE_WORD (
- (acpi_size) target_object->package.count * sizeof (acpi_object));
+ (acpi_size) target_object->package.count * sizeof (union acpi_object));
break;
static acpi_status
acpi_ut_copy_ipackage_to_epackage (
- acpi_operand_object *internal_object,
- u8 *buffer,
- acpi_size *space_used)
+ union acpi_operand_object *internal_object,
+ u8 *buffer,
+ acpi_size *space_used)
{
- acpi_object *external_object;
- acpi_status status;
- acpi_pkg_info info;
+ union acpi_object *external_object;
+ acpi_status status;
+ struct acpi_pkg_info info;
ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_epackage");
/*
* First package at head of the buffer
*/
- external_object = ACPI_CAST_PTR (acpi_object, buffer);
+ external_object = ACPI_CAST_PTR (union acpi_object, buffer);
/*
* Free space begins right after the first package
*/
- info.length = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
- info.free_space = buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+ info.length = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
+ info.free_space = buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
info.object_space = 0;
info.num_packages = 1;
external_object->type = ACPI_GET_OBJECT_TYPE (internal_object);
external_object->package.count = internal_object->package.count;
- external_object->package.elements = ACPI_CAST_PTR (acpi_object, info.free_space);
+ external_object->package.elements = ACPI_CAST_PTR (union acpi_object, info.free_space);
/*
* Leave room for an array of ACPI_OBJECTS in the buffer
* and move the free space past it
*/
info.length += (acpi_size) external_object->package.count *
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
info.free_space += external_object->package.count *
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
status = acpi_ut_walk_package_tree (internal_object, external_object,
acpi_ut_copy_ielement_to_eelement, &info);
acpi_status
acpi_ut_copy_iobject_to_eobject (
- acpi_operand_object *internal_object,
- acpi_buffer *ret_buffer)
+ union acpi_operand_object *internal_object,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_copy_iobject_to_eobject");
* Build a simple object (no nested objects)
*/
status = acpi_ut_copy_isimple_to_esimple (internal_object,
- (acpi_object *) ret_buffer->pointer,
+ (union acpi_object *) ret_buffer->pointer,
((u8 *) ret_buffer->pointer +
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object))),
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object))),
&ret_buffer->length);
/*
* build simple does not include the object size in the length
* so we add it in here
*/
- ret_buffer->length += sizeof (acpi_object);
+ ret_buffer->length += sizeof (union acpi_object);
}
return_ACPI_STATUS (status);
acpi_status
acpi_ut_copy_esimple_to_isimple (
- acpi_object *external_object,
- acpi_operand_object **ret_internal_object)
+ union acpi_object *external_object,
+ union acpi_operand_object **ret_internal_object)
{
- acpi_operand_object *internal_object;
+ union acpi_operand_object *internal_object;
ACPI_FUNCTION_TRACE ("ut_copy_esimple_to_isimple");
static acpi_status
acpi_ut_copy_epackage_to_ipackage (
- acpi_operand_object *internal_object,
- u8 *buffer,
- u32 *space_used)
+ union acpi_operand_object *internal_object,
+ u8 *buffer,
+ u32 *space_used)
{
- u8 *free_space;
- acpi_object *external_object;
- u32 length = 0;
- u32 this_index;
- u32 object_space = 0;
- acpi_operand_object *this_internal_obj;
- acpi_object *this_external_obj;
+ u8 *free_space;
+ union acpi_object *external_object;
+ u32 length = 0;
+ u32 this_index;
+ u32 object_space = 0;
+ union acpi_operand_object *this_internal_obj;
+ union acpi_object *this_external_obj;
ACPI_FUNCTION_TRACE ("ut_copy_epackage_to_ipackage");
/*
* First package at head of the buffer
*/
- external_object = (acpi_object *)buffer;
+ external_object = (union acpi_object *)buffer;
/*
* Free space begins right after the first package
*/
- free_space = buffer + sizeof(acpi_object);
+ free_space = buffer + sizeof(union acpi_object);
external_object->type = ACPI_GET_OBJECT_TYPE (internal_object);
external_object->package.count = internal_object->package.count;
- external_object->package.elements = (acpi_object *)free_space;
+ external_object->package.elements = (union acpi_object *)free_space;
/*
* Build an array of ACPI_OBJECTS in the buffer
* and move the free space past it
*/
- free_space += external_object->package.count * sizeof(acpi_object);
+ free_space += external_object->package.count * sizeof(union acpi_object);
/* Call walk_package */
acpi_status
acpi_ut_copy_eobject_to_iobject (
- acpi_object *external_object,
- acpi_operand_object **internal_object)
+ union acpi_object *external_object,
+ union acpi_operand_object **internal_object)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_copy_eobject_to_iobject");
acpi_status
acpi_ut_copy_simple_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc)
{
- u16 reference_count;
- acpi_operand_object *next_object;
+ u16 reference_count;
+ union acpi_operand_object *next_object;
/* Save fields from destination that we don't want to overwrite */
/* Copy the entire source object over the destination object*/
ACPI_MEMCPY ((char *) dest_desc, (char *) source_desc,
- sizeof (acpi_operand_object));
+ sizeof (union acpi_operand_object));
/* Restore the saved fields */
acpi_status
acpi_ut_copy_ielement_to_ielement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context)
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context)
{
- acpi_status status = AE_OK;
- u32 this_index;
- acpi_operand_object **this_target_ptr;
- acpi_operand_object *target_object;
+ acpi_status status = AE_OK;
+ u32 this_index;
+ union acpi_operand_object **this_target_ptr;
+ union acpi_operand_object *target_object;
ACPI_FUNCTION_ENTRY ();
this_index = state->pkg.index;
- this_target_ptr = (acpi_operand_object **)
+ this_target_ptr = (union acpi_operand_object **)
&state->pkg.dest_object->package.elements[this_index];
switch (object_type) {
acpi_status
acpi_ut_copy_ipackage_to_ipackage (
- acpi_operand_object *source_obj,
- acpi_operand_object *dest_obj,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_obj,
+ union acpi_operand_object *dest_obj,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_ipackage");
acpi_status
acpi_ut_copy_iobject_to_iobject (
- acpi_operand_object *source_desc,
- acpi_operand_object **dest_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **dest_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ut_copy_iobject_to_iobject");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_ut_init_stack_ptr_trace (
void)
{
- u32 current_sp;
+ u32 current_sp;
acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF (¤t_sp, NULL);
acpi_ut_track_stack_ptr (
void)
{
- acpi_size current_sp;
+ acpi_size current_sp;
current_sp = ACPI_PTR_DIFF (¤t_sp, NULL);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...)
{
- u32 thread_id;
+ u32 thread_id;
va_list args;
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print_raw (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...)
{
va_list args;
void
acpi_ut_trace (
- u32 line_number,
- acpi_debug_print_info *dbg_info)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info)
{
acpi_gbl_nesting_level++;
void
acpi_ut_trace_ptr (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- void *pointer)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ void *pointer)
{
acpi_gbl_nesting_level++;
acpi_ut_track_stack_ptr ();
void
acpi_ut_trace_str (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *string)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *string)
{
acpi_gbl_nesting_level++;
void
acpi_ut_trace_u32 (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u32 integer)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u32 integer)
{
acpi_gbl_nesting_level++;
void
acpi_ut_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info)
{
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
void
acpi_ut_status_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_status status)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_status status)
{
if (ACPI_SUCCESS (status)) {
void
acpi_ut_value_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_integer value)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_integer value)
{
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
void
acpi_ut_ptr_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u8 *ptr)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u8 *ptr)
{
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
void
acpi_ut_dump_buffer (
- u8 *buffer,
- u32 count,
- u32 display,
- u32 component_id)
+ u8 *buffer,
+ u32 count,
+ u32 display,
+ u32 component_id)
{
- acpi_native_uint i = 0;
- acpi_native_uint j;
- u32 temp32;
- u8 buf_char;
+ acpi_native_uint i = 0;
+ acpi_native_uint j;
+ u32 temp32;
+ u8 buf_char;
/* Only dump the buffer if tracing is enabled */
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ut_delete_internal_obj (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
- void *obj_pointer = NULL;
- acpi_operand_object *handler_desc;
- acpi_operand_object *second_desc;
+ void *obj_pointer = NULL;
+ union acpi_operand_object *handler_desc;
+ union acpi_operand_object *second_desc;
ACPI_FUNCTION_TRACE_PTR ("ut_delete_internal_obj", object);
void
acpi_ut_delete_internal_object_list (
- acpi_operand_object **obj_list)
+ union acpi_operand_object **obj_list)
{
- acpi_operand_object **internal_obj;
+ union acpi_operand_object **internal_obj;
ACPI_FUNCTION_TRACE ("ut_delete_internal_object_list");
static void
acpi_ut_update_ref_count (
- acpi_operand_object *object,
- u32 action)
+ union acpi_operand_object *object,
+ u32 action)
{
- u16 count;
- u16 new_count;
+ u16 count;
+ u16 new_count;
ACPI_FUNCTION_NAME ("ut_update_ref_count");
acpi_status
acpi_ut_update_object_reference (
- acpi_operand_object *object,
- u16 action)
+ union acpi_operand_object *object,
+ u16 action)
{
- acpi_status status;
- u32 i;
- acpi_operand_object *next;
- acpi_operand_object *new;
- acpi_generic_state *state_list = NULL;
- acpi_generic_state *state;
+ acpi_status status;
+ u32 i;
+ union acpi_operand_object *next;
+ union acpi_operand_object *new;
+ union acpi_generic_state *state_list = NULL;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ut_update_object_reference", object);
void
acpi_ut_add_reference (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
ACPI_FUNCTION_TRACE_PTR ("ut_add_reference", object);
void
acpi_ut_remove_reference (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
ACPI_FUNCTION_TRACE_PTR ("ut_remove_reference", object);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ut_evaluate_object (
- acpi_namespace_node *prefix_node,
- char *path,
- u32 expected_return_btypes,
- acpi_operand_object **return_desc)
+ struct acpi_namespace_node *prefix_node,
+ char *path,
+ u32 expected_return_btypes,
+ union acpi_operand_object **return_desc)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
- u32 return_btype;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
+ u32 return_btype;
ACPI_FUNCTION_TRACE ("ut_evaluate_object");
acpi_status
acpi_ut_evaluate_numeric_object (
- char *object_name,
- acpi_namespace_node *device_node,
- acpi_integer *address)
+ char *object_name,
+ struct acpi_namespace_node *device_node,
+ acpi_integer *address)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_evaluate_numeric_object");
acpi_status
acpi_ut_execute_HID (
- acpi_namespace_node *device_node,
- acpi_device_id *hid)
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *hid)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_HID");
acpi_status
acpi_ut_execute_CID (
- acpi_namespace_node *device_node,
- acpi_device_id *cid)
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *cid)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_CID");
acpi_status
acpi_ut_execute_UID (
- acpi_namespace_node *device_node,
- acpi_device_id *uid)
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *uid)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_UID");
acpi_status
acpi_ut_execute_STA (
- acpi_namespace_node *device_node,
- u32 *flags)
+ struct acpi_namespace_node *device_node,
+ u32 *flags)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_STA");
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
const char *
acpi_format_exception (
- acpi_status status)
+ acpi_status status)
{
- const char *exception = "UNKNOWN_STATUS_CODE";
- acpi_status sub_status;
+ const char *exception = "UNKNOWN_STATUS_CODE";
+ acpi_status sub_status;
ACPI_FUNCTION_NAME ("format_exception");
/* Debug switch - level and trace mask */
#ifdef ACPI_DEBUG_OUTPUT
-u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
+u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
#else
-u32 acpi_dbg_level = ACPI_NORMAL_DEFAULT;
+u32 acpi_dbg_level = ACPI_NORMAL_DEFAULT;
#endif
/* Debug switch - layer (component) mask */
-u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT;
-u32 acpi_gbl_nesting_level = 0;
+u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT;
+u32 acpi_gbl_nesting_level = 0;
/* Debugger globals */
-u8 acpi_gbl_db_terminate_threads = FALSE;
-u8 acpi_gbl_abort_method = FALSE;
-u8 acpi_gbl_method_executing = FALSE;
+u8 acpi_gbl_db_terminate_threads = FALSE;
+u8 acpi_gbl_abort_method = FALSE;
+u8 acpi_gbl_method_executing = FALSE;
/* System flags */
-u32 acpi_gbl_startup_flags = 0;
+u32 acpi_gbl_startup_flags = 0;
/* System starts uninitialized */
-u8 acpi_gbl_shutdown = TRUE;
+u8 acpi_gbl_shutdown = TRUE;
-const u8 acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128};
+const u8 acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128};
-const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
+const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
"\\_S0_",
"\\_S1_",
"\\_S2_",
* during the initialization sequence.
*/
-const acpi_predefined_names acpi_gbl_pre_defined_names[] =
+const struct acpi_predefined_names acpi_gbl_pre_defined_names[] =
{ {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL},
{"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL},
{"_SB_", ACPI_TYPE_DEVICE, NULL},
* The table is indexed by values of acpi_object_type
*/
-const u8 acpi_gbl_ns_properties[] =
+const u8 acpi_gbl_ns_properties[] =
{
ACPI_NS_NORMAL, /* 00 Any */
ACPI_NS_NORMAL, /* 01 Number */
/* Hex to ASCII conversion table */
-static const char acpi_gbl_hex_to_ascii[] =
+static const char acpi_gbl_hex_to_ascii[] =
{'0','1','2','3','4','5','6','7',
'8','9','A','B','C','D','E','F'};
char
acpi_ut_hex_to_ascii_char (
- acpi_integer integer,
- u32 position)
+ acpi_integer integer,
+ u32 position)
{
return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]);
******************************************************************************/
-acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
+struct acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
-ACPI_TABLE_SUPPORT acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] =
+struct acpi_table_support acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] =
{
/*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */
*
******************************************************************************/
-acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] =
+struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] =
{
/* Name Parent Register Register Bit Position Register Bit Mask */
};
-acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
+struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
{
/* ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS, ACPI_BITREG_TIMER_ENABLE, ACPI_BITMASK_TIMER_STATUS, ACPI_BITMASK_TIMER_ENABLE},
/* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, ACPI_BITREG_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
/* Region type decoding */
-const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
+const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
{
"system_memory",
"system_iO",
char *
acpi_ut_get_region_name (
- u8 space_id)
+ u8 space_id)
{
if (space_id >= ACPI_USER_REGION_BEGIN)
/* Event type decoding */
-static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
+static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
{
"PM_Timer",
"global_lock",
char *
acpi_ut_get_event_name (
- u32 event_id)
+ u32 event_id)
{
if (event_id > ACPI_EVENT_MAX)
* indicatewhat type is actually going to be stored for this entry.
*/
-static const char acpi_gbl_bad_type[] = "UNDEFINED";
+static const char acpi_gbl_bad_type[] = "UNDEFINED";
#define TYPE_NAME_LENGTH 12 /* Maximum length of each string */
-static const char *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
+static const char *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
{
/* 00 */ "Untyped",
/* 01 */ "Integer",
char *
acpi_ut_get_type_name (
- acpi_object_type type)
+ acpi_object_type type)
{
if (type > ACPI_TYPE_INVALID)
char *
acpi_ut_get_object_type_name (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
if (!obj_desc)
char *
acpi_ut_get_mutex_name (
- u32 mutex_id)
+ u32 mutex_id)
{
if (mutex_id > MAX_MTX)
u8
acpi_ut_valid_object_type (
- acpi_object_type type)
+ acpi_object_type type)
{
if (type > ACPI_TYPE_LOCAL_MAX)
acpi_owner_id
acpi_ut_allocate_owner_id (
- u32 id_type)
+ u32 id_type)
{
- acpi_owner_id owner_id = 0xFFFF;
+ acpi_owner_id owner_id = 0xFFFF;
ACPI_FUNCTION_TRACE ("ut_allocate_owner_id");
acpi_ut_init_globals (
void)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ut_init_globals");
/* Memory allocation and cache lists */
- ACPI_MEMSET (acpi_gbl_memory_lists, 0, sizeof (acpi_memory_list) * ACPI_NUM_MEM_LISTS);
+ ACPI_MEMSET (acpi_gbl_memory_lists, 0, sizeof (struct acpi_memory_list) * ACPI_NUM_MEM_LISTS);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_generic_state *) NULL)->common.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_parse_object *) NULL)->common.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_parse_object *) NULL)->common.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_operand_object *) NULL)->cache.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_walk_state *) NULL)->next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_generic_state *) NULL)->common.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_operand_object *) NULL)->cache.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset = (u16) ACPI_PTR_DIFF (&(((struct acpi_walk_state *) NULL)->next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size = sizeof (acpi_namespace_node);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size = sizeof (acpi_generic_state);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size = sizeof (acpi_parse_obj_common);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (acpi_parse_obj_named);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size = sizeof (acpi_operand_object);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size = sizeof (acpi_walk_state);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size = sizeof (struct acpi_namespace_node);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size = sizeof (union acpi_generic_state);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size = sizeof (struct acpi_parse_obj_common);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (struct acpi_parse_obj_named);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size = sizeof (union acpi_operand_object);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size = sizeof (struct acpi_walk_state);
acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].max_cache_depth = ACPI_MAX_STATE_CACHE_DEPTH;
acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].max_cache_depth = ACPI_MAX_PARSE_CACHE_DEPTH;
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static void
acpi_ut_fadt_register_error (
- char *register_name,
- u32 value,
- acpi_size offset)
+ char *register_name,
+ u32 value,
+ acpi_size offset)
{
ACPI_REPORT_WARNING (
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_status
acpi_ut_short_divide (
- acpi_integer *in_dividend,
- u32 divisor,
- acpi_integer *out_quotient,
- u32 *out_remainder)
+ acpi_integer *in_dividend,
+ u32 divisor,
+ acpi_integer *out_quotient,
+ u32 *out_remainder)
{
- uint64_overlay dividend;
- uint64_overlay quotient;
- u32 remainder32;
+ union uint64_overlay dividend;
+ union uint64_overlay quotient;
+ u32 remainder32;
ACPI_FUNCTION_TRACE ("ut_short_divide");
acpi_status
acpi_ut_divide (
- acpi_integer *in_dividend,
- acpi_integer *in_divisor,
- acpi_integer *out_quotient,
- acpi_integer *out_remainder)
+ acpi_integer *in_dividend,
+ acpi_integer *in_divisor,
+ acpi_integer *out_quotient,
+ acpi_integer *out_remainder)
{
- uint64_overlay dividend;
- uint64_overlay divisor;
- uint64_overlay quotient;
- uint64_overlay remainder;
- uint64_overlay normalized_dividend;
- uint64_overlay normalized_divisor;
- u32 partial1;
- uint64_overlay partial2;
- uint64_overlay partial3;
+ union uint64_overlay dividend;
+ union uint64_overlay divisor;
+ union uint64_overlay quotient;
+ union uint64_overlay remainder;
+ union uint64_overlay normalized_dividend;
+ union uint64_overlay normalized_divisor;
+ u32 partial1;
+ union uint64_overlay partial2;
+ union uint64_overlay partial3;
ACPI_FUNCTION_TRACE ("ut_divide");
acpi_status
acpi_ut_short_divide (
- acpi_integer *in_dividend,
- u32 divisor,
- acpi_integer *out_quotient,
- u32 *out_remainder)
+ acpi_integer *in_dividend,
+ u32 divisor,
+ acpi_integer *out_quotient,
+ u32 *out_remainder)
{
ACPI_FUNCTION_TRACE ("ut_short_divide");
acpi_status
acpi_ut_divide (
- acpi_integer *in_dividend,
- acpi_integer *in_divisor,
- acpi_integer *out_quotient,
- acpi_integer *out_remainder)
+ acpi_integer *in_dividend,
+ acpi_integer *in_divisor,
+ acpi_integer *out_quotient,
+ acpi_integer *out_remainder)
{
ACPI_FUNCTION_TRACE ("ut_divide");
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
void
acpi_ut_print_string (
- char *string,
- u8 max_length)
+ char *string,
+ u8 max_length)
{
- u32 i;
+ u32 i;
if (!string) {
u32
acpi_ut_dword_byte_swap (
- u32 value)
+ u32 value)
{
union {
- u32 value;
- u8 bytes[4];
+ u32 value;
+ u8 bytes[4];
} out;
union {
- u32 value;
- u8 bytes[4];
+ u32 value;
+ u8 bytes[4];
} in;
void
acpi_ut_set_integer_width (
- u8 revision)
+ u8 revision)
{
if (revision <= 1) {
void
acpi_ut_display_init_pathname (
- u8 type,
- acpi_namespace_node *obj_handle,
- char *path)
+ u8 type,
+ struct acpi_namespace_node *obj_handle,
+ char *path)
{
- acpi_status status;
- acpi_buffer buffer;
+ acpi_status status;
+ struct acpi_buffer buffer;
ACPI_FUNCTION_ENTRY ();
u8
acpi_ut_valid_acpi_name (
- u32 name)
+ u32 name)
{
- char *name_ptr = (char *) &name;
- u32 i;
+ char *name_ptr = (char *) &name;
+ u32 i;
ACPI_FUNCTION_ENTRY ();
u8
acpi_ut_valid_acpi_character (
- char character)
+ char character)
{
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ut_strtoul64 (
- char *string,
- u32 base,
- acpi_integer *ret_integer)
+ char *string,
+ u32 base,
+ acpi_integer *ret_integer)
{
- u32 index;
- acpi_integer return_value = 0;
- acpi_status status = AE_OK;
- acpi_integer dividend;
- acpi_integer quotient;
+ u32 index;
+ acpi_integer return_value = 0;
+ acpi_status status = AE_OK;
+ acpi_integer dividend;
+ acpi_integer quotient;
*ret_integer = 0;
char *
acpi_ut_strupr (
- char *src_string)
+ char *src_string)
{
- char *string;
+ char *string;
ACPI_FUNCTION_ENTRY ();
acpi_ut_mutex_initialize (
void)
{
- u32 i;
- acpi_status status;
+ u32 i;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_mutex_initialize");
acpi_ut_mutex_terminate (
void)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ut_mutex_terminate");
acpi_status
acpi_ut_create_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_U32 ("ut_create_mutex", mutex_id);
acpi_status
acpi_ut_delete_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_U32 ("ut_delete_mutex", mutex_id);
acpi_status
acpi_ut_acquire_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status;
- u32 i;
- u32 this_thread_id;
+ acpi_status status;
+ u32 i;
+ u32 this_thread_id;
ACPI_FUNCTION_NAME ("ut_acquire_mutex");
acpi_status
acpi_ut_release_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status;
- u32 i;
- u32 this_thread_id;
+ acpi_status status;
+ u32 i;
+ u32 this_thread_id;
ACPI_FUNCTION_NAME ("ut_release_mutex");
acpi_status
acpi_ut_create_update_state_and_push (
- acpi_operand_object *object,
- u16 action,
- acpi_generic_state **state_list)
+ union acpi_operand_object *object,
+ u16 action,
+ union acpi_generic_state **state_list)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_ENTRY ();
acpi_status
acpi_ut_create_pkg_state_and_push (
- void *internal_object,
- void *external_object,
- u16 index,
- acpi_generic_state **state_list)
+ void *internal_object,
+ void *external_object,
+ u16 index,
+ union acpi_generic_state **state_list)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_ENTRY ();
void
acpi_ut_push_generic_state (
- acpi_generic_state **list_head,
- acpi_generic_state *state)
+ union acpi_generic_state **list_head,
+ union acpi_generic_state *state)
{
ACPI_FUNCTION_TRACE ("ut_push_generic_state");
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_pop_generic_state (
- acpi_generic_state **list_head)
+ union acpi_generic_state **list_head)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE ("ut_pop_generic_state");
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_generic_state (void)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_ENTRY ();
*
******************************************************************************/
-acpi_thread_state *
+struct acpi_thread_state *
acpi_ut_create_thread_state (
void)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE ("ut_create_thread_state");
state->common.data_type = ACPI_DESC_TYPE_STATE_THREAD;
state->thread.thread_id = acpi_os_get_thread_id ();
- return_PTR ((acpi_thread_state *) state);
+ return_PTR ((struct acpi_thread_state *) state);
}
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_update_state (
- acpi_operand_object *object,
- u16 action)
+ union acpi_operand_object *object,
+ u16 action)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ut_create_update_state", object);
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_pkg_state (
- void *internal_object,
- void *external_object,
- u16 index)
+ void *internal_object,
+ void *external_object,
+ u16 index)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ut_create_pkg_state", internal_object);
/* Init fields specific to the update struct */
state->common.data_type = ACPI_DESC_TYPE_STATE_PACKAGE;
- state->pkg.source_object = (acpi_operand_object *) internal_object;
+ state->pkg.source_object = (union acpi_operand_object *) internal_object;
state->pkg.dest_object = external_object;
state->pkg.index = index;
state->pkg.num_packages = 1;
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_control_state (
void)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE ("ut_create_control_state");
void
acpi_ut_delete_generic_state (
- acpi_generic_state *state)
+ union acpi_generic_state *state)
{
ACPI_FUNCTION_TRACE ("ut_delete_generic_state");
acpi_status
acpi_ut_walk_package_tree (
- acpi_operand_object *source_object,
- void *target_object,
- acpi_pkg_callback walk_callback,
- void *context)
+ union acpi_operand_object *source_object,
+ void *target_object,
+ acpi_pkg_callback walk_callback,
+ void *context)
{
- acpi_status status = AE_OK;
- acpi_generic_state *state_list = NULL;
- acpi_generic_state *state;
- u32 this_index;
- acpi_operand_object *this_source_obj;
+ acpi_status status = AE_OK;
+ union acpi_generic_state *state_list = NULL;
+ union acpi_generic_state *state;
+ u32 this_index;
+ union acpi_operand_object *this_source_obj;
ACPI_FUNCTION_TRACE ("ut_walk_package_tree");
/* Get one element of the package */
this_index = state->pkg.index;
- this_source_obj = (acpi_operand_object *)
+ this_source_obj = (union acpi_operand_object *)
state->pkg.source_object->package.elements[this_index];
/*
u8
acpi_ut_generate_checksum (
- u8 *buffer,
- u32 length)
+ u8 *buffer,
+ u32 length)
{
- u32 i;
- signed char sum = 0;
+ u32 i;
+ signed char sum = 0;
for (i = 0; i < length; i++) {
u8 *
acpi_ut_get_resource_end_tag (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- u8 buffer_byte;
- u8 *buffer;
- u8 *end_buffer;
+ u8 buffer_byte;
+ u8 *buffer;
+ u8 *end_buffer;
buffer = obj_desc->buffer.pointer;
void
acpi_ut_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
void
acpi_ut_report_warning (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
acpi_os_printf ("%8s-%04d: *** Warning: ", module_name, line_number);
void
acpi_ut_report_info (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
acpi_os_printf ("%8s-%04d: *** Info: ", module_name, line_number);
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_internal_object_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id,
- acpi_object_type type)
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ acpi_object_type type)
{
- acpi_operand_object *object;
- acpi_operand_object *second_object;
+ union acpi_operand_object *object;
+ union acpi_operand_object *second_object;
ACPI_FUNCTION_TRACE_STR ("ut_create_internal_object_dbg", acpi_ut_get_type_name (type));
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_buffer_object (
- acpi_size buffer_size)
+ acpi_size buffer_size)
{
- acpi_operand_object *buffer_desc;
- u8 *buffer;
+ union acpi_operand_object *buffer_desc;
+ u8 *buffer;
ACPI_FUNCTION_TRACE_U32 ("ut_create_buffer_object", buffer_size);
*
* PARAMETERS: Object - Object to be validated
*
- * RETURN: Validate a pointer to be an acpi_operand_object
+ * RETURN: Validate a pointer to be an union acpi_operand_object
*
******************************************************************************/
u8
acpi_ut_valid_internal_object (
- void *object)
+ void *object)
{
ACPI_FUNCTION_NAME ("ut_valid_internal_object");
switch (ACPI_GET_DESCRIPTOR_TYPE (object)) {
case ACPI_DESC_TYPE_OPERAND:
- /* The object appears to be a valid acpi_operand_object */
+ /* The object appears to be a valid union acpi_operand_object */
return (TRUE);
void *
acpi_ut_allocate_object_desc_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
- acpi_operand_object *object;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ut_allocate_object_desc_dbg");
ACPI_SET_DESCRIPTOR_TYPE (object, ACPI_DESC_TYPE_OPERAND);
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p Size %X\n",
- object, (u32) sizeof (acpi_operand_object)));
+ object, (u32) sizeof (union acpi_operand_object)));
return_PTR (object);
}
void
acpi_ut_delete_object_desc (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
ACPI_FUNCTION_TRACE_PTR ("ut_delete_object_desc", object);
- /* Object must be an acpi_operand_object */
+ /* Object must be an union acpi_operand_object */
if (ACPI_GET_DESCRIPTOR_TYPE (object) != ACPI_DESC_TYPE_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
acpi_status
acpi_ut_get_simple_object_size (
- acpi_operand_object *internal_object,
- acpi_size *obj_length)
+ union acpi_operand_object *internal_object,
+ acpi_size *obj_length)
{
- acpi_size length;
- acpi_status status = AE_OK;
+ acpi_size length;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ut_get_simple_object_size", internal_object);
/* Start with the length of the Acpi object */
- length = sizeof (acpi_object);
+ length = sizeof (union acpi_object);
if (ACPI_GET_DESCRIPTOR_TYPE (internal_object) == ACPI_DESC_TYPE_NAMED) {
/* Object is a named object (reference), just return the length */
acpi_status
acpi_ut_get_element_length (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context)
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context)
{
- acpi_status status = AE_OK;
- acpi_pkg_info *info = (acpi_pkg_info *) context;
- acpi_size object_space;
+ acpi_status status = AE_OK;
+ struct acpi_pkg_info *info = (struct acpi_pkg_info *) context;
+ acpi_size object_space;
switch (object_type) {
acpi_status
acpi_ut_get_package_object_size (
- acpi_operand_object *internal_object,
- acpi_size *obj_length)
+ union acpi_operand_object *internal_object,
+ acpi_size *obj_length)
{
- acpi_status status;
- acpi_pkg_info info;
+ acpi_status status;
+ struct acpi_pkg_info info;
ACPI_FUNCTION_TRACE_PTR ("ut_get_package_object_size", internal_object);
* just add the length of the package objects themselves.
* Round up to the next machine word.
*/
- info.length += ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object)) *
+ info.length += ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object)) *
(acpi_size) info.num_packages;
/* Return the total package length */
acpi_status
acpi_ut_get_object_size(
- acpi_operand_object *internal_object,
- acpi_size *obj_length)
+ union acpi_operand_object *internal_object,
+ acpi_size *obj_length)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
acpi_initialize_subsystem (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_initialize_subsystem");
acpi_status
acpi_enable_subsystem (
- u32 flags)
+ u32 flags)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_enable_subsystem");
acpi_status
acpi_initialize_objects (
- u32 flags)
+ u32 flags)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_initialize_objects");
acpi_status
acpi_terminate (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_terminate");
acpi_status
acpi_get_system_info (
- acpi_buffer *out_buffer)
+ struct acpi_buffer *out_buffer)
{
- acpi_system_info *info_ptr;
- u32 i;
- acpi_status status;
+ struct acpi_system_info *info_ptr;
+ u32 i;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_system_info");
/* Validate/Allocate/Clear caller buffer */
- status = acpi_ut_initialize_buffer (out_buffer, sizeof (acpi_system_info));
+ status = acpi_ut_initialize_buffer (out_buffer, sizeof (struct acpi_system_info));
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
/*
* Populate the return buffer
*/
- info_ptr = (acpi_system_info *) out_buffer->pointer;
+ info_ptr = (struct acpi_system_info *) out_buffer->pointer;
info_ptr->acpi_ca_version = ACPI_CA_VERSION;
acpi_status
acpi_install_initialization_handler (
- acpi_init_handler handler,
- u32 function)
+ acpi_init_handler handler,
+ u32 function)
{
if (!handler) {
#ifdef ACPI_DEBUG_OUTPUT
#define acpi_util_eval_error(h,p,s) {\
char prefix[80] = {'\0'};\
- acpi_buffer buffer = {sizeof(prefix), prefix};\
+ struct acpi_buffer buffer = {sizeof(prefix), prefix};\
acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluate [%s.%s]: %s\n",\
(char *) prefix, p, acpi_format_exception(s))); }
acpi_status
acpi_extract_package (
- acpi_object *package,
- acpi_buffer *format,
- acpi_buffer *buffer)
+ union acpi_object *package,
+ struct acpi_buffer *format,
+ struct acpi_buffer *buffer)
{
u32 size_required = 0;
u32 tail_offset = 0;
*/
for (i=0; i<format_count; i++) {
- acpi_object *element = &(package->package.elements[i]);
+ union acpi_object *element = &(package->package.elements[i]);
if (!element) {
return_ACPI_STATUS(AE_BAD_DATA);
for (i=0; i<format_count; i++) {
u8 **pointer = NULL;
- acpi_object *element = &(package->package.elements[i]);
+ union acpi_object *element = &(package->package.elements[i]);
if (!element) {
return_ACPI_STATUS(AE_BAD_DATA);
acpi_evaluate_integer (
acpi_handle handle,
acpi_string pathname,
- acpi_object_list *arguments,
+ struct acpi_object_list *arguments,
unsigned long *data)
{
acpi_status status = AE_OK;
- acpi_object element;
- acpi_buffer buffer = {sizeof(acpi_object), &element};
+ union acpi_object element;
+ struct acpi_buffer buffer = {sizeof(union acpi_object), &element};
ACPI_FUNCTION_TRACE("acpi_evaluate_integer");
acpi_evaluate_reference (
acpi_handle handle,
acpi_string pathname,
- acpi_object_list *arguments,
+ struct acpi_object_list *arguments,
struct acpi_handle_list *list)
{
acpi_status status = AE_OK;
- acpi_object *package = NULL;
- acpi_object *element = NULL;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ union acpi_object *package = NULL;
+ union acpi_object *element = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
u32 i = 0;
ACPI_FUNCTION_TRACE("acpi_evaluate_reference");
if (ACPI_FAILURE(status))
goto end;
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
if ((buffer.length == 0) || !package) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
* TBD: _TRA, etc.
*/
static void
-decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
+decode_acpi_resource (struct acpi_resource *resource, struct acpiphp_bridge *bridge)
{
- acpi_resource_address16 *address16_data;
- acpi_resource_address32 *address32_data;
- acpi_resource_address64 *address64_data;
+ struct acpi_resource_address16 *address16_data;
+ struct acpi_resource_address32 *address32_data;
+ struct acpi_resource_address64 *address64_data;
struct pci_resource *res;
u32 resource_type, producer_consumer, address_length;
switch (resource->id) {
case ACPI_RSTYPE_ADDRESS16:
- address16_data = (acpi_resource_address16 *)&resource->data;
+ address16_data = (struct acpi_resource_address16 *)&resource->data;
resource_type = address16_data->resource_type;
producer_consumer = address16_data->producer_consumer;
min_address_range = address16_data->min_address_range;
break;
case ACPI_RSTYPE_ADDRESS32:
- address32_data = (acpi_resource_address32 *)&resource->data;
+ address32_data = (struct acpi_resource_address32 *)&resource->data;
resource_type = address32_data->resource_type;
producer_consumer = address32_data->producer_consumer;
min_address_range = address32_data->min_address_range;
break;
case ACPI_RSTYPE_ADDRESS64:
- address64_data = (acpi_resource_address64 *)&resource->data;
+ address64_data = (struct acpi_resource_address64 *)&resource->data;
resource_type = address64_data->resource_type;
producer_consumer = address64_data->producer_consumer;
min_address_range = address64_data->min_address_range;
break;
}
- resource = (acpi_resource *)((char*)resource + resource->length);
+ resource = (struct acpi_resource *)((char*)resource + resource->length);
if (found && producer_consumer == ACPI_PRODUCER && address_length > 0) {
switch (resource_type) {
static void decode_hpp(struct acpiphp_bridge *bridge)
{
acpi_status status;
- acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
- .pointer = NULL};
- acpi_object *package;
+ struct acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+ .pointer = NULL};
+ union acpi_object *package;
int i;
/* default numbers */
return;
}
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
if (!package || package->type != ACPI_TYPE_PACKAGE ||
package->package.count != 4 || !package->package.elements) {
static void add_host_bridge (acpi_handle *handle, int seg, int bus)
{
acpi_status status;
- acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
- .pointer = NULL};
+ struct acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+ .pointer = NULL};
struct acpiphp_bridge *bridge;
find_host_bridge (acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_status status;
- acpi_device_info info;
+ struct acpi_device_info info;
char objname[5];
- acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
+ struct acpi_buffer buffer = { .length = sizeof(objname),
+ .pointer = objname };
status = acpi_get_object_info(handle, &info);
if (ACPI_FAILURE(status)) {
acpi_status status;
struct acpiphp_func *func;
struct list_head *l;
- acpi_object_list arg_list;
- acpi_object arg;
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
int retval = 0;
{
struct acpiphp_bridge *bridge;
char objname[64];
- acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
+ struct acpi_buffer buffer = { .length = sizeof(objname),
+ .pointer = objname };
bridge = (struct acpiphp_bridge *)context;
{
struct acpiphp_func *func;
char objname[64];
- acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
+ struct acpi_buffer buffer = { .length = sizeof(objname),
+ .pointer = objname };
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
u8 reserved[3];
} __attribute__ ((packed));
-/* Common table header */
-
-struct acpi_table_header {
- char signature[4];
- u32 length;
- u8 revision;
- u8 checksum;
- char oem_id[6];
- char oem_table_id[8];
- u32 oem_revision;
- char asl_compiler_id[4];
- u32 asl_compiler_revision;
-} __attribute__ ((packed));
-
typedef struct {
u8 type;
u8 length;
/* Embedded Controller Boot Resources Table (ECDT) */
struct acpi_table_ecdt {
- struct acpi_table_header header;
- acpi_generic_address ec_control;
- acpi_generic_address ec_data;
- u32 uid;
- u8 gpe_bit;
- char ec_id[0];
+ struct acpi_table_header header;
+ struct acpi_generic_address ec_control;
+ struct acpi_generic_address ec_data;
+ u32 uid;
+ u8 gpe_bit;
+ char ec_id[0];
} __attribute__ ((packed));
/* Table Handlers */
struct acpi_prt_entry {
struct list_head node;
- acpi_pci_id id;
+ struct acpi_pci_id id;
u8 pin;
struct {
acpi_handle handle;