mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
Merge branch 'acpica'
* acpica: (21 commits) ACPICA: Update version to 20131218. ACPICA: Utilities: Cleanup declarations of the acpi_gbl_debug_file global. ACPICA: Linuxize: Cleanup spaces after special macro invocations. ACPICA: Interpreter: Add additional debug info for an error case. ACPICA: Update ACPI example code to make it an actual working program. ACPICA: Add an error message if the Debugger fails initialization. ACPICA: Conditionally define a local variable that is used for debug only. ACPICA: Parser: Updates/fixes for debug output. ACPICA: Enhance ACPI warning for memory/IO address conflicts. ACPICA: Update several debug statements - no functional change. ACPICA: Improve exception handling for GPE block installation. ACPICA: Add helper macros to extract bus/segment numbers from HEST table. ACPICA: Tables: Add full support for the PCCT table, update table definition. ACPICA: Tables: Add full support for the DBG2 table. ACPICA: Add option to favor 32-bit FADT addresses. ACPICA: Cleanup the option of forcing the use of the RSDT. ACPICA: Back port and refine validation of the XSDT root table. ACPICA: Linux Header: Remove unused OSL prototypes. ACPICA: Remove unused ACPI_FREE_BUFFER macro. No functional change. ACPICA: Disassembler: Improve pathname support for emitted External() statements. ...
This commit is contained in:
commit
3e7cc142c1
@ -61,7 +61,6 @@
|
|||||||
|
|
||||||
#define PREFIX "ACPI: "
|
#define PREFIX "ACPI: "
|
||||||
|
|
||||||
u32 acpi_rsdt_forced;
|
|
||||||
unsigned int acpi_cpei_override;
|
unsigned int acpi_cpei_override;
|
||||||
unsigned int acpi_cpei_phys_cpuid;
|
unsigned int acpi_cpei_phys_cpuid;
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
|
|
||||||
#include "sleep.h" /* To include x86_acpi_suspend_lowlevel */
|
#include "sleep.h" /* To include x86_acpi_suspend_lowlevel */
|
||||||
static int __initdata acpi_force = 0;
|
static int __initdata acpi_force = 0;
|
||||||
u32 acpi_rsdt_forced;
|
|
||||||
int acpi_disabled;
|
int acpi_disabled;
|
||||||
EXPORT_SYMBOL(acpi_disabled);
|
EXPORT_SYMBOL(acpi_disabled);
|
||||||
|
|
||||||
@ -1564,7 +1563,7 @@ static int __init parse_acpi(char *arg)
|
|||||||
}
|
}
|
||||||
/* acpi=rsdt use RSDT instead of XSDT */
|
/* acpi=rsdt use RSDT instead of XSDT */
|
||||||
else if (strcmp(arg, "rsdt") == 0) {
|
else if (strcmp(arg, "rsdt") == 0) {
|
||||||
acpi_rsdt_forced = 1;
|
acpi_gbl_do_not_use_xsdt = TRUE;
|
||||||
}
|
}
|
||||||
/* "acpi=noirq" disables ACPI interrupt routing */
|
/* "acpi=noirq" disables ACPI interrupt routing */
|
||||||
else if (strcmp(arg, "noirq") == 0) {
|
else if (strcmp(arg, "noirq") == 0) {
|
||||||
|
@ -113,7 +113,6 @@ void acpi_db_display_handlers(void);
|
|||||||
ACPI_HW_DEPENDENT_RETURN_VOID(void
|
ACPI_HW_DEPENDENT_RETURN_VOID(void
|
||||||
acpi_db_generate_gpe(char *gpe_arg,
|
acpi_db_generate_gpe(char *gpe_arg,
|
||||||
char *block_arg))
|
char *block_arg))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void))
|
ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -71,9 +71,8 @@ acpi_status acpi_ev_init_global_lock_handler(void);
|
|||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_OK(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_OK(acpi_status
|
||||||
acpi_ev_acquire_global_lock(u16 timeout))
|
acpi_ev_acquire_global_lock(u16 timeout))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void))
|
ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void))
|
||||||
acpi_status acpi_ev_remove_global_lock_handler(void);
|
acpi_status acpi_ev_remove_global_lock_handler(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* evgpe - Low-level GPE support
|
* evgpe - Low-level GPE support
|
||||||
@ -133,7 +132,7 @@ acpi_status acpi_ev_gpe_initialize(void);
|
|||||||
ACPI_HW_DEPENDENT_RETURN_VOID(void
|
ACPI_HW_DEPENDENT_RETURN_VOID(void
|
||||||
acpi_ev_update_gpes(acpi_owner_id table_owner_id))
|
acpi_ev_update_gpes(acpi_owner_id table_owner_id))
|
||||||
|
|
||||||
acpi_status
|
acpi_status
|
||||||
acpi_ev_match_gpe_method(acpi_handle obj_handle,
|
acpi_ev_match_gpe_method(acpi_handle obj_handle,
|
||||||
u32 level, void *context, void **return_value);
|
u32 level, void *context, void **return_value);
|
||||||
|
|
||||||
@ -149,7 +148,9 @@ acpi_status
|
|||||||
acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||||
struct acpi_gpe_block_info *gpe_block, void *context);
|
struct acpi_gpe_block_info *gpe_block, void *context);
|
||||||
|
|
||||||
struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 interrupt_number);
|
acpi_status
|
||||||
|
acpi_ev_get_gpe_xrupt_block(u32 interrupt_number,
|
||||||
|
struct acpi_gpe_xrupt_info **gpe_xrupt_block);
|
||||||
|
|
||||||
acpi_status acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt);
|
acpi_status acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt);
|
||||||
|
|
||||||
|
@ -118,6 +118,24 @@ bool ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
|
|||||||
*/
|
*/
|
||||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
|
u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Optionally ignore an XSDT if present and use the RSDT instead.
|
||||||
|
* Although the ACPI specification requires that an XSDT be used instead
|
||||||
|
* of the RSDT, the XSDT has been found to be corrupt or ill-formed on
|
||||||
|
* some machines. Default behavior is to use the XSDT if present.
|
||||||
|
*/
|
||||||
|
u8 ACPI_INIT_GLOBAL(acpi_gbl_do_not_use_xsdt, FALSE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Optionally use 32-bit FADT addresses if and when there is a conflict
|
||||||
|
* (address mismatch) between the 32-bit and 64-bit versions of the
|
||||||
|
* address. Although ACPICA adheres to the ACPI specification which
|
||||||
|
* requires the use of the corresponding 64-bit address if it is non-zero,
|
||||||
|
* some machines have been found to have a corrupted non-zero 64-bit
|
||||||
|
* address. Default is FALSE, do not favor the 32-bit addresses.
|
||||||
|
*/
|
||||||
|
u8 ACPI_INIT_GLOBAL(acpi_gbl_use32_bit_fadt_addresses, FALSE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optionally truncate I/O addresses to 16 bits. Provides compatibility
|
* Optionally truncate I/O addresses to 16 bits. Provides compatibility
|
||||||
* with other ACPI implementations. NOTE: During ACPICA initialization,
|
* with other ACPI implementations. NOTE: During ACPICA initialization,
|
||||||
@ -482,6 +500,18 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
|
|||||||
|
|
||||||
#endif /* ACPI_DEBUGGER */
|
#endif /* ACPI_DEBUGGER */
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
* Application globals
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef ACPI_APPLICATION
|
||||||
|
|
||||||
|
ACPI_FILE ACPI_INIT_GLOBAL(acpi_gbl_debug_file, NULL);
|
||||||
|
|
||||||
|
#endif /* ACPI_APPLICATION */
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* Info/help support
|
* Info/help support
|
||||||
|
@ -1038,15 +1038,16 @@ struct acpi_external_list {
|
|||||||
struct acpi_external_list *next;
|
struct acpi_external_list *next;
|
||||||
u32 value;
|
u32 value;
|
||||||
u16 length;
|
u16 length;
|
||||||
|
u16 flags;
|
||||||
u8 type;
|
u8 type;
|
||||||
u8 flags;
|
|
||||||
u8 resolved;
|
|
||||||
u8 emitted;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Values for Flags field above */
|
/* Values for Flags field above */
|
||||||
|
|
||||||
#define ACPI_IPATH_ALLOCATED 0x01
|
#define ACPI_EXT_RESOLVED_REFERENCE 0x01 /* Object was resolved during cross ref */
|
||||||
|
#define ACPI_EXT_ORIGIN_FROM_FILE 0x02 /* External came from a file */
|
||||||
|
#define ACPI_EXT_INTERNAL_PATH_ALLOCATED 0x04 /* Deallocate internal path on completion */
|
||||||
|
#define ACPI_EXT_EXTERNAL_EMITTED 0x08 /* External() statement has been emitted */
|
||||||
|
|
||||||
struct acpi_external_file {
|
struct acpi_external_file {
|
||||||
char *path;
|
char *path;
|
||||||
|
@ -105,7 +105,7 @@ acpi_ds_create_external_region(acpi_status lookup_status,
|
|||||||
* operation_region not found. Generate an External for it, and
|
* operation_region not found. Generate an External for it, and
|
||||||
* insert the name into the namespace.
|
* insert the name into the namespace.
|
||||||
*/
|
*/
|
||||||
acpi_dm_add_to_external_list(op, path, ACPI_TYPE_REGION, 0);
|
acpi_dm_add_op_to_external_list(op, path, ACPI_TYPE_REGION, 0, 0);
|
||||||
status = acpi_ns_lookup(walk_state->scope_info, path, ACPI_TYPE_REGION,
|
status = acpi_ns_lookup(walk_state->scope_info, path, ACPI_TYPE_REGION,
|
||||||
ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
|
ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
|
||||||
walk_state, node);
|
walk_state, node);
|
||||||
|
@ -727,27 +727,26 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
|
||||||
|
"NumOperands %d, ArgCount %d, Index %d\n",
|
||||||
|
walk_state->num_operands, arg_count, index));
|
||||||
|
|
||||||
|
/* Create the interpreter arguments, in reverse order */
|
||||||
|
|
||||||
index--;
|
index--;
|
||||||
|
|
||||||
/* It is the appropriate order to get objects from the Result stack */
|
|
||||||
|
|
||||||
for (i = 0; i < arg_count; i++) {
|
for (i = 0; i < arg_count; i++) {
|
||||||
arg = arguments[index];
|
arg = arguments[index];
|
||||||
|
walk_state->operand_index = (u8)index;
|
||||||
/* Force the filling of the operand stack in inverse order */
|
|
||||||
|
|
||||||
walk_state->operand_index = (u8) index;
|
|
||||||
|
|
||||||
status = acpi_ds_create_operand(walk_state, arg, index);
|
status = acpi_ds_create_operand(walk_state, arg, index);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
index--;
|
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
|
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
|
||||||
"Arg #%u (%p) done, Arg1=%p\n", index, arg,
|
"Created Arg #%u (%p) %u args total\n",
|
||||||
first_arg));
|
index, arg, arg_count));
|
||||||
|
index--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
|
@ -181,8 +181,8 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
|
|||||||
* Target of Scope() not found. Generate an External for it, and
|
* Target of Scope() not found. Generate an External for it, and
|
||||||
* insert the name into the namespace.
|
* insert the name into the namespace.
|
||||||
*/
|
*/
|
||||||
acpi_dm_add_to_external_list(op, path, ACPI_TYPE_DEVICE,
|
acpi_dm_add_op_to_external_list(op, path,
|
||||||
0);
|
ACPI_TYPE_DEVICE, 0, 0);
|
||||||
status =
|
status =
|
||||||
acpi_ns_lookup(walk_state->scope_info, path,
|
acpi_ns_lookup(walk_state->scope_info, path,
|
||||||
object_type, ACPI_IMODE_LOAD_PASS1,
|
object_type, ACPI_IMODE_LOAD_PASS1,
|
||||||
|
@ -87,9 +87,9 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
|
|||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
gpe_xrupt_block = acpi_ev_get_gpe_xrupt_block(interrupt_number);
|
status =
|
||||||
if (!gpe_xrupt_block) {
|
acpi_ev_get_gpe_xrupt_block(interrupt_number, &gpe_xrupt_block);
|
||||||
status = AE_NO_MEMORY;
|
if (ACPI_FAILURE(status)) {
|
||||||
goto unlock_and_exit;
|
goto unlock_and_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
|
|||||||
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
||||||
|
|
||||||
unlock_and_exit:
|
unlock_and_exit:
|
||||||
status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
|
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,8 +197,9 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
|||||||
* FUNCTION: acpi_ev_get_gpe_xrupt_block
|
* FUNCTION: acpi_ev_get_gpe_xrupt_block
|
||||||
*
|
*
|
||||||
* PARAMETERS: interrupt_number - Interrupt for a GPE block
|
* PARAMETERS: interrupt_number - Interrupt for a GPE block
|
||||||
|
* gpe_xrupt_block - Where the block is returned
|
||||||
*
|
*
|
||||||
* RETURN: A GPE interrupt block
|
* RETURN: Status
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Get or Create a GPE interrupt block. There is one interrupt
|
* DESCRIPTION: Get or Create a GPE interrupt block. There is one interrupt
|
||||||
* block per unique interrupt level used for GPEs. Should be
|
* block per unique interrupt level used for GPEs. Should be
|
||||||
@ -207,7 +208,9 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 interrupt_number)
|
acpi_status
|
||||||
|
acpi_ev_get_gpe_xrupt_block(u32 interrupt_number,
|
||||||
|
struct acpi_gpe_xrupt_info ** gpe_xrupt_block)
|
||||||
{
|
{
|
||||||
struct acpi_gpe_xrupt_info *next_gpe_xrupt;
|
struct acpi_gpe_xrupt_info *next_gpe_xrupt;
|
||||||
struct acpi_gpe_xrupt_info *gpe_xrupt;
|
struct acpi_gpe_xrupt_info *gpe_xrupt;
|
||||||
@ -221,7 +224,8 @@ struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 interrupt_number)
|
|||||||
next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
|
next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
|
||||||
while (next_gpe_xrupt) {
|
while (next_gpe_xrupt) {
|
||||||
if (next_gpe_xrupt->interrupt_number == interrupt_number) {
|
if (next_gpe_xrupt->interrupt_number == interrupt_number) {
|
||||||
return_PTR(next_gpe_xrupt);
|
*gpe_xrupt_block = next_gpe_xrupt;
|
||||||
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
next_gpe_xrupt = next_gpe_xrupt->next;
|
next_gpe_xrupt = next_gpe_xrupt->next;
|
||||||
@ -231,7 +235,7 @@ struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 interrupt_number)
|
|||||||
|
|
||||||
gpe_xrupt = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_xrupt_info));
|
gpe_xrupt = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_xrupt_info));
|
||||||
if (!gpe_xrupt) {
|
if (!gpe_xrupt) {
|
||||||
return_PTR(NULL);
|
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
gpe_xrupt->interrupt_number = interrupt_number;
|
gpe_xrupt->interrupt_number = interrupt_number;
|
||||||
@ -250,6 +254,7 @@ struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 interrupt_number)
|
|||||||
} else {
|
} else {
|
||||||
acpi_gbl_gpe_xrupt_list_head = gpe_xrupt;
|
acpi_gbl_gpe_xrupt_list_head = gpe_xrupt;
|
||||||
}
|
}
|
||||||
|
|
||||||
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
|
||||||
|
|
||||||
/* Install new interrupt handler if not SCI_INT */
|
/* Install new interrupt handler if not SCI_INT */
|
||||||
@ -259,14 +264,15 @@ struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 interrupt_number)
|
|||||||
acpi_ev_gpe_xrupt_handler,
|
acpi_ev_gpe_xrupt_handler,
|
||||||
gpe_xrupt);
|
gpe_xrupt);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ACPI_ERROR((AE_INFO,
|
ACPI_EXCEPTION((AE_INFO, status,
|
||||||
"Could not install GPE interrupt handler at level 0x%X",
|
"Could not install GPE interrupt handler at level 0x%X",
|
||||||
interrupt_number));
|
interrupt_number));
|
||||||
return_PTR(NULL);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return_PTR(gpe_xrupt);
|
*gpe_xrupt_block = gpe_xrupt;
|
||||||
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -124,7 +124,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!source_desc) {
|
if (!source_desc) {
|
||||||
ACPI_ERROR((AE_INFO, "No object attached to node %p", node));
|
ACPI_ERROR((AE_INFO, "No object attached to node [%4.4s] %p",
|
||||||
|
node->name.ascii, node));
|
||||||
return_ACPI_STATUS(AE_AML_NO_OPERAND);
|
return_ACPI_STATUS(AE_AML_NO_OPERAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ acpi_evaluate_object_typed(acpi_handle handle,
|
|||||||
acpi_object_type return_type)
|
acpi_object_type return_type)
|
||||||
{
|
{
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
u8 must_free = FALSE;
|
u8 free_buffer_on_error = FALSE;
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(acpi_evaluate_object_typed);
|
ACPI_FUNCTION_TRACE(acpi_evaluate_object_typed);
|
||||||
|
|
||||||
@ -95,14 +95,13 @@ acpi_evaluate_object_typed(acpi_handle handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (return_buffer->length == ACPI_ALLOCATE_BUFFER) {
|
if (return_buffer->length == ACPI_ALLOCATE_BUFFER) {
|
||||||
must_free = TRUE;
|
free_buffer_on_error = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Evaluate the object */
|
/* Evaluate the object */
|
||||||
|
|
||||||
status =
|
status = acpi_evaluate_object(handle, pathname,
|
||||||
acpi_evaluate_object(handle, pathname, external_params,
|
external_params, return_buffer);
|
||||||
return_buffer);
|
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
@ -135,11 +134,15 @@ acpi_evaluate_object_typed(acpi_handle handle,
|
|||||||
pointer)->type),
|
pointer)->type),
|
||||||
acpi_ut_get_type_name(return_type)));
|
acpi_ut_get_type_name(return_type)));
|
||||||
|
|
||||||
if (must_free) {
|
if (free_buffer_on_error) {
|
||||||
|
/*
|
||||||
/* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */
|
* Free a buffer created via ACPI_ALLOCATE_BUFFER.
|
||||||
|
* Note: We use acpi_os_free here because acpi_os_allocate was used
|
||||||
ACPI_FREE_BUFFER(*return_buffer);
|
* to allocate the buffer. This purposefully bypasses the
|
||||||
|
* (optionally enabled) allocation tracking mechanism since we
|
||||||
|
* only want to track internal allocations.
|
||||||
|
*/
|
||||||
|
acpi_os_free(return_buffer->pointer);
|
||||||
return_buffer->pointer = NULL;
|
return_buffer->pointer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,6 +71,10 @@ static const u8 acpi_gbl_argument_count[] =
|
|||||||
|
|
||||||
const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
|
const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
|
||||||
{
|
{
|
||||||
|
#ifdef ACPI_DEBUG_OUTPUT
|
||||||
|
const char *opcode_name = "Unknown AML opcode";
|
||||||
|
#endif
|
||||||
|
|
||||||
ACPI_FUNCTION_NAME(ps_get_opcode_info);
|
ACPI_FUNCTION_NAME(ps_get_opcode_info);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -92,11 +96,54 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode)
|
|||||||
return (&acpi_gbl_aml_op_info
|
return (&acpi_gbl_aml_op_info
|
||||||
[acpi_gbl_long_op_index[(u8)opcode]]);
|
[acpi_gbl_long_op_index[(u8)opcode]]);
|
||||||
}
|
}
|
||||||
|
#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
|
||||||
|
#include "asldefine.h"
|
||||||
|
|
||||||
|
switch (opcode) {
|
||||||
|
case AML_RAW_DATA_BYTE:
|
||||||
|
opcode_name = "-Raw Data Byte-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_RAW_DATA_WORD:
|
||||||
|
opcode_name = "-Raw Data Word-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_RAW_DATA_DWORD:
|
||||||
|
opcode_name = "-Raw Data Dword-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_RAW_DATA_QWORD:
|
||||||
|
opcode_name = "-Raw Data Qword-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_RAW_DATA_BUFFER:
|
||||||
|
opcode_name = "-Raw Data Buffer-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_RAW_DATA_CHAIN:
|
||||||
|
opcode_name = "-Raw Data Buffer Chain-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_PACKAGE_LENGTH:
|
||||||
|
opcode_name = "-Package Length-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_UNASSIGNED_OPCODE:
|
||||||
|
opcode_name = "-Unassigned Opcode-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_DEFAULT_ARG_OP:
|
||||||
|
opcode_name = "-Default Arg-";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Unknown AML opcode */
|
/* Unknown AML opcode */
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%4.4X]\n", opcode_name, opcode));
|
||||||
"Unknown AML opcode [%4.4X]\n", opcode));
|
|
||||||
|
|
||||||
return (&acpi_gbl_aml_op_info[_UNK]);
|
return (&acpi_gbl_aml_op_info[_UNK]);
|
||||||
}
|
}
|
||||||
|
@ -56,10 +56,11 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
|
|||||||
|
|
||||||
static void acpi_tb_convert_fadt(void);
|
static void acpi_tb_convert_fadt(void);
|
||||||
|
|
||||||
static void acpi_tb_validate_fadt(void);
|
|
||||||
|
|
||||||
static void acpi_tb_setup_fadt_registers(void);
|
static void acpi_tb_setup_fadt_registers(void);
|
||||||
|
|
||||||
|
static u64
|
||||||
|
acpi_tb_select_address(char *register_name, u32 address32, u64 address64);
|
||||||
|
|
||||||
/* Table for conversion of FADT to common internal format and FADT validation */
|
/* Table for conversion of FADT to common internal format and FADT validation */
|
||||||
|
|
||||||
typedef struct acpi_fadt_info {
|
typedef struct acpi_fadt_info {
|
||||||
@ -175,6 +176,7 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = {
|
|||||||
* space_id - ACPI Space ID for this register
|
* space_id - ACPI Space ID for this register
|
||||||
* byte_width - Width of this register
|
* byte_width - Width of this register
|
||||||
* address - Address of the register
|
* address - Address of the register
|
||||||
|
* register_name - ASCII name of the ACPI register
|
||||||
*
|
*
|
||||||
* RETURN: None
|
* RETURN: None
|
||||||
*
|
*
|
||||||
@ -218,6 +220,68 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
|
|||||||
generic_address->access_width = 0; /* Access width ANY */
|
generic_address->access_width = 0; /* Access width ANY */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: acpi_tb_select_address
|
||||||
|
*
|
||||||
|
* PARAMETERS: register_name - ASCII name of the ACPI register
|
||||||
|
* address32 - 32-bit address of the register
|
||||||
|
* address64 - 64-bit address of the register
|
||||||
|
*
|
||||||
|
* RETURN: The resolved 64-bit address
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Select between 32-bit and 64-bit versions of addresses within
|
||||||
|
* the FADT. Used for the FACS and DSDT addresses.
|
||||||
|
*
|
||||||
|
* NOTES:
|
||||||
|
*
|
||||||
|
* Check for FACS and DSDT address mismatches. An address mismatch between
|
||||||
|
* the 32-bit and 64-bit address fields (FIRMWARE_CTRL/X_FIRMWARE_CTRL and
|
||||||
|
* DSDT/X_DSDT) could be a corrupted address field or it might indicate
|
||||||
|
* the presence of two FACS or two DSDT tables.
|
||||||
|
*
|
||||||
|
* November 2013:
|
||||||
|
* By default, as per the ACPICA specification, a valid 64-bit address is
|
||||||
|
* used regardless of the value of the 32-bit address. However, this
|
||||||
|
* behavior can be overridden via the acpi_gbl_use32_bit_fadt_addresses flag.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
static u64
|
||||||
|
acpi_tb_select_address(char *register_name, u32 address32, u64 address64)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!address64) {
|
||||||
|
|
||||||
|
/* 64-bit address is zero, use 32-bit address */
|
||||||
|
|
||||||
|
return ((u64)address32);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (address32 && (address64 != (u64)address32)) {
|
||||||
|
|
||||||
|
/* Address mismatch between 32-bit and 64-bit versions */
|
||||||
|
|
||||||
|
ACPI_BIOS_WARNING((AE_INFO,
|
||||||
|
"32/64X %s address mismatch in FADT: "
|
||||||
|
"0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
|
||||||
|
register_name, address32,
|
||||||
|
ACPI_FORMAT_UINT64(address64),
|
||||||
|
acpi_gbl_use32_bit_fadt_addresses ? 32 :
|
||||||
|
64));
|
||||||
|
|
||||||
|
/* 32-bit address override */
|
||||||
|
|
||||||
|
if (acpi_gbl_use32_bit_fadt_addresses) {
|
||||||
|
return ((u64)address32);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Default is to use the 64-bit address */
|
||||||
|
|
||||||
|
return (address64);
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_tb_parse_fadt
|
* FUNCTION: acpi_tb_parse_fadt
|
||||||
@ -331,10 +395,6 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
|
|||||||
|
|
||||||
acpi_tb_convert_fadt();
|
acpi_tb_convert_fadt();
|
||||||
|
|
||||||
/* Validate FADT values now, before we make any changes */
|
|
||||||
|
|
||||||
acpi_tb_validate_fadt();
|
|
||||||
|
|
||||||
/* Initialize the global ACPI register structures */
|
/* Initialize the global ACPI register structures */
|
||||||
|
|
||||||
acpi_tb_setup_fadt_registers();
|
acpi_tb_setup_fadt_registers();
|
||||||
@ -344,65 +404,54 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
|
|||||||
*
|
*
|
||||||
* FUNCTION: acpi_tb_convert_fadt
|
* FUNCTION: acpi_tb_convert_fadt
|
||||||
*
|
*
|
||||||
* PARAMETERS: None, uses acpi_gbl_FADT
|
* PARAMETERS: none - acpi_gbl_FADT is used.
|
||||||
*
|
*
|
||||||
* RETURN: None
|
* RETURN: None
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Converts all versions of the FADT to a common internal format.
|
* DESCRIPTION: Converts all versions of the FADT to a common internal format.
|
||||||
* Expand 32-bit addresses to 64-bit as necessary.
|
* Expand 32-bit addresses to 64-bit as necessary. Also validate
|
||||||
|
* important fields within the FADT.
|
||||||
*
|
*
|
||||||
* NOTE: acpi_gbl_FADT must be of size (struct acpi_table_fadt),
|
* NOTE: acpi_gbl_FADT must be of size (struct acpi_table_fadt), and must
|
||||||
* and must contain a copy of the actual FADT.
|
* contain a copy of the actual BIOS-provided FADT.
|
||||||
*
|
*
|
||||||
* Notes on 64-bit register addresses:
|
* Notes on 64-bit register addresses:
|
||||||
*
|
*
|
||||||
* After this FADT conversion, later ACPICA code will only use the 64-bit "X"
|
* After this FADT conversion, later ACPICA code will only use the 64-bit "X"
|
||||||
* fields of the FADT for all ACPI register addresses.
|
* fields of the FADT for all ACPI register addresses.
|
||||||
*
|
*
|
||||||
* The 64-bit "X" fields are optional extensions to the original 32-bit FADT
|
* The 64-bit X fields are optional extensions to the original 32-bit FADT
|
||||||
* V1.0 fields. Even if they are present in the FADT, they are optional and
|
* V1.0 fields. Even if they are present in the FADT, they are optional and
|
||||||
* are unused if the BIOS sets them to zero. Therefore, we must copy/expand
|
* are unused if the BIOS sets them to zero. Therefore, we must copy/expand
|
||||||
* 32-bit V1.0 fields if the corresponding X field is zero.
|
* 32-bit V1.0 fields to the 64-bit X fields if the the 64-bit X field is
|
||||||
|
* originally zero.
|
||||||
*
|
*
|
||||||
* For ACPI 1.0 FADTs, all 32-bit address fields are expanded to the
|
* For ACPI 1.0 FADTs (that contain no 64-bit addresses), all 32-bit address
|
||||||
* corresponding "X" fields in the internal FADT.
|
* fields are expanded to the corresponding 64-bit X fields in the internal
|
||||||
|
* common FADT.
|
||||||
*
|
*
|
||||||
* For ACPI 2.0+ FADTs, all valid (non-zero) 32-bit address fields are expanded
|
* For ACPI 2.0+ FADTs, all valid (non-zero) 32-bit address fields are expanded
|
||||||
* to the corresponding 64-bit X fields. For compatibility with other ACPI
|
* to the corresponding 64-bit X fields, if the 64-bit field is originally
|
||||||
* implementations, we ignore the 64-bit field if the 32-bit field is valid,
|
* zero. Adhering to the ACPI specification, we completely ignore the 32-bit
|
||||||
* regardless of whether the host OS is 32-bit or 64-bit.
|
* field if the 64-bit field is valid, regardless of whether the host OS is
|
||||||
|
* 32-bit or 64-bit.
|
||||||
|
*
|
||||||
|
* Possible additional checks:
|
||||||
|
* (acpi_gbl_FADT.pm1_event_length >= 4)
|
||||||
|
* (acpi_gbl_FADT.pm1_control_length >= 2)
|
||||||
|
* (acpi_gbl_FADT.pm_timer_length >= 4)
|
||||||
|
* Gpe block lengths must be multiple of 2
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
static void acpi_tb_convert_fadt(void)
|
static void acpi_tb_convert_fadt(void)
|
||||||
{
|
{
|
||||||
|
char *name;
|
||||||
struct acpi_generic_address *address64;
|
struct acpi_generic_address *address64;
|
||||||
u32 address32;
|
u32 address32;
|
||||||
|
u8 length;
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
/*
|
|
||||||
* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary.
|
|
||||||
* Later code will always use the X 64-bit field. Also, check for an
|
|
||||||
* address mismatch between the 32-bit and 64-bit address fields
|
|
||||||
* (FIRMWARE_CTRL/X_FIRMWARE_CTRL, DSDT/X_DSDT) which would indicate
|
|
||||||
* the presence of two FACS or two DSDT tables.
|
|
||||||
*/
|
|
||||||
if (!acpi_gbl_FADT.Xfacs) {
|
|
||||||
acpi_gbl_FADT.Xfacs = (u64) acpi_gbl_FADT.facs;
|
|
||||||
} else if (acpi_gbl_FADT.facs &&
|
|
||||||
(acpi_gbl_FADT.Xfacs != (u64) acpi_gbl_FADT.facs)) {
|
|
||||||
ACPI_WARNING((AE_INFO,
|
|
||||||
"32/64 FACS address mismatch in FADT - two FACS tables!"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!acpi_gbl_FADT.Xdsdt) {
|
|
||||||
acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt;
|
|
||||||
} else if (acpi_gbl_FADT.dsdt &&
|
|
||||||
(acpi_gbl_FADT.Xdsdt != (u64) acpi_gbl_FADT.dsdt)) {
|
|
||||||
ACPI_WARNING((AE_INFO,
|
|
||||||
"32/64 DSDT address mismatch in FADT - two DSDT tables!"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
|
* For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
|
||||||
* should be zero are indeed zero. This will workaround BIOSs that
|
* should be zero are indeed zero. This will workaround BIOSs that
|
||||||
@ -421,119 +470,24 @@ static void acpi_tb_convert_fadt(void)
|
|||||||
acpi_gbl_FADT.boot_flags = 0;
|
acpi_gbl_FADT.boot_flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the local FADT table header length */
|
/*
|
||||||
|
* Now we can update the local FADT length to the length of the
|
||||||
|
* current FADT version as defined by the ACPI specification.
|
||||||
|
* Thus, we will have a common FADT internally.
|
||||||
|
*/
|
||||||
acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt);
|
acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X"
|
* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary.
|
||||||
* generic address structures as necessary. Later code will always use
|
* Later ACPICA code will always use the X 64-bit field.
|
||||||
* the 64-bit address structures.
|
|
||||||
*
|
|
||||||
* March 2009:
|
|
||||||
* We now always use the 32-bit address if it is valid (non-null). This
|
|
||||||
* is not in accordance with the ACPI specification which states that
|
|
||||||
* the 64-bit address supersedes the 32-bit version, but we do this for
|
|
||||||
* compatibility with other ACPI implementations. Most notably, in the
|
|
||||||
* case where both the 32 and 64 versions are non-null, we use the 32-bit
|
|
||||||
* version. This is the only address that is guaranteed to have been
|
|
||||||
* tested by the BIOS manufacturer.
|
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
|
acpi_gbl_FADT.Xfacs = acpi_tb_select_address("FACS",
|
||||||
address32 = *ACPI_ADD_PTR(u32,
|
acpi_gbl_FADT.facs,
|
||||||
&acpi_gbl_FADT,
|
acpi_gbl_FADT.Xfacs);
|
||||||
fadt_info_table[i].address32);
|
|
||||||
|
|
||||||
address64 = ACPI_ADD_PTR(struct acpi_generic_address,
|
acpi_gbl_FADT.Xdsdt = acpi_tb_select_address("DSDT",
|
||||||
&acpi_gbl_FADT,
|
acpi_gbl_FADT.dsdt,
|
||||||
fadt_info_table[i].address64);
|
acpi_gbl_FADT.Xdsdt);
|
||||||
|
|
||||||
/*
|
|
||||||
* If both 32- and 64-bit addresses are valid (non-zero),
|
|
||||||
* they must match.
|
|
||||||
*/
|
|
||||||
if (address64->address && address32 &&
|
|
||||||
(address64->address != (u64)address32)) {
|
|
||||||
ACPI_BIOS_ERROR((AE_INFO,
|
|
||||||
"32/64X address mismatch in FADT/%s: "
|
|
||||||
"0x%8.8X/0x%8.8X%8.8X, using 32",
|
|
||||||
fadt_info_table[i].name, address32,
|
|
||||||
ACPI_FORMAT_UINT64(address64->
|
|
||||||
address)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Always use 32-bit address if it is valid (non-null) */
|
|
||||||
|
|
||||||
if (address32) {
|
|
||||||
/*
|
|
||||||
* Copy the 32-bit address to the 64-bit GAS structure. The
|
|
||||||
* Space ID is always I/O for 32-bit legacy address fields
|
|
||||||
*/
|
|
||||||
acpi_tb_init_generic_address(address64,
|
|
||||||
ACPI_ADR_SPACE_SYSTEM_IO,
|
|
||||||
*ACPI_ADD_PTR(u8,
|
|
||||||
&acpi_gbl_FADT,
|
|
||||||
fadt_info_table
|
|
||||||
[i].length),
|
|
||||||
(u64) address32,
|
|
||||||
fadt_info_table[i].name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: acpi_tb_validate_fadt
|
|
||||||
*
|
|
||||||
* PARAMETERS: table - Pointer to the FADT to be validated
|
|
||||||
*
|
|
||||||
* RETURN: None
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Validate various important fields within the FADT. If a problem
|
|
||||||
* is found, issue a message, but no status is returned.
|
|
||||||
* Used by both the table manager and the disassembler.
|
|
||||||
*
|
|
||||||
* Possible additional checks:
|
|
||||||
* (acpi_gbl_FADT.pm1_event_length >= 4)
|
|
||||||
* (acpi_gbl_FADT.pm1_control_length >= 2)
|
|
||||||
* (acpi_gbl_FADT.pm_timer_length >= 4)
|
|
||||||
* Gpe block lengths must be multiple of 2
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static void acpi_tb_validate_fadt(void)
|
|
||||||
{
|
|
||||||
char *name;
|
|
||||||
struct acpi_generic_address *address64;
|
|
||||||
u8 length;
|
|
||||||
u32 i;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check for FACS and DSDT address mismatches. An address mismatch between
|
|
||||||
* the 32-bit and 64-bit address fields (FIRMWARE_CTRL/X_FIRMWARE_CTRL and
|
|
||||||
* DSDT/X_DSDT) would indicate the presence of two FACS or two DSDT tables.
|
|
||||||
*/
|
|
||||||
if (acpi_gbl_FADT.facs &&
|
|
||||||
(acpi_gbl_FADT.Xfacs != (u64)acpi_gbl_FADT.facs)) {
|
|
||||||
ACPI_BIOS_WARNING((AE_INFO,
|
|
||||||
"32/64X FACS address mismatch in FADT - "
|
|
||||||
"0x%8.8X/0x%8.8X%8.8X, using 32",
|
|
||||||
acpi_gbl_FADT.facs,
|
|
||||||
ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xfacs)));
|
|
||||||
|
|
||||||
acpi_gbl_FADT.Xfacs = (u64)acpi_gbl_FADT.facs;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (acpi_gbl_FADT.dsdt &&
|
|
||||||
(acpi_gbl_FADT.Xdsdt != (u64)acpi_gbl_FADT.dsdt)) {
|
|
||||||
ACPI_BIOS_WARNING((AE_INFO,
|
|
||||||
"32/64X DSDT address mismatch in FADT - "
|
|
||||||
"0x%8.8X/0x%8.8X%8.8X, using 32",
|
|
||||||
acpi_gbl_FADT.dsdt,
|
|
||||||
ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xdsdt)));
|
|
||||||
|
|
||||||
acpi_gbl_FADT.Xdsdt = (u64)acpi_gbl_FADT.dsdt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If Hardware Reduced flag is set, we are all done */
|
/* If Hardware Reduced flag is set, we are all done */
|
||||||
|
|
||||||
@ -545,17 +499,94 @@ static void acpi_tb_validate_fadt(void)
|
|||||||
|
|
||||||
for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
|
for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
|
||||||
/*
|
/*
|
||||||
* Generate pointer to the 64-bit address, get the register
|
* Get the 32-bit and 64-bit addresses, as well as the register
|
||||||
* length (width) and the register name
|
* length and register name.
|
||||||
*/
|
*/
|
||||||
|
address32 = *ACPI_ADD_PTR(u32,
|
||||||
|
&acpi_gbl_FADT,
|
||||||
|
fadt_info_table[i].address32);
|
||||||
|
|
||||||
address64 = ACPI_ADD_PTR(struct acpi_generic_address,
|
address64 = ACPI_ADD_PTR(struct acpi_generic_address,
|
||||||
&acpi_gbl_FADT,
|
&acpi_gbl_FADT,
|
||||||
fadt_info_table[i].address64);
|
fadt_info_table[i].address64);
|
||||||
length =
|
|
||||||
*ACPI_ADD_PTR(u8, &acpi_gbl_FADT,
|
length = *ACPI_ADD_PTR(u8,
|
||||||
fadt_info_table[i].length);
|
&acpi_gbl_FADT,
|
||||||
|
fadt_info_table[i].length);
|
||||||
|
|
||||||
name = fadt_info_table[i].name;
|
name = fadt_info_table[i].name;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X"
|
||||||
|
* generic address structures as necessary. Later code will always use
|
||||||
|
* the 64-bit address structures.
|
||||||
|
*
|
||||||
|
* November 2013:
|
||||||
|
* Now always use the 64-bit address if it is valid (non-zero), in
|
||||||
|
* accordance with the ACPI specification which states that a 64-bit
|
||||||
|
* address supersedes the 32-bit version. This behavior can be
|
||||||
|
* overridden by the acpi_gbl_use32_bit_fadt_addresses flag.
|
||||||
|
*
|
||||||
|
* During 64-bit address construction and verification,
|
||||||
|
* these cases are handled:
|
||||||
|
*
|
||||||
|
* Address32 zero, Address64 [don't care] - Use Address64
|
||||||
|
*
|
||||||
|
* Address32 non-zero, Address64 zero - Copy/use Address32
|
||||||
|
* Address32 non-zero == Address64 non-zero - Use Address64
|
||||||
|
* Address32 non-zero != Address64 non-zero - Warning, use Address64
|
||||||
|
*
|
||||||
|
* Override: if acpi_gbl_use32_bit_fadt_addresses is TRUE, and:
|
||||||
|
* Address32 non-zero != Address64 non-zero - Warning, copy/use Address32
|
||||||
|
*
|
||||||
|
* Note: space_id is always I/O for 32-bit legacy address fields
|
||||||
|
*/
|
||||||
|
if (address32) {
|
||||||
|
if (!address64->address) {
|
||||||
|
|
||||||
|
/* 64-bit address is zero, use 32-bit address */
|
||||||
|
|
||||||
|
acpi_tb_init_generic_address(address64,
|
||||||
|
ACPI_ADR_SPACE_SYSTEM_IO,
|
||||||
|
*ACPI_ADD_PTR(u8,
|
||||||
|
&acpi_gbl_FADT,
|
||||||
|
fadt_info_table
|
||||||
|
[i].
|
||||||
|
length),
|
||||||
|
(u64)address32,
|
||||||
|
name);
|
||||||
|
} else if (address64->address != (u64)address32) {
|
||||||
|
|
||||||
|
/* Address mismatch */
|
||||||
|
|
||||||
|
ACPI_BIOS_WARNING((AE_INFO,
|
||||||
|
"32/64X address mismatch in FADT/%s: "
|
||||||
|
"0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
|
||||||
|
name, address32,
|
||||||
|
ACPI_FORMAT_UINT64
|
||||||
|
(address64->address),
|
||||||
|
acpi_gbl_use32_bit_fadt_addresses
|
||||||
|
? 32 : 64));
|
||||||
|
|
||||||
|
if (acpi_gbl_use32_bit_fadt_addresses) {
|
||||||
|
|
||||||
|
/* 32-bit address override */
|
||||||
|
|
||||||
|
acpi_tb_init_generic_address(address64,
|
||||||
|
ACPI_ADR_SPACE_SYSTEM_IO,
|
||||||
|
*ACPI_ADD_PTR
|
||||||
|
(u8,
|
||||||
|
&acpi_gbl_FADT,
|
||||||
|
fadt_info_table
|
||||||
|
[i].
|
||||||
|
length),
|
||||||
|
(u64)
|
||||||
|
address32,
|
||||||
|
name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For each extended field, check for length mismatch between the
|
* For each extended field, check for length mismatch between the
|
||||||
* legacy length field and the corresponding 64-bit X length field.
|
* legacy length field and the corresponding 64-bit X length field.
|
||||||
|
@ -49,69 +49,11 @@
|
|||||||
ACPI_MODULE_NAME("tbutils")
|
ACPI_MODULE_NAME("tbutils")
|
||||||
|
|
||||||
/* Local prototypes */
|
/* Local prototypes */
|
||||||
|
static acpi_status acpi_tb_validate_xsdt(acpi_physical_address address);
|
||||||
|
|
||||||
static acpi_physical_address
|
static acpi_physical_address
|
||||||
acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size);
|
acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size);
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: acpi_tb_check_xsdt
|
|
||||||
*
|
|
||||||
* PARAMETERS: address - Pointer to the XSDT
|
|
||||||
*
|
|
||||||
* RETURN: status
|
|
||||||
* AE_OK - XSDT is okay
|
|
||||||
* AE_NO_MEMORY - can't map XSDT
|
|
||||||
* AE_INVALID_TABLE_LENGTH - invalid table length
|
|
||||||
* AE_NULL_ENTRY - XSDT has NULL entry
|
|
||||||
*
|
|
||||||
* DESCRIPTION: validate XSDT
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static acpi_status
|
|
||||||
acpi_tb_check_xsdt(acpi_physical_address address)
|
|
||||||
{
|
|
||||||
struct acpi_table_header *table;
|
|
||||||
u32 length;
|
|
||||||
u64 xsdt_entry_address;
|
|
||||||
u8 *table_entry;
|
|
||||||
u32 table_count;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
|
|
||||||
if (!table)
|
|
||||||
return AE_NO_MEMORY;
|
|
||||||
|
|
||||||
length = table->length;
|
|
||||||
acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
|
|
||||||
if (length < sizeof(struct acpi_table_header))
|
|
||||||
return AE_INVALID_TABLE_LENGTH;
|
|
||||||
|
|
||||||
table = acpi_os_map_memory(address, length);
|
|
||||||
if (!table)
|
|
||||||
return AE_NO_MEMORY;
|
|
||||||
|
|
||||||
/* Calculate the number of tables described in XSDT */
|
|
||||||
table_count =
|
|
||||||
(u32) ((table->length -
|
|
||||||
sizeof(struct acpi_table_header)) / sizeof(u64));
|
|
||||||
table_entry =
|
|
||||||
ACPI_CAST_PTR(u8, table) + sizeof(struct acpi_table_header);
|
|
||||||
for (i = 0; i < table_count; i++) {
|
|
||||||
ACPI_MOVE_64_TO_64(&xsdt_entry_address, table_entry);
|
|
||||||
if (!xsdt_entry_address) {
|
|
||||||
/* XSDT has NULL entry */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
table_entry += sizeof(u64);
|
|
||||||
}
|
|
||||||
acpi_os_unmap_memory(table, length);
|
|
||||||
|
|
||||||
if (i < table_count)
|
|
||||||
return AE_NULL_ENTRY;
|
|
||||||
else
|
|
||||||
return AE_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if (!ACPI_REDUCED_HARDWARE)
|
#if (!ACPI_REDUCED_HARDWARE)
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
@ -383,7 +325,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
|
|||||||
* Get the table physical address (32-bit for RSDT, 64-bit for XSDT):
|
* Get the table physical address (32-bit for RSDT, 64-bit for XSDT):
|
||||||
* Note: Addresses are 32-bit aligned (not 64) in both RSDT and XSDT
|
* Note: Addresses are 32-bit aligned (not 64) in both RSDT and XSDT
|
||||||
*/
|
*/
|
||||||
if (table_entry_size == sizeof(u32)) {
|
if (table_entry_size == ACPI_RSDT_ENTRY_SIZE) {
|
||||||
/*
|
/*
|
||||||
* 32-bit platform, RSDT: Return 32-bit table entry
|
* 32-bit platform, RSDT: Return 32-bit table entry
|
||||||
* 64-bit platform, RSDT: Expand 32-bit to 64-bit and return
|
* 64-bit platform, RSDT: Expand 32-bit to 64-bit and return
|
||||||
@ -413,6 +355,87 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: acpi_tb_validate_xsdt
|
||||||
|
*
|
||||||
|
* PARAMETERS: address - Physical address of the XSDT (from RSDP)
|
||||||
|
*
|
||||||
|
* RETURN: Status. AE_OK if the table appears to be valid.
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Validate an XSDT to ensure that it is of minimum size and does
|
||||||
|
* not contain any NULL entries. A problem that is seen in the
|
||||||
|
* field is that the XSDT exists, but is actually useless because
|
||||||
|
* of one or more (or all) NULL entries.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
static acpi_status acpi_tb_validate_xsdt(acpi_physical_address xsdt_address)
|
||||||
|
{
|
||||||
|
struct acpi_table_header *table;
|
||||||
|
u8 *next_entry;
|
||||||
|
acpi_physical_address address;
|
||||||
|
u32 length;
|
||||||
|
u32 entry_count;
|
||||||
|
acpi_status status;
|
||||||
|
u32 i;
|
||||||
|
|
||||||
|
/* Get the XSDT length */
|
||||||
|
|
||||||
|
table =
|
||||||
|
acpi_os_map_memory(xsdt_address, sizeof(struct acpi_table_header));
|
||||||
|
if (!table) {
|
||||||
|
return (AE_NO_MEMORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
length = table->length;
|
||||||
|
acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Minimum XSDT length is the size of the standard ACPI header
|
||||||
|
* plus one physical address entry
|
||||||
|
*/
|
||||||
|
if (length < (sizeof(struct acpi_table_header) + ACPI_XSDT_ENTRY_SIZE)) {
|
||||||
|
return (AE_INVALID_TABLE_LENGTH);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map the entire XSDT */
|
||||||
|
|
||||||
|
table = acpi_os_map_memory(xsdt_address, length);
|
||||||
|
if (!table) {
|
||||||
|
return (AE_NO_MEMORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get the number of entries and pointer to first entry */
|
||||||
|
|
||||||
|
status = AE_OK;
|
||||||
|
next_entry = ACPI_ADD_PTR(u8, table, sizeof(struct acpi_table_header));
|
||||||
|
entry_count = (u32)((table->length - sizeof(struct acpi_table_header)) /
|
||||||
|
ACPI_XSDT_ENTRY_SIZE);
|
||||||
|
|
||||||
|
/* Validate each entry (physical address) within the XSDT */
|
||||||
|
|
||||||
|
for (i = 0; i < entry_count; i++) {
|
||||||
|
address =
|
||||||
|
acpi_tb_get_root_table_entry(next_entry,
|
||||||
|
ACPI_XSDT_ENTRY_SIZE);
|
||||||
|
if (!address) {
|
||||||
|
|
||||||
|
/* Detected a NULL entry, XSDT is invalid */
|
||||||
|
|
||||||
|
status = AE_NULL_ENTRY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
next_entry += ACPI_XSDT_ENTRY_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unmap table */
|
||||||
|
|
||||||
|
acpi_os_unmap_memory(table, length);
|
||||||
|
return (status);
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_tb_parse_root_table
|
* FUNCTION: acpi_tb_parse_root_table
|
||||||
@ -438,16 +461,14 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
|
|||||||
u32 table_count;
|
u32 table_count;
|
||||||
struct acpi_table_header *table;
|
struct acpi_table_header *table;
|
||||||
acpi_physical_address address;
|
acpi_physical_address address;
|
||||||
acpi_physical_address uninitialized_var(rsdt_address);
|
|
||||||
u32 length;
|
u32 length;
|
||||||
u8 *table_entry;
|
u8 *table_entry;
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(tb_parse_root_table);
|
ACPI_FUNCTION_TRACE(tb_parse_root_table);
|
||||||
|
|
||||||
/*
|
/* Map the entire RSDP and extract the address of the RSDT or XSDT */
|
||||||
* Map the entire RSDP and extract the address of the RSDT or XSDT
|
|
||||||
*/
|
|
||||||
rsdp = acpi_os_map_memory(rsdp_address, sizeof(struct acpi_table_rsdp));
|
rsdp = acpi_os_map_memory(rsdp_address, sizeof(struct acpi_table_rsdp));
|
||||||
if (!rsdp) {
|
if (!rsdp) {
|
||||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||||
@ -457,24 +478,22 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
|
|||||||
ACPI_CAST_PTR(struct acpi_table_header,
|
ACPI_CAST_PTR(struct acpi_table_header,
|
||||||
rsdp));
|
rsdp));
|
||||||
|
|
||||||
/* Differentiate between RSDT and XSDT root tables */
|
/* Use XSDT if present and not overridden. Otherwise, use RSDT */
|
||||||
|
|
||||||
if (rsdp->revision > 1 && rsdp->xsdt_physical_address
|
if ((rsdp->revision > 1) &&
|
||||||
&& !acpi_rsdt_forced) {
|
rsdp->xsdt_physical_address && !acpi_gbl_do_not_use_xsdt) {
|
||||||
/*
|
/*
|
||||||
* Root table is an XSDT (64-bit physical addresses). We must use the
|
* RSDP contains an XSDT (64-bit physical addresses). We must use
|
||||||
* XSDT if the revision is > 1 and the XSDT pointer is present, as per
|
* the XSDT if the revision is > 1 and the XSDT pointer is present,
|
||||||
* the ACPI specification.
|
* as per the ACPI specification.
|
||||||
*/
|
*/
|
||||||
address = (acpi_physical_address) rsdp->xsdt_physical_address;
|
address = (acpi_physical_address) rsdp->xsdt_physical_address;
|
||||||
table_entry_size = sizeof(u64);
|
table_entry_size = ACPI_XSDT_ENTRY_SIZE;
|
||||||
rsdt_address = (acpi_physical_address)
|
|
||||||
rsdp->rsdt_physical_address;
|
|
||||||
} else {
|
} else {
|
||||||
/* Root table is an RSDT (32-bit physical addresses) */
|
/* Root table is an RSDT (32-bit physical addresses) */
|
||||||
|
|
||||||
address = (acpi_physical_address) rsdp->rsdt_physical_address;
|
address = (acpi_physical_address) rsdp->rsdt_physical_address;
|
||||||
table_entry_size = sizeof(u32);
|
table_entry_size = ACPI_RSDT_ENTRY_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -483,15 +502,25 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
|
|||||||
*/
|
*/
|
||||||
acpi_os_unmap_memory(rsdp, sizeof(struct acpi_table_rsdp));
|
acpi_os_unmap_memory(rsdp, sizeof(struct acpi_table_rsdp));
|
||||||
|
|
||||||
if (table_entry_size == sizeof(u64)) {
|
/*
|
||||||
if (acpi_tb_check_xsdt(address) == AE_NULL_ENTRY) {
|
* If it is present and used, validate the XSDT for access/size
|
||||||
/* XSDT has NULL entry, RSDT is used */
|
* and ensure that all table entries are at least non-NULL
|
||||||
address = rsdt_address;
|
*/
|
||||||
table_entry_size = sizeof(u32);
|
if (table_entry_size == ACPI_XSDT_ENTRY_SIZE) {
|
||||||
ACPI_WARNING((AE_INFO, "BIOS XSDT has NULL entry, "
|
status = acpi_tb_validate_xsdt(address);
|
||||||
"using RSDT"));
|
if (ACPI_FAILURE(status)) {
|
||||||
|
ACPI_BIOS_WARNING((AE_INFO,
|
||||||
|
"XSDT is invalid (%s), using RSDT",
|
||||||
|
acpi_format_exception(status)));
|
||||||
|
|
||||||
|
/* Fall back to the RSDT */
|
||||||
|
|
||||||
|
address =
|
||||||
|
(acpi_physical_address) rsdp->rsdt_physical_address;
|
||||||
|
table_entry_size = ACPI_RSDT_ENTRY_SIZE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Map the RSDT/XSDT table header to get the full table length */
|
/* Map the RSDT/XSDT table header to get the full table length */
|
||||||
|
|
||||||
table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
|
table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
|
||||||
@ -501,12 +530,14 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
|
|||||||
|
|
||||||
acpi_tb_print_table_header(address, table);
|
acpi_tb_print_table_header(address, table);
|
||||||
|
|
||||||
/* Get the length of the full table, verify length and map entire table */
|
/*
|
||||||
|
* Validate length of the table, and map entire table.
|
||||||
|
* Minimum length table must contain at least one entry.
|
||||||
|
*/
|
||||||
length = table->length;
|
length = table->length;
|
||||||
acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
|
acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
|
||||||
|
|
||||||
if (length < sizeof(struct acpi_table_header)) {
|
if (length < (sizeof(struct acpi_table_header) + table_entry_size)) {
|
||||||
ACPI_BIOS_ERROR((AE_INFO,
|
ACPI_BIOS_ERROR((AE_INFO,
|
||||||
"Invalid table length 0x%X in RSDT/XSDT",
|
"Invalid table length 0x%X in RSDT/XSDT",
|
||||||
length));
|
length));
|
||||||
@ -526,22 +557,21 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
|
|||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the number of tables described in the root table */
|
/* Get the number of entries and pointer to first entry */
|
||||||
|
|
||||||
table_count = (u32)((table->length - sizeof(struct acpi_table_header)) /
|
table_count = (u32)((table->length - sizeof(struct acpi_table_header)) /
|
||||||
table_entry_size);
|
table_entry_size);
|
||||||
|
table_entry = ACPI_ADD_PTR(u8, table, sizeof(struct acpi_table_header));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First two entries in the table array are reserved for the DSDT
|
* First two entries in the table array are reserved for the DSDT
|
||||||
* and FACS, which are not actually present in the RSDT/XSDT - they
|
* and FACS, which are not actually present in the RSDT/XSDT - they
|
||||||
* come from the FADT
|
* come from the FADT
|
||||||
*/
|
*/
|
||||||
table_entry =
|
|
||||||
ACPI_CAST_PTR(u8, table) + sizeof(struct acpi_table_header);
|
|
||||||
acpi_gbl_root_table_list.current_table_count = 2;
|
acpi_gbl_root_table_list.current_table_count = 2;
|
||||||
|
|
||||||
/*
|
/* Initialize the root table array from the RSDT/XSDT */
|
||||||
* Initialize the root table array from the RSDT/XSDT
|
|
||||||
*/
|
|
||||||
for (i = 0; i < table_count; i++) {
|
for (i = 0; i < table_count; i++) {
|
||||||
if (acpi_gbl_root_table_list.current_table_count >=
|
if (acpi_gbl_root_table_list.current_table_count >=
|
||||||
acpi_gbl_root_table_list.max_table_count) {
|
acpi_gbl_root_table_list.max_table_count) {
|
||||||
@ -584,7 +614,7 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
|
|||||||
acpi_tb_install_table(acpi_gbl_root_table_list.tables[i].
|
acpi_tb_install_table(acpi_gbl_root_table_list.tables[i].
|
||||||
address, NULL, i);
|
address, NULL, i);
|
||||||
|
|
||||||
/* Special case for FADT - get the DSDT and FACS */
|
/* Special case for FADT - validate it then get the DSDT and FACS */
|
||||||
|
|
||||||
if (ACPI_COMPARE_NAME
|
if (ACPI_COMPARE_NAME
|
||||||
(&acpi_gbl_root_table_list.tables[i].signature,
|
(&acpi_gbl_root_table_list.tables[i].signature,
|
||||||
|
@ -224,10 +224,11 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
|
|||||||
|
|
||||||
while (range_info) {
|
while (range_info) {
|
||||||
/*
|
/*
|
||||||
* Check if the requested Address/Length overlaps this address_range.
|
* Check if the requested address/length overlaps this
|
||||||
* Four cases to consider:
|
* address range. There are four cases to consider:
|
||||||
*
|
*
|
||||||
* 1) Input address/length is contained completely in the address range
|
* 1) Input address/length is contained completely in the
|
||||||
|
* address range
|
||||||
* 2) Input address/length overlaps range at the range start
|
* 2) Input address/length overlaps range at the range start
|
||||||
* 3) Input address/length overlaps range at the range end
|
* 3) Input address/length overlaps range at the range end
|
||||||
* 4) Input address/length completely encompasses the range
|
* 4) Input address/length completely encompasses the range
|
||||||
@ -244,11 +245,17 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
|
|||||||
region_node);
|
region_node);
|
||||||
|
|
||||||
ACPI_WARNING((AE_INFO,
|
ACPI_WARNING((AE_INFO,
|
||||||
"0x%p-0x%p %s conflicts with Region %s %d",
|
"%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)",
|
||||||
|
acpi_ut_get_region_name(space_id),
|
||||||
ACPI_CAST_PTR(void, address),
|
ACPI_CAST_PTR(void, address),
|
||||||
ACPI_CAST_PTR(void, end_address),
|
ACPI_CAST_PTR(void, end_address),
|
||||||
acpi_ut_get_region_name(space_id),
|
ACPI_CAST_PTR(void,
|
||||||
pathname, overlap_count));
|
range_info->
|
||||||
|
start_address),
|
||||||
|
ACPI_CAST_PTR(void,
|
||||||
|
range_info->
|
||||||
|
end_address),
|
||||||
|
pathname));
|
||||||
ACPI_FREE(pathname);
|
ACPI_FREE(pathname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,9 +302,13 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
|
|||||||
return (AE_BUFFER_OVERFLOW);
|
return (AE_BUFFER_OVERFLOW);
|
||||||
|
|
||||||
case ACPI_ALLOCATE_BUFFER:
|
case ACPI_ALLOCATE_BUFFER:
|
||||||
|
/*
|
||||||
/* Allocate a new buffer */
|
* Allocate a new buffer. We directectly call acpi_os_allocate here to
|
||||||
|
* purposefully bypass the (optionally enabled) internal allocation
|
||||||
|
* tracking mechanism since we only want to track internal
|
||||||
|
* allocations. Note: The caller should use acpi_os_free to free this
|
||||||
|
* buffer created via ACPI_ALLOCATE_BUFFER.
|
||||||
|
*/
|
||||||
buffer->pointer = acpi_os_allocate(required_length);
|
buffer->pointer = acpi_os_allocate(required_length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -248,12 +248,12 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
|
|||||||
ACPI_FUNCTION_NAME(os_acquire_object);
|
ACPI_FUNCTION_NAME(os_acquire_object);
|
||||||
|
|
||||||
if (!cache) {
|
if (!cache) {
|
||||||
return (NULL);
|
return_PTR(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES);
|
status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
return (NULL);
|
return_PTR(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_MEM_TRACKING(cache->requests++);
|
ACPI_MEM_TRACKING(cache->requests++);
|
||||||
@ -276,7 +276,7 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
|
|||||||
|
|
||||||
status = acpi_ut_release_mutex(ACPI_MTX_CACHES);
|
status = acpi_ut_release_mutex(ACPI_MTX_CACHES);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
return (NULL);
|
return_PTR(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear (zero) the previously used Object */
|
/* Clear (zero) the previously used Object */
|
||||||
@ -299,15 +299,15 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
|
|||||||
|
|
||||||
status = acpi_ut_release_mutex(ACPI_MTX_CACHES);
|
status = acpi_ut_release_mutex(ACPI_MTX_CACHES);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
return (NULL);
|
return_PTR(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
object = ACPI_ALLOCATE_ZEROED(cache->object_size);
|
object = ACPI_ALLOCATE_ZEROED(cache->object_size);
|
||||||
if (!object) {
|
if (!object) {
|
||||||
return (NULL);
|
return_PTR(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (object);
|
return_PTR(object);
|
||||||
}
|
}
|
||||||
#endif /* ACPI_USE_LOCAL_CACHE */
|
#endif /* ACPI_USE_LOCAL_CACHE */
|
||||||
|
@ -194,9 +194,9 @@ acpi_debug_print(u32 requested_debug_level,
|
|||||||
*/
|
*/
|
||||||
acpi_os_printf("%9s-%04ld ", module_name, line_number);
|
acpi_os_printf("%9s-%04ld ", module_name, line_number);
|
||||||
|
|
||||||
#ifdef ACPI_EXEC_APP
|
#ifdef ACPI_APPLICATION
|
||||||
/*
|
/*
|
||||||
* For acpi_exec only, emit the thread ID and nesting level.
|
* For acpi_exec/iASL only, emit the thread ID and nesting level.
|
||||||
* Note: nesting level is really only useful during a single-thread
|
* Note: nesting level is really only useful during a single-thread
|
||||||
* execution. Otherwise, multiple threads will keep resetting the
|
* execution. Otherwise, multiple threads will keep resetting the
|
||||||
* level.
|
* level.
|
||||||
|
@ -388,11 +388,7 @@ acpi_status acpi_ut_init_globals(void)
|
|||||||
/* Public globals */
|
/* Public globals */
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
|
ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_dbg_level)
|
ACPI_EXPORT_SYMBOL(acpi_dbg_level)
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
|
ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_gpe_count)
|
ACPI_EXPORT_SYMBOL(acpi_gpe_count)
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL(acpi_current_gpe_count)
|
ACPI_EXPORT_SYMBOL(acpi_current_gpe_count)
|
||||||
|
@ -122,8 +122,16 @@ acpi_status __init acpi_initialize_subsystem(void)
|
|||||||
|
|
||||||
/* If configured, initialize the AML debugger */
|
/* If configured, initialize the AML debugger */
|
||||||
|
|
||||||
ACPI_DEBUGGER_EXEC(status = acpi_db_initialize());
|
#ifdef ACPI_DEBUGGER
|
||||||
return_ACPI_STATUS(status);
|
status = acpi_db_initialize();
|
||||||
|
if (ACPI_FAILURE(status)) {
|
||||||
|
ACPI_EXCEPTION((AE_INFO, status,
|
||||||
|
"During Debugger initialization"));
|
||||||
|
return_ACPI_STATUS(status);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem)
|
ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem)
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||||
|
|
||||||
#define ACPI_CA_VERSION 0x20131115
|
#define ACPI_CA_VERSION 0x20131218
|
||||||
|
|
||||||
#include <acpi/acconfig.h>
|
#include <acpi/acconfig.h>
|
||||||
#include <acpi/actypes.h>
|
#include <acpi/actypes.h>
|
||||||
@ -54,7 +54,6 @@
|
|||||||
#include <acpi/acbuffer.h>
|
#include <acpi/acbuffer.h>
|
||||||
|
|
||||||
extern u8 acpi_gbl_permanent_mmap;
|
extern u8 acpi_gbl_permanent_mmap;
|
||||||
extern u32 acpi_rsdt_forced;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Globals that are publically available
|
* Globals that are publically available
|
||||||
@ -72,17 +71,19 @@ extern u32 acpi_dbg_layer;
|
|||||||
|
|
||||||
/* ACPICA runtime options */
|
/* ACPICA runtime options */
|
||||||
|
|
||||||
extern u8 acpi_gbl_enable_interpreter_slack;
|
|
||||||
extern u8 acpi_gbl_all_methods_serialized;
|
extern u8 acpi_gbl_all_methods_serialized;
|
||||||
extern u8 acpi_gbl_create_osi_method;
|
|
||||||
extern u8 acpi_gbl_use_default_register_widths;
|
|
||||||
extern acpi_name acpi_gbl_trace_method_name;
|
|
||||||
extern u32 acpi_gbl_trace_flags;
|
|
||||||
extern bool acpi_gbl_enable_aml_debug_object;
|
|
||||||
extern u8 acpi_gbl_copy_dsdt_locally;
|
extern u8 acpi_gbl_copy_dsdt_locally;
|
||||||
extern u8 acpi_gbl_truncate_io_addresses;
|
extern u8 acpi_gbl_create_osi_method;
|
||||||
extern u8 acpi_gbl_disable_auto_repair;
|
extern u8 acpi_gbl_disable_auto_repair;
|
||||||
extern u8 acpi_gbl_disable_ssdt_table_load;
|
extern u8 acpi_gbl_disable_ssdt_table_load;
|
||||||
|
extern u8 acpi_gbl_do_not_use_xsdt;
|
||||||
|
extern bool acpi_gbl_enable_aml_debug_object;
|
||||||
|
extern u8 acpi_gbl_enable_interpreter_slack;
|
||||||
|
extern u32 acpi_gbl_trace_flags;
|
||||||
|
extern acpi_name acpi_gbl_trace_method_name;
|
||||||
|
extern u8 acpi_gbl_truncate_io_addresses;
|
||||||
|
extern u8 acpi_gbl_use32_bit_fadt_addresses;
|
||||||
|
extern u8 acpi_gbl_use_default_register_widths;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hardware-reduced prototypes. All interfaces that use these macros will
|
* Hardware-reduced prototypes. All interfaces that use these macros will
|
||||||
@ -130,10 +131,9 @@ acpi_status __init acpi_terminate(void);
|
|||||||
* Miscellaneous global interfaces
|
* Miscellaneous global interfaces
|
||||||
*/
|
*/
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
|
||||||
#ifdef ACPI_FUTURE_USAGE
|
#ifdef ACPI_FUTURE_USAGE
|
||||||
acpi_status acpi_subsystem_status(void);
|
acpi_status acpi_subsystem_status(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ACPI_FUTURE_USAGE
|
#ifdef ACPI_FUTURE_USAGE
|
||||||
@ -278,16 +278,13 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||||||
acpi_install_sci_handler(acpi_sci_handler
|
acpi_install_sci_handler(acpi_sci_handler
|
||||||
address,
|
address,
|
||||||
void *context))
|
void *context))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_remove_sci_handler(acpi_sci_handler
|
acpi_remove_sci_handler(acpi_sci_handler
|
||||||
address))
|
address))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_install_global_event_handler
|
acpi_install_global_event_handler
|
||||||
(acpi_gbl_event_handler handler,
|
(acpi_gbl_event_handler handler,
|
||||||
void *context))
|
void *context))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_install_fixed_event_handler(u32
|
acpi_install_fixed_event_handler(u32
|
||||||
acpi_event,
|
acpi_event,
|
||||||
@ -295,12 +292,10 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||||||
handler,
|
handler,
|
||||||
void
|
void
|
||||||
*context))
|
*context))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_remove_fixed_event_handler(u32 acpi_event,
|
acpi_remove_fixed_event_handler(u32 acpi_event,
|
||||||
acpi_event_handler
|
acpi_event_handler
|
||||||
handler))
|
handler))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_install_gpe_handler(acpi_handle
|
acpi_install_gpe_handler(acpi_handle
|
||||||
gpe_device,
|
gpe_device,
|
||||||
@ -309,15 +304,14 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||||||
acpi_gpe_handler
|
acpi_gpe_handler
|
||||||
address,
|
address,
|
||||||
void *context))
|
void *context))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_remove_gpe_handler(acpi_handle gpe_device,
|
acpi_remove_gpe_handler(acpi_handle gpe_device,
|
||||||
u32 gpe_number,
|
u32 gpe_number,
|
||||||
acpi_gpe_handler
|
acpi_gpe_handler
|
||||||
address))
|
address))
|
||||||
acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type,
|
acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type,
|
||||||
acpi_notify_handler handler,
|
acpi_notify_handler handler,
|
||||||
void *context);
|
void *context);
|
||||||
|
|
||||||
acpi_status
|
acpi_status
|
||||||
acpi_remove_notify_handler(acpi_handle device,
|
acpi_remove_notify_handler(acpi_handle device,
|
||||||
@ -366,7 +360,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_disable_event(u32 event, u32 flags))
|
acpi_disable_event(u32 event, u32 flags))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
@ -404,20 +397,16 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||||||
parent_device,
|
parent_device,
|
||||||
acpi_handle gpe_device,
|
acpi_handle gpe_device,
|
||||||
u32 gpe_number))
|
u32 gpe_number))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_set_gpe_wake_mask(acpi_handle gpe_device,
|
acpi_set_gpe_wake_mask(acpi_handle gpe_device,
|
||||||
u32 gpe_number,
|
u32 gpe_number,
|
||||||
u8 action))
|
u8 action))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_get_gpe_status(acpi_handle gpe_device,
|
acpi_get_gpe_status(acpi_handle gpe_device,
|
||||||
u32 gpe_number,
|
u32 gpe_number,
|
||||||
acpi_event_status
|
acpi_event_status
|
||||||
*event_status))
|
*event_status))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
@ -431,7 +420,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||||||
*gpe_block_address,
|
*gpe_block_address,
|
||||||
u32 register_count,
|
u32 register_count,
|
||||||
u32 interrupt_number))
|
u32 interrupt_number))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_remove_gpe_block(acpi_handle gpe_device))
|
acpi_remove_gpe_block(acpi_handle gpe_device))
|
||||||
|
|
||||||
@ -532,7 +520,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||||||
#ifdef ACPI_FUTURE_USAGE
|
#ifdef ACPI_FUTURE_USAGE
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
acpi_get_timer_resolution(u32 *resolution))
|
acpi_get_timer_resolution(u32 *resolution))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
|
||||||
|
|
||||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||||
|
@ -182,6 +182,9 @@ struct acpi_table_xsdt {
|
|||||||
u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */
|
u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define ACPI_RSDT_ENTRY_SIZE (sizeof (u32))
|
||||||
|
#define ACPI_XSDT_ENTRY_SIZE (sizeof (u64))
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FACS - Firmware ACPI Control Structure (FACS)
|
* FACS - Firmware ACPI Control Structure (FACS)
|
||||||
|
@ -457,7 +457,7 @@ struct acpi_hest_aer_common {
|
|||||||
u8 enabled;
|
u8 enabled;
|
||||||
u32 records_to_preallocate;
|
u32 records_to_preallocate;
|
||||||
u32 max_sections_per_record;
|
u32 max_sections_per_record;
|
||||||
u32 bus;
|
u32 bus; /* Bus and Segment numbers */
|
||||||
u16 device;
|
u16 device;
|
||||||
u16 function;
|
u16 function;
|
||||||
u16 device_control;
|
u16 device_control;
|
||||||
@ -473,6 +473,14 @@ struct acpi_hest_aer_common {
|
|||||||
#define ACPI_HEST_FIRMWARE_FIRST (1)
|
#define ACPI_HEST_FIRMWARE_FIRST (1)
|
||||||
#define ACPI_HEST_GLOBAL (1<<1)
|
#define ACPI_HEST_GLOBAL (1<<1)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Macros to access the bus/segment numbers in Bus field above:
|
||||||
|
* Bus number is encoded in bits 7:0
|
||||||
|
* Segment number is encoded in bits 23:8
|
||||||
|
*/
|
||||||
|
#define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
|
||||||
|
#define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
|
||||||
|
|
||||||
/* Hardware Error Notification */
|
/* Hardware Error Notification */
|
||||||
|
|
||||||
struct acpi_hest_notify {
|
struct acpi_hest_notify {
|
||||||
|
@ -327,6 +327,11 @@ struct acpi_table_dbg2 {
|
|||||||
u32 info_count;
|
u32 info_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct acpi_dbg2_header {
|
||||||
|
u32 info_offset;
|
||||||
|
u32 info_count;
|
||||||
|
};
|
||||||
|
|
||||||
/* Debug Device Information Subtable */
|
/* Debug Device Information Subtable */
|
||||||
|
|
||||||
struct acpi_dbg2_device {
|
struct acpi_dbg2_device {
|
||||||
|
@ -374,16 +374,22 @@ struct acpi_mpst_shared {
|
|||||||
struct acpi_table_pcct {
|
struct acpi_table_pcct {
|
||||||
struct acpi_table_header header; /* Common ACPI table header */
|
struct acpi_table_header header; /* Common ACPI table header */
|
||||||
u32 flags;
|
u32 flags;
|
||||||
u32 latency;
|
u64 reserved;
|
||||||
u32 reserved;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Values for Flags field above */
|
/* Values for Flags field above */
|
||||||
|
|
||||||
#define ACPI_PCCT_DOORBELL 1
|
#define ACPI_PCCT_DOORBELL 1
|
||||||
|
|
||||||
|
/* Values for subtable type in struct acpi_subtable_header */
|
||||||
|
|
||||||
|
enum acpi_pcct_type {
|
||||||
|
ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
|
||||||
|
ACPI_PCCT_TYPE_RESERVED = 1 /* 1 and greater are reserved */
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PCCT subtables
|
* PCCT Subtables, correspond to Type in struct acpi_subtable_header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 0: Generic Communications Subspace */
|
/* 0: Generic Communications Subspace */
|
||||||
@ -396,6 +402,9 @@ struct acpi_pcct_subspace {
|
|||||||
struct acpi_generic_address doorbell_register;
|
struct acpi_generic_address doorbell_register;
|
||||||
u64 preserve_mask;
|
u64 preserve_mask;
|
||||||
u64 write_mask;
|
u64 write_mask;
|
||||||
|
u32 latency;
|
||||||
|
u32 max_access_rate;
|
||||||
|
u16 min_turnaround_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -928,22 +928,14 @@ struct acpi_object_list {
|
|||||||
* Miscellaneous common Data Structures used by the interfaces
|
* Miscellaneous common Data Structures used by the interfaces
|
||||||
*/
|
*/
|
||||||
#define ACPI_NO_BUFFER 0
|
#define ACPI_NO_BUFFER 0
|
||||||
#define ACPI_ALLOCATE_BUFFER (acpi_size) (-1)
|
#define ACPI_ALLOCATE_BUFFER (acpi_size) (-1) /* Let ACPICA allocate buffer */
|
||||||
#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (-2)
|
#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (-2) /* For internal use only (enables tracking) */
|
||||||
|
|
||||||
struct acpi_buffer {
|
struct acpi_buffer {
|
||||||
acpi_size length; /* Length in bytes of the buffer */
|
acpi_size length; /* Length in bytes of the buffer */
|
||||||
void *pointer; /* pointer to buffer */
|
void *pointer; /* pointer to buffer */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_BUFFER.
|
|
||||||
* Note: We use acpi_os_free here because acpi_os_allocate was used to allocate
|
|
||||||
* the buffer. This purposefully bypasses the internal allocation tracking
|
|
||||||
* mechanism (if it is enabled).
|
|
||||||
*/
|
|
||||||
#define ACPI_FREE_BUFFER(b) acpi_os_free((b).pointer)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* name_type for acpi_get_name
|
* name_type for acpi_get_name
|
||||||
*/
|
*/
|
||||||
|
@ -96,13 +96,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* acpi_bin/acpi_dump/acpi_src/acpi_xtract configuration. All single
|
* acpi_bin/acpi_dump/acpi_src/acpi_xtract/Example configuration. All single
|
||||||
* threaded, with no debug output.
|
* threaded, with no debug output.
|
||||||
*/
|
*/
|
||||||
#if (defined ACPI_BIN_APP) || \
|
#if (defined ACPI_BIN_APP) || \
|
||||||
(defined ACPI_DUMP_APP) || \
|
(defined ACPI_DUMP_APP) || \
|
||||||
(defined ACPI_SRC_APP) || \
|
(defined ACPI_SRC_APP) || \
|
||||||
(defined ACPI_XTRACT_APP)
|
(defined ACPI_XTRACT_APP) || \
|
||||||
|
(defined ACPI_EXAMPLE_APP)
|
||||||
#define ACPI_APPLICATION
|
#define ACPI_APPLICATION
|
||||||
#define ACPI_SINGLE_THREADED
|
#define ACPI_SINGLE_THREADED
|
||||||
#endif
|
#endif
|
||||||
@ -394,4 +395,13 @@ typedef char *va_list;
|
|||||||
|
|
||||||
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
|
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
|
||||||
|
|
||||||
|
#ifndef ACPI_FILE
|
||||||
|
#ifdef ACPI_APPLICATION
|
||||||
|
#include <stdio.h>
|
||||||
|
#define ACPI_FILE FILE *
|
||||||
|
#else
|
||||||
|
#define ACPI_FILE void *
|
||||||
|
#endif /* ACPI_APPLICATION */
|
||||||
|
#endif /* ACPI_FILE */
|
||||||
|
|
||||||
#endif /* __ACENV_H__ */
|
#endif /* __ACENV_H__ */
|
||||||
|
@ -239,10 +239,6 @@ void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
|
|||||||
*/
|
*/
|
||||||
void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
|
void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
|
||||||
|
|
||||||
void acpi_os_gpe_count(u32 gpe_number);
|
|
||||||
|
|
||||||
void acpi_os_fixed_event_count(u32 fixed_event_number);
|
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|
||||||
#endif /* __ACLINUX_H__ */
|
#endif /* __ACLINUX_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user