Lines Matching full:scope
4 * Module Name: psscope - Parser scope stack management routines
32 return (parser_state->scope->parse_scope.op); in acpi_ps_get_parent_scope()
41 * RETURN: Boolean, TRUE = scope completed.
44 * 1) AML pointer is at or beyond the end of the scope
45 * 2) The scope argument count has reached zero.
53 ((parser_state->aml >= parser_state->scope->parse_scope.arg_end in acpi_ps_has_completed_scope()
54 || !parser_state->scope->parse_scope.arg_count))); in acpi_ps_has_completed_scope()
62 * root - the Root Node of this new scope
66 * DESCRIPTION: Allocate and init a new scope object
74 union acpi_generic_state *scope; in acpi_ps_init_scope() local
78 scope = acpi_ut_create_generic_state(); in acpi_ps_init_scope()
79 if (!scope) { in acpi_ps_init_scope()
83 scope->common.descriptor_type = ACPI_DESC_TYPE_STATE_RPSCOPE; in acpi_ps_init_scope()
84 scope->parse_scope.op = root_op; in acpi_ps_init_scope()
85 scope->parse_scope.arg_count = ACPI_VAR_ARGS; in acpi_ps_init_scope()
86 scope->parse_scope.arg_end = parser_state->aml_end; in acpi_ps_init_scope()
87 scope->parse_scope.pkg_end = parser_state->aml_end; in acpi_ps_init_scope()
89 parser_state->scope = scope; in acpi_ps_init_scope()
115 union acpi_generic_state *scope; in acpi_ps_push_scope() local
119 scope = acpi_ut_create_generic_state(); in acpi_ps_push_scope()
120 if (!scope) { in acpi_ps_push_scope()
124 scope->common.descriptor_type = ACPI_DESC_TYPE_STATE_PSCOPE; in acpi_ps_push_scope()
125 scope->parse_scope.op = op; in acpi_ps_push_scope()
126 scope->parse_scope.arg_list = remaining_args; in acpi_ps_push_scope()
127 scope->parse_scope.arg_count = arg_count; in acpi_ps_push_scope()
128 scope->parse_scope.pkg_end = parser_state->pkg_end; in acpi_ps_push_scope()
130 /* Push onto scope stack */ in acpi_ps_push_scope()
132 acpi_ut_push_generic_state(&parser_state->scope, scope); in acpi_ps_push_scope()
138 scope->parse_scope.arg_end = parser_state->pkg_end; in acpi_ps_push_scope()
142 scope->parse_scope.arg_end = ACPI_TO_POINTER(ACPI_MAX_PTR); in acpi_ps_push_scope()
168 union acpi_generic_state *scope = parser_state->scope; in acpi_ps_pop_scope() local
172 /* Only pop the scope if there is in fact a next scope */ in acpi_ps_pop_scope()
174 if (scope->common.next) { in acpi_ps_pop_scope()
175 scope = acpi_ut_pop_generic_state(&parser_state->scope); in acpi_ps_pop_scope()
179 *op = scope->parse_scope.op; in acpi_ps_pop_scope()
180 *arg_list = scope->parse_scope.arg_list; in acpi_ps_pop_scope()
181 *arg_count = scope->parse_scope.arg_count; in acpi_ps_pop_scope()
182 parser_state->pkg_end = scope->parse_scope.pkg_end; in acpi_ps_pop_scope()
184 /* All done with this scope state structure */ in acpi_ps_pop_scope()
186 acpi_ut_delete_generic_state(scope); in acpi_ps_pop_scope()
209 * root scope
215 union acpi_generic_state *scope; in acpi_ps_cleanup_scope() local
223 /* Delete anything on the scope stack */ in acpi_ps_cleanup_scope()
225 while (parser_state->scope) { in acpi_ps_cleanup_scope()
226 scope = acpi_ut_pop_generic_state(&parser_state->scope); in acpi_ps_cleanup_scope()
227 acpi_ut_delete_generic_state(scope); in acpi_ps_cleanup_scope()