2018-03-14 23:13:07 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
|
2005-04-16 22:20:36 +00:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
|
|
|
|
*
|
2022-04-11 18:54:22 +00:00
|
|
|
* Copyright (C) 2000 - 2022, Intel Corp.
|
2005-04-16 22:20:36 +00:00
|
|
|
*
|
2018-03-14 23:13:07 +00:00
|
|
|
*****************************************************************************/
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
#ifndef __ACNAMESP_H__
|
|
|
|
#define __ACNAMESP_H__
|
|
|
|
|
|
|
|
/* To search the entire name space, pass this as search_base */
|
|
|
|
|
|
|
|
#define ACPI_NS_ALL ((acpi_handle)0)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Elements of acpi_ns_properties are bit significant
|
|
|
|
* and should be one-to-one with values of acpi_object_type
|
|
|
|
*/
|
|
|
|
#define ACPI_NS_NORMAL 0
|
2005-08-05 04:44:28 +00:00
|
|
|
#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
|
|
|
|
#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
|
|
|
|
|
|
|
|
#define ACPI_NS_NO_UPSEARCH 0
|
2018-08-10 21:43:00 +00:00
|
|
|
#define ACPI_NS_SEARCH_PARENT 0x0001
|
|
|
|
#define ACPI_NS_DONT_OPEN_SCOPE 0x0002
|
|
|
|
#define ACPI_NS_NO_PEER_SEARCH 0x0004
|
|
|
|
#define ACPI_NS_ERROR_IF_FOUND 0x0008
|
|
|
|
#define ACPI_NS_PREFIX_IS_SCOPE 0x0010
|
|
|
|
#define ACPI_NS_EXTERNAL 0x0020
|
|
|
|
#define ACPI_NS_TEMPORARY 0x0040
|
|
|
|
#define ACPI_NS_OVERRIDE_IF_FOUND 0x0080
|
|
|
|
#define ACPI_NS_EARLY_INIT 0x0100
|
2018-11-05 17:43:54 +00:00
|
|
|
#define ACPI_NS_PREFIX_MUST_EXIST 0x0200
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2007-02-02 16:48:21 +00:00
|
|
|
/* Flags for acpi_ns_walk_namespace */
|
|
|
|
|
|
|
|
#define ACPI_NS_WALK_NO_UNLOCK 0
|
|
|
|
#define ACPI_NS_WALK_UNLOCK 0x01
|
|
|
|
#define ACPI_NS_WALK_TEMP_NODES 0x02
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2009-07-24 02:56:43 +00:00
|
|
|
/* Object is not a package element */
|
|
|
|
|
|
|
|
#define ACPI_NOT_PACKAGE_ELEMENT ACPI_UINT32_MAX
|
2015-12-29 05:58:02 +00:00
|
|
|
#define ACPI_ALL_PACKAGE_ELEMENTS (ACPI_UINT32_MAX-1)
|
2009-07-24 02:56:43 +00:00
|
|
|
|
|
|
|
/* Always emit warning message, not dependent on node flags */
|
|
|
|
|
|
|
|
#define ACPI_WARN_ALWAYS 0
|
|
|
|
|
2005-04-19 02:49:35 +00:00
|
|
|
/*
|
|
|
|
* nsinit - Namespace initialization
|
|
|
|
*/
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_status acpi_ns_initialize_objects(void);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2016-02-19 06:17:15 +00:00
|
|
|
acpi_status acpi_ns_initialize_devices(u32 flags);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2018-05-08 21:06:15 +00:00
|
|
|
acpi_status
|
|
|
|
acpi_ns_init_one_package(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value);
|
|
|
|
|
2005-04-19 02:49:35 +00:00
|
|
|
/*
|
|
|
|
* nsload - Namespace loading
|
|
|
|
*/
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_status acpi_ns_load_namespace(void);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2008-06-10 05:42:13 +00:00
|
|
|
acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-04-19 02:49:35 +00:00
|
|
|
/*
|
|
|
|
* nswalk - walk the namespace
|
|
|
|
*/
|
2005-04-16 22:20:36 +00:00
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_walk_namespace(acpi_object_type type,
|
|
|
|
acpi_handle start_object,
|
|
|
|
u32 max_depth,
|
2007-02-02 16:48:21 +00:00
|
|
|
u32 flags,
|
2013-08-08 07:30:05 +00:00
|
|
|
acpi_walk_callback descending_callback,
|
|
|
|
acpi_walk_callback ascending_callback,
|
2005-08-05 04:44:28 +00:00
|
|
|
void *context, void **return_value);
|
|
|
|
|
2009-05-21 02:27:51 +00:00
|
|
|
struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node
|
|
|
|
*parent,
|
|
|
|
struct acpi_namespace_node
|
2005-08-05 04:44:28 +00:00
|
|
|
*child);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2009-05-21 02:27:51 +00:00
|
|
|
struct acpi_namespace_node *acpi_ns_get_next_node_typed(acpi_object_type type,
|
|
|
|
struct
|
|
|
|
acpi_namespace_node
|
|
|
|
*parent,
|
|
|
|
struct
|
|
|
|
acpi_namespace_node
|
|
|
|
*child);
|
|
|
|
|
2005-04-19 02:49:35 +00:00
|
|
|
/*
|
|
|
|
* nsparse - table parsing
|
|
|
|
*/
|
2005-04-16 22:20:36 +00:00
|
|
|
acpi_status
|
2008-06-10 05:42:13 +00:00
|
|
|
acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
ACPICA: Interpreter: Fix MLC issues by switching to new term_list grammar for table loading
ACPICA commit 0e24fb67cde08d7df7671d7d7b183490dc79707e
The MLC (Module Level Code) is an ACPICA terminology describing the AML
code out of any control method, its support is an indication of the
interpreter behavior during the table loading.
The original implementation of MLC in ACPICA had several issues:
1. Out of any control method, besides of the object creating opcodes, only
the code blocks wrapped by "If/Else/While" opcodes were supported.
2. The supported MLC code blocks were executed after loading the table
rather than being executed right in place.
============================================================
The demo of this order issue is as follows:
Name (OBJ1, 1)
If (CND1 == 1)
{
Name (OBJ2, 2)
}
Name (OBJ3, 3)
The original MLC support created OBJ2 after OBJ3's creation.
============================================================
Other than these limitations, MLC support in ACPICA looks correct. And
supporting this should be easy/natural for ACPICA, but enabling of this was
blocked by some ACPICA internal and OSPM specific initialization order
issues we've fixed recently. The wrong support started from the following
false bug fixing commit:
Commit: 7f0c826a437157d2b19662977e9cf3b472cf24a6
Subject: ACPICA: Add support for module-level executable AML code
Commit: 9a884ab64a4d092b4c3bf24fd9a30f7fbd4591e7
Subject: ACPICA: Add additional module-level code support
...
We can confirm Windows interpreter behavior via reverse engineering means.
It can be proven that not only If/Else/While wrapped code blocks, all
opcodes can be executed at the module level, including operation region
accesses. And it can be proven that the MLC should be executed right in
place, not in such a deferred way executed after loading the table.
And the above facts indeed reflect the spec words around ACPI definition
block tables (DSDT/SSDT/...), the entire table and the Scope object is
defined by the AML specification in BNF style as:
AMLCode := def_block_header term_list
def_scope := scope_op pkg_length name_string term_list
The bodies of the scope opening terms (AMLCode/Scope) are all term_list,
thus the table loading should be no difference than the control method
evaluations as the body of the Method is also defined by the AML
specification as term_list:
def_method := method_op pkg_length name_string method_flags term_list
The only difference is: after evaluating control method, created named
objects may be freed due to no reference, while named objects created by
the table loading should only be freed after unloading the table.
So this patch follows the spec and the de-facto standard behavior, enables
the new grammar (term_list) for the table loading.
By doing so, beyond the fixes to the above issues, we can see additional
differences comparing to the old grammar based table loading:
1. Originally, beyond the scope opening terms (AMLCode/Scope),
If/Else/While wrapped code blocks under the scope creating terms
(Device/power_resource/Processor/thermal_zone) are also supported as
deferred MLC, which violates the spec defined grammar where object_list
is enforced. With MLC support improved as non-deferred, the interpreter
parses such scope creating terms as term_list rather object_list like the
scope opening terms.
After probing the Windows behavior and proving that it also parses these
terms as term_list, we submitted an ECR (Engineering Change Request) to
the ASWG (ACPI Specification Working Group) to clarify this. The ECR is
titled as "ASL Grammar Clarification for Executable AML Opcodes" and has
been accepted by the ASWG. The new grammar will appear in ACPI
specification 6.2.
2. Originally, Buffer/Package/operation_region/create_XXXField/bank_field
arguments are evaluated in a deferred way after loading the table. With
MLC support improved, they are also parsed right in place during the
table loading.
This is also Windows compliant and the only difference is the removal
of the debugging messages implemented before acpi_ds_execute_arguments(),
see Link # [1] for the details. A previous commit should have ensured
that acpi_check_address_range() won't regress.
Note that enabling this feature may cause regressions due to long term
Linux ACPI support on top of the wrong grammar. So this patch also prepares
a global option to be used to roll back to the old grammar during the
period between a regression is reported and the regression is
root-cause-fixed. Lv Zheng.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=112911 # [1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=117671 # [1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=153541 # [1]
Link: https://github.com/acpica/acpica/issues/122
Link: https://bugs.acpica.org/show_bug.cgi?id=963
Link: https://github.com/acpica/acpica/commit/0e24fb67
Reported-and-tested-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Reported-by: Ehsan <dashesy@gmail.com>
Reported-and-tested-by: Dutch Guy <lucht_piloot@gmx.net>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-09-07 06:06:54 +00:00
|
|
|
acpi_status
|
|
|
|
acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
acpi_status
|
2008-06-10 05:42:13 +00:00
|
|
|
acpi_ns_one_complete_parse(u32 pass_number,
|
|
|
|
u32 table_index,
|
2008-04-10 15:06:39 +00:00
|
|
|
struct acpi_namespace_node *start_node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nsaccess - Top-level namespace access
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_status acpi_ns_root_initialize(void);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_lookup(union acpi_generic_state *scope_info,
|
|
|
|
char *name,
|
|
|
|
acpi_object_type type,
|
|
|
|
acpi_interpreter_mode interpreter_mode,
|
|
|
|
u32 flags,
|
|
|
|
struct acpi_walk_state *walk_state,
|
|
|
|
struct acpi_namespace_node **ret_node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nsalloc - Named object allocation/deallocation
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
2005-08-05 04:44:28 +00:00
|
|
|
struct acpi_namespace_node *acpi_ns_create_node(u32 name);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_delete_node(struct acpi_namespace_node *node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2009-06-29 05:43:27 +00:00
|
|
|
void acpi_ns_remove_node(struct acpi_namespace_node *node);
|
|
|
|
|
2005-04-19 02:49:35 +00:00
|
|
|
void
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle);
|
2005-04-19 02:49:35 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_detach_object(struct acpi_namespace_node *node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_delete_children(struct acpi_namespace_node *parent);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
int acpi_ns_compare_names(char *name1, char *name2);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2013-03-08 09:23:16 +00:00
|
|
|
/*
|
|
|
|
* nsconvert - Dynamic object conversion routines
|
|
|
|
*/
|
|
|
|
acpi_status
|
|
|
|
acpi_ns_convert_to_integer(union acpi_operand_object *original_object,
|
|
|
|
union acpi_operand_object **return_object);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ns_convert_to_string(union acpi_operand_object *original_object,
|
|
|
|
union acpi_operand_object **return_object);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
|
|
|
|
union acpi_operand_object **return_object);
|
|
|
|
|
2013-03-08 09:23:24 +00:00
|
|
|
acpi_status
|
2015-12-29 05:57:38 +00:00
|
|
|
acpi_ns_convert_to_unicode(struct acpi_namespace_node *scope,
|
|
|
|
union acpi_operand_object *original_object,
|
2013-03-08 09:23:24 +00:00
|
|
|
union acpi_operand_object **return_object);
|
|
|
|
|
2013-03-08 09:23:32 +00:00
|
|
|
acpi_status
|
2015-12-29 05:57:38 +00:00
|
|
|
acpi_ns_convert_to_resource(struct acpi_namespace_node *scope,
|
|
|
|
union acpi_operand_object *original_object,
|
2013-03-08 09:23:32 +00:00
|
|
|
union acpi_operand_object **return_object);
|
|
|
|
|
2015-12-29 05:58:02 +00:00
|
|
|
acpi_status
|
|
|
|
acpi_ns_convert_to_reference(struct acpi_namespace_node *scope,
|
|
|
|
union acpi_operand_object *original_object,
|
|
|
|
union acpi_operand_object **return_object);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nsdump - Namespace dump/print utilities
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
void
|
2016-03-24 01:40:40 +00:00
|
|
|
acpi_ns_dump_pathname(acpi_handle handle,
|
|
|
|
const char *msg, u32 level, u32 component);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2016-03-24 01:40:40 +00:00
|
|
|
void acpi_ns_print_pathname(u32 num_segments, const char *pathname);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_dump_one_object(acpi_handle obj_handle,
|
|
|
|
u32 level, void *context, void **return_value);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
void
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_dump_objects(acpi_object_type type,
|
|
|
|
u8 display_type,
|
|
|
|
u32 max_depth,
|
|
|
|
acpi_owner_id owner_id, acpi_handle start_handle);
|
2013-09-23 01:52:19 +00:00
|
|
|
|
|
|
|
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);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nseval - Namespace evaluation functions
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
2006-05-26 20:36:00 +00:00
|
|
|
acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2008-09-28 07:26:17 +00:00
|
|
|
/*
|
2013-05-30 02:00:01 +00:00
|
|
|
* nsarguments - Argument count/type checking for predefined/reserved names
|
2008-09-28 07:26:17 +00:00
|
|
|
*/
|
2013-05-30 02:00:01 +00:00
|
|
|
void
|
|
|
|
acpi_ns_check_argument_count(char *pathname,
|
|
|
|
struct acpi_namespace_node *node,
|
|
|
|
u32 user_param_count,
|
|
|
|
const union acpi_predefined_info *info);
|
2008-09-28 07:26:17 +00:00
|
|
|
|
|
|
|
void
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_check_acpi_compliance(char *pathname,
|
2008-09-28 07:26:17 +00:00
|
|
|
struct acpi_namespace_node *node,
|
2013-05-30 02:00:01 +00:00
|
|
|
const union acpi_predefined_info *predefined);
|
|
|
|
|
|
|
|
void acpi_ns_check_argument_types(struct acpi_evaluate_info *info);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* nspredef - Return value checking for predefined/reserved names
|
|
|
|
*/
|
|
|
|
acpi_status
|
|
|
|
acpi_ns_check_return_value(struct acpi_namespace_node *node,
|
|
|
|
struct acpi_evaluate_info *info,
|
|
|
|
u32 user_param_count,
|
|
|
|
acpi_status return_status,
|
|
|
|
union acpi_operand_object **return_object);
|
2008-09-28 07:26:17 +00:00
|
|
|
|
2013-01-11 12:08:51 +00:00
|
|
|
acpi_status
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_check_object_type(struct acpi_evaluate_info *info,
|
2013-01-11 12:08:51 +00:00
|
|
|
union acpi_operand_object **return_object_ptr,
|
|
|
|
u32 expected_btypes, u32 package_index);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* nsprepkg - Validation of predefined name packages
|
|
|
|
*/
|
|
|
|
acpi_status
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_check_package(struct acpi_evaluate_info *info,
|
2013-01-11 12:08:51 +00:00
|
|
|
union acpi_operand_object **return_object_ptr);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nsnames - Name and Scope manipulation
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
2005-08-05 04:44:28 +00:00
|
|
|
u32 acpi_ns_opens_scope(acpi_object_type type);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2015-07-23 04:52:39 +00:00
|
|
|
u32
|
|
|
|
acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
|
|
|
|
char *full_path, u32 path_size, u8 no_trailing);
|
|
|
|
|
2020-03-27 22:21:09 +00:00
|
|
|
void acpi_ns_normalize_pathname(char *original_path);
|
|
|
|
|
2015-07-23 04:52:39 +00:00
|
|
|
char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
|
|
|
|
u8 no_trailing);
|
|
|
|
|
2017-11-17 23:42:22 +00:00
|
|
|
char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
|
|
|
|
const char *internal_path);
|
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2016-11-30 07:20:52 +00:00
|
|
|
acpi_status
|
|
|
|
acpi_ns_handle_to_name(acpi_handle target_handle, struct acpi_buffer *buffer);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_handle_to_pathname(acpi_handle target_handle,
|
2015-07-23 04:52:39 +00:00
|
|
|
struct acpi_buffer *buffer, u8 no_trailing);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
u8
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2016-09-07 06:07:02 +00:00
|
|
|
acpi_status
|
|
|
|
acpi_ns_get_node_unlocked(struct acpi_namespace_node *prefix_node,
|
|
|
|
const char *external_pathname,
|
|
|
|
u32 flags, struct acpi_namespace_node **out_node);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
acpi_status
|
2006-05-26 20:36:00 +00:00
|
|
|
acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
|
2008-06-10 05:55:53 +00:00
|
|
|
const char *external_pathname,
|
2006-05-26 20:36:00 +00:00
|
|
|
u32 flags, struct acpi_namespace_node **out_node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nsobject - Object management for namespace nodes
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_attach_object(struct acpi_namespace_node *node,
|
|
|
|
union acpi_operand_object *object, acpi_object_type type);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
union acpi_operand_object *acpi_ns_get_attached_object(struct
|
|
|
|
acpi_namespace_node
|
|
|
|
*node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
union acpi_operand_object *acpi_ns_get_secondary_object(union
|
|
|
|
acpi_operand_object
|
|
|
|
*obj_desc);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_attach_data(struct acpi_namespace_node *node,
|
|
|
|
acpi_object_handler handler, void *data);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_detach_data(struct acpi_namespace_node *node,
|
|
|
|
acpi_object_handler handler);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_get_attached_data(struct acpi_namespace_node *node,
|
|
|
|
acpi_object_handler handler, void **data);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2009-07-24 02:56:43 +00:00
|
|
|
/*
|
2009-11-12 01:44:06 +00:00
|
|
|
* nsrepair - General return object repair for all
|
|
|
|
* predefined methods/objects
|
2009-07-24 02:56:43 +00:00
|
|
|
*/
|
|
|
|
acpi_status
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_simple_repair(struct acpi_evaluate_info *info,
|
2009-07-24 02:56:43 +00:00
|
|
|
u32 expected_btypes,
|
|
|
|
u32 package_index,
|
|
|
|
union acpi_operand_object **return_object_ptr);
|
|
|
|
|
2009-07-24 03:03:09 +00:00
|
|
|
acpi_status
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_wrap_with_package(struct acpi_evaluate_info *info,
|
2012-03-21 01:51:39 +00:00
|
|
|
union acpi_operand_object *original_object,
|
|
|
|
union acpi_operand_object **obj_desc_ptr);
|
2009-07-24 03:03:09 +00:00
|
|
|
|
2010-01-21 01:28:32 +00:00
|
|
|
acpi_status
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_repair_null_element(struct acpi_evaluate_info *info,
|
2010-01-21 01:28:32 +00:00
|
|
|
u32 expected_btypes,
|
|
|
|
u32 package_index,
|
|
|
|
union acpi_operand_object **return_object_ptr);
|
|
|
|
|
|
|
|
void
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_remove_null_elements(struct acpi_evaluate_info *info,
|
2010-01-21 01:28:32 +00:00
|
|
|
u8 package_type,
|
|
|
|
union acpi_operand_object *obj_desc);
|
|
|
|
|
2009-11-12 01:44:06 +00:00
|
|
|
/*
|
|
|
|
* nsrepair2 - Return object repair for specific
|
|
|
|
* predefined methods/objects
|
|
|
|
*/
|
|
|
|
acpi_status
|
2013-05-30 02:00:01 +00:00
|
|
|
acpi_ns_complex_repairs(struct acpi_evaluate_info *info,
|
2009-11-12 01:44:06 +00:00
|
|
|
struct acpi_namespace_node *node,
|
|
|
|
acpi_status validate_status,
|
|
|
|
union acpi_operand_object **return_object_ptr);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nssearch - Namespace searching and entry
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_search_and_enter(u32 entry_name,
|
|
|
|
struct acpi_walk_state *walk_state,
|
|
|
|
struct acpi_namespace_node *node,
|
|
|
|
acpi_interpreter_mode interpreter_mode,
|
|
|
|
acpi_object_type type,
|
|
|
|
u32 flags, struct acpi_namespace_node **ret_node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2006-05-26 20:36:00 +00:00
|
|
|
acpi_ns_search_one_scope(u32 entry_name,
|
|
|
|
struct acpi_namespace_node *node,
|
|
|
|
acpi_object_type type,
|
|
|
|
struct acpi_namespace_node **ret_node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
void
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_install_node(struct acpi_walk_state *walk_state,
|
|
|
|
struct acpi_namespace_node *parent_node,
|
|
|
|
struct acpi_namespace_node *node, acpi_object_type type);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/*
|
2005-04-19 02:49:35 +00:00
|
|
|
* nsutils - Utility functions
|
2005-04-16 22:20:36 +00:00
|
|
|
*/
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
u32 acpi_ns_local(acpi_object_type type);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2008-06-10 05:55:53 +00:00
|
|
|
void
|
|
|
|
acpi_ns_print_node_pathname(struct acpi_namespace_node *node, const char *msg);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2008-06-10 05:55:53 +00:00
|
|
|
acpi_status
|
|
|
|
acpi_ns_internalize_name(const char *dotted_name, char **converted_name);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
acpi_status
|
2005-08-05 04:44:28 +00:00
|
|
|
acpi_ns_externalize_name(u32 internal_name_length,
|
2008-06-10 05:55:53 +00:00
|
|
|
const char *internal_name,
|
2005-08-05 04:44:28 +00:00
|
|
|
u32 * converted_name_length, char **converted_name);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2009-12-11 06:57:00 +00:00
|
|
|
struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
void acpi_ns_terminate(void);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-08-05 04:44:28 +00:00
|
|
|
#endif /* __ACNAMESP_H__ */
|