Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/acpica/acpica
Browse files Browse the repository at this point in the history
  • Loading branch information
RehabMan committed May 6, 2018
2 parents 533d4de + f435050 commit effe9a2
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 7 deletions.
43 changes: 43 additions & 0 deletions documents/changes.txt
@@ -1,3 +1,46 @@
----------------------------------------
27 April 2018. Summary of changes for version 20180427:


1) ACPICA kernel-resident subsystem:

Debugger: Added support for Package objects in the "Test Objects"
command. This command walks the entire namespace and evaluates all named
data objects (Integers, Strings, Buffers, and now Packages).

Improved error messages for the namespace root node. Originally, the root
was referred to by the confusing string "\___". This has been replaced by
"Namespace Root" for clarification.

Fixed a potential infinite loop in the AcpiRsDumpByteList function. Colin
Ian King <colin.king@canonical.com>.


2) iASL Compiler/Disassembler and Tools:

iASL: Implemented support to detect and flag illegal forward references.
For compatibility with other ACPI implementations, these references are
now illegal at the root level of the DSDT or SSDTs. Forward references
have always been illegal within control methods. This change should not
affect existing ASL/AML code because of the fact that these references
have always been illegal in the other ACPI implementation.

iASL: Added error messages for the case where a table OEM ID and OEM
TABLE ID strings are longer than the ACPI-defined length. Previously,
these strings were simply silently truncated.

iASL: Enhanced the -tc option (which creates an AML hex file in C,
suitable for import into a firmware project):
1) Create a unique name for the table, to simplify use of multiple
SSDTs.
2) Add a protection #ifdef in the file, similar to a .h header file.
With assistance from Sami Mujawar, sami.mujawar@arm.com and Evan Lloyd,
evan.lloyd@arm.com

AcpiExec: Added a new option, -df, to disable the local fault handler.
This is useful during debugging, where it may be desired to drop into a
debugger on a fault.

----------------------------------------
13 March 2018. Summary of changes for version 20180313:

Expand Down
2 changes: 1 addition & 1 deletion source/common/dmtbinfo2.c
Expand Up @@ -1063,7 +1063,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[] =
{ACPI_DMT_UINT24, ACPI_NFIT7_OFFSET (Reserved[0]), "Reserved", 0},
{ACPI_DMT_UINT32, ACPI_NFIT7_OFFSET (Capabilities), "Capabilities (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Cache Flush to NVDIMM", 0},
{ACPI_DMT_FLAG1, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Flush to MVDIMM", 0},
{ACPI_DMT_FLAG1, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Flush to NVDIMM", 0},
{ACPI_DMT_FLAG2, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Mirroring", 0},
{ACPI_DMT_UINT32, ACPI_NFIT7_OFFSET (Reserved2), "Reserved", 0},
ACPI_DMT_TERMINATOR
Expand Down
67 changes: 63 additions & 4 deletions source/components/debugger/dbtest.c
Expand Up @@ -188,6 +188,10 @@ AcpiDbTestStringType (
ACPI_NAMESPACE_NODE *Node,
UINT32 ByteLength);

static ACPI_STATUS
AcpiDbTestPackageType (
ACPI_NAMESPACE_NODE *Node);

static ACPI_STATUS
AcpiDbReadFromObject (
ACPI_NAMESPACE_NODE *Node,
Expand Down Expand Up @@ -456,6 +460,11 @@ AcpiDbTestOneObject (
BitLength = ByteLength * 8;
break;

case ACPI_TYPE_PACKAGE:

LocalType = ACPI_TYPE_PACKAGE;
break;

case ACPI_TYPE_FIELD_UNIT:
case ACPI_TYPE_BUFFER_FIELD:
case ACPI_TYPE_LOCAL_REGION_FIELD:
Expand Down Expand Up @@ -490,6 +499,7 @@ AcpiDbTestOneObject (

AcpiOsPrintf ("%14s: %4.4s",
AcpiUtGetTypeName (Node->Type), Node->Name.Ascii);

if (!ObjDesc)
{
AcpiOsPrintf (" Ignoring, no attached object\n");
Expand All @@ -510,13 +520,12 @@ AcpiDbTestOneObject (
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
case ACPI_ADR_SPACE_SYSTEM_IO:
case ACPI_ADR_SPACE_PCI_CONFIG:
case ACPI_ADR_SPACE_EC:

break;

default:

AcpiOsPrintf (" %s space is not supported [%4.4s]\n",
AcpiOsPrintf (" %s space is not supported in this command [%4.4s]\n",
AcpiUtGetRegionName (RegionObj->Region.SpaceId),
RegionObj->Region.Node->Name.Ascii);
return (AE_OK);
Expand Down Expand Up @@ -546,26 +555,41 @@ AcpiDbTestOneObject (
Status = AcpiDbTestBufferType (Node, BitLength);
break;

case ACPI_TYPE_PACKAGE:

Status = AcpiDbTestPackageType (Node);
break;

default:

AcpiOsPrintf (" Ignoring, type not implemented (%2.2X)",
LocalType);
break;
}

/* Exit on error, but don't abort the namespace walk */

if (ACPI_FAILURE (Status))
{
Status = AE_OK;
goto Exit;
}

switch (Node->Type)
{
case ACPI_TYPE_LOCAL_REGION_FIELD:

RegionObj = ObjDesc->Field.RegionObj;
AcpiOsPrintf (" (%s)",
AcpiUtGetRegionName (RegionObj->Region.SpaceId));

break;

default:
break;
}

Exit:
AcpiOsPrintf ("\n");
return (Status);
}
Expand Down Expand Up @@ -624,7 +648,6 @@ AcpiDbTestIntegerType (
{
ValueToWrite = 0;
}

/* Write a new value */

WriteValue.Type = ACPI_TYPE_INTEGER;
Expand Down Expand Up @@ -915,6 +938,40 @@ AcpiDbTestStringType (
}


/*******************************************************************************
*
* FUNCTION: AcpiDbTestPackageType
*
* PARAMETERS: Node - Parent NS node for the object
*
* RETURN: Status
*
* DESCRIPTION: Test read for a Package object.
*
******************************************************************************/

static ACPI_STATUS
AcpiDbTestPackageType (
ACPI_NAMESPACE_NODE *Node)
{
ACPI_OBJECT *Temp1 = NULL;
ACPI_STATUS Status;


/* Read the original value */

Status = AcpiDbReadFromObject (Node, ACPI_TYPE_PACKAGE, &Temp1);
if (ACPI_FAILURE (Status))
{
return (Status);
}

AcpiOsPrintf (" %8.8X Elements", Temp1->Package.Count);
AcpiOsFree (Temp1);
return (Status);
}


/*******************************************************************************
*
* FUNCTION: AcpiDbReadFromObject
Expand Down Expand Up @@ -957,8 +1014,8 @@ AcpiDbReadFromObject (
AcpiGbl_MethodExecuting = TRUE;
Status = AcpiEvaluateObject (ReadHandle, NULL,
&ParamObjects, &ReturnObj);
AcpiGbl_MethodExecuting = FALSE;

AcpiGbl_MethodExecuting = FALSE;
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not read from object, %s",
Expand All @@ -973,6 +1030,7 @@ AcpiDbReadFromObject (
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_BUFFER:
case ACPI_TYPE_STRING:
case ACPI_TYPE_PACKAGE:
/*
* Did we receive the type we wanted? Most important for the
* Integer/Buffer case (when a field is larger than an Integer,
Expand All @@ -984,6 +1042,7 @@ AcpiDbReadFromObject (
AcpiUtGetTypeName (ExpectedType),
AcpiUtGetTypeName (RetValue->Type));

AcpiOsFree (ReturnObj.Pointer);
return (AE_TYPE);
}

Expand Down
2 changes: 1 addition & 1 deletion source/include/acpixf.h
Expand Up @@ -154,7 +154,7 @@

/* Current ACPICA subsystem version in YYYYMMDD format */

#define ACPI_CA_VERSION 0x20180313
#define ACPI_CA_VERSION 0x20180427

#include "acconfig.h"
#include "actypes.h"
Expand Down
1 change: 0 additions & 1 deletion source/tools/acpibin/abmain.c
Expand Up @@ -186,7 +186,6 @@ AbDisplayUsage (
ACPI_OPTION ("-a <File1> <File2>", "Compare two binary AML files, dump all mismatches");
ACPI_OPTION ("-c <File1> <File2>", "Compare two binary AML files, dump first 100 mismatches");
ACPI_OPTION ("-d <In> <Out>", "Dump AML binary to text file");
ACPI_OPTION ("-e <Sig> <In> <Out>", "Extract binary AML table from acpidump file");
ACPI_OPTION ("-o <Value>", "Start comparison at this offset into second file");
ACPI_OPTION ("-h <File>", "Display table header for binary AML file");
ACPI_OPTION ("-s <File>", "Update checksum for binary AML file");
Expand Down

0 comments on commit effe9a2

Please sign in to comment.