1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44#ifndef __ACNAMESP_H__
45#define __ACNAMESP_H__
46
47
48
49#define ACPI_NS_ALL ((acpi_handle)0)
50
51
52
53
54
55#define ACPI_NS_NORMAL 0
56#define ACPI_NS_NEWSCOPE 1
57#define ACPI_NS_LOCAL 2
58
59
60
61#define ACPI_NS_NO_UPSEARCH 0
62#define ACPI_NS_SEARCH_PARENT 0x01
63#define ACPI_NS_DONT_OPEN_SCOPE 0x02
64#define ACPI_NS_NO_PEER_SEARCH 0x04
65#define ACPI_NS_ERROR_IF_FOUND 0x08
66#define ACPI_NS_PREFIX_IS_SCOPE 0x10
67#define ACPI_NS_EXTERNAL 0x20
68#define ACPI_NS_TEMPORARY 0x40
69
70
71
72#define ACPI_NS_WALK_NO_UNLOCK 0
73#define ACPI_NS_WALK_UNLOCK 0x01
74#define ACPI_NS_WALK_TEMP_NODES 0x02
75
76
77
78#define ACPI_NOT_PACKAGE_ELEMENT ACPI_UINT32_MAX
79
80
81
82#define ACPI_WARN_ALWAYS 0
83
84
85
86
87acpi_status acpi_ns_initialize_objects(void);
88
89acpi_status acpi_ns_initialize_devices(void);
90
91
92
93
94acpi_status acpi_ns_load_namespace(void);
95
96acpi_status
97acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node);
98
99
100
101
102acpi_status
103acpi_ns_walk_namespace(acpi_object_type type,
104 acpi_handle start_object,
105 u32 max_depth,
106 u32 flags,
107 acpi_walk_callback pre_order_visit,
108 acpi_walk_callback post_order_visit,
109 void *context, void **return_value);
110
111struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node
112 *parent,
113 struct acpi_namespace_node
114 *child);
115
116struct acpi_namespace_node *acpi_ns_get_next_node_typed(acpi_object_type type,
117 struct
118 acpi_namespace_node
119 *parent,
120 struct
121 acpi_namespace_node
122 *child);
123
124
125
126
127acpi_status
128acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
129
130acpi_status
131acpi_ns_one_complete_parse(u32 pass_number,
132 u32 table_index,
133 struct acpi_namespace_node *start_node);
134
135
136
137
138acpi_status acpi_ns_root_initialize(void);
139
140acpi_status
141acpi_ns_lookup(union acpi_generic_state *scope_info,
142 char *name,
143 acpi_object_type type,
144 acpi_interpreter_mode interpreter_mode,
145 u32 flags,
146 struct acpi_walk_state *walk_state,
147 struct acpi_namespace_node **ret_node);
148
149
150
151
152struct acpi_namespace_node *acpi_ns_create_node(u32 name);
153
154void acpi_ns_delete_node(struct acpi_namespace_node *node);
155
156void acpi_ns_remove_node(struct acpi_namespace_node *node);
157
158void
159acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle);
160
161void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id);
162
163void acpi_ns_detach_object(struct acpi_namespace_node *node);
164
165void acpi_ns_delete_children(struct acpi_namespace_node *parent);
166
167int acpi_ns_compare_names(char *name1, char *name2);
168
169
170
171
172#ifdef ACPI_FUTURE_USAGE
173void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth);
174#endif
175
176void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);
177
178void
179acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component);
180
181void acpi_ns_print_pathname(u32 num_segments, char *pathname);
182
183acpi_status
184acpi_ns_dump_one_object(acpi_handle obj_handle,
185 u32 level, void *context, void **return_value);
186
187#ifdef ACPI_FUTURE_USAGE
188void
189acpi_ns_dump_objects(acpi_object_type type,
190 u8 display_type,
191 u32 max_depth,
192 acpi_owner_id owner_id, acpi_handle start_handle);
193#endif
194
195
196
197
198acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
199
200void acpi_ns_exec_module_code_list(void);
201
202
203
204
205acpi_status
206acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
207 u32 user_param_count,
208 acpi_status return_status,
209 union acpi_operand_object **return_object);
210
211const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
212 acpi_namespace_node
213 *node);
214
215void
216acpi_ns_check_parameter_count(char *pathname,
217 struct acpi_namespace_node *node,
218 u32 user_param_count,
219 const union acpi_predefined_info *info);
220
221
222
223
224u32 acpi_ns_opens_scope(acpi_object_type type);
225
226acpi_status
227acpi_ns_build_external_path(struct acpi_namespace_node *node,
228 acpi_size size, char *name_buffer);
229
230char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
231
232char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
233
234acpi_status
235acpi_ns_handle_to_pathname(acpi_handle target_handle,
236 struct acpi_buffer *buffer);
237
238u8
239acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
240
241acpi_status
242acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
243 const char *external_pathname,
244 u32 flags, struct acpi_namespace_node **out_node);
245
246acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
247
248
249
250
251acpi_status
252acpi_ns_attach_object(struct acpi_namespace_node *node,
253 union acpi_operand_object *object, acpi_object_type type);
254
255union acpi_operand_object *acpi_ns_get_attached_object(struct
256 acpi_namespace_node
257 *node);
258
259union acpi_operand_object *acpi_ns_get_secondary_object(union
260 acpi_operand_object
261 *obj_desc);
262
263acpi_status
264acpi_ns_attach_data(struct acpi_namespace_node *node,
265 acpi_object_handler handler, void *data);
266
267acpi_status
268acpi_ns_detach_data(struct acpi_namespace_node *node,
269 acpi_object_handler handler);
270
271acpi_status
272acpi_ns_get_attached_data(struct acpi_namespace_node *node,
273 acpi_object_handler handler, void **data);
274
275
276
277
278
279acpi_status
280acpi_ns_repair_object(struct acpi_predefined_data *data,
281 u32 expected_btypes,
282 u32 package_index,
283 union acpi_operand_object **return_object_ptr);
284
285acpi_status
286acpi_ns_wrap_with_package(struct acpi_predefined_data *data,
287 union acpi_operand_object *original_object,
288 union acpi_operand_object **obj_desc_ptr);
289
290acpi_status
291acpi_ns_repair_null_element(struct acpi_predefined_data *data,
292 u32 expected_btypes,
293 u32 package_index,
294 union acpi_operand_object **return_object_ptr);
295
296void
297acpi_ns_remove_null_elements(struct acpi_predefined_data *data,
298 u8 package_type,
299 union acpi_operand_object *obj_desc);
300
301
302
303
304
305acpi_status
306acpi_ns_complex_repairs(struct acpi_predefined_data *data,
307 struct acpi_namespace_node *node,
308 acpi_status validate_status,
309 union acpi_operand_object **return_object_ptr);
310
311
312
313
314acpi_status
315acpi_ns_search_and_enter(u32 entry_name,
316 struct acpi_walk_state *walk_state,
317 struct acpi_namespace_node *node,
318 acpi_interpreter_mode interpreter_mode,
319 acpi_object_type type,
320 u32 flags, struct acpi_namespace_node **ret_node);
321
322acpi_status
323acpi_ns_search_one_scope(u32 entry_name,
324 struct acpi_namespace_node *node,
325 acpi_object_type type,
326 struct acpi_namespace_node **ret_node);
327
328void
329acpi_ns_install_node(struct acpi_walk_state *walk_state,
330 struct acpi_namespace_node *parent_node,
331 struct acpi_namespace_node *node, acpi_object_type type);
332
333
334
335
336u8 acpi_ns_valid_root_prefix(char prefix);
337
338acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
339
340u32 acpi_ns_local(acpi_object_type type);
341
342void
343acpi_ns_print_node_pathname(struct acpi_namespace_node *node, const char *msg);
344
345acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info);
346
347void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);
348
349acpi_status
350acpi_ns_internalize_name(const char *dotted_name, char **converted_name);
351
352acpi_status
353acpi_ns_externalize_name(u32 internal_name_length,
354 const char *internal_name,
355 u32 * converted_name_length, char **converted_name);
356
357struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle);
358
359void acpi_ns_terminate(void);
360
361#endif
362