2018-03-14 16:13:07 -07:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
|
2005-04-16 15:20:36 -07:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Module Name: nsdump - table dumping routines for debug
|
|
|
|
*
|
2023-04-05 06:38:21 -07:00
|
|
|
* Copyright (C) 2000 - 2023, Intel Corp.
|
2005-04-16 15:20:36 -07:00
|
|
|
*
|
2018-03-14 16:13:07 -07:00
|
|
|
*****************************************************************************/
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
#include <acpi/acpi.h>
|
2009-01-08 22:30:03 -07:00
|
|
|
#include "accommon.h"
|
|
|
|
#include "acnamesp.h"
|
2012-12-30 17:06:50 -07:00
|
|
|
#include <acpi/acoutput.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
#define _COMPONENT ACPI_NAMESPACE
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_MODULE_NAME("nsdump")
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-04-18 19:49:35 -07:00
|
|
|
/* Local prototypes */
|
|
|
|
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
2005-08-04 21:44:28 -07:00
|
|
|
void acpi_ns_dump_root_devices(void);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-04-18 19:49:35 -07:00
|
|
|
static acpi_status
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_ns_dump_one_device(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value);
|
2005-04-18 19:49:35 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
2013-09-22 18:52:19 -07:00
|
|
|
|
|
|
|
static acpi_status
|
|
|
|
acpi_ns_dump_one_object_path(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value);
|
|
|
|
|
|
|
|
static acpi_status
|
|
|
|
acpi_ns_get_max_depth(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value);
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_print_pathname
|
|
|
|
*
|
2005-04-18 19:49:35 -07:00
|
|
|
* PARAMETERS: num_segments - Number of ACPI name segments
|
2012-07-11 18:40:10 -07:00
|
|
|
* pathname - The compressed (internal) path
|
2005-04-16 15:20:36 -07:00
|
|
|
*
|
2005-04-18 19:49:35 -07:00
|
|
|
* RETURN: None
|
|
|
|
*
|
2005-04-16 15:20:36 -07:00
|
|
|
* DESCRIPTION: Print an object's full namespace pathname
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2016-03-23 18:40:40 -07:00
|
|
|
void acpi_ns_print_pathname(u32 num_segments, const char *pathname)
|
2005-04-16 15:20:36 -07:00
|
|
|
{
|
2008-06-09 22:42:13 -07:00
|
|
|
u32 i;
|
2005-07-29 15:15:00 -07:00
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 14:15:00 -07:00
|
|
|
ACPI_FUNCTION_NAME(ns_print_pathname);
|
2005-07-29 15:15:00 -07:00
|
|
|
|
2012-12-30 17:06:27 -07:00
|
|
|
/* Check if debug output enabled */
|
|
|
|
|
|
|
|
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_NAMES, ACPI_NAMESPACE)) {
|
2005-04-16 15:20:36 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Print the entire name */
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "["));
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
while (num_segments) {
|
2005-07-29 15:15:00 -07:00
|
|
|
for (i = 0; i < 4; i++) {
|
2015-06-30 23:45:11 -07:00
|
|
|
isprint((int)pathname[i]) ?
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("%c", pathname[i]) :
|
|
|
|
acpi_os_printf("?");
|
2005-07-29 15:15:00 -07:00
|
|
|
}
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-04-08 13:42:25 -07:00
|
|
|
pathname += ACPI_NAMESEG_SIZE;
|
2005-04-16 15:20:36 -07:00
|
|
|
num_segments--;
|
|
|
|
if (num_segments) {
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf(".");
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("]\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
|
2016-03-23 18:40:40 -07:00
|
|
|
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
|
|
|
/* Not used at this time, perhaps later */
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_dump_pathname
|
|
|
|
*
|
2012-07-11 18:40:10 -07:00
|
|
|
* PARAMETERS: handle - Object
|
|
|
|
* msg - Prefix message
|
|
|
|
* level - Desired debug level
|
|
|
|
* component - Caller's component ID
|
2005-04-16 15:20:36 -07:00
|
|
|
*
|
2005-04-18 19:49:35 -07:00
|
|
|
* RETURN: None
|
|
|
|
*
|
2005-04-16 15:20:36 -07:00
|
|
|
* DESCRIPTION: Print an object's full namespace pathname
|
|
|
|
* Manages allocation/freeing of a pathname buffer
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void
|
2016-03-23 18:40:40 -07:00
|
|
|
acpi_ns_dump_pathname(acpi_handle handle,
|
|
|
|
const char *msg, u32 level, u32 component)
|
2005-04-16 15:20:36 -07:00
|
|
|
{
|
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 14:15:00 -07:00
|
|
|
ACPI_FUNCTION_TRACE(ns_dump_pathname);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
/* Do this only if the requested debug level and component are enabled */
|
|
|
|
|
2012-12-30 17:06:27 -07:00
|
|
|
if (!ACPI_IS_DEBUG_ENABLED(level, component)) {
|
2005-04-16 15:20:36 -07:00
|
|
|
return_VOID;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert handle to a full pathname and print it (with supplied message) */
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_ns_print_node_pathname(handle, msg);
|
|
|
|
acpi_os_printf("\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
return_VOID;
|
|
|
|
}
|
2016-03-23 18:40:40 -07:00
|
|
|
#endif
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_dump_one_object
|
|
|
|
*
|
2005-04-18 19:49:35 -07:00
|
|
|
* PARAMETERS: obj_handle - Node to be dumped
|
2012-07-11 18:40:10 -07:00
|
|
|
* level - Nesting level of the handle
|
|
|
|
* context - Passed into walk_namespace
|
2005-04-18 19:49:35 -07:00
|
|
|
* return_value - Not used
|
|
|
|
*
|
|
|
|
* RETURN: Status
|
2005-04-16 15:20:36 -07:00
|
|
|
*
|
|
|
|
* DESCRIPTION: Dump a single Node
|
|
|
|
* This procedure is a user_function called by acpi_ns_walk_namespace.
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
acpi_status
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_ns_dump_one_object(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value)
|
2005-04-16 15:20:36 -07:00
|
|
|
{
|
2005-08-04 21:44:28 -07:00
|
|
|
struct acpi_walk_info *info = (struct acpi_walk_info *)context;
|
|
|
|
struct acpi_namespace_node *this_node;
|
|
|
|
union acpi_operand_object *obj_desc = NULL;
|
|
|
|
acpi_object_type obj_type;
|
|
|
|
acpi_object_type type;
|
|
|
|
u32 bytes_to_dump;
|
|
|
|
u32 dbg_level;
|
|
|
|
u32 i;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 14:15:00 -07:00
|
|
|
ACPI_FUNCTION_NAME(ns_dump_one_object);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
/* Is output enabled? */
|
|
|
|
|
|
|
|
if (!(acpi_dbg_level & info->debug_level)) {
|
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!obj_handle) {
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Null object handle\n"));
|
2005-04-16 15:20:36 -07:00
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
2009-12-10 23:57:00 -07:00
|
|
|
this_node = acpi_ns_validate_handle(obj_handle);
|
2009-02-02 23:17:29 -07:00
|
|
|
if (!this_node) {
|
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid object handle %p\n",
|
|
|
|
obj_handle));
|
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
type = this_node->type;
|
2018-06-01 12:06:40 -07:00
|
|
|
info->count++;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
/* Check if the owner matches */
|
|
|
|
|
2005-07-07 21:00:00 -07:00
|
|
|
if ((info->owner_id != ACPI_OWNER_ID_MAX) &&
|
2005-08-04 21:44:28 -07:00
|
|
|
(info->owner_id != this_node->owner_id)) {
|
2005-04-16 15:20:36 -07:00
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 21:00:00 -07:00
|
|
|
if (!(info->display_type & ACPI_DISPLAY_SHORT)) {
|
2006-10-01 21:00:00 -07:00
|
|
|
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 21:00:00 -07:00
|
|
|
/* Indent the object according to the level */
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("%2d%*s", (u32) level - 1, (int)level * 2, " ");
|
2005-04-16 15:20:36 -07:00
|
|
|
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 21:00:00 -07:00
|
|
|
/* Check the node type and name */
|
2005-04-16 15:20:36 -07:00
|
|
|
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 21:00:00 -07:00
|
|
|
if (type > ACPI_TYPE_LOCAL_MAX) {
|
2010-03-05 02:56:40 -07:00
|
|
|
ACPI_WARNING((AE_INFO,
|
|
|
|
"Invalid ACPI Object Type 0x%08X", type));
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 21:00:00 -07:00
|
|
|
}
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node));
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
|
2009-03-05 19:05:18 -07:00
|
|
|
/* Now we can print out the pertinent information */
|
|
|
|
|
2019-08-16 14:43:21 -07:00
|
|
|
acpi_os_printf(" %-12s %p %3.3X ",
|
2005-12-02 16:27:00 -07:00
|
|
|
acpi_ut_get_type_name(type), this_node,
|
|
|
|
this_node->owner_id);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
dbg_level = acpi_dbg_level;
|
|
|
|
acpi_dbg_level = 0;
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = acpi_ns_get_attached_object(this_node);
|
2005-04-16 15:20:36 -07:00
|
|
|
acpi_dbg_level = dbg_level;
|
|
|
|
|
2007-02-02 09:48:21 -07:00
|
|
|
/* Temp nodes are those nodes created by a control method */
|
|
|
|
|
|
|
|
if (this_node->flags & ANOBJ_TEMPORARY) {
|
|
|
|
acpi_os_printf("(T) ");
|
|
|
|
}
|
|
|
|
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 21:00:00 -07:00
|
|
|
switch (info->display_type & ACPI_DISPLAY_MASK) {
|
2005-04-16 15:20:36 -07:00
|
|
|
case ACPI_DISPLAY_SUMMARY:
|
|
|
|
|
|
|
|
if (!obj_desc) {
|
2006-10-01 21:00:00 -07:00
|
|
|
|
2012-03-20 18:46:47 -07:00
|
|
|
/* No attached object. Some types should always have an object */
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case ACPI_TYPE_INTEGER:
|
|
|
|
case ACPI_TYPE_PACKAGE:
|
|
|
|
case ACPI_TYPE_BUFFER:
|
|
|
|
case ACPI_TYPE_STRING:
|
|
|
|
case ACPI_TYPE_METHOD:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2012-03-20 18:46:47 -07:00
|
|
|
acpi_os_printf("<No attached object>");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2012-03-20 18:46:47 -07:00
|
|
|
break;
|
|
|
|
}
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case ACPI_TYPE_PROCESSOR:
|
|
|
|
|
2015-04-12 20:48:46 -07:00
|
|
|
acpi_os_printf("ID %02X Len %02X Addr %8.8X%8.8X\n",
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc->processor.proc_id,
|
|
|
|
obj_desc->processor.length,
|
2015-04-12 20:48:46 -07:00
|
|
|
ACPI_FORMAT_UINT64(obj_desc->processor.
|
|
|
|
address));
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_DEVICE:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Notify Object: %p\n", obj_desc);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_METHOD:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Args %X Len %.4X Aml %p\n",
|
|
|
|
(u32) obj_desc->method.param_count,
|
|
|
|
obj_desc->method.aml_length,
|
|
|
|
obj_desc->method.aml_start);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_INTEGER:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("= %8.8X%8.8X\n",
|
|
|
|
ACPI_FORMAT_UINT64(obj_desc->integer.
|
|
|
|
value));
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_PACKAGE:
|
|
|
|
|
|
|
|
if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Elements %.2X\n",
|
|
|
|
obj_desc->package.count);
|
|
|
|
} else {
|
|
|
|
acpi_os_printf("[Length not yet evaluated]\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_BUFFER:
|
|
|
|
|
|
|
|
if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Len %.2X",
|
|
|
|
obj_desc->buffer.length);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
/* Dump some of the buffer */
|
|
|
|
|
|
|
|
if (obj_desc->buffer.length > 0) {
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf(" =");
|
|
|
|
for (i = 0;
|
|
|
|
(i < obj_desc->buffer.length
|
|
|
|
&& i < 12); i++) {
|
2019-10-25 14:36:49 -07:00
|
|
|
acpi_os_printf(" %2.2X",
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc->buffer.
|
|
|
|
pointer[i]);
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
}
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("\n");
|
|
|
|
} else {
|
|
|
|
acpi_os_printf("[Length not yet evaluated]\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_STRING:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Len %.2X ", obj_desc->string.length);
|
2016-08-04 01:42:55 -07:00
|
|
|
acpi_ut_print_string(obj_desc->string.pointer, 80);
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_REGION:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("[%s]",
|
|
|
|
acpi_ut_get_region_name(obj_desc->region.
|
|
|
|
space_id));
|
2005-04-16 15:20:36 -07:00
|
|
|
if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
|
2015-04-12 20:48:52 -07:00
|
|
|
ACPI_FORMAT_UINT64(obj_desc->
|
|
|
|
region.
|
|
|
|
address),
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc->region.length);
|
|
|
|
} else {
|
|
|
|
acpi_os_printf
|
|
|
|
(" [Address/Length not yet evaluated]\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_REFERENCE:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("[%s]\n",
|
2008-09-26 20:08:41 -07:00
|
|
|
acpi_ut_get_reference_name(obj_desc));
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_BUFFER_FIELD:
|
|
|
|
|
|
|
|
if (obj_desc->buffer_field.buffer_obj &&
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc->buffer_field.buffer_obj->buffer.node) {
|
|
|
|
acpi_os_printf("Buf [%4.4s]",
|
|
|
|
acpi_ut_get_node_name(obj_desc->
|
|
|
|
buffer_field.
|
|
|
|
buffer_obj->
|
|
|
|
buffer.
|
|
|
|
node));
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Rgn [%4.4s]",
|
|
|
|
acpi_ut_get_node_name(obj_desc->
|
|
|
|
common_field.
|
|
|
|
region_obj->region.
|
|
|
|
node));
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Rgn [%4.4s] Bnk [%4.4s]",
|
|
|
|
acpi_ut_get_node_name(obj_desc->
|
|
|
|
common_field.
|
|
|
|
region_obj->region.
|
|
|
|
node),
|
|
|
|
acpi_ut_get_node_name(obj_desc->
|
|
|
|
bank_field.
|
|
|
|
bank_obj->
|
|
|
|
common_field.
|
|
|
|
node));
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Idx [%4.4s] Dat [%4.4s]",
|
|
|
|
acpi_ut_get_node_name(obj_desc->
|
|
|
|
index_field.
|
|
|
|
index_obj->
|
|
|
|
common_field.node),
|
|
|
|
acpi_ut_get_node_name(obj_desc->
|
|
|
|
index_field.
|
|
|
|
data_obj->
|
|
|
|
common_field.
|
|
|
|
node));
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_ALIAS:
|
|
|
|
case ACPI_TYPE_LOCAL_METHOD_ALIAS:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Target %4.4s (%p)\n",
|
|
|
|
acpi_ut_get_node_name(obj_desc),
|
|
|
|
obj_desc);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Object %p\n", obj_desc);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Common field handling */
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case ACPI_TYPE_BUFFER_FIELD:
|
|
|
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
|
|
|
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
|
|
|
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
|
|
|
|
2019-10-25 14:36:49 -07:00
|
|
|
acpi_os_printf(" Off %.3X Len %.2X Acc %.2X\n",
|
2005-08-04 21:44:28 -07:00
|
|
|
(obj_desc->common_field.
|
|
|
|
base_byte_offset * 8)
|
|
|
|
+
|
|
|
|
obj_desc->common_field.
|
|
|
|
start_field_bit_offset,
|
|
|
|
obj_desc->common_field.bit_length,
|
|
|
|
obj_desc->common_field.
|
|
|
|
access_byte_width);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_DISPLAY_OBJECTS:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("O:%p", obj_desc);
|
2005-04-16 15:20:36 -07:00
|
|
|
if (!obj_desc) {
|
2006-10-01 21:00:00 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
/* No attached object, we are done */
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
2010-05-25 20:47:13 -07:00
|
|
|
acpi_os_printf("(R%u)", obj_desc->common.reference_count);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case ACPI_TYPE_METHOD:
|
|
|
|
|
|
|
|
/* Name is a Method and its AML offset/length are set */
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf(" M:%p-%X\n", obj_desc->method.aml_start,
|
|
|
|
obj_desc->method.aml_length);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_INTEGER:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf(" I:%8.8X8.8%X\n",
|
|
|
|
ACPI_FORMAT_UINT64(obj_desc->integer.
|
|
|
|
value));
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_STRING:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf(" S:%p-%X\n", obj_desc->string.pointer,
|
|
|
|
obj_desc->string.length);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_BUFFER:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf(" B:%p-%X\n", obj_desc->buffer.pointer,
|
|
|
|
obj_desc->buffer.length);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If debug turned off, done */
|
|
|
|
|
|
|
|
if (!(acpi_dbg_level & ACPI_LV_VALUES)) {
|
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If there is an attached object, display it */
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
dbg_level = acpi_dbg_level;
|
2005-04-16 15:20:36 -07:00
|
|
|
acpi_dbg_level = 0;
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = acpi_ns_get_attached_object(this_node);
|
2005-04-16 15:20:36 -07:00
|
|
|
acpi_dbg_level = dbg_level;
|
|
|
|
|
|
|
|
/* Dump attached objects */
|
|
|
|
|
|
|
|
while (obj_desc) {
|
|
|
|
obj_type = ACPI_TYPE_INVALID;
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("Attached Object %p: ", obj_desc);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
/* Decode the type of attached object and dump the contents */
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) {
|
2005-04-16 15:20:36 -07:00
|
|
|
case ACPI_DESC_TYPE_NAMED:
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("(Ptr to Node)\n");
|
|
|
|
bytes_to_dump = sizeof(struct acpi_namespace_node);
|
|
|
|
ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_DESC_TYPE_OPERAND:
|
|
|
|
|
2009-02-17 23:44:03 -07:00
|
|
|
obj_type = obj_desc->common.type;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
if (obj_type > ACPI_TYPE_LOCAL_MAX) {
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf
|
2008-06-09 23:25:05 -07:00
|
|
|
("(Pointer to ACPI Object type %.2X [UNKNOWN])\n",
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_type);
|
2015-12-28 22:54:36 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
bytes_to_dump = 32;
|
2005-08-04 21:44:28 -07:00
|
|
|
} else {
|
|
|
|
acpi_os_printf
|
2008-06-09 23:25:05 -07:00
|
|
|
("(Pointer to ACPI Object type %.2X [%s])\n",
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_type, acpi_ut_get_type_name(obj_type));
|
2015-12-28 22:54:36 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
bytes_to_dump =
|
|
|
|
sizeof(union acpi_operand_object);
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
|
2005-05-12 21:00:00 -07:00
|
|
|
break;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If value is NOT an internal object, we are done */
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) !=
|
|
|
|
ACPI_DESC_TYPE_OPERAND) {
|
2005-04-16 15:20:36 -07:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|
2009-03-05 19:05:18 -07:00
|
|
|
/* Valid object, get the pointer to next level, if any */
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
switch (obj_type) {
|
2005-05-12 21:00:00 -07:00
|
|
|
case ACPI_TYPE_BUFFER:
|
2005-04-16 15:20:36 -07:00
|
|
|
case ACPI_TYPE_STRING:
|
2005-05-12 21:00:00 -07:00
|
|
|
/*
|
|
|
|
* NOTE: takes advantage of common fields between string/buffer
|
|
|
|
*/
|
|
|
|
bytes_to_dump = obj_desc->string.length;
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = (void *)obj_desc->string.pointer;
|
2015-12-28 22:54:36 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("(Buffer/String pointer %p length %X)\n",
|
|
|
|
obj_desc, bytes_to_dump);
|
|
|
|
ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
|
2005-05-12 21:00:00 -07:00
|
|
|
goto cleanup;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
case ACPI_TYPE_BUFFER_FIELD:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc =
|
|
|
|
(union acpi_operand_object *)obj_desc->buffer_field.
|
|
|
|
buffer_obj;
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_PACKAGE:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = (void *)obj_desc->package.elements;
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_METHOD:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = (void *)obj_desc->method.aml_start;
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = (void *)obj_desc->field.region_obj;
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = (void *)obj_desc->bank_field.region_obj;
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
obj_desc = (void *)obj_desc->index_field.index_obj;
|
2005-04-16 15:20:36 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2013-06-07 17:58:14 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-10-28 18:30:02 -07:00
|
|
|
cleanup:
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_os_printf("\n");
|
2005-04-16 15:20:36 -07:00
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_dump_objects
|
|
|
|
*
|
2012-07-11 18:40:10 -07:00
|
|
|
* PARAMETERS: type - Object type to be dumped
|
2005-04-18 19:49:35 -07:00
|
|
|
* display_type - 0 or ACPI_DISPLAY_SUMMARY
|
2005-04-16 15:20:36 -07:00
|
|
|
* max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX
|
|
|
|
* for an effectively unlimited depth.
|
2009-03-05 19:05:18 -07:00
|
|
|
* owner_id - Dump only objects owned by this ID. Use
|
2005-04-16 15:20:36 -07:00
|
|
|
* ACPI_UINT32_MAX to match all owners.
|
|
|
|
* start_handle - Where in namespace to start/end search
|
|
|
|
*
|
2005-04-18 19:49:35 -07:00
|
|
|
* RETURN: None
|
|
|
|
*
|
2009-03-05 19:05:18 -07:00
|
|
|
* DESCRIPTION: Dump typed objects within the loaded namespace. Uses
|
|
|
|
* acpi_ns_walk_namespace in conjunction with acpi_ns_dump_one_object.
|
2005-04-16 15:20:36 -07:00
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_ns_dump_objects(acpi_object_type type,
|
|
|
|
u8 display_type,
|
|
|
|
u32 max_depth,
|
|
|
|
acpi_owner_id owner_id, acpi_handle start_handle)
|
2005-04-16 15:20:36 -07:00
|
|
|
{
|
2005-08-04 21:44:28 -07:00
|
|
|
struct acpi_walk_info info;
|
2011-01-11 18:13:31 -07:00
|
|
|
acpi_status status;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_FUNCTION_ENTRY();
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-01-11 18:13:31 -07:00
|
|
|
/*
|
|
|
|
* Just lock the entire namespace for the duration of the dump.
|
|
|
|
* We don't want any changes to the namespace during this time,
|
|
|
|
* especially the temporary nodes since we are going to display
|
|
|
|
* them also.
|
|
|
|
*/
|
|
|
|
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
|
|
|
|
if (ACPI_FAILURE(status)) {
|
|
|
|
acpi_os_printf("Could not acquire namespace mutex\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-06-01 12:06:40 -07:00
|
|
|
info.count = 0;
|
2005-04-16 15:20:36 -07:00
|
|
|
info.debug_level = ACPI_LV_TABLES;
|
|
|
|
info.owner_id = owner_id;
|
|
|
|
info.display_type = display_type;
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
(void)acpi_ns_walk_namespace(type, start_handle, max_depth,
|
2007-02-02 09:48:21 -07:00
|
|
|
ACPI_NS_WALK_NO_UNLOCK |
|
|
|
|
ACPI_NS_WALK_TEMP_NODES,
|
2009-11-12 19:06:08 -07:00
|
|
|
acpi_ns_dump_one_object, NULL,
|
|
|
|
(void *)&info, NULL);
|
2011-01-11 18:13:31 -07:00
|
|
|
|
2018-06-01 12:06:40 -07:00
|
|
|
acpi_os_printf("\nNamespace node count: %u\n\n", info.count);
|
2011-01-11 18:13:31 -07:00
|
|
|
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
|
2013-09-22 18:52:19 -07:00
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_dump_one_object_path, acpi_ns_get_max_depth
|
|
|
|
*
|
|
|
|
* PARAMETERS: obj_handle - Node to be dumped
|
|
|
|
* level - Nesting level of the handle
|
|
|
|
* context - Passed into walk_namespace
|
|
|
|
* return_value - Not used
|
|
|
|
*
|
|
|
|
* RETURN: Status
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Dump the full pathname to a namespace object. acp_ns_get_max_depth
|
|
|
|
* computes the maximum nesting depth in the namespace tree, in
|
|
|
|
* order to simplify formatting in acpi_ns_dump_one_object_path.
|
|
|
|
* These procedures are user_functions called by acpi_ns_walk_namespace.
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
static acpi_status
|
|
|
|
acpi_ns_dump_one_object_path(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value)
|
|
|
|
{
|
|
|
|
u32 max_level = *((u32 *)context);
|
|
|
|
char *pathname;
|
|
|
|
struct acpi_namespace_node *node;
|
|
|
|
int path_indent;
|
|
|
|
|
|
|
|
if (!obj_handle) {
|
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
node = acpi_ns_validate_handle(obj_handle);
|
2013-10-28 18:29:04 -07:00
|
|
|
if (!node) {
|
|
|
|
|
|
|
|
/* Ignore bad node during namespace walk */
|
|
|
|
|
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
2015-12-28 22:53:50 -07:00
|
|
|
pathname = acpi_ns_get_normalized_pathname(node, TRUE);
|
2013-09-22 18:52:19 -07:00
|
|
|
|
|
|
|
path_indent = 1;
|
|
|
|
if (level <= max_level) {
|
|
|
|
path_indent = max_level - level + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
acpi_os_printf("%2d%*s%-12s%*s",
|
|
|
|
level, level, " ", acpi_ut_get_type_name(node->type),
|
|
|
|
path_indent, " ");
|
|
|
|
|
|
|
|
acpi_os_printf("%s\n", &pathname[1]);
|
|
|
|
ACPI_FREE(pathname);
|
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
static acpi_status
|
|
|
|
acpi_ns_get_max_depth(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value)
|
|
|
|
{
|
|
|
|
u32 *max_level = (u32 *)context;
|
|
|
|
|
|
|
|
if (level > *max_level) {
|
|
|
|
*max_level = level;
|
|
|
|
}
|
|
|
|
return (AE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_dump_object_paths
|
|
|
|
*
|
|
|
|
* PARAMETERS: type - Object type to be dumped
|
|
|
|
* display_type - 0 or ACPI_DISPLAY_SUMMARY
|
|
|
|
* max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX
|
|
|
|
* for an effectively unlimited depth.
|
|
|
|
* owner_id - Dump only objects owned by this ID. Use
|
|
|
|
* ACPI_UINT32_MAX to match all owners.
|
|
|
|
* start_handle - Where in namespace to start/end search
|
|
|
|
*
|
|
|
|
* RETURN: None
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Dump full object pathnames within the loaded namespace. Uses
|
|
|
|
* acpi_ns_walk_namespace in conjunction with acpi_ns_dump_one_object_path.
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
void
|
|
|
|
acpi_ns_dump_object_paths(acpi_object_type type,
|
|
|
|
u8 display_type,
|
|
|
|
u32 max_depth,
|
|
|
|
acpi_owner_id owner_id, acpi_handle start_handle)
|
|
|
|
{
|
|
|
|
acpi_status status;
|
|
|
|
u32 max_level = 0;
|
|
|
|
|
|
|
|
ACPI_FUNCTION_ENTRY();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Just lock the entire namespace for the duration of the dump.
|
|
|
|
* We don't want any changes to the namespace during this time,
|
|
|
|
* especially the temporary nodes since we are going to display
|
|
|
|
* them also.
|
|
|
|
*/
|
|
|
|
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
|
|
|
|
if (ACPI_FAILURE(status)) {
|
|
|
|
acpi_os_printf("Could not acquire namespace mutex\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get the max depth of the namespace tree, for formatting later */
|
|
|
|
|
|
|
|
(void)acpi_ns_walk_namespace(type, start_handle, max_depth,
|
|
|
|
ACPI_NS_WALK_NO_UNLOCK |
|
|
|
|
ACPI_NS_WALK_TEMP_NODES,
|
|
|
|
acpi_ns_get_max_depth, NULL,
|
|
|
|
(void *)&max_level, NULL);
|
|
|
|
|
|
|
|
/* Now dump the entire namespace */
|
|
|
|
|
|
|
|
(void)acpi_ns_walk_namespace(type, start_handle, max_depth,
|
|
|
|
ACPI_NS_WALK_NO_UNLOCK |
|
|
|
|
ACPI_NS_WALK_TEMP_NODES,
|
|
|
|
acpi_ns_dump_one_object_path, NULL,
|
|
|
|
(void *)&max_level, NULL);
|
|
|
|
|
|
|
|
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
|
|
|
|
}
|
|
|
|
|
2005-04-18 19:49:35 -07:00
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_dump_entry
|
|
|
|
*
|
2012-07-11 18:40:10 -07:00
|
|
|
* PARAMETERS: handle - Node to be dumped
|
2005-04-18 19:49:35 -07:00
|
|
|
* debug_level - Output level
|
|
|
|
*
|
|
|
|
* RETURN: None
|
|
|
|
*
|
|
|
|
* DESCRIPTION: Dump a single Node
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level)
|
2005-04-18 19:49:35 -07:00
|
|
|
{
|
2005-08-04 21:44:28 -07:00
|
|
|
struct acpi_walk_info info;
|
2005-04-18 19:49:35 -07:00
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_FUNCTION_ENTRY();
|
2005-04-18 19:49:35 -07:00
|
|
|
|
|
|
|
info.debug_level = debug_level;
|
2005-07-07 21:00:00 -07:00
|
|
|
info.owner_id = ACPI_OWNER_ID_MAX;
|
2005-04-18 19:49:35 -07:00
|
|
|
info.display_type = ACPI_DISPLAY_SUMMARY;
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
(void)acpi_ns_dump_one_object(handle, 1, &info, NULL);
|
2005-04-18 19:49:35 -07:00
|
|
|
}
|
|
|
|
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-23 21:00:00 -07:00
|
|
|
#ifdef ACPI_ASL_COMPILER
|
2005-04-16 15:20:36 -07:00
|
|
|
/*******************************************************************************
|
|
|
|
*
|
|
|
|
* FUNCTION: acpi_ns_dump_tables
|
|
|
|
*
|
|
|
|
* PARAMETERS: search_base - Root of subtree to be dumped, or
|
|
|
|
* NS_ALL to dump the entire namespace
|
2012-10-30 19:26:55 -07:00
|
|
|
* max_depth - Maximum depth of dump. Use INT_MAX
|
2005-04-16 15:20:36 -07:00
|
|
|
* for an effectively unlimited depth.
|
|
|
|
*
|
2005-04-18 19:49:35 -07:00
|
|
|
* RETURN: None
|
|
|
|
*
|
2005-04-16 15:20:36 -07:00
|
|
|
* DESCRIPTION: Dump the name space, or a portion of it.
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth)
|
2005-04-16 15:20:36 -07:00
|
|
|
{
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_handle search_handle = search_base;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-21 14:15:00 -07:00
|
|
|
ACPI_FUNCTION_TRACE(ns_dump_tables);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
if (!acpi_gbl_root_node) {
|
|
|
|
/*
|
|
|
|
* If the name space has not been initialized,
|
|
|
|
* there is nothing to dump.
|
|
|
|
*/
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
|
|
|
|
"namespace not initialized!\n"));
|
2005-04-16 15:20:36 -07:00
|
|
|
return_VOID;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ACPI_NS_ALL == search_base) {
|
2006-10-01 21:00:00 -07:00
|
|
|
|
2005-04-18 19:49:35 -07:00
|
|
|
/* Entire namespace */
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
search_handle = acpi_gbl_root_node;
|
2005-08-04 21:44:28 -07:00
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_TABLES, "\\\n"));
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|
|
|
|
|
2005-08-04 21:44:28 -07:00
|
|
|
acpi_ns_dump_objects(ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, max_depth,
|
|
|
|
ACPI_OWNER_ID_MAX, search_handle);
|
2005-04-16 15:20:36 -07:00
|
|
|
return_VOID;
|
|
|
|
}
|
2012-12-18 22:36:49 -07:00
|
|
|
#endif
|
|
|
|
#endif
|