#include "acparser.h"
#include "amlcode.h"
#include "acconvert.h"
+#include "acnamesp.h"
#define _COMPONENT ACPI_PARSER
ACPI_MODULE_NAME ("psobject")
AcpiPsGetAmlOpcode (
ACPI_WALK_STATE *WalkState)
{
- UINT32 AmlOffset;
+ ACPI_ERROR_ONLY (UINT32 AmlOffset);
ACPI_FUNCTION_TRACE_PTR (PsGetAmlOpcode, WalkState);
if (WalkState->PassNumber == 2)
{
- AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml,
- WalkState->ParserState.AmlStart);
+ ACPI_ERROR_ONLY(AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml,
+ WalkState->ParserState.AmlStart));
ACPI_ERROR ((AE_INFO,
"Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring",
{
if (*Op)
{
+ /*
+ * These Opcodes need to be removed from the namespace because they
+ * get created even if these opcodes cannot be created due to
+ * errors.
+ */
+ if (((*Op)->Common.AmlOpcode == AML_REGION_OP) ||
+ ((*Op)->Common.AmlOpcode == AML_DATA_REGION_OP))
+ {
+ AcpiNsDeleteChildren ((*Op)->Common.Node);
+ AcpiNsRemoveNode ((*Op)->Common.Node);
+ (*Op)->Common.Node = NULL;
+ AcpiPsDeleteParseTree (*Op);
+ }
+
Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
if (ACPI_FAILURE (Status2))
{
#endif
WalkState->PrevOp = NULL;
WalkState->PrevArgTypes = WalkState->ArgTypes;
+
+ if (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL)
+ {
+ /*
+ * There was something that went wrong while executing code at the
+ * module-level. We need to skip parsing whatever caused the
+ * error and keep going. One runtime error during the table load
+ * should not cause the entire table to not be loaded. This is
+ * because there could be correct AML beyond the parts that caused
+ * the runtime error.
+ */
+ ACPI_ERROR ((AE_INFO, "Ignore error and continue table load"));
+ return_ACPI_STATUS (AE_OK);
+ }
return_ACPI_STATUS (Status);
}