acpi_status acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node) { acpi_status status; ACPI_FUNCTION_TRACE(ns_parse_table); if (acpi_gbl_parse_table_as_term_list) { ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start load pass\n")); status = acpi_ns_execute_table(table_index, start_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } else { /* * AML Parse, pass 1 * * In this pass, we load most of the namespace. Control methods * are not parsed until later. A parse tree is not created. * Instead, each Parser Op subtree is deleted when it is finished. * This saves a great deal of memory, and allows a small cache of * parse objects to service the entire parse. The second pass of * the parse then performs another complete parse of the AML. */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n")); status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index, start_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * AML Parse, pass 2 * * In this pass, we resolve forward references and other things * that could not be completed during the first pass. * Another complete parse of the AML is performed, but the * overhead of this is compensated for by the fact that the * parse objects are all cached. */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n")); status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index, start_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } return_ACPI_STATUS(status); }
acpi_status acpi_ns_parse_table ( acpi_table_desc *table_desc, acpi_namespace_node *start_node) { acpi_status status; FUNCTION_TRACE ("Ns_parse_table"); /* * AML Parse, pass 1 * * In this pass, we load most of the namespace. Control methods * are not parsed until later. A parse tree is not created. Instead, * each Parser Op subtree is deleted when it is finished. This saves * a great deal of memory, and allows a small cache of parse objects * to service the entire parse. The second pass of the parse then * performs another complete parse of the AML.. */ status = acpi_ns_one_complete_parse (1, table_desc); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } /* * AML Parse, pass 2 * * In this pass, we resolve forward references and other things * that could not be completed during the first pass. * Another complete parse of the AML is performed, but the * overhead of this is compensated for by the fact that the * parse objects are all cached. */ status = acpi_ns_one_complete_parse (2, table_desc); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } return_ACPI_STATUS (status); }
acpi_status acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node) { acpi_status status; ACPI_FUNCTION_TRACE(ns_parse_table); /* */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n")); status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index, start_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n")); status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index, start_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } return_ACPI_STATUS(status); }