summaryrefslogtreecommitdiff
path: root/source/components
diff options
context:
space:
mode:
Diffstat (limited to 'source/components')
-rw-r--r--source/components/debugger/dbxface.c122
-rw-r--r--source/components/dispatcher/dsopcode.c3
-rw-r--r--source/components/dispatcher/dswload2.c9
-rw-r--r--source/components/namespace/nsaccess.c21
-rw-r--r--source/components/parser/psloop.c22
-rw-r--r--source/components/parser/psobject.c2
-rw-r--r--source/components/tables/tbxfload.c2
7 files changed, 127 insertions, 54 deletions
diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c
index c661b248b75e..a0f3ed6b3c14 100644
--- a/source/components/debugger/dbxface.c
+++ b/source/components/debugger/dbxface.c
@@ -174,6 +174,12 @@ AcpiDbMethodEnd (
ACPI_WALK_STATE *WalkState);
#endif
+#ifdef ACPI_DISASSEMBLER
+static ACPI_PARSE_OBJECT *
+AcpiDbGetDisplayOp (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op);
+#endif
/*******************************************************************************
*
@@ -273,6 +279,74 @@ AcpiDbSignalBreakPoint (
}
+#ifdef ACPI_DISASSEMBLER
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbGetDisplayOp
+ *
+ * PARAMETERS: WalkState - Current walk
+ * Op - Current executing op (from aml interpreter)
+ *
+ * RETURN: Opcode to display
+ *
+ * DESCRIPTION: Find the opcode to display during single stepping
+ *
+ ******************************************************************************/
+
+static ACPI_PARSE_OBJECT *
+AcpiDbGetDisplayOp (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *DisplayOp;
+ ACPI_PARSE_OBJECT *ParentOp;
+
+ DisplayOp = Op;
+ ParentOp = Op->Common.Parent;
+ if (ParentOp)
+ {
+ if ((WalkState->ControlState) &&
+ (WalkState->ControlState->Common.State ==
+ ACPI_CONTROL_PREDICATE_EXECUTING))
+ {
+ /*
+ * We are executing the predicate of an IF or WHILE statement
+ * Search upwards for the containing IF or WHILE so that the
+ * entire predicate can be displayed.
+ */
+ while (ParentOp)
+ {
+ if ((ParentOp->Common.AmlOpcode == AML_IF_OP) ||
+ (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
+ {
+ DisplayOp = ParentOp;
+ break;
+ }
+ ParentOp = ParentOp->Common.Parent;
+ }
+ }
+ else
+ {
+ while (ParentOp)
+ {
+ if ((ParentOp->Common.AmlOpcode == AML_IF_OP) ||
+ (ParentOp->Common.AmlOpcode == AML_ELSE_OP) ||
+ (ParentOp->Common.AmlOpcode == AML_SCOPE_OP) ||
+ (ParentOp->Common.AmlOpcode == AML_METHOD_OP) ||
+ (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
+ {
+ break;
+ }
+ DisplayOp = ParentOp;
+ ParentOp = ParentOp->Common.Parent;
+ }
+ }
+ }
+ return DisplayOp;
+}
+#endif
+
+
/*******************************************************************************
*
* FUNCTION: AcpiDbSingleStep
@@ -296,8 +370,6 @@ AcpiDbSingleStep (
ACPI_PARSE_OBJECT *Next;
ACPI_STATUS Status = AE_OK;
UINT32 OriginalDebugLevel;
- ACPI_PARSE_OBJECT *DisplayOp;
- ACPI_PARSE_OBJECT *ParentOp;
UINT32 AmlOffset;
@@ -393,53 +465,11 @@ AcpiDbSingleStep (
Next = Op->Common.Next;
Op->Common.Next = NULL;
-
- DisplayOp = Op;
- ParentOp = Op->Common.Parent;
- if (ParentOp)
- {
- if ((WalkState->ControlState) &&
- (WalkState->ControlState->Common.State ==
- ACPI_CONTROL_PREDICATE_EXECUTING))
- {
- /*
- * We are executing the predicate of an IF or WHILE statement
- * Search upwards for the containing IF or WHILE so that the
- * entire predicate can be displayed.
- */
- while (ParentOp)
- {
- if ((ParentOp->Common.AmlOpcode == AML_IF_OP) ||
- (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
- {
- DisplayOp = ParentOp;
- break;
- }
- ParentOp = ParentOp->Common.Parent;
- }
- }
- else
- {
- while (ParentOp)
- {
- if ((ParentOp->Common.AmlOpcode == AML_IF_OP) ||
- (ParentOp->Common.AmlOpcode == AML_ELSE_OP) ||
- (ParentOp->Common.AmlOpcode == AML_SCOPE_OP) ||
- (ParentOp->Common.AmlOpcode == AML_METHOD_OP) ||
- (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
- {
- break;
- }
- DisplayOp = ParentOp;
- ParentOp = ParentOp->Common.Parent;
- }
- }
- }
-
/* Now we can disassemble and display it */
#ifdef ACPI_DISASSEMBLER
- AcpiDmDisassemble (WalkState, DisplayOp, ACPI_UINT32_MAX);
+ AcpiDmDisassemble (WalkState, AcpiDbGetDisplayOp (WalkState, Op),
+ ACPI_UINT32_MAX);
#else
/*
* The AML Disassembler is not configured - at least we can
diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c
index 038993c774f3..ca2cd4700292 100644
--- a/source/components/dispatcher/dsopcode.c
+++ b/source/components/dispatcher/dsopcode.c
@@ -586,6 +586,9 @@ AcpiDsEvalRegionOperands (
ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
ObjDesc->Region.Length));
+ Status = AcpiUtAddAddressRange (ObjDesc->Region.SpaceId,
+ ObjDesc->Region.Address, ObjDesc->Region.Length, Node);
+
/* Now the address and length are valid for this opregion */
ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;
diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c
index 9bc6ecfae697..4b6e41d8dd30 100644
--- a/source/components/dispatcher/dswload2.c
+++ b/source/components/dispatcher/dswload2.c
@@ -448,6 +448,15 @@ AcpiDsLoad2BeginOp (
}
#endif
+ /*
+ * For name creation opcodes, the full namepath prefix must
+ * exist, except for the final (new) nameseg.
+ */
+ if (WalkState->OpInfo->Flags & AML_NAMED)
+ {
+ Flags |= ACPI_NS_PREFIX_MUST_EXIST;
+ }
+
/* Add new entry or lookup existing entry */
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c
index af97c51feff5..11c652e0442b 100644
--- a/source/components/namespace/nsaccess.c
+++ b/source/components/namespace/nsaccess.c
@@ -421,6 +421,7 @@ AcpiNsLookup (
ACPI_OBJECT_TYPE ThisSearchType;
UINT32 SearchParentFlag = ACPI_NS_SEARCH_PARENT;
UINT32 LocalFlags;
+ ACPI_INTERPRETER_MODE LocalInterpreterMode;
ACPI_FUNCTION_TRACE (NsLookup);
@@ -670,6 +671,7 @@ AcpiNsLookup (
*/
ThisSearchType = ACPI_TYPE_ANY;
CurrentNode = ThisNode;
+
while (NumSegments && CurrentNode)
{
NumSegments--;
@@ -704,6 +706,16 @@ AcpiNsLookup (
}
}
+ /* Handle opcodes that create a new NameSeg via a full NamePath */
+
+ LocalInterpreterMode = InterpreterMode;
+ if ((Flags & ACPI_NS_PREFIX_MUST_EXIST) && (NumSegments > 0))
+ {
+ /* Every element of the path must exist (except for the final NameSeg) */
+
+ LocalInterpreterMode = ACPI_IMODE_EXECUTE;
+ }
+
/* Extract one ACPI name from the front of the pathname */
ACPI_MOVE_32_TO_32 (&SimpleName, Path);
@@ -711,11 +723,18 @@ AcpiNsLookup (
/* Try to find the single (4 character) ACPI name */
Status = AcpiNsSearchAndEnter (SimpleName, WalkState, CurrentNode,
- InterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
+ LocalInterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
{
+#if !defined ACPI_ASL_COMPILER /* Note: iASL reports this error by itself, not needed here */
+ if (Flags & ACPI_NS_PREFIX_MUST_EXIST)
+ {
+ AcpiOsPrintf (ACPI_MSG_BIOS_ERROR
+ "Object does not exist: %4.4s\n", &SimpleName);
+ }
+#endif
/* Name not found in ACPI namespace */
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c
index ef517b54d0bf..9625834c56f6 100644
--- a/source/components/parser/psloop.c
+++ b/source/components/parser/psloop.c
@@ -298,7 +298,7 @@ AcpiPsGetArguments (
* future. Use of this option can cause problems with AML code that
* depends upon in-order immediate execution of module-level code.
*/
- if (AcpiGbl_GroupModuleLevelCode &&
+ if (!AcpiGbl_ExecuteTablesAsMethods &&
(WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) &&
((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0))
{
@@ -566,6 +566,7 @@ AcpiPsParseLoop (
ACPI_PARSE_OBJECT *Op = NULL; /* current op */
ACPI_PARSE_STATE *ParserState;
UINT8 *AmlOpStart = NULL;
+ UINT8 OpcodeLength;
ACPI_FUNCTION_TRACE_PTR (PsParseLoop, WalkState);
@@ -654,7 +655,7 @@ AcpiPsParseLoop (
* status to AE_OK to proceed with the table load.
*/
if ((WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL) &&
- Status == AE_ALREADY_EXISTS)
+ ((Status == AE_ALREADY_EXISTS) || (Status == AE_NOT_FOUND)))
{
Status = AE_OK;
}
@@ -686,9 +687,20 @@ AcpiPsParseLoop (
* the scope op because the parse failure indicates that
* the device may not exist.
*/
- ACPI_ERROR ((AE_INFO, "Skip parsing opcode %s",
- AcpiPsGetOpcodeName (WalkState->Opcode)));
- WalkState->ParserState.Aml = WalkState->Aml + 1;
+ ACPI_INFO (("Skipping parse of AML opcode: %s (0x%4.4X)",
+ AcpiPsGetOpcodeName (WalkState->Opcode), WalkState->Opcode));
+
+ /*
+ * Determine the opcode length before skipping the opcode.
+ * An opcode can be 1 byte or 2 bytes in length.
+ */
+ OpcodeLength = 1;
+ if ((WalkState->Opcode & 0xFF00) == AML_EXTENDED_OPCODE)
+ {
+ OpcodeLength = 2;
+ }
+ WalkState->ParserState.Aml = WalkState->Aml + OpcodeLength;
+
WalkState->ParserState.Aml =
AcpiPsGetNextPackageEnd(&WalkState->ParserState);
WalkState->Aml = WalkState->ParserState.Aml;
diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c
index 8d6f81bd68b3..ca7ab0aec520 100644
--- a/source/components/parser/psobject.c
+++ b/source/components/parser/psobject.c
@@ -773,7 +773,7 @@ AcpiPsCompleteOp (
* because there could be correct AML beyond the parts that caused
* the runtime error.
*/
- ACPI_ERROR ((AE_INFO, "Ignore error and continue table load"));
+ ACPI_INFO (("Ignoring error and continuing table load"));
return_ACPI_STATUS (AE_OK);
}
return_ACPI_STATUS (Status);
diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c
index 0119b684579f..a956806e8ccd 100644
--- a/source/components/tables/tbxfload.c
+++ b/source/components/tables/tbxfload.c
@@ -219,7 +219,7 @@ AcpiLoadTables (
"While loading namespace from ACPI tables"));
}
- if (AcpiGbl_ExecuteTablesAsMethods || !AcpiGbl_GroupModuleLevelCode)
+ if (AcpiGbl_ExecuteTablesAsMethods)
{
/*
* If the module-level code support is enabled, initialize the objects