summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/dispatcher/dswload.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/dispatcher/dswload.c')
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswload.c45
1 files changed, 29 insertions, 16 deletions
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswload.c b/sys/contrib/dev/acpica/components/dispatcher/dswload.c
index 8bc425a..ff14300 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dswload.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -188,7 +188,8 @@ AcpiDsLoad1BeginOp (
ObjectType = WalkState->OpInfo->ObjectType;
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "State=%p Op=%p [%s]\n", WalkState, Op, AcpiUtGetTypeName (ObjectType)));
+ "State=%p Op=%p [%s]\n", WalkState, Op,
+ AcpiUtGetTypeName (ObjectType)));
switch (WalkState->Opcode)
{
@@ -199,7 +200,7 @@ AcpiDsLoad1BeginOp (
* Allow search-to-root for single namesegs.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
- ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState, &(Node));
+ ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState, &(Node));
#ifdef ACPI_ASL_COMPILER
if (Status == AE_NOT_FOUND)
{
@@ -210,8 +211,8 @@ AcpiDsLoad1BeginOp (
*/
AcpiDmAddOpToExternalList (Op, Path, ACPI_TYPE_DEVICE, 0, 0);
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
- ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
- WalkState, &Node);
+ ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
+ WalkState, &Node);
}
#endif
if (ACPI_FAILURE (Status))
@@ -325,15 +326,24 @@ AcpiDsLoad1BeginOp (
if ((WalkState->Opcode != AML_SCOPE_OP) &&
(!(WalkState->ParseFlags & ACPI_PARSE_DEFERRED_OP)))
{
- Flags |= ACPI_NS_ERROR_IF_FOUND;
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[%s] Cannot already exist\n",
+ if (WalkState->NamespaceOverride)
+ {
+ Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[%s] Override allowed\n",
+ AcpiUtGetTypeName (ObjectType)));
+ }
+ else
+ {
+ Flags |= ACPI_NS_ERROR_IF_FOUND;
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[%s] Cannot already exist\n",
AcpiUtGetTypeName (ObjectType)));
+ }
}
else
{
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"[%s] Both Find or Create allowed\n",
- AcpiUtGetTypeName (ObjectType)));
+ AcpiUtGetTypeName (ObjectType)));
}
/*
@@ -343,7 +353,7 @@ AcpiDsLoad1BeginOp (
* parse tree later.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
- ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
+ ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
@@ -363,7 +373,8 @@ AcpiDsLoad1BeginOp (
if (AcpiNsOpensScope (ObjectType))
{
- Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState);
+ Status = AcpiDsScopeStackPush (
+ Node, ObjectType, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -389,7 +400,7 @@ AcpiDsLoad1BeginOp (
{
/* Create a new op */
- Op = AcpiPsAllocOp (WalkState->Opcode);
+ Op = AcpiPsAllocOp (WalkState->Opcode, WalkState->Aml);
if (!Op)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -485,8 +496,9 @@ AcpiDsLoad1EndOp (
if (Op->Common.AmlOpcode == AML_REGION_OP)
{
Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length,
- (ACPI_ADR_SPACE_TYPE) ((Op->Common.Value.Arg)->Common.Value.Integer),
- WalkState);
+ (ACPI_ADR_SPACE_TYPE)
+ ((Op->Common.Value.Arg)->Common.Value.Integer),
+ WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -495,7 +507,7 @@ AcpiDsLoad1EndOp (
else if (Op->Common.AmlOpcode == AML_DATA_REGION_OP)
{
Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length,
- ACPI_ADR_SPACE_DATA_TABLE, WalkState);
+ ACPI_ADR_SPACE_DATA_TABLE, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -547,11 +559,12 @@ AcpiDsLoad1EndOp (
WalkState->Operands[0] = ACPI_CAST_PTR (void, Op->Named.Node);
WalkState->NumOperands = 1;
- Status = AcpiDsCreateOperands (WalkState, Op->Common.Value.Arg);
+ Status = AcpiDsCreateOperands (
+ WalkState, Op->Common.Value.Arg);
if (ACPI_SUCCESS (Status))
{
Status = AcpiExCreateMethod (Op->Named.Data,
- Op->Named.Length, WalkState);
+ Op->Named.Length, WalkState);
}
WalkState->Operands[0] = NULL;
OpenPOWER on IntegriCloud