summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/parser/psutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/parser/psutils.c')
-rw-r--r--sys/contrib/dev/acpica/components/parser/psutils.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/contrib/dev/acpica/components/parser/psutils.c b/sys/contrib/dev/acpica/components/parser/psutils.c
index 1a269a6..ca3830e 100644
--- a/sys/contrib/dev/acpica/components/parser/psutils.c
+++ b/sys/contrib/dev/acpica/components/parser/psutils.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
@@ -64,12 +64,12 @@
ACPI_PARSE_OBJECT *
AcpiPsCreateScopeOp (
- void)
+ UINT8 *Aml)
{
ACPI_PARSE_OBJECT *ScopeOp;
- ScopeOp = AcpiPsAllocOp (AML_SCOPE_OP);
+ ScopeOp = AcpiPsAllocOp (AML_SCOPE_OP, Aml);
if (!ScopeOp)
{
return (NULL);
@@ -104,9 +104,9 @@ AcpiPsInitOp (
Op->Common.DescriptorType = ACPI_DESC_TYPE_PARSER;
Op->Common.AmlOpcode = Opcode;
- ACPI_DISASM_ONLY_MEMBERS (ACPI_STRNCPY (Op->Common.AmlOpName,
- (AcpiPsGetOpcodeInfo (Opcode))->Name,
- sizeof (Op->Common.AmlOpName)));
+ ACPI_DISASM_ONLY_MEMBERS (strncpy (Op->Common.AmlOpName,
+ (AcpiPsGetOpcodeInfo (Opcode))->Name,
+ sizeof (Op->Common.AmlOpName)));
}
@@ -115,6 +115,7 @@ AcpiPsInitOp (
* FUNCTION: AcpiPsAllocOp
*
* PARAMETERS: Opcode - Opcode that will be stored in the new Op
+ * Aml - Address of the opcode
*
* RETURN: Pointer to the new Op, null on failure
*
@@ -126,7 +127,8 @@ AcpiPsInitOp (
ACPI_PARSE_OBJECT*
AcpiPsAllocOp (
- UINT16 Opcode)
+ UINT16 Opcode,
+ UINT8 *Aml)
{
ACPI_PARSE_OBJECT *Op;
const ACPI_OPCODE_INFO *OpInfo;
@@ -146,7 +148,7 @@ AcpiPsAllocOp (
}
else if (OpInfo->Flags & AML_NAMED)
{
- Flags = ACPI_PARSEOP_NAMED;
+ Flags = ACPI_PARSEOP_NAMED_OBJECT;
}
else if (Opcode == AML_INT_BYTELIST_OP)
{
@@ -173,6 +175,7 @@ AcpiPsAllocOp (
if (Op)
{
AcpiPsInitOp (Op, Opcode);
+ Op->Common.Aml = Aml;
Op->Common.Flags = Flags;
}
@@ -202,7 +205,8 @@ AcpiPsFreeOp (
if (Op->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Free retval op: %p\n", Op));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
+ "Free retval op: %p\n", Op));
}
if (Op->Common.Flags & ACPI_PARSEOP_GENERIC)
OpenPOWER on IntegriCloud