diff options
Diffstat (limited to 'source/components/parser/psargs.c')
| -rw-r--r-- | source/components/parser/psargs.c | 23 | 
1 files changed, 11 insertions, 12 deletions
diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c index ae6807304a8d..538b73eebd1f 100644 --- a/source/components/parser/psargs.c +++ b/source/components/parser/psargs.c @@ -316,7 +316,7 @@ AcpiPsGetNextNamepath (          ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,              "Control Method - %p Desc %p Path=%p\n", Node, MethodDesc, Path)); -        NameOp = AcpiPsAllocOp (AML_INT_NAMEPATH_OP); +        NameOp = AcpiPsAllocOp (AML_INT_NAMEPATH_OP, Start);          if (!NameOp)          {              return_ACPI_STATUS (AE_NO_MEMORY); @@ -524,7 +524,7 @@ static ACPI_PARSE_OBJECT *  AcpiPsGetNextField (      ACPI_PARSE_STATE        *ParserState)  { -    UINT32                  AmlOffset; +    UINT8                   *Aml;      ACPI_PARSE_OBJECT       *Field;      ACPI_PARSE_OBJECT       *Arg = NULL;      UINT16                  Opcode; @@ -540,8 +540,7 @@ AcpiPsGetNextField (      ACPI_FUNCTION_TRACE (PsGetNextField); -    AmlOffset = (UINT32) ACPI_PTR_DIFF ( -        ParserState->Aml, ParserState->AmlStart); +    Aml = ParserState->Aml;      /* Determine field type */ @@ -579,14 +578,12 @@ AcpiPsGetNextField (      /* Allocate a new field op */ -    Field = AcpiPsAllocOp (Opcode); +    Field = AcpiPsAllocOp (Opcode, Aml);      if (!Field)      {          return_PTR (NULL);      } -    Field->Common.AmlOffset = AmlOffset; -      /* Decode the field type */      switch (Opcode) @@ -650,6 +647,7 @@ AcpiPsGetNextField (           * Argument for Connection operator can be either a Buffer           * (resource descriptor), or a NameString.           */ +        Aml = ParserState->Aml;          if (ACPI_GET8 (ParserState->Aml) == AML_BUFFER_OP)          {              ParserState->Aml++; @@ -662,7 +660,7 @@ AcpiPsGetNextField (              {                  /* Non-empty list */ -                Arg = AcpiPsAllocOp (AML_INT_BYTELIST_OP); +                Arg = AcpiPsAllocOp (AML_INT_BYTELIST_OP, Aml);                  if (!Arg)                  {                      AcpiPsFreeOp (Field); @@ -712,7 +710,7 @@ AcpiPsGetNextField (          }          else          { -            Arg = AcpiPsAllocOp (AML_INT_NAMEPATH_OP); +            Arg = AcpiPsAllocOp (AML_INT_NAMEPATH_OP, Aml);              if (!Arg)              {                  AcpiPsFreeOp (Field); @@ -784,7 +782,7 @@ AcpiPsGetNextArg (          /* Constants, strings, and namestrings are all the same size */ -        Arg = AcpiPsAllocOp (AML_BYTE_OP); +        Arg = AcpiPsAllocOp (AML_BYTE_OP, ParserState->Aml);          if (!Arg)          {              return_ACPI_STATUS (AE_NO_MEMORY); @@ -836,7 +834,8 @@ AcpiPsGetNextArg (          {              /* Non-empty list */ -            Arg = AcpiPsAllocOp (AML_INT_BYTELIST_OP); +            Arg = AcpiPsAllocOp (AML_INT_BYTELIST_OP, +                    ParserState->Aml);              if (!Arg)              {                  return_ACPI_STATUS (AE_NO_MEMORY); @@ -866,7 +865,7 @@ AcpiPsGetNextArg (          {              /* NullName or NameString */ -            Arg = AcpiPsAllocOp (AML_INT_NAMEPATH_OP); +            Arg = AcpiPsAllocOp (AML_INT_NAMEPATH_OP, ParserState->Aml);              if (!Arg)              {                  return_ACPI_STATUS (AE_NO_MEMORY);  | 
