summaryrefslogtreecommitdiff
path: root/source/components/parser/psobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/parser/psobject.c')
-rw-r--r--source/components/parser/psobject.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c
index 63e2b3b1ab8a0..8d6f81bd68b31 100644
--- a/source/components/parser/psobject.c
+++ b/source/components/parser/psobject.c
@@ -154,6 +154,7 @@
#include "acparser.h"
#include "amlcode.h"
#include "acconvert.h"
+#include "acnamesp.h"
#define _COMPONENT ACPI_PARSER
ACPI_MODULE_NAME ("psobject")
@@ -722,6 +723,20 @@ AcpiPsCompleteOp (
{
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))
{
@@ -747,6 +762,20 @@ AcpiPsCompleteOp (
#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);
}