2005-04-17 06:20:36 +08:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Module Name: exdump - Interpreter debug output routines
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/*
|
2006-01-14 05:22:00 +08:00
|
|
|
* Copyright (C) 2000 - 2006, R. Byron Moore
|
2005-04-17 06:20:36 +08: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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <acpi/acpi.h>
|
|
|
|
#include <acpi/acinterp.h>
|
|
|
|
#include <acpi/amlcode.h>
|
|
|
|
#include <acpi/acnamesp.h>
|
|
|
|
#include <acpi/acparser.h>
|
|
|
|
|
|
|
|
#define _COMPONENT ACPI_EXECUTER
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_MODULE_NAME("exdump")
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-05-13 12:00:00 +08:00
|
|
|
/*
|
|
|
|
* The following routines are used for debug output only
|
|
|
|
*/
|
|
|
|
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
2005-04-19 10:49:35 +08:00
|
|
|
/* Local prototypes */
|
2005-08-05 12:44:28 +08:00
|
|
|
static void acpi_ex_out_string(char *title, char *value);
|
2005-04-19 10:49:35 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
static void acpi_ex_out_pointer(char *title, void *value);
|
2005-04-19 10:49:35 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
static void acpi_ex_out_address(char *title, acpi_physical_address value);
|
2005-04-19 10:49:35 +08:00
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc);
|
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-24 12:00:00 +08:00
|
|
|
|
|
|
|
static void
|
2005-11-02 13:00:00 +08:00
|
|
|
acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,
|
|
|
|
u32 level, u32 index);
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* Object Descriptor info tables
|
|
|
|
*
|
|
|
|
* Note: The first table entry must be an INIT opcode and must contain
|
|
|
|
* the table length (number of table entries)
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_integer[2] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_integer), NULL},
|
|
|
|
{ACPI_EXD_UINT64, ACPI_EXD_OFFSET(integer.value), "Value"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_string[4] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_string), NULL},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(string.length), "Length"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(string.pointer), "Pointer"},
|
|
|
|
{ACPI_EXD_STRING, 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_buffer[4] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"},
|
|
|
|
{ACPI_EXD_BUFFER, 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_package[5] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"},
|
|
|
|
{ACPI_EXD_PACKAGE, 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_device[4] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.system_notify),
|
|
|
|
"System Notify"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.device_notify),
|
|
|
|
"Device Notify"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_event[2] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_event), NULL},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.semaphore), "Semaphore"}
|
|
|
|
};
|
|
|
|
|
2005-11-18 02:07:00 +08:00
|
|
|
static struct acpi_exdump_info acpi_ex_dump_method[8] = {
|
2005-11-02 13:00:00 +08:00
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "param_count"},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"},
|
2005-11-18 02:07:00 +08:00
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"},
|
2005-11-02 13:00:00 +08:00
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_mutex[5] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_mutex), NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(mutex.sync_level), "Sync Level"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.owner_thread), "Owner Thread"},
|
|
|
|
{ACPI_EXD_UINT16, ACPI_EXD_OFFSET(mutex.acquisition_depth),
|
|
|
|
"Acquire Depth"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.semaphore), "Semaphore"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_region[7] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"},
|
|
|
|
{ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.handler), "Handler"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_power[5] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level),
|
|
|
|
"System Level"},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.resource_order),
|
|
|
|
"Resource Order"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.system_notify),
|
|
|
|
"System Notify"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.device_notify),
|
|
|
|
"Device Notify"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_processor[7] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_processor), NULL},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.length), "Length"},
|
|
|
|
{ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.system_notify),
|
|
|
|
"System Notify"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.device_notify),
|
|
|
|
"Device Notify"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.handler), "Handler"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_thermal[4] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_thermal), NULL},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.system_notify),
|
|
|
|
"System Notify"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.device_notify),
|
|
|
|
"Device Notify"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.handler), "Handler"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_buffer_field[3] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer_field), NULL},
|
|
|
|
{ACPI_EXD_FIELD, 0, NULL},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer_field.buffer_obj),
|
|
|
|
"Buffer Object"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_region_field[3] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region_field), NULL},
|
|
|
|
{ACPI_EXD_FIELD, 0, NULL},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_bank_field[5] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL},
|
|
|
|
{ACPI_EXD_FIELD, 0, NULL},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(bank_field.value), "Value"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.region_obj),
|
|
|
|
"Region Object"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.bank_obj), "Bank Object"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_index_field[5] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL},
|
|
|
|
{ACPI_EXD_FIELD, 0, NULL},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(index_field.value), "Value"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.index_obj),
|
|
|
|
"Index Object"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_reference[7] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"},
|
|
|
|
{ACPI_EXD_REFERENCE, 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler),
|
|
|
|
NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.next), "Next"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.region_list),
|
|
|
|
"Region List"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.node), "Node"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_notify[3] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Miscellaneous tables */
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_common[4] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL},
|
|
|
|
{ACPI_EXD_TYPE, 0, NULL},
|
|
|
|
{ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count),
|
|
|
|
"Reference Count"},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_field_common), NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.field_flags),
|
|
|
|
"Field Flags"},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.access_byte_width),
|
|
|
|
"Access Byte Width"},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.bit_length),
|
|
|
|
"Bit Length"},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.start_field_bit_offset),
|
|
|
|
"Field Bit Offset"},
|
|
|
|
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset),
|
|
|
|
"Base Byte Offset"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct acpi_exdump_info acpi_ex_dump_node[6] = {
|
|
|
|
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"},
|
|
|
|
{ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"},
|
|
|
|
{ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(reference_count),
|
|
|
|
"Reference Count"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"},
|
|
|
|
{ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Dispatch table, indexed by object type */
|
|
|
|
|
|
|
|
static struct acpi_exdump_info *acpi_ex_dump_info[] = {
|
|
|
|
NULL,
|
|
|
|
acpi_ex_dump_integer,
|
|
|
|
acpi_ex_dump_string,
|
|
|
|
acpi_ex_dump_buffer,
|
|
|
|
acpi_ex_dump_package,
|
|
|
|
NULL,
|
|
|
|
acpi_ex_dump_device,
|
|
|
|
acpi_ex_dump_event,
|
|
|
|
acpi_ex_dump_method,
|
|
|
|
acpi_ex_dump_mutex,
|
|
|
|
acpi_ex_dump_region,
|
|
|
|
acpi_ex_dump_power,
|
|
|
|
acpi_ex_dump_processor,
|
|
|
|
acpi_ex_dump_thermal,
|
|
|
|
acpi_ex_dump_buffer_field,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
acpi_ex_dump_region_field,
|
|
|
|
acpi_ex_dump_bank_field,
|
|
|
|
acpi_ex_dump_index_field,
|
|
|
|
acpi_ex_dump_reference,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
acpi_ex_dump_notify,
|
|
|
|
acpi_ex_dump_address_handler,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ex_dump_object
|
|
|
|
*
|
|
|
|
* PARAMETERS: obj_desc - Descriptor to dump
|
|
|
|
* Info - Info table corresponding to this object
|
|
|
|
* type
|
|
|
|
*
|
|
|
|
* RETURN: None
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Walk the info table for this object
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
static void
|
|
|
|
acpi_ex_dump_object(union acpi_operand_object *obj_desc,
|
|
|
|
struct acpi_exdump_info *info)
|
|
|
|
{
|
|
|
|
u8 *target;
|
|
|
|
char *name;
|
|
|
|
u8 count;
|
|
|
|
|
|
|
|
if (!info) {
|
|
|
|
acpi_os_printf
|
|
|
|
("ex_dump_object: Display not implemented for object type %s\n",
|
|
|
|
acpi_ut_get_object_type_name(obj_desc));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* First table entry must contain the table length (# of table entries) */
|
|
|
|
|
|
|
|
count = info->offset;
|
|
|
|
|
|
|
|
while (count) {
|
2005-11-18 02:07:00 +08:00
|
|
|
target = ACPI_ADD_PTR(u8, obj_desc, info->offset);
|
2005-11-02 13:00:00 +08:00
|
|
|
name = info->name;
|
|
|
|
|
|
|
|
switch (info->opcode) {
|
|
|
|
case ACPI_EXD_INIT:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_TYPE:
|
|
|
|
acpi_ex_out_string("Type",
|
|
|
|
acpi_ut_get_object_type_name
|
|
|
|
(obj_desc));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_UINT8:
|
|
|
|
|
|
|
|
acpi_os_printf("%20s : %2.2X\n", name, *target);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_UINT16:
|
|
|
|
|
|
|
|
acpi_os_printf("%20s : %4.4X\n", name,
|
2005-11-18 02:07:00 +08:00
|
|
|
ACPI_GET16(target));
|
2005-11-02 13:00:00 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_UINT32:
|
|
|
|
|
|
|
|
acpi_os_printf("%20s : %8.8X\n", name,
|
2005-11-18 02:07:00 +08:00
|
|
|
ACPI_GET32(target));
|
2005-11-02 13:00:00 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_UINT64:
|
|
|
|
|
|
|
|
acpi_os_printf("%20s : %8.8X%8.8X\n", "Value",
|
2005-11-18 02:07:00 +08:00
|
|
|
ACPI_FORMAT_UINT64(ACPI_GET64(target)));
|
2005-11-02 13:00:00 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_POINTER:
|
|
|
|
|
|
|
|
acpi_ex_out_pointer(name,
|
|
|
|
*ACPI_CAST_PTR(void *, target));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_ADDRESS:
|
|
|
|
|
|
|
|
acpi_ex_out_address(name,
|
|
|
|
*ACPI_CAST_PTR
|
|
|
|
(acpi_physical_address, target));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_STRING:
|
|
|
|
|
|
|
|
acpi_ut_print_string(obj_desc->string.pointer,
|
|
|
|
ACPI_UINT8_MAX);
|
|
|
|
acpi_os_printf("\n");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_BUFFER:
|
|
|
|
|
|
|
|
ACPI_DUMP_BUFFER(obj_desc->buffer.pointer,
|
|
|
|
obj_desc->buffer.length);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_PACKAGE:
|
|
|
|
|
|
|
|
/* Dump the package contents */
|
|
|
|
|
|
|
|
acpi_os_printf("\nPackage Contents:\n");
|
|
|
|
acpi_ex_dump_package_obj(obj_desc, 0, 0);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_FIELD:
|
|
|
|
|
|
|
|
acpi_ex_dump_object(obj_desc,
|
|
|
|
acpi_ex_dump_field_common);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_EXD_REFERENCE:
|
|
|
|
|
|
|
|
acpi_ex_out_string("Opcode",
|
|
|
|
(acpi_ps_get_opcode_info
|
|
|
|
(obj_desc->reference.opcode))->
|
|
|
|
name);
|
|
|
|
acpi_ex_dump_reference_obj(obj_desc);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
acpi_os_printf("**** Invalid table opcode [%X] ****\n",
|
|
|
|
info->opcode);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
info++;
|
|
|
|
count--;
|
|
|
|
}
|
|
|
|
}
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/*******************************************************************************
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ex_dump_operand
|
|
|
|
*
|
2005-04-19 10:49:35 +08:00
|
|
|
* PARAMETERS: *obj_desc - Pointer to entry to be dumped
|
|
|
|
* Depth - Current nesting depth
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* RETURN: None
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Dump an operand object
|
|
|
|
*
|
2005-04-19 10:49:35 +08:00
|
|
|
******************************************************************************/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2005-08-05 12:44:28 +08:00
|
|
|
u32 length;
|
|
|
|
u32 index;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_FUNCTION_NAME("ex_dump_operand")
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
if (!
|
|
|
|
((ACPI_LV_EXEC & acpi_dbg_level)
|
|
|
|
&& (_COMPONENT & acpi_dbg_layer))) {
|
2005-04-17 06:20:36 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!obj_desc) {
|
2006-10-02 12:00:00 +08:00
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/* This could be a null element of a package */
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Null Object Descriptor\n"));
|
2005-04-17 06:20:36 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) {
|
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p Namespace Node: ",
|
|
|
|
obj_desc));
|
|
|
|
ACPI_DUMP_ENTRY(obj_desc, ACPI_LV_EXEC);
|
2005-04-17 06:20:36 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) {
|
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
|
|
|
|
"%p is not a node or operand object: [%s]\n",
|
|
|
|
obj_desc,
|
|
|
|
acpi_ut_get_descriptor_name(obj_desc)));
|
|
|
|
ACPI_DUMP_BUFFER(obj_desc, sizeof(union acpi_operand_object));
|
2005-04-17 06:20:36 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* obj_desc is a valid object */
|
|
|
|
|
|
|
|
if (depth > 0) {
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%*s[%u] %p ",
|
|
|
|
depth, " ", depth, obj_desc));
|
|
|
|
} else {
|
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p ", obj_desc));
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/* Decode object type */
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
|
2005-04-17 06:20:36 +08:00
|
|
|
case ACPI_TYPE_LOCAL_REFERENCE:
|
|
|
|
|
|
|
|
switch (obj_desc->reference.opcode) {
|
|
|
|
case AML_DEBUG_OP:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Reference: Debug\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_NAME_OP:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_DUMP_PATHNAME(obj_desc->reference.object,
|
|
|
|
"Reference: Name: ", ACPI_LV_INFO,
|
|
|
|
_COMPONENT);
|
|
|
|
ACPI_DUMP_ENTRY(obj_desc->reference.object,
|
|
|
|
ACPI_LV_INFO);
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_INDEX_OP:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Reference: Index %p\n",
|
|
|
|
obj_desc->reference.object);
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_REF_OF_OP:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Reference: (ref_of) %p\n",
|
|
|
|
obj_desc->reference.object);
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_ARG_OP:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Reference: Arg%d",
|
|
|
|
obj_desc->reference.offset);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
|
2006-10-02 12:00:00 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* Value is an Integer */
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf(" value is [%8.8X%8.8x]",
|
|
|
|
ACPI_FORMAT_UINT64(obj_desc->
|
|
|
|
integer.
|
|
|
|
value));
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_LOCAL_OP:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Reference: Local%d",
|
|
|
|
obj_desc->reference.offset);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Value is an Integer */
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf(" value is [%8.8X%8.8x]",
|
|
|
|
ACPI_FORMAT_UINT64(obj_desc->
|
|
|
|
integer.
|
|
|
|
value));
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_INT_NAMEPATH_OP:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Reference.Node->Name %X\n",
|
|
|
|
obj_desc->reference.node->name.integer);
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
/* Unknown opcode */
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Unknown Reference opcode=%X\n",
|
|
|
|
obj_desc->reference.opcode);
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_BUFFER:
|
|
|
|
|
[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-10-01 07:03:00 +08:00
|
|
|
acpi_os_printf("Buffer len %X @ %p\n",
|
2005-08-05 12:44:28 +08:00
|
|
|
obj_desc->buffer.length,
|
|
|
|
obj_desc->buffer.pointer);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
length = obj_desc->buffer.length;
|
|
|
|
if (length > 64) {
|
|
|
|
length = 64;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Debug only -- dump the buffer contents */
|
|
|
|
|
|
|
|
if (obj_desc->buffer.pointer) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Buffer Contents: ");
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
for (index = 0; index < length; index++) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf(" %02x",
|
|
|
|
obj_desc->buffer.pointer[index]);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_INTEGER:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Integer %8.8X%8.8X\n",
|
|
|
|
ACPI_FORMAT_UINT64(obj_desc->integer.value));
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_PACKAGE:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Package [Len %X] element_array %p\n",
|
|
|
|
obj_desc->package.count,
|
|
|
|
obj_desc->package.elements);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If elements exist, package element pointer is valid,
|
|
|
|
* and debug_level exceeds 1, dump package's elements.
|
|
|
|
*/
|
|
|
|
if (obj_desc->package.count &&
|
2005-08-05 12:44:28 +08:00
|
|
|
obj_desc->package.elements && acpi_dbg_level > 1) {
|
|
|
|
for (index = 0; index < obj_desc->package.count;
|
|
|
|
index++) {
|
|
|
|
acpi_ex_dump_operand(obj_desc->package.
|
|
|
|
elements[index],
|
|
|
|
depth + 1);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_REGION:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Region %s (%X)",
|
|
|
|
acpi_ut_get_region_name(obj_desc->region.
|
|
|
|
space_id),
|
|
|
|
obj_desc->region.space_id);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If the address and length have not been evaluated,
|
|
|
|
* don't print them.
|
|
|
|
*/
|
|
|
|
if (!(obj_desc->region.flags & AOPOBJ_DATA_VALID)) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("\n");
|
|
|
|
} else {
|
|
|
|
acpi_os_printf(" base %8.8X%8.8X Length %X\n",
|
|
|
|
ACPI_FORMAT_UINT64(obj_desc->region.
|
|
|
|
address),
|
|
|
|
obj_desc->region.length);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_STRING:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("String length %X @ %p ",
|
|
|
|
obj_desc->string.length,
|
|
|
|
obj_desc->string.pointer);
|
2005-04-19 10:49:35 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX);
|
|
|
|
acpi_os_printf("\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("bank_field\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf
|
|
|
|
("region_field: Bits=%X acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n",
|
|
|
|
obj_desc->field.bit_length,
|
|
|
|
obj_desc->field.access_byte_width,
|
|
|
|
obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK,
|
|
|
|
obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK,
|
|
|
|
obj_desc->field.base_byte_offset,
|
|
|
|
obj_desc->field.start_field_bit_offset);
|
2005-04-19 10:49:35 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_ex_dump_operand(obj_desc->field.region_obj, depth + 1);
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("index_field\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_BUFFER_FIELD:
|
|
|
|
|
[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-10-01 07:03:00 +08:00
|
|
|
acpi_os_printf("buffer_field: %X bits at byte %X bit %X of\n",
|
2005-08-05 12:44:28 +08:00
|
|
|
obj_desc->buffer_field.bit_length,
|
|
|
|
obj_desc->buffer_field.base_byte_offset,
|
|
|
|
obj_desc->buffer_field.start_field_bit_offset);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
if (!obj_desc->buffer_field.buffer_obj) {
|
[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-10-01 07:03:00 +08:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n"));
|
2005-08-05 12:44:28 +08:00
|
|
|
} else
|
|
|
|
if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj)
|
|
|
|
!= ACPI_TYPE_BUFFER) {
|
[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-10-01 07:03:00 +08:00
|
|
|
acpi_os_printf("*not a Buffer*\n");
|
2005-08-05 12:44:28 +08:00
|
|
|
} else {
|
|
|
|
acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj,
|
|
|
|
depth + 1);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_EVENT:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Event\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_METHOD:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Method(%X) @ %p:%X\n",
|
|
|
|
obj_desc->method.param_count,
|
|
|
|
obj_desc->method.aml_start,
|
|
|
|
obj_desc->method.aml_length);
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_MUTEX:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Mutex\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_DEVICE:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Device\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_POWER:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Power\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_PROCESSOR:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Processor\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_THERMAL:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Thermal\n");
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
/* Unknown Type */
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Unknown Type %X\n",
|
|
|
|
ACPI_GET_OBJECT_TYPE(obj_desc));
|
2005-04-17 06:20:36 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/*******************************************************************************
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ex_dump_operands
|
|
|
|
*
|
|
|
|
* PARAMETERS: Operands - Operand list
|
|
|
|
* interpreter_mode - Load or Exec
|
|
|
|
* Ident - Identification
|
|
|
|
* num_levels - # of stack entries to dump above line
|
|
|
|
* Note - Output notation
|
|
|
|
* module_name - Caller's module name
|
|
|
|
* line_number - Caller's invocation line number
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Dump the object stack
|
|
|
|
*
|
2005-04-19 10:49:35 +08:00
|
|
|
******************************************************************************/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
void
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_ex_dump_operands(union acpi_operand_object **operands,
|
|
|
|
acpi_interpreter_mode interpreter_mode,
|
|
|
|
char *ident,
|
|
|
|
u32 num_levels,
|
|
|
|
char *note, char *module_name, u32 line_number)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_native_uint i;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_FUNCTION_NAME("ex_dump_operands");
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
if (!ident) {
|
|
|
|
ident = "?";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!note) {
|
|
|
|
note = "?";
|
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
|
|
|
|
"************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
|
|
|
|
ident, num_levels));
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
if (num_levels == 0) {
|
|
|
|
num_levels = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Dump the operand stack starting at the top */
|
|
|
|
|
|
|
|
for (i = 0; num_levels > 0; i--, num_levels--) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_ex_dump_operand(operands[i], 0);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
|
|
|
|
"************* Operand Stack dump from %s(%d), %s\n",
|
|
|
|
module_name, line_number, note));
|
2005-04-17 06:20:36 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/*******************************************************************************
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2005-04-19 10:49:35 +08:00
|
|
|
* FUNCTION: acpi_ex_out* functions
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* PARAMETERS: Title - Descriptive text
|
|
|
|
* Value - Value to be displayed
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Object dump output formatting functions. These functions
|
|
|
|
* reduce the number of format strings required and keeps them
|
|
|
|
* all in one place for easy modification.
|
|
|
|
*
|
2005-04-19 10:49:35 +08:00
|
|
|
******************************************************************************/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
static void acpi_ex_out_string(char *title, char *value)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("%20s : %s\n", title, value);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
static void acpi_ex_out_pointer(char *title, void *value)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("%20s : %p\n", title, value);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
static void acpi_ex_out_address(char *title, acpi_physical_address value)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
|
|
|
|
|
|
|
#if ACPI_MACHINE_WIDTH == 16
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("%20s : %p\n", title, value);
|
2005-04-17 06:20:36 +08:00
|
|
|
#else
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64(value));
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/*******************************************************************************
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2005-11-02 13:00:00 +08:00
|
|
|
* FUNCTION: acpi_ex_dump_namespace_node
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2005-11-02 13:00:00 +08:00
|
|
|
* PARAMETERS: Node - Descriptor to dump
|
2005-04-19 10:49:35 +08:00
|
|
|
* Flags - Force display if TRUE
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* DESCRIPTION: Dumps the members of the given.Node
|
|
|
|
*
|
2005-04-19 10:49:35 +08:00
|
|
|
******************************************************************************/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_FUNCTION_ENTRY();
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
if (!flags) {
|
2005-08-05 12:44:28 +08:00
|
|
|
if (!
|
|
|
|
((ACPI_LV_OBJECTS & acpi_dbg_level)
|
|
|
|
&& (_COMPONENT & acpi_dbg_layer))) {
|
2005-04-17 06:20:36 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node));
|
|
|
|
acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type));
|
|
|
|
acpi_ex_out_pointer("Attached Object",
|
|
|
|
acpi_ns_get_attached_object(node));
|
|
|
|
acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node));
|
2005-11-02 13:00:00 +08:00
|
|
|
|
|
|
|
acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node),
|
|
|
|
acpi_ex_dump_node);
|
2005-04-17 06:20:36 +08: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-24 12:00:00 +08:00
|
|
|
/*******************************************************************************
|
|
|
|
*
|
2005-11-02 13:00:00 +08:00
|
|
|
* FUNCTION: acpi_ex_dump_reference_obj
|
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-24 12:00:00 +08:00
|
|
|
*
|
|
|
|
* PARAMETERS: Object - Descriptor to dump
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Dumps a reference object
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc)
|
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-24 12:00:00 +08:00
|
|
|
{
|
2005-08-05 12:44:28 +08:00
|
|
|
struct acpi_buffer ret_buf;
|
|
|
|
acpi_status 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-24 12:00:00 +08:00
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER;
|
|
|
|
|
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-24 12:00:00 +08:00
|
|
|
if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("Named Object %p ", obj_desc->reference.node);
|
2005-11-02 13:00:00 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
status =
|
|
|
|
acpi_ns_handle_to_pathname(obj_desc->reference.node,
|
|
|
|
&ret_buf);
|
|
|
|
if (ACPI_FAILURE(status)) {
|
|
|
|
acpi_os_printf("Could not convert name to pathname\n");
|
|
|
|
} else {
|
|
|
|
acpi_os_printf("%s\n", (char *)ret_buf.pointer);
|
|
|
|
ACPI_MEM_FREE(ret_buf.pointer);
|
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-24 12:00:00 +08:00
|
|
|
}
|
2005-08-05 12:44:28 +08:00
|
|
|
} else if (obj_desc->reference.object) {
|
|
|
|
acpi_os_printf("\nReferenced Object: %p\n",
|
|
|
|
obj_desc->reference.object);
|
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-24 12:00:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
*
|
2005-11-02 13:00:00 +08:00
|
|
|
* FUNCTION: acpi_ex_dump_package_obj
|
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-24 12:00:00 +08:00
|
|
|
*
|
2005-11-02 13:00:00 +08:00
|
|
|
* PARAMETERS: obj_desc - Descriptor to dump
|
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-24 12:00:00 +08:00
|
|
|
* Level - Indentation Level
|
|
|
|
* Index - Package index for this object
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Dumps the elements of the package
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
static void
|
2005-11-02 13:00:00 +08:00
|
|
|
acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,
|
|
|
|
u32 level, u32 index)
|
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-24 12:00:00 +08:00
|
|
|
{
|
2005-08-05 12:44:28 +08:00
|
|
|
u32 i;
|
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-24 12:00:00 +08:00
|
|
|
|
|
|
|
/* Indentation and index output */
|
|
|
|
|
|
|
|
if (level > 0) {
|
|
|
|
for (i = 0; i < level; i++) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf(" ");
|
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-24 12:00:00 +08:00
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("[%.2d] ", index);
|
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-24 12:00:00 +08:00
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("%p ", obj_desc);
|
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-24 12:00:00 +08:00
|
|
|
|
|
|
|
/* Null package elements are allowed */
|
|
|
|
|
|
|
|
if (!obj_desc) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("[Null Object]\n");
|
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-24 12:00:00 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Packages may only contain a few object types */
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
|
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-24 12:00:00 +08:00
|
|
|
case ACPI_TYPE_INTEGER:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("[Integer] = %8.8X%8.8X\n",
|
|
|
|
ACPI_FORMAT_UINT64(obj_desc->integer.value));
|
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-24 12:00:00 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_STRING:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("[String] Value: ");
|
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-24 12:00:00 +08:00
|
|
|
for (i = 0; i < obj_desc->string.length; i++) {
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("%c", obj_desc->string.pointer[i]);
|
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-24 12:00:00 +08:00
|
|
|
}
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("\n");
|
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-24 12:00:00 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_BUFFER:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("[Buffer] Length %.2X = ",
|
|
|
|
obj_desc->buffer.length);
|
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-24 12:00:00 +08:00
|
|
|
if (obj_desc->buffer.length) {
|
2005-11-18 02:07:00 +08:00
|
|
|
acpi_ut_dump_buffer(ACPI_CAST_PTR
|
|
|
|
(u8, obj_desc->buffer.pointer),
|
2005-08-05 12:44:28 +08:00
|
|
|
obj_desc->buffer.length,
|
|
|
|
DB_DWORD_DISPLAY, _COMPONENT);
|
|
|
|
} else {
|
|
|
|
acpi_os_printf("\n");
|
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-24 12:00:00 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_PACKAGE:
|
|
|
|
|
[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-10-01 07:03:00 +08:00
|
|
|
acpi_os_printf("[Package] Contains %d Elements:\n",
|
2005-08-05 12:44:28 +08:00
|
|
|
obj_desc->package.count);
|
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-24 12:00:00 +08:00
|
|
|
|
|
|
|
for (i = 0; i < obj_desc->package.count; i++) {
|
2005-11-02 13:00:00 +08:00
|
|
|
acpi_ex_dump_package_obj(obj_desc->package.elements[i],
|
|
|
|
level + 1, i);
|
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-24 12:00:00 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_REFERENCE:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("[Object Reference] ");
|
2005-11-02 13:00:00 +08:00
|
|
|
acpi_ex_dump_reference_obj(obj_desc);
|
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-24 12:00:00 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("[Unknown Type] %X\n",
|
|
|
|
ACPI_GET_OBJECT_TYPE(obj_desc));
|
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-24 12:00:00 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/*******************************************************************************
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ex_dump_object_descriptor
|
|
|
|
*
|
2005-11-02 13:00:00 +08:00
|
|
|
* PARAMETERS: obj_desc - Descriptor to dump
|
2005-04-19 10:49:35 +08:00
|
|
|
* Flags - Force display if TRUE
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* DESCRIPTION: Dumps the members of the object descriptor given.
|
|
|
|
*
|
2005-04-19 10:49:35 +08:00
|
|
|
******************************************************************************/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
void
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2005-08-05 12:44:28 +08:00
|
|
|
ACPI_FUNCTION_TRACE("ex_dump_object_descriptor");
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
if (!obj_desc) {
|
|
|
|
return_VOID;
|
|
|
|
}
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
if (!flags) {
|
2005-08-05 12:44:28 +08:00
|
|
|
if (!
|
|
|
|
((ACPI_LV_OBJECTS & acpi_dbg_level)
|
|
|
|
&& (_COMPONENT & acpi_dbg_layer))) {
|
2005-04-17 06:20:36 +08:00
|
|
|
return_VOID;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) {
|
2005-11-02 13:00:00 +08:00
|
|
|
acpi_ex_dump_namespace_node((struct acpi_namespace_node *)
|
|
|
|
obj_desc, flags);
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_os_printf("\nAttached Object (%p):\n",
|
|
|
|
((struct acpi_namespace_node *)obj_desc)->
|
|
|
|
object);
|
2005-11-02 13:00:00 +08:00
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *)
|
|
|
|
obj_desc)->object, flags);
|
2005-04-17 06:20:36 +08:00
|
|
|
return_VOID;
|
|
|
|
}
|
|
|
|
|
2005-08-05 12:44:28 +08:00
|
|
|
if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) {
|
|
|
|
acpi_os_printf
|
|
|
|
("ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n",
|
|
|
|
obj_desc, acpi_ut_get_descriptor_name(obj_desc));
|
2005-04-17 06:20:36 +08:00
|
|
|
return_VOID;
|
|
|
|
}
|
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
if (obj_desc->common.type > ACPI_TYPE_NS_NODE_MAX) {
|
|
|
|
return_VOID;
|
|
|
|
}
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
/* Common Fields */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
acpi_ex_dump_object(obj_desc, acpi_ex_dump_common);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
/* Object-specific fields */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-11-02 13:00:00 +08:00
|
|
|
acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]);
|
2005-04-17 06:20:36 +08:00
|
|
|
return_VOID;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|