2005-04-16 16:20:36 -06:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Module Name: utglobal - Global variables for the ACPI subsystem
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/*
|
2006-01-13 14:22:00 -07:00
|
|
|
* Copyright (C) 2000 - 2006, R. Byron Moore
|
2005-04-16 16:20:36 -06:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions, and the following disclaimer,
|
|
|
|
* without modification.
|
|
|
|
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
|
|
|
* substantially similar to the "NO WARRANTY" disclaimer below
|
|
|
|
* ("Disclaimer") and any redistribution must be conditioned upon
|
|
|
|
* including a substantially similar Disclaimer requirement for further
|
|
|
|
* binary redistribution.
|
|
|
|
* 3. Neither the names of the above-listed copyright holders nor the names
|
|
|
|
* of any contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* Alternatively, this software may be distributed under the terms of the
|
|
|
|
* GNU General Public License ("GPL") version 2 as published by the Free
|
|
|
|
* Software Foundation.
|
|
|
|
*
|
|
|
|
* NO WARRANTY
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
|
|
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGES.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define DEFINE_ACPI_GLOBALS
|
|
|
|
|
|
|
|
#include <acpi/acpi.h>
|
|
|
|
#include <acpi/acnamesp.h>
|
|
|
|
|
|
|
|
#define _COMPONENT ACPI_UTILITIES
|
2005-08-04 22:44:28 -06:00
|
|
|
ACPI_MODULE_NAME("utglobal")
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_format_exception
|
|
|
|
*
|
|
|
|
* PARAMETERS: Status - The acpi_status code to be formatted
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* RETURN: A string containing the exception text. A valid pointer is
|
|
|
|
* always returned.
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* DESCRIPTION: This function translates an ACPI exception into an ASCII string.
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
2005-08-04 22:44:28 -06:00
|
|
|
const char *acpi_format_exception(acpi_status status)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_status sub_status;
|
|
|
|
const char *exception = NULL;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-01-13 14:22:00 -07:00
|
|
|
ACPI_FUNCTION_ENTRY();
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-01-13 14:22:00 -07:00
|
|
|
/*
|
|
|
|
* Status is composed of two parts, a "type" and an actual code
|
|
|
|
*/
|
2005-04-16 16:20:36 -06:00
|
|
|
sub_status = (status & ~AE_CODE_MASK);
|
|
|
|
|
|
|
|
switch (status & AE_CODE_MASK) {
|
|
|
|
case AE_CODE_ENVIRONMENTAL:
|
|
|
|
|
|
|
|
if (sub_status <= AE_CODE_ENV_MAX) {
|
2005-08-04 22:44:28 -06:00
|
|
|
exception = acpi_gbl_exception_names_env[sub_status];
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
2005-04-18 20:49:35 -06:00
|
|
|
break;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
case AE_CODE_PROGRAMMER:
|
|
|
|
|
|
|
|
if (sub_status <= AE_CODE_PGM_MAX) {
|
2005-08-04 22:44:28 -06:00
|
|
|
exception =
|
|
|
|
acpi_gbl_exception_names_pgm[sub_status - 1];
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
2005-04-18 20:49:35 -06:00
|
|
|
break;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
case AE_CODE_ACPI_TABLES:
|
|
|
|
|
|
|
|
if (sub_status <= AE_CODE_TBL_MAX) {
|
2005-08-04 22:44:28 -06:00
|
|
|
exception =
|
|
|
|
acpi_gbl_exception_names_tbl[sub_status - 1];
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
2005-04-18 20:49:35 -06:00
|
|
|
break;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
case AE_CODE_AML:
|
|
|
|
|
|
|
|
if (sub_status <= AE_CODE_AML_MAX) {
|
2005-08-04 22:44:28 -06:00
|
|
|
exception =
|
|
|
|
acpi_gbl_exception_names_aml[sub_status - 1];
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
2005-04-18 20:49:35 -06:00
|
|
|
break;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
case AE_CODE_CONTROL:
|
|
|
|
|
|
|
|
if (sub_status <= AE_CODE_CTRL_MAX) {
|
2005-08-04 22:44:28 -06:00
|
|
|
exception =
|
|
|
|
acpi_gbl_exception_names_ctrl[sub_status - 1];
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
2005-04-18 20:49:35 -06:00
|
|
|
break;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
default:
|
2005-04-18 20:49:35 -06:00
|
|
|
break;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
if (!exception) {
|
2006-10-01 22:00:00 -06:00
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/* Exception code was not recognized */
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-01-27 14:43:00 -07:00
|
|
|
ACPI_ERROR((AE_INFO,
|
|
|
|
"Unknown exception code: 0x%8.8X", status));
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-01-13 14:22:00 -07:00
|
|
|
exception = "UNKNOWN_STATUS_CODE";
|
2005-04-18 20:49:35 -06:00
|
|
|
}
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-01-13 14:22:00 -07:00
|
|
|
return (ACPI_CAST_PTR(const char, exception));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* Static global variable initialization.
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We want the debug switches statically initialized so they
|
|
|
|
* are already set when the debugger is entered.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Debug switch - level and trace mask */
|
2005-08-04 22:44:28 -06:00
|
|
|
u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Debug switch - layer (component) mask */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
|
|
|
|
u32 acpi_gbl_nesting_level = 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Debugger globals */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
u8 acpi_gbl_db_terminate_threads = FALSE;
|
|
|
|
u8 acpi_gbl_abort_method = FALSE;
|
|
|
|
u8 acpi_gbl_method_executing = FALSE;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* System flags */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
u32 acpi_gbl_startup_flags = 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* System starts uninitialized */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
u8 acpi_gbl_shutdown = TRUE;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
const u8 acpi_gbl_decode_to8bit[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
"\\_S0_",
|
|
|
|
"\\_S1_",
|
|
|
|
"\\_S2_",
|
|
|
|
"\\_S3_",
|
|
|
|
"\\_S4_",
|
|
|
|
"\\_S5_"
|
|
|
|
};
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
const char *acpi_gbl_highest_dstate_names[4] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
"_S1D",
|
|
|
|
"_S2D",
|
|
|
|
"_S3D",
|
|
|
|
"_S4D"
|
|
|
|
};
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* Namespace globals
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Predefined ACPI Names (Built-in to the Interpreter)
|
|
|
|
*
|
|
|
|
* NOTES:
|
|
|
|
* 1) _SB_ is defined to be a device to allow \_SB_._INI to be run
|
|
|
|
* during the initialization sequence.
|
|
|
|
* 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to
|
|
|
|
* perform a Notify() operation on it.
|
|
|
|
*/
|
2005-10-20 22:00:00 -06:00
|
|
|
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},
|
|
|
|
{"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
|
|
|
{"_TZ_", ACPI_TYPE_THERMAL, NULL},
|
|
|
|
{"_REV", ACPI_TYPE_INTEGER, (char *)ACPI_CA_SUPPORT_LEVEL},
|
|
|
|
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
|
|
|
|
{"_GL_", ACPI_TYPE_MUTEX, (char *)1},
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
2005-10-20 22:00:00 -06:00
|
|
|
{"_OSI", ACPI_TYPE_METHOD, (char *)1},
|
2005-04-16 16:20:36 -06:00
|
|
|
#endif
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/* Table terminator */
|
|
|
|
|
2005-10-20 22:00:00 -06:00
|
|
|
{NULL, ACPI_TYPE_ANY, NULL}
|
2005-04-18 20:49:35 -06:00
|
|
|
};
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Properties of the ACPI Object Types, both internal and external.
|
|
|
|
* The table is indexed by values of acpi_object_type
|
|
|
|
*/
|
2005-08-04 22:44:28 -06:00
|
|
|
const u8 acpi_gbl_ns_properties[] = {
|
|
|
|
ACPI_NS_NORMAL, /* 00 Any */
|
|
|
|
ACPI_NS_NORMAL, /* 01 Number */
|
|
|
|
ACPI_NS_NORMAL, /* 02 String */
|
|
|
|
ACPI_NS_NORMAL, /* 03 Buffer */
|
|
|
|
ACPI_NS_NORMAL, /* 04 Package */
|
|
|
|
ACPI_NS_NORMAL, /* 05 field_unit */
|
|
|
|
ACPI_NS_NEWSCOPE, /* 06 Device */
|
|
|
|
ACPI_NS_NORMAL, /* 07 Event */
|
|
|
|
ACPI_NS_NEWSCOPE, /* 08 Method */
|
|
|
|
ACPI_NS_NORMAL, /* 09 Mutex */
|
|
|
|
ACPI_NS_NORMAL, /* 10 Region */
|
|
|
|
ACPI_NS_NEWSCOPE, /* 11 Power */
|
|
|
|
ACPI_NS_NEWSCOPE, /* 12 Processor */
|
|
|
|
ACPI_NS_NEWSCOPE, /* 13 Thermal */
|
|
|
|
ACPI_NS_NORMAL, /* 14 buffer_field */
|
|
|
|
ACPI_NS_NORMAL, /* 15 ddb_handle */
|
|
|
|
ACPI_NS_NORMAL, /* 16 Debug Object */
|
|
|
|
ACPI_NS_NORMAL, /* 17 def_field */
|
|
|
|
ACPI_NS_NORMAL, /* 18 bank_field */
|
|
|
|
ACPI_NS_NORMAL, /* 19 index_field */
|
|
|
|
ACPI_NS_NORMAL, /* 20 Reference */
|
|
|
|
ACPI_NS_NORMAL, /* 21 Alias */
|
|
|
|
ACPI_NS_NORMAL, /* 22 method_alias */
|
|
|
|
ACPI_NS_NORMAL, /* 23 Notify */
|
|
|
|
ACPI_NS_NORMAL, /* 24 Address Handler */
|
|
|
|
ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Desc */
|
|
|
|
ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 26 Resource Field */
|
|
|
|
ACPI_NS_NEWSCOPE, /* 27 Scope */
|
|
|
|
ACPI_NS_NORMAL, /* 28 Extra */
|
|
|
|
ACPI_NS_NORMAL, /* 29 Data */
|
|
|
|
ACPI_NS_NORMAL /* 30 Invalid */
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Hex to ASCII conversion table */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
static const char acpi_gbl_hex_to_ascii[] = {
|
|
|
|
'0', '1', '2', '3', '4', '5', '6', '7',
|
|
|
|
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
|
2005-04-18 20:49:35 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_hex_to_ascii_char
|
|
|
|
*
|
|
|
|
* PARAMETERS: Integer - Contains the hex digit
|
|
|
|
* Position - bit position of the digit within the
|
2005-04-18 20:49:35 -06:00
|
|
|
* integer (multiple of 4)
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* RETURN: The converted Ascii character
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* DESCRIPTION: Convert a hex digit to an Ascii character
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
|
|
|
return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]);
|
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* Table name globals
|
|
|
|
*
|
|
|
|
* NOTE: This table includes ONLY the ACPI tables that the subsystem consumes.
|
|
|
|
* it is NOT an exhaustive list of all possible ACPI tables. All ACPI tables
|
|
|
|
* that are not used by the subsystem are simply ignored.
|
|
|
|
*
|
|
|
|
* Do NOT add any table to this list that is not consumed directly by this
|
2005-04-18 20:49:35 -06:00
|
|
|
* subsystem (No MADT, ECDT, SBST, etc.)
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 15:15:00 -06:00
|
|
|
struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1];
|
2005-04-16 16:20:36 -06:00
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 15:15:00 -06:00
|
|
|
struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
/*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
/* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof(RSDP_SIG) - 1,
|
|
|
|
ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE}
|
|
|
|
,
|
|
|
|
/* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void *)&acpi_gbl_DSDT,
|
|
|
|
sizeof(DSDT_SIG) - 1,
|
|
|
|
ACPI_TABLE_SECONDARY | ACPI_TABLE_SINGLE |
|
|
|
|
ACPI_TABLE_EXECUTABLE}
|
|
|
|
,
|
|
|
|
/* FADT 2 */ {FADT_SIG, FADT_SIG, (void *)&acpi_gbl_FADT,
|
|
|
|
sizeof(FADT_SIG) - 1,
|
|
|
|
ACPI_TABLE_PRIMARY | ACPI_TABLE_SINGLE}
|
|
|
|
,
|
|
|
|
/* FACS 3 */ {FACS_SIG, FACS_SIG, (void *)&acpi_gbl_FACS,
|
|
|
|
sizeof(FACS_SIG) - 1,
|
|
|
|
ACPI_TABLE_SECONDARY | ACPI_TABLE_SINGLE}
|
|
|
|
,
|
|
|
|
/* PSDT 4 */ {PSDT_SIG, PSDT_SIG, NULL, sizeof(PSDT_SIG) - 1,
|
|
|
|
ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE |
|
|
|
|
ACPI_TABLE_EXECUTABLE}
|
|
|
|
,
|
|
|
|
/* SSDT 5 */ {SSDT_SIG, SSDT_SIG, NULL, sizeof(SSDT_SIG) - 1,
|
|
|
|
ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE |
|
|
|
|
ACPI_TABLE_EXECUTABLE}
|
|
|
|
,
|
|
|
|
/* XSDT 6 */ {XSDT_SIG, XSDT_SIG, NULL, sizeof(RSDT_SIG) - 1,
|
|
|
|
ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE}
|
|
|
|
,
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Event and Hardware globals
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
/* Name Parent Register Register Bit Position Register Bit Mask */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
/* ACPI_BITREG_TIMER_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_TIMER_STATUS,
|
|
|
|
ACPI_BITMASK_TIMER_STATUS},
|
|
|
|
/* ACPI_BITREG_BUS_MASTER_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_BUS_MASTER_STATUS,
|
|
|
|
ACPI_BITMASK_BUS_MASTER_STATUS},
|
|
|
|
/* ACPI_BITREG_GLOBAL_LOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_GLOBAL_LOCK_STATUS,
|
|
|
|
ACPI_BITMASK_GLOBAL_LOCK_STATUS},
|
|
|
|
/* ACPI_BITREG_POWER_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_POWER_BUTTON_STATUS,
|
|
|
|
ACPI_BITMASK_POWER_BUTTON_STATUS},
|
|
|
|
/* ACPI_BITREG_SLEEP_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_SLEEP_BUTTON_STATUS,
|
|
|
|
ACPI_BITMASK_SLEEP_BUTTON_STATUS},
|
|
|
|
/* ACPI_BITREG_RT_CLOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_RT_CLOCK_STATUS,
|
|
|
|
ACPI_BITMASK_RT_CLOCK_STATUS},
|
|
|
|
/* ACPI_BITREG_WAKE_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_WAKE_STATUS,
|
|
|
|
ACPI_BITMASK_WAKE_STATUS},
|
|
|
|
/* ACPI_BITREG_PCIEXP_WAKE_STATUS */ {ACPI_REGISTER_PM1_STATUS,
|
|
|
|
ACPI_BITPOSITION_PCIEXP_WAKE_STATUS,
|
|
|
|
ACPI_BITMASK_PCIEXP_WAKE_STATUS},
|
|
|
|
|
|
|
|
/* ACPI_BITREG_TIMER_ENABLE */ {ACPI_REGISTER_PM1_ENABLE,
|
|
|
|
ACPI_BITPOSITION_TIMER_ENABLE,
|
|
|
|
ACPI_BITMASK_TIMER_ENABLE},
|
|
|
|
/* ACPI_BITREG_GLOBAL_LOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE,
|
|
|
|
ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE,
|
|
|
|
ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
|
|
|
|
/* ACPI_BITREG_POWER_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE,
|
|
|
|
ACPI_BITPOSITION_POWER_BUTTON_ENABLE,
|
|
|
|
ACPI_BITMASK_POWER_BUTTON_ENABLE},
|
|
|
|
/* ACPI_BITREG_SLEEP_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE,
|
|
|
|
ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE,
|
|
|
|
ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
|
|
|
|
/* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE,
|
|
|
|
ACPI_BITPOSITION_RT_CLOCK_ENABLE,
|
|
|
|
ACPI_BITMASK_RT_CLOCK_ENABLE},
|
|
|
|
/* ACPI_BITREG_WAKE_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, 0, 0},
|
|
|
|
/* ACPI_BITREG_PCIEXP_WAKE_DISABLE */ {ACPI_REGISTER_PM1_ENABLE,
|
|
|
|
ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE,
|
|
|
|
ACPI_BITMASK_PCIEXP_WAKE_DISABLE},
|
|
|
|
|
|
|
|
/* ACPI_BITREG_SCI_ENABLE */ {ACPI_REGISTER_PM1_CONTROL,
|
|
|
|
ACPI_BITPOSITION_SCI_ENABLE,
|
|
|
|
ACPI_BITMASK_SCI_ENABLE},
|
|
|
|
/* ACPI_BITREG_BUS_MASTER_RLD */ {ACPI_REGISTER_PM1_CONTROL,
|
|
|
|
ACPI_BITPOSITION_BUS_MASTER_RLD,
|
|
|
|
ACPI_BITMASK_BUS_MASTER_RLD},
|
|
|
|
/* ACPI_BITREG_GLOBAL_LOCK_RELEASE */ {ACPI_REGISTER_PM1_CONTROL,
|
|
|
|
ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE,
|
|
|
|
ACPI_BITMASK_GLOBAL_LOCK_RELEASE},
|
|
|
|
/* ACPI_BITREG_SLEEP_TYPE_A */ {ACPI_REGISTER_PM1_CONTROL,
|
|
|
|
ACPI_BITPOSITION_SLEEP_TYPE_X,
|
|
|
|
ACPI_BITMASK_SLEEP_TYPE_X},
|
|
|
|
/* ACPI_BITREG_SLEEP_TYPE_B */ {ACPI_REGISTER_PM1_CONTROL,
|
|
|
|
ACPI_BITPOSITION_SLEEP_TYPE_X,
|
|
|
|
ACPI_BITMASK_SLEEP_TYPE_X},
|
|
|
|
/* ACPI_BITREG_SLEEP_ENABLE */ {ACPI_REGISTER_PM1_CONTROL,
|
|
|
|
ACPI_BITPOSITION_SLEEP_ENABLE,
|
|
|
|
ACPI_BITMASK_SLEEP_ENABLE},
|
|
|
|
|
|
|
|
/* ACPI_BITREG_ARB_DIS */ {ACPI_REGISTER_PM2_CONTROL,
|
|
|
|
ACPI_BITPOSITION_ARB_DISABLE,
|
|
|
|
ACPI_BITMASK_ARB_DISABLE}
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
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},
|
|
|
|
/* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS,
|
|
|
|
ACPI_BITREG_POWER_BUTTON_ENABLE,
|
|
|
|
ACPI_BITMASK_POWER_BUTTON_STATUS,
|
|
|
|
ACPI_BITMASK_POWER_BUTTON_ENABLE},
|
|
|
|
/* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS,
|
|
|
|
ACPI_BITREG_SLEEP_BUTTON_ENABLE,
|
|
|
|
ACPI_BITMASK_SLEEP_BUTTON_STATUS,
|
|
|
|
ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
|
|
|
|
/* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS,
|
|
|
|
ACPI_BITREG_RT_CLOCK_ENABLE,
|
|
|
|
ACPI_BITMASK_RT_CLOCK_STATUS,
|
|
|
|
ACPI_BITMASK_RT_CLOCK_ENABLE},
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_get_region_name
|
|
|
|
*
|
|
|
|
* PARAMETERS: None.
|
|
|
|
*
|
|
|
|
* RETURN: Status
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Translate a Space ID into a name string (Debug only)
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Region type decoding */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
"SystemMemory",
|
|
|
|
"SystemIO",
|
|
|
|
"PCI_Config",
|
|
|
|
"EmbeddedControl",
|
|
|
|
"SMBus",
|
|
|
|
"CMOS",
|
|
|
|
"PCIBARTarget",
|
|
|
|
"DataTable"
|
|
|
|
};
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char *acpi_ut_get_region_name(u8 space_id)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (space_id >= ACPI_USER_REGION_BEGIN) {
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 15:15:00 -06:00
|
|
|
return ("UserDefinedRegion");
|
2005-08-04 22:44:28 -06:00
|
|
|
} else if (space_id >= ACPI_NUM_PREDEFINED_REGIONS) {
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 15:15:00 -06:00
|
|
|
return ("InvalidSpaceId");
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-12-16 15:05:00 -07:00
|
|
|
return (ACPI_CAST_PTR(char, acpi_gbl_region_types[space_id]));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_get_event_name
|
|
|
|
*
|
|
|
|
* PARAMETERS: None.
|
|
|
|
*
|
|
|
|
* RETURN: Status
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Translate a Event ID into a name string (Debug only)
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Event type decoding */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
"PM_Timer",
|
2005-10-20 22:00:00 -06:00
|
|
|
"GlobalLock",
|
|
|
|
"PowerButton",
|
|
|
|
"SleepButton",
|
|
|
|
"RealTimeClock",
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char *acpi_ut_get_event_name(u32 event_id)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (event_id > ACPI_EVENT_MAX) {
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 15:15:00 -06:00
|
|
|
return ("InvalidEventID");
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2006-01-13 14:22:00 -07:00
|
|
|
return (ACPI_CAST_PTR(char, acpi_gbl_event_types[event_id]));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_get_type_name
|
|
|
|
*
|
|
|
|
* PARAMETERS: None.
|
|
|
|
*
|
|
|
|
* RETURN: Status
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Translate a Type ID into a name string (Debug only)
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Elements of acpi_gbl_ns_type_names below must match
|
|
|
|
* one-to-one with values of acpi_object_type
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching;
|
|
|
|
* when stored in a table it really means that we have thus far seen no
|
|
|
|
* evidence to indicate what type is actually going to be stored for this entry.
|
2005-04-16 16:20:36 -06:00
|
|
|
*/
|
2005-08-04 22:44:28 -06:00
|
|
|
static const char acpi_gbl_bad_type[] = "UNDEFINED";
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/* Printable names of the ACPI object types */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
static const char *acpi_gbl_ns_type_names[] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 00 */ "Untyped",
|
|
|
|
/* 01 */ "Integer",
|
|
|
|
/* 02 */ "String",
|
|
|
|
/* 03 */ "Buffer",
|
|
|
|
/* 04 */ "Package",
|
2005-10-20 22:00:00 -06:00
|
|
|
/* 05 */ "FieldUnit",
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 06 */ "Device",
|
|
|
|
/* 07 */ "Event",
|
|
|
|
/* 08 */ "Method",
|
|
|
|
/* 09 */ "Mutex",
|
|
|
|
/* 10 */ "Region",
|
|
|
|
/* 11 */ "Power",
|
|
|
|
/* 12 */ "Processor",
|
|
|
|
/* 13 */ "Thermal",
|
2005-10-20 22:00:00 -06:00
|
|
|
/* 14 */ "BufferField",
|
|
|
|
/* 15 */ "DdbHandle",
|
|
|
|
/* 16 */ "DebugObject",
|
|
|
|
/* 17 */ "RegionField",
|
|
|
|
/* 18 */ "BankField",
|
|
|
|
/* 19 */ "IndexField",
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 20 */ "Reference",
|
|
|
|
/* 21 */ "Alias",
|
2005-10-20 22:00:00 -06:00
|
|
|
/* 22 */ "MethodAlias",
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 23 */ "Notify",
|
2005-10-20 22:00:00 -06:00
|
|
|
/* 24 */ "AddrHandler",
|
|
|
|
/* 25 */ "ResourceDesc",
|
|
|
|
/* 26 */ "ResourceFld",
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 27 */ "Scope",
|
|
|
|
/* 28 */ "Extra",
|
|
|
|
/* 29 */ "Data",
|
|
|
|
/* 30 */ "Invalid"
|
|
|
|
};
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char *acpi_ut_get_type_name(acpi_object_type type)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (type > ACPI_TYPE_INVALID) {
|
2006-01-13 14:22:00 -07:00
|
|
|
return (ACPI_CAST_PTR(char, acpi_gbl_bad_type));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2006-01-13 14:22:00 -07:00
|
|
|
return (ACPI_CAST_PTR(char, acpi_gbl_ns_type_names[type]));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (!obj_desc) {
|
2005-04-16 16:20:36 -06:00
|
|
|
return ("[NULL Object Descriptor]");
|
|
|
|
}
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
return (acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE(obj_desc)));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_get_node_name
|
|
|
|
*
|
|
|
|
* PARAMETERS: Object - A namespace node
|
|
|
|
*
|
|
|
|
* RETURN: Pointer to a string
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Validate the node and return the node's ACPI name.
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char *acpi_ut_get_node_name(void *object)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2005-08-04 22:44:28 -06:00
|
|
|
struct acpi_namespace_node *node = (struct acpi_namespace_node *)object;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (!object) {
|
2005-04-16 16:20:36 -06:00
|
|
|
return ("NULL");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check for Root node */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if ((object == ACPI_ROOT_OBJECT) || (object == acpi_gbl_root_node)) {
|
2005-04-16 16:20:36 -06:00
|
|
|
return ("\"\\\" ");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Descriptor must be a namespace node */
|
|
|
|
|
2006-03-17 14:44:00 -07:00
|
|
|
if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) {
|
2005-04-16 16:20:36 -06:00
|
|
|
return ("####");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Name must be a valid ACPI name */
|
|
|
|
|
2005-11-17 11:07:00 -07:00
|
|
|
if (!acpi_ut_valid_acpi_name(node->name.integer)) {
|
ACPI: ACPICA 20060331
Implemented header file support for the following
additional ACPI tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR,
SPMI, TCPA, and WDRT. With this support, all current and
known ACPI tables are now defined in the ACPICA headers and
are available for use by device drivers and other software.
Implemented support to allow tables that contain ACPI
names with invalid characters to be loaded. Previously,
this would cause the table load to fail, but since
there are several known cases of such tables on
existing machines, this change was made to enable
ACPI support for them. Also, this matches the
behavior of the Microsoft ACPI implementation.
https://bugzilla.novell.com/show_bug.cgi?id=147621
Fixed a couple regressions introduced during the memory
optimization in the 20060317 release. The namespace
node definition required additional reorganization and
an internal datatype that had been changed to 8-bit was
restored to 32-bit. (Valery Podrezov)
Fixed a problem where a null pointer passed to
acpi_ut_delete_generic_state() could be passed through
to acpi_os_release_object which is unexpected. Such
null pointers are now trapped and ignored, matching
the behavior of the previous implementation before the
deployment of acpi_os_release_object(). (Valery Podrezov,
Fiodor Suietov)
Fixed a memory mapping leak during the deletion of
a SystemMemory operation region where a cached memory
mapping was not deleted. This became a noticeable problem
for operation regions that are defined within frequently
used control methods. (Dana Meyers)
Reorganized the ACPI table header files into two main
files: one for the ACPI tables consumed by the ACPICA core,
and another for the miscellaneous ACPI tables that are
consumed by the drivers and other software. The various
FADT definitions were merged into one common section and
three different tables (ACPI 1.0, 1.0+, and 2.0)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-30 22:00:00 -07:00
|
|
|
node->name.integer = acpi_ut_repair_name(node->name.integer);
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the name */
|
|
|
|
|
|
|
|
return (node->name.ascii);
|
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_get_descriptor_name
|
|
|
|
*
|
|
|
|
* PARAMETERS: Object - An ACPI object
|
|
|
|
*
|
|
|
|
* RETURN: Pointer to a string
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Validate object and return the descriptor type
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
/* Printable names of object descriptor types */
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
static const char *acpi_gbl_desc_type_names[] = {
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 00 */ "Invalid",
|
|
|
|
/* 01 */ "Cached",
|
|
|
|
/* 02 */ "State-Generic",
|
|
|
|
/* 03 */ "State-Update",
|
|
|
|
/* 04 */ "State-Package",
|
|
|
|
/* 05 */ "State-Control",
|
2005-10-20 22:00:00 -06:00
|
|
|
/* 06 */ "State-RootParseScope",
|
|
|
|
/* 07 */ "State-ParseScope",
|
|
|
|
/* 08 */ "State-WalkScope",
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 09 */ "State-Result",
|
|
|
|
/* 10 */ "State-Notify",
|
|
|
|
/* 11 */ "State-Thread",
|
|
|
|
/* 12 */ "Walk",
|
|
|
|
/* 13 */ "Parser",
|
|
|
|
/* 14 */ "Operand",
|
|
|
|
/* 15 */ "Node"
|
|
|
|
};
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char *acpi_ut_get_descriptor_name(void *object)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (!object) {
|
2005-04-16 16:20:36 -06:00
|
|
|
return ("NULL OBJECT");
|
|
|
|
}
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (ACPI_GET_DESCRIPTOR_TYPE(object) > ACPI_DESC_TYPE_MAX) {
|
2005-12-16 15:05:00 -07:00
|
|
|
return (ACPI_CAST_PTR(char, acpi_gbl_bad_type));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-12-16 15:05:00 -07:00
|
|
|
return (ACPI_CAST_PTR(char,
|
|
|
|
acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_TYPE
|
|
|
|
(object)]));
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
|
|
|
/*
|
|
|
|
* Strings and procedures used for debug only
|
|
|
|
*/
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_get_mutex_name
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* PARAMETERS: mutex_id - The predefined ID for this mutex.
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* RETURN: String containing the name of the mutex. Always returns a valid
|
|
|
|
* pointer.
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* DESCRIPTION: Translate a mutex ID into a name string (Debug only)
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
char *acpi_ut_get_mutex_name(u32 mutex_id)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
2006-06-08 14:29:00 -06:00
|
|
|
if (mutex_id > ACPI_MAX_MUTEX) {
|
2005-04-16 16:20:36 -06:00
|
|
|
return ("Invalid Mutex ID");
|
|
|
|
}
|
|
|
|
|
|
|
|
return (acpi_gbl_mutex_names[mutex_id]);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_valid_object_type
|
|
|
|
*
|
|
|
|
* PARAMETERS: Type - Object type to be validated
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* RETURN: TRUE if valid object type, FALSE otherwise
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* DESCRIPTION: Validate an object type
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
u8 acpi_ut_valid_object_type(acpi_object_type type)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
if (type > ACPI_TYPE_LOCAL_MAX) {
|
2006-10-01 22:00:00 -06:00
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
/* Note: Assumes all TYPEs are contiguous (external/local) */
|
|
|
|
|
|
|
|
return (FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (TRUE);
|
|
|
|
}
|
|
|
|
|
2005-04-18 20:49:35 -06:00
|
|
|
/*******************************************************************************
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ut_init_globals
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
* PARAMETERS: None
|
|
|
|
*
|
|
|
|
* RETURN: None
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* DESCRIPTION: Init library globals. All globals that require specific
|
|
|
|
* initialization should be initialized here!
|
|
|
|
*
|
2005-04-18 20:49:35 -06:00
|
|
|
******************************************************************************/
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
void acpi_ut_init_globals(void)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_status status;
|
|
|
|
u32 i;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 15:15:00 -06:00
|
|
|
ACPI_FUNCTION_TRACE(ut_init_globals);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 22:00:00 -06:00
|
|
|
/* Create all memory caches */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
status = acpi_ut_create_caches();
|
|
|
|
if (ACPI_FAILURE(status)) {
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 22:00:00 -06:00
|
|
|
return;
|
|
|
|
}
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* ACPI table structure */
|
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 15:15:00 -06:00
|
|
|
for (i = 0; i < (ACPI_TABLE_ID_MAX + 1); i++) {
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_table_lists[i].next = NULL;
|
|
|
|
acpi_gbl_table_lists[i].count = 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Mutex locked flags */
|
|
|
|
|
2006-06-08 14:29:00 -06:00
|
|
|
for (i = 0; i < ACPI_NUM_MUTEX; i++) {
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_mutex_info[i].mutex = NULL;
|
|
|
|
acpi_gbl_mutex_info[i].thread_id = ACPI_MUTEX_NOT_ACQUIRED;
|
|
|
|
acpi_gbl_mutex_info[i].use_count = 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2005-12-02 16:27:00 -07:00
|
|
|
for (i = 0; i < ACPI_NUM_OWNERID_MASKS; i++) {
|
|
|
|
acpi_gbl_owner_id_mask[i] = 0;
|
|
|
|
}
|
|
|
|
acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; /* Last ID is never valid */
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
/* GPE support */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_gpe_xrupt_list_head = NULL;
|
|
|
|
acpi_gbl_gpe_fadt_blocks[0] = NULL;
|
|
|
|
acpi_gbl_gpe_fadt_blocks[1] = NULL;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Global notify handlers */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_system_notify.handler = NULL;
|
|
|
|
acpi_gbl_device_notify.handler = NULL;
|
|
|
|
acpi_gbl_exception_handler = NULL;
|
|
|
|
acpi_gbl_init_handler = NULL;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Global "typed" ACPI table pointers */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_RSDP = NULL;
|
|
|
|
acpi_gbl_XSDT = NULL;
|
|
|
|
acpi_gbl_FACS = NULL;
|
|
|
|
acpi_gbl_FADT = NULL;
|
|
|
|
acpi_gbl_DSDT = NULL;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Global Lock support */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_global_lock_acquired = FALSE;
|
|
|
|
acpi_gbl_global_lock_thread_count = 0;
|
|
|
|
acpi_gbl_global_lock_handle = 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Miscellaneous variables */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_table_flags = ACPI_PHYSICAL_POINTER;
|
|
|
|
acpi_gbl_rsdp_original_location = 0;
|
|
|
|
acpi_gbl_cm_single_step = FALSE;
|
|
|
|
acpi_gbl_db_terminate_threads = FALSE;
|
|
|
|
acpi_gbl_shutdown = FALSE;
|
|
|
|
acpi_gbl_ns_lookup_count = 0;
|
|
|
|
acpi_gbl_ps_find_count = 0;
|
|
|
|
acpi_gbl_acpi_hardware_present = TRUE;
|
2005-12-02 16:27:00 -07:00
|
|
|
acpi_gbl_last_owner_id_index = 0;
|
|
|
|
acpi_gbl_next_owner_id_offset = 0;
|
[ACPI] ACPICA 20050930
Completed a major overhaul of the Resource Manager code -
specifically, optimizations in the area of the AML/internal
resource conversion code. The code has been optimized to
simplify and eliminate duplicated code, CPU stack use has
been decreased by optimizing function parameters and local
variables, and naming conventions across the manager have
been standardized for clarity and ease of maintenance (this
includes function, parameter, variable, and struct/typedef
names.)
All Resource Manager dispatch and information tables have
been moved to a single location for clarity and ease of
maintenance. One new file was created, named "rsinfo.c".
The ACPI return macros (return_ACPI_STATUS, etc.) have
been modified to guarantee that the argument is
not evaluated twice, making them less prone to macro
side-effects. However, since there exists the possibility
of additional stack use if a particular compiler cannot
optimize them (such as in the debug generation case),
the original macros are optionally available. Note that
some invocations of the return_VALUE macro may now cause
size mismatch warnings; the return_UINT8 and return_UINT32
macros are provided to eliminate these. (From Randy Dunlap)
Implemented a new mechanism to enable debug tracing for
individual control methods. A new external interface,
acpi_debug_trace(), is provided to enable this mechanism. The
intent is to allow the host OS to easily enable and disable
tracing for problematic control methods. This interface
can be easily exposed to a user or debugger interface if
desired. See the file psxface.c for details.
acpi_ut_callocate() will now return a valid pointer if a
length of zero is specified - a length of one is used
and a warning is issued. This matches the behavior of
acpi_ut_allocate().
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-09-30 17:03:00 -06:00
|
|
|
acpi_gbl_trace_method_name = 0;
|
|
|
|
acpi_gbl_trace_dbg_level = 0;
|
|
|
|
acpi_gbl_trace_dbg_layer = 0;
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_debugger_configuration = DEBUGGER_THREADING;
|
|
|
|
acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Hardware oriented */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_events_initialized = FALSE;
|
|
|
|
acpi_gbl_system_awake_and_running = TRUE;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* Namespace */
|
|
|
|
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_root_node = NULL;
|
2005-04-16 16:20:36 -06:00
|
|
|
acpi_gbl_root_node_struct.name.integer = ACPI_ROOT_NAME;
|
2006-03-17 14:44:00 -07:00
|
|
|
acpi_gbl_root_node_struct.descriptor_type = ACPI_DESC_TYPE_NAMED;
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_root_node_struct.type = ACPI_TYPE_DEVICE;
|
|
|
|
acpi_gbl_root_node_struct.child = NULL;
|
|
|
|
acpi_gbl_root_node_struct.peer = NULL;
|
|
|
|
acpi_gbl_root_node_struct.object = NULL;
|
|
|
|
acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
#ifdef ACPI_DEBUG_OUTPUT
|
2005-08-04 22:44:28 -06:00
|
|
|
acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX;
|
2005-04-16 16:20:36 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return_VOID;
|
|
|
|
}
|
2006-10-02 22:00:00 -06:00
|
|
|
|
|
|
|
ACPI_EXPORT_SYMBOL(acpi_dbg_level)
|
|
|
|
ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
|