summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2022-01-20 13:55:47 -0800
committerRobert Moore <Robert.Moore@intel.com>2022-01-20 13:55:47 -0800
commitb32dde35e26a63a85d78d4dc0a7260b61e626ac1 (patch)
tree72f00753dcec9db3ba32918112737b4ef4dbc2bf
parent84bf573ab7222c4e1c22167b22d29c4da1552b20 (diff)
downloadacpica-b32dde35e26a63a85d78d4dc0a7260b61e626ac1.tar.gz
Add new acpi 6.4 semantics for LoadTable operator
DDB_HANDLE is gone, now loadtable returns a pass/fail integer.
-rw-r--r--source/compiler/aslmap.c2
-rw-r--r--source/components/executer/exconfig.c26
2 files changed, 19 insertions, 9 deletions
diff --git a/source/compiler/aslmap.c b/source/compiler/aslmap.c
index 126cbe1ed..1f462c857 100644
--- a/source/compiler/aslmap.c
+++ b/source/compiler/aslmap.c
@@ -380,7 +380,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* LNOT */ OP_TABLE_ENTRY (AML_LOGICAL_NOT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* LNOTEQUAL */ OP_TABLE_ENTRY (AML_LOGICAL_NOT_EQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* LOAD */ OP_TABLE_ENTRY (AML_LOAD_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* LOADTABLE */ OP_TABLE_ENTRY (AML_LOAD_TABLE_OP, 0, 0, ACPI_BTYPE_DDB_HANDLE),
+/* LOADTABLE */ OP_TABLE_ENTRY (AML_LOAD_TABLE_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* LOCAL0 */ OP_TABLE_ENTRY (AML_LOCAL0, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* LOCAL1 */ OP_TABLE_ENTRY (AML_LOCAL1, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* LOCAL2 */ OP_TABLE_ENTRY (AML_LOCAL2, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c
index 85cdbf69b..066004909 100644
--- a/source/components/executer/exconfig.c
+++ b/source/components/executer/exconfig.c
@@ -244,6 +244,7 @@ AcpiExLoadTableOp (
ACPI_NAMESPACE_NODE *ParentNode;
ACPI_NAMESPACE_NODE *StartNode;
ACPI_NAMESPACE_NODE *ParameterNode = NULL;
+ ACPI_OPERAND_OBJECT *ReturnObj;
ACPI_OPERAND_OBJECT *DdbHandle;
UINT32 TableIndex;
@@ -251,6 +252,16 @@ AcpiExLoadTableOp (
ACPI_FUNCTION_TRACE (ExLoadTableOp);
+ /* Create the return object */
+
+ ReturnObj = AcpiUtCreateIntegerObject ((UINT64) 0);
+ if (!ReturnObj)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ *ReturnDesc = ReturnObj;
+
/* Find the ACPI table in the RSDT/XSDT */
AcpiExExitInterpreter ();
@@ -268,13 +279,6 @@ AcpiExLoadTableOp (
/* Table not found, return an Integer=0 and AE_OK */
- DdbHandle = AcpiUtCreateIntegerObject ((UINT64) 0);
- if (!DdbHandle)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- *ReturnDesc = DdbHandle;
return_ACPI_STATUS (AE_OK);
}
@@ -365,7 +369,13 @@ AcpiExLoadTableOp (
}
}
- *ReturnDesc = DdbHandle;
+ /* Remove the reference to DdbHandle created by AcpiExAddTable above */
+
+ AcpiUtRemoveReference (DdbHandle);
+
+ /* Return -1 (non-zero) indicates success */
+
+ ReturnObj->Integer.Value = 0xFFFFFFFFFFFFFFFF;
return_ACPI_STATUS (Status);
}