diff options
author | Bob Moore <robert.moore@intel.com> | 2005-11-02 08:00:00 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-12-10 08:26:05 +0300 |
commit | 96db255c8f014ae3497507104e8df809785a619f (patch) | |
tree | 79d2c506644370fd6c10d94bd40c419cd3bad148 /drivers/acpi/utilities/utmisc.c | |
parent | 0897831bb54eb36fd9e2a22da7f0f64be1b20d09 (diff) | |
download | linux-96db255c8f014ae3497507104e8df809785a619f.tar.xz |
[ACPI] ACPICA 20051102
Modified the subsystem initialization sequence to improve
GPE support. The GPE initialization has been split into
two parts in order to defer execution of the _PRW methods
(Power Resources for Wake) until after the hardware is
fully initialized and the SCI handler is installed. This
allows the _PRW methods to access fields protected by the
Global Lock. This will fix systems where a NO_GLOBAL_LOCK
exception has been seen during initialization.
Fixed a regression with the ConcatenateResTemplate()
ASL operator introduced in the 20051021 release.
Implemented support for "local" internal ACPI object
types within the debugger "Object" command and the
acpi_walk_namespace() external interfaces. These local
types include RegionFields, BankFields, IndexFields, Alias,
and reference objects.
Moved common AML resource handling code into a new file,
"utresrc.c". This code is shared by both the Resource
Manager and the AML Debugger.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities/utmisc.c')
-rw-r--r-- | drivers/acpi/utilities/utmisc.c | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index e9058d4da122..2a9110c06391 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c @@ -43,7 +43,6 @@ #include <acpi/acpi.h> #include <acpi/acnamesp.h> -#include <acpi/amlresrc.h> #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utmisc") @@ -791,153 +790,6 @@ u8 acpi_ut_generate_checksum(u8 * buffer, u32 length) /******************************************************************************* * - * FUNCTION: acpi_ut_get_resource_type - * - * PARAMETERS: Aml - Pointer to the raw AML resource descriptor - * - * RETURN: The Resource Type with no extraneous bits (except the - * Large/Small descriptor bit -- this is left alone) - * - * DESCRIPTION: Extract the Resource Type/Name from the first byte of - * a resource descriptor. - * - ******************************************************************************/ - -u8 acpi_ut_get_resource_type(void *aml) -{ - ACPI_FUNCTION_ENTRY(); - - /* - * Byte 0 contains the descriptor name (Resource Type) - * Determine if this is a small or large resource - */ - if (*((u8 *) aml) & ACPI_RESOURCE_NAME_LARGE) { - /* Large Resource Type -- bits 6:0 contain the name */ - - return (*((u8 *) aml)); - } else { - /* Small Resource Type -- bits 6:3 contain the name */ - - return ((u8) (*((u8 *) aml) & ACPI_RESOURCE_NAME_SMALL_MASK)); - } -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_get_resource_length - * - * PARAMETERS: Aml - Pointer to the raw AML resource descriptor - * - * RETURN: Byte Length - * - * DESCRIPTION: Get the "Resource Length" of a raw AML descriptor. By - * definition, this does not include the size of the descriptor - * header or the length field itself. - * - ******************************************************************************/ - -u16 acpi_ut_get_resource_length(void *aml) -{ - u16 resource_length; - - ACPI_FUNCTION_ENTRY(); - - /* - * Byte 0 contains the descriptor name (Resource Type) - * Determine if this is a small or large resource - */ - if (*((u8 *) aml) & ACPI_RESOURCE_NAME_LARGE) { - /* Large Resource type -- bytes 1-2 contain the 16-bit length */ - - ACPI_MOVE_16_TO_16(&resource_length, &((u8 *) aml)[1]); - - } else { - /* Small Resource type -- bits 2:0 of byte 0 contain the length */ - - resource_length = (u16) (*((u8 *) aml) & - ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK); - } - - return (resource_length); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_get_descriptor_length - * - * PARAMETERS: Aml - Pointer to the raw AML resource descriptor - * - * RETURN: Byte length - * - * DESCRIPTION: Get the total byte length of a raw AML descriptor, including the - * length of the descriptor header and the length field itself. - * Used to walk descriptor lists. - * - ******************************************************************************/ - -u32 acpi_ut_get_descriptor_length(void *aml) -{ - u32 descriptor_length; - - ACPI_FUNCTION_ENTRY(); - - /* First get the Resource Length (Does not include header length) */ - - descriptor_length = acpi_ut_get_resource_length(aml); - - /* Determine if this is a small or large resource */ - - if (*((u8 *) aml) & ACPI_RESOURCE_NAME_LARGE) { - descriptor_length += sizeof(struct aml_resource_large_header); - } else { - descriptor_length += sizeof(struct aml_resource_small_header); - } - - return (descriptor_length); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_get_resource_end_tag - * - * PARAMETERS: obj_desc - The resource template buffer object - * - * RETURN: Pointer to the end tag - * - * DESCRIPTION: Find the END_TAG resource descriptor in an AML resource template - * - ******************************************************************************/ - -u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc) -{ - u8 *aml; - u8 *end_aml; - - aml = obj_desc->buffer.pointer; - end_aml = aml + obj_desc->buffer.length; - - /* Walk the resource template, one descriptor per loop */ - - while (aml < end_aml) { - if (acpi_ut_get_resource_type(aml) == - ACPI_RESOURCE_NAME_END_TAG) { - /* Found the end_tag descriptor, all done */ - - return (aml); - } - - /* Point to the next resource descriptor */ - - aml += acpi_ut_get_resource_length(aml); - } - - /* End tag was not found */ - - return (NULL); -} - -/******************************************************************************* - * * FUNCTION: acpi_ut_report_error * * PARAMETERS: module_name - Caller's module name (for error output) |