^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Name: acnamesp.h - Namespace subcomponent prototypes and defines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright (C) 2000 - 2020, Intel Corp.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #ifndef __ACNAMESP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define __ACNAMESP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) /* To search the entire name space, pass this as search_base */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #define ACPI_NS_ALL ((acpi_handle)0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) * Elements of acpi_ns_properties are bit significant
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * and should be one-to-one with values of acpi_object_type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define ACPI_NS_NORMAL 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) /* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define ACPI_NS_NO_UPSEARCH 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define ACPI_NS_SEARCH_PARENT 0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define ACPI_NS_DONT_OPEN_SCOPE 0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define ACPI_NS_NO_PEER_SEARCH 0x0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define ACPI_NS_ERROR_IF_FOUND 0x0008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define ACPI_NS_PREFIX_IS_SCOPE 0x0010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #define ACPI_NS_EXTERNAL 0x0020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define ACPI_NS_TEMPORARY 0x0040
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #define ACPI_NS_OVERRIDE_IF_FOUND 0x0080
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #define ACPI_NS_EARLY_INIT 0x0100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #define ACPI_NS_PREFIX_MUST_EXIST 0x0200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) /* Flags for acpi_ns_walk_namespace */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #define ACPI_NS_WALK_NO_UNLOCK 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #define ACPI_NS_WALK_UNLOCK 0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #define ACPI_NS_WALK_TEMP_NODES 0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) /* Object is not a package element */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #define ACPI_NOT_PACKAGE_ELEMENT ACPI_UINT32_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #define ACPI_ALL_PACKAGE_ELEMENTS (ACPI_UINT32_MAX-1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) /* Always emit warning message, not dependent on node flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #define ACPI_WARN_ALWAYS 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) * nsinit - Namespace initialization
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) acpi_status acpi_ns_initialize_objects(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) acpi_status acpi_ns_initialize_devices(u32 flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) acpi_ns_init_one_package(acpi_handle obj_handle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) u32 level, void *context, void **return_value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * nsload - Namespace loading
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) acpi_status acpi_ns_load_namespace(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) * nswalk - walk the namespace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) acpi_ns_walk_namespace(acpi_object_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) acpi_handle start_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) u32 max_depth,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) u32 flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) acpi_walk_callback descending_callback,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) acpi_walk_callback ascending_callback,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) void *context, void **return_value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) *parent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) struct acpi_namespace_node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) *child);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) struct acpi_namespace_node *acpi_ns_get_next_node_typed(acpi_object_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) acpi_namespace_node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) *parent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) acpi_namespace_node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) *child);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) * nsparse - table parsing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) acpi_ns_one_complete_parse(u32 pass_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) u32 table_index,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) struct acpi_namespace_node *start_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) * nsaccess - Top-level namespace access
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) acpi_status acpi_ns_root_initialize(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) acpi_ns_lookup(union acpi_generic_state *scope_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) acpi_object_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) acpi_interpreter_mode interpreter_mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) u32 flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) struct acpi_walk_state *walk_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) struct acpi_namespace_node **ret_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) * nsalloc - Named object allocation/deallocation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) struct acpi_namespace_node *acpi_ns_create_node(u32 name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) void acpi_ns_delete_node(struct acpi_namespace_node *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) void acpi_ns_remove_node(struct acpi_namespace_node *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) void acpi_ns_detach_object(struct acpi_namespace_node *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) void acpi_ns_delete_children(struct acpi_namespace_node *parent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) int acpi_ns_compare_names(char *name1, char *name2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) * nsconvert - Dynamic object conversion routines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) acpi_ns_convert_to_integer(union acpi_operand_object *original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) union acpi_operand_object **return_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) acpi_ns_convert_to_string(union acpi_operand_object *original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) union acpi_operand_object **return_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) union acpi_operand_object **return_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) acpi_ns_convert_to_unicode(struct acpi_namespace_node *scope,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) union acpi_operand_object *original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) union acpi_operand_object **return_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) acpi_ns_convert_to_resource(struct acpi_namespace_node *scope,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) union acpi_operand_object *original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) union acpi_operand_object **return_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) acpi_ns_convert_to_reference(struct acpi_namespace_node *scope,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) union acpi_operand_object *original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) union acpi_operand_object **return_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) * nsdump - Namespace dump/print utilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) acpi_ns_dump_pathname(acpi_handle handle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) const char *msg, u32 level, u32 component);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) void acpi_ns_print_pathname(u32 num_segments, const char *pathname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) acpi_ns_dump_one_object(acpi_handle obj_handle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) u32 level, void *context, void **return_value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) acpi_ns_dump_objects(acpi_object_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) u8 display_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) u32 max_depth,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) acpi_owner_id owner_id, acpi_handle start_handle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) acpi_ns_dump_object_paths(acpi_object_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) u8 display_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) u32 max_depth,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) acpi_owner_id owner_id, acpi_handle start_handle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) * nseval - Namespace evaluation functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) * nsarguments - Argument count/type checking for predefined/reserved names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) acpi_ns_check_argument_count(char *pathname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) u32 user_param_count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) const union acpi_predefined_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) acpi_ns_check_acpi_compliance(char *pathname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) const union acpi_predefined_info *predefined);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) void acpi_ns_check_argument_types(struct acpi_evaluate_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) * nspredef - Return value checking for predefined/reserved names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) acpi_ns_check_return_value(struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) u32 user_param_count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) acpi_status return_status,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) union acpi_operand_object **return_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) acpi_ns_check_object_type(struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) union acpi_operand_object **return_object_ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) u32 expected_btypes, u32 package_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) * nsprepkg - Validation of predefined name packages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) acpi_ns_check_package(struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) union acpi_operand_object **return_object_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) * nsnames - Name and Scope manipulation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) u32 acpi_ns_opens_scope(acpi_object_type type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) char *full_path, u32 path_size, u8 no_trailing);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) void acpi_ns_normalize_pathname(char *original_path);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) u8 no_trailing);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) const char *internal_path);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) acpi_ns_handle_to_name(acpi_handle target_handle, struct acpi_buffer *buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) acpi_ns_handle_to_pathname(acpi_handle target_handle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) struct acpi_buffer *buffer, u8 no_trailing);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) acpi_ns_get_node_unlocked(struct acpi_namespace_node *prefix_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) const char *external_pathname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) u32 flags, struct acpi_namespace_node **out_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) const char *external_pathname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) u32 flags, struct acpi_namespace_node **out_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) * nsobject - Object management for namespace nodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) acpi_ns_attach_object(struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) union acpi_operand_object *object, acpi_object_type type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) union acpi_operand_object *acpi_ns_get_attached_object(struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) acpi_namespace_node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) union acpi_operand_object *acpi_ns_get_secondary_object(union
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) acpi_operand_object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) *obj_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) acpi_ns_attach_data(struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) acpi_object_handler handler, void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) acpi_ns_detach_data(struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) acpi_object_handler handler);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) acpi_ns_get_attached_data(struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) acpi_object_handler handler, void **data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) * nsrepair - General return object repair for all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) * predefined methods/objects
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) acpi_ns_simple_repair(struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) u32 expected_btypes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) u32 package_index,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) union acpi_operand_object **return_object_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) acpi_ns_wrap_with_package(struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) union acpi_operand_object *original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) union acpi_operand_object **obj_desc_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) acpi_ns_repair_null_element(struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) u32 expected_btypes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) u32 package_index,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) union acpi_operand_object **return_object_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) acpi_ns_remove_null_elements(struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) u8 package_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) union acpi_operand_object *obj_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) * nsrepair2 - Return object repair for specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) * predefined methods/objects
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) acpi_ns_complex_repairs(struct acpi_evaluate_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) acpi_status validate_status,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) union acpi_operand_object **return_object_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) * nssearch - Namespace searching and entry
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) acpi_ns_search_and_enter(u32 entry_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) struct acpi_walk_state *walk_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) acpi_interpreter_mode interpreter_mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) acpi_object_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) u32 flags, struct acpi_namespace_node **ret_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) acpi_ns_search_one_scope(u32 entry_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) acpi_object_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) struct acpi_namespace_node **ret_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) acpi_ns_install_node(struct acpi_walk_state *walk_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) struct acpi_namespace_node *parent_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) struct acpi_namespace_node *node, acpi_object_type type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) * nsutils - Utility functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) u32 acpi_ns_local(acpi_object_type type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) acpi_ns_print_node_pathname(struct acpi_namespace_node *node, const char *msg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) acpi_ns_internalize_name(const char *dotted_name, char **converted_name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) acpi_ns_externalize_name(u32 internal_name_length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) const char *internal_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) u32 * converted_name_length, char **converted_name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) void acpi_ns_terminate(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) #endif /* __ACNAMESP_H__ */