summaryrefslogtreecommitdiff
path: root/source/components
diff options
context:
space:
mode:
Diffstat (limited to 'source/components')
-rw-r--r--source/components/debugger/dbcmds.c30
-rw-r--r--source/components/debugger/dbconvert.c2
-rw-r--r--source/components/debugger/dbdisply.c77
-rw-r--r--source/components/debugger/dbexec.c11
-rw-r--r--source/components/debugger/dbfileio.c136
-rw-r--r--source/components/debugger/dbinput.c45
-rw-r--r--source/components/debugger/dbmethod.c2
-rw-r--r--source/components/debugger/dbnames.c9
-rw-r--r--source/components/debugger/dbobject.c6
-rw-r--r--source/components/debugger/dbstats.c3
-rw-r--r--source/components/debugger/dbtest.c5
-rw-r--r--source/components/debugger/dbutils.c1
-rw-r--r--source/components/debugger/dbxface.c91
-rw-r--r--source/components/disassembler/dmbuffer.c7
-rw-r--r--source/components/disassembler/dmcstyle.c1
-rw-r--r--source/components/disassembler/dmdeferred.c3
-rw-r--r--source/components/disassembler/dmnames.c13
-rw-r--r--source/components/disassembler/dmopcode.c7
-rw-r--r--source/components/disassembler/dmresrc.c7
-rw-r--r--source/components/disassembler/dmresrcl.c18
-rw-r--r--source/components/disassembler/dmresrcl2.c10
-rw-r--r--source/components/disassembler/dmresrcs.c3
-rw-r--r--source/components/disassembler/dmwalk.c14
-rw-r--r--source/components/dispatcher/dsargs.c34
-rw-r--r--source/components/dispatcher/dscontrol.c49
-rw-r--r--source/components/dispatcher/dsdebug.c9
-rw-r--r--source/components/dispatcher/dsfield.c83
-rw-r--r--source/components/dispatcher/dsinit.c12
-rw-r--r--source/components/dispatcher/dsmethod.c73
-rw-r--r--source/components/dispatcher/dsmthdat.c39
-rw-r--r--source/components/dispatcher/dsobject.c66
-rw-r--r--source/components/dispatcher/dsopcode.c46
-rw-r--r--source/components/dispatcher/dsutils.c45
-rw-r--r--source/components/dispatcher/dswexec.c51
-rw-r--r--source/components/dispatcher/dswload.c32
-rw-r--r--source/components/dispatcher/dswload2.c40
-rw-r--r--source/components/dispatcher/dswscope.c1
-rw-r--r--source/components/dispatcher/dswstate.c9
-rw-r--r--source/components/events/evevent.c14
-rw-r--r--source/components/events/evglock.c11
-rw-r--r--source/components/events/evgpe.c16
-rw-r--r--source/components/events/evgpeblk.c15
-rw-r--r--source/components/events/evgpeinit.c28
-rw-r--r--source/components/events/evgpeutil.c7
-rw-r--r--source/components/events/evhandler.c12
-rw-r--r--source/components/events/evmisc.c5
-rw-r--r--source/components/events/evregion.c8
-rw-r--r--source/components/events/evrgnini.c16
-rw-r--r--source/components/events/evsci.c4
-rw-r--r--source/components/events/evxface.c10
-rw-r--r--source/components/events/evxfevnt.c28
-rw-r--r--source/components/events/evxfgpe.c8
-rw-r--r--source/components/events/evxfregn.c4
-rw-r--r--source/components/executer/exconfig.c43
-rw-r--r--source/components/executer/exconvrt.c26
-rw-r--r--source/components/executer/excreate.c24
-rw-r--r--source/components/executer/exdebug.c384
-rw-r--r--source/components/executer/exdump.c43
-rw-r--r--source/components/executer/exfield.c82
-rw-r--r--source/components/executer/exfldio.c63
-rw-r--r--source/components/executer/exmisc.c37
-rw-r--r--source/components/executer/exmutex.c75
-rw-r--r--source/components/executer/exnames.c8
-rw-r--r--source/components/executer/exoparg1.c69
-rw-r--r--source/components/executer/exoparg2.c41
-rw-r--r--source/components/executer/exoparg3.c25
-rw-r--r--source/components/executer/exoparg6.c25
-rw-r--r--source/components/executer/exprep.c60
-rw-r--r--source/components/executer/exregion.c11
-rw-r--r--source/components/executer/exresnte.c10
-rw-r--r--source/components/executer/exresolv.c25
-rw-r--r--source/components/executer/exresop.c36
-rw-r--r--source/components/executer/exstore.c26
-rw-r--r--source/components/executer/exstoren.c4
-rw-r--r--source/components/executer/exstorob.c7
-rw-r--r--source/components/executer/exsystem.c8
-rw-r--r--source/components/executer/extrace.c427
-rw-r--r--source/components/executer/exutils.c10
-rw-r--r--source/components/hardware/hwacpi.c10
-rw-r--r--source/components/hardware/hwesleep.c5
-rw-r--r--source/components/hardware/hwgpe.c12
-rw-r--r--source/components/hardware/hwregs.c39
-rw-r--r--source/components/hardware/hwsleep.c16
-rw-r--r--source/components/hardware/hwxface.c48
-rw-r--r--source/components/hardware/hwxfsleep.c7
-rw-r--r--source/components/namespace/nsaccess.c12
-rw-r--r--source/components/namespace/nsalloc.c5
-rw-r--r--source/components/namespace/nsarguments.c6
-rw-r--r--source/components/namespace/nsconvert.c12
-rw-r--r--source/components/namespace/nsdump.c41
-rw-r--r--source/components/namespace/nsdumpdv.c4
-rw-r--r--source/components/namespace/nseval.c6
-rw-r--r--source/components/namespace/nsinit.c10
-rw-r--r--source/components/namespace/nsload.c9
-rw-r--r--source/components/namespace/nsnames.c15
-rw-r--r--source/components/namespace/nsobject.c6
-rw-r--r--source/components/namespace/nsparse.c13
-rw-r--r--source/components/namespace/nsprepkg.c21
-rw-r--r--source/components/namespace/nsrepair.c14
-rw-r--r--source/components/namespace/nsrepair2.c33
-rw-r--r--source/components/namespace/nssearch.c4
-rw-r--r--source/components/namespace/nsutils.c21
-rw-r--r--source/components/namespace/nswalk.c12
-rw-r--r--source/components/namespace/nsxfeval.c24
-rw-r--r--source/components/namespace/nsxfname.c56
-rw-r--r--source/components/namespace/nsxfobj.c7
-rw-r--r--source/components/parser/psargs.c11
-rw-r--r--source/components/parser/psloop.c10
-rw-r--r--source/components/parser/psobject.c7
-rw-r--r--source/components/parser/psparse.c47
-rw-r--r--source/components/parser/psscope.c10
-rw-r--r--source/components/parser/psutils.c7
-rw-r--r--source/components/parser/pswalk.c1
-rw-r--r--source/components/parser/psxface.c9
-rw-r--r--source/components/resources/rsaddr.c27
-rw-r--r--source/components/resources/rscalc.c63
-rw-r--r--source/components/resources/rscreate.c49
-rw-r--r--source/components/resources/rsdump.c15
-rw-r--r--source/components/resources/rslist.c25
-rw-r--r--source/components/resources/rsmisc.c51
-rw-r--r--source/components/resources/rsutils.c65
-rw-r--r--source/components/resources/rsxface.c15
-rw-r--r--source/components/tables/tbdata.c9
-rw-r--r--source/components/tables/tbfadt.c8
-rw-r--r--source/components/tables/tbfind.c8
-rw-r--r--source/components/tables/tbinstal.c13
-rw-r--r--source/components/tables/tbprint.c5
-rw-r--r--source/components/tables/tbutils.c48
-rw-r--r--source/components/tables/tbxface.c18
-rw-r--r--source/components/tables/tbxfload.c20
-rw-r--r--source/components/tables/tbxfroot.c24
-rw-r--r--source/components/utilities/utaddress.c2
-rw-r--r--source/components/utilities/utalloc.c15
-rw-r--r--source/components/utilities/utcache.c4
-rw-r--r--source/components/utilities/utcopy.c120
-rw-r--r--source/components/utilities/utdecode.c31
-rw-r--r--source/components/utilities/utdelete.c11
-rw-r--r--source/components/utilities/uterror.c8
-rw-r--r--source/components/utilities/uteval.c8
-rw-r--r--source/components/utilities/utfileio.c366
-rw-r--r--source/components/utilities/uthex.c2
-rw-r--r--source/components/utilities/utids.c93
-rw-r--r--source/components/utilities/utinit.c16
-rw-r--r--source/components/utilities/utmath.c33
-rw-r--r--source/components/utilities/utmisc.c30
-rw-r--r--source/components/utilities/utmutex.c7
-rw-r--r--source/components/utilities/utnonansi.c4
-rw-r--r--source/components/utilities/utobject.c30
-rw-r--r--source/components/utilities/utosi.c14
-rw-r--r--source/components/utilities/utownerid.c11
-rw-r--r--source/components/utilities/utpredef.c6
-rw-r--r--source/components/utilities/utprint.c16
-rw-r--r--source/components/utilities/utresrc.c17
-rw-r--r--source/components/utilities/utstate.c3
-rw-r--r--source/components/utilities/utstring.c1
-rw-r--r--source/components/utilities/uttrack.c81
-rw-r--r--source/components/utilities/utuuid.c8
-rw-r--r--source/components/utilities/utxface.c21
-rw-r--r--source/components/utilities/utxferror.c4
-rw-r--r--source/components/utilities/utxfmutex.c4
160 files changed, 2373 insertions, 2471 deletions
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c
index c9d06f977f83f..1a3b8c848bc85 100644
--- a/source/components/debugger/dbcmds.c
+++ b/source/components/debugger/dbcmds.c
@@ -117,8 +117,7 @@ AcpiDbConvertToNode (
Node = ACPI_TO_POINTER (Address);
if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
{
- AcpiOsPrintf ("Address %p is invalid",
- Node);
+ AcpiOsPrintf ("Address %p is invalid", Node);
return (NULL);
}
@@ -127,7 +126,7 @@ AcpiDbConvertToNode (
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
AcpiOsPrintf ("Address %p is not a valid namespace node [%s]\n",
- Node, AcpiUtGetDescriptorName (Node));
+ Node, AcpiUtGetDescriptorName (Node));
return (NULL);
}
}
@@ -914,7 +913,7 @@ AcpiDbDeviceResources (
Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
- ParentPath = AcpiNsGetExternalPathname (Node);
+ ParentPath = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!ParentPath)
{
return (AE_NO_MEMORY);
@@ -1005,7 +1004,7 @@ GetCrs:
/* Get the _CRS resource list (test ALLOCATE buffer) */
ReturnBuffer.Pointer = NULL;
- ReturnBuffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+ ReturnBuffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
Status = AcpiGetCurrentResources (Node, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1074,7 +1073,7 @@ GetPrs:
}
ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
- ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
+ ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetPossibleResources (Node, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1097,7 +1096,7 @@ GetAei:
AcpiOsPrintf ("Evaluating _AEI\n");
ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
- ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
+ ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiEvaluateObject (AeiNode, NULL, NULL, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1108,7 +1107,7 @@ GetAei:
}
ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
- ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
+ ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetEventResources (Node, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1224,8 +1223,8 @@ AcpiDbGenerateGpe (
}
}
- GpeEventInfo = AcpiEvGetGpeEventInfo (ACPI_TO_POINTER (BlockNumber),
- GpeNumber);
+ GpeEventInfo = AcpiEvGetGpeEventInfo (
+ ACPI_TO_POINTER (BlockNumber), GpeNumber);
if (!GpeEventInfo)
{
AcpiOsPrintf ("Invalid GPE\n");
@@ -1284,15 +1283,8 @@ AcpiDbTrace (
UINT32 Flags = 0;
- if (EnableArg)
- {
- AcpiUtStrupr (EnableArg);
- }
-
- if (OnceArg)
- {
- AcpiUtStrupr (OnceArg);
- }
+ AcpiUtStrupr (EnableArg);
+ AcpiUtStrupr (OnceArg);
if (MethodArg)
{
diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c
index 058838a42e84b..218909e1bbaca 100644
--- a/source/components/debugger/dbconvert.c
+++ b/source/components/debugger/dbconvert.c
@@ -198,7 +198,7 @@ AcpiDbConvertToBuffer (
}
j++;
- i+=2;
+ i += 2;
while (String[i] &&
((String[i] == ',') || (String[i] == ' ')))
{
diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c
index 267ab58fd859d..09d1232a74ea3 100644
--- a/source/components/debugger/dbdisply.c
+++ b/source/components/debugger/dbdisply.c
@@ -413,14 +413,13 @@ AcpiDbDisplayMethodInfo (
}
ObjDesc = WalkState->MethodDesc;
- Node = WalkState->MethodNode;
+ Node = WalkState->MethodNode;
AcpiOsPrintf ("Currently executing control method is [%4.4s]\n",
- AcpiUtGetNodeName (Node));
+ AcpiUtGetNodeName (Node));
AcpiOsPrintf ("%X Arguments, SyncLevel = %X\n",
- (UINT32) ObjDesc->Method.ParamCount,
- (UINT32) ObjDesc->Method.SyncLevel);
-
+ (UINT32) ObjDesc->Method.ParamCount,
+ (UINT32) ObjDesc->Method.SyncLevel);
RootOp = StartOp;
while (RootOp->Common.Parent)
@@ -581,7 +580,7 @@ AcpiDbDisplayResults (
}
ObjDesc = WalkState->MethodDesc;
- Node = WalkState->MethodNode;
+ Node = WalkState->MethodNode;
if (WalkState->Results)
{
@@ -657,7 +656,7 @@ AcpiDbDisplayCallingTree (
*
* FUNCTION: AcpiDbDisplayObjectType
*
- * PARAMETERS: Name - User entered NS node handle or name
+ * PARAMETERS: ObjectArg - User entered NS node handle
*
* RETURN: None
*
@@ -667,21 +666,17 @@ AcpiDbDisplayCallingTree (
void
AcpiDbDisplayObjectType (
- char *Name)
+ char *ObjectArg)
{
- ACPI_NAMESPACE_NODE *Node;
+ ACPI_HANDLE Handle;
ACPI_DEVICE_INFO *Info;
ACPI_STATUS Status;
UINT32 i;
- Node = AcpiDbConvertToNode (Name);
- if (!Node)
- {
- return;
- }
+ Handle = ACPI_TO_POINTER (strtoul (ObjectArg, NULL, 16));
- Status = AcpiGetObjectInfo (ACPI_CAST_PTR (ACPI_HANDLE, Node), &Info);
+ Status = AcpiGetObjectInfo (Handle, &Info);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not get object info, %s\n",
@@ -689,25 +684,18 @@ AcpiDbDisplayObjectType (
return;
}
- if (Info->Valid & ACPI_VALID_ADR)
- {
- AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
- ACPI_FORMAT_UINT64 (Info->Address),
- Info->CurrentStatus, Info->Flags);
- }
- if (Info->Valid & ACPI_VALID_SXDS)
- {
- AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
- Info->HighestDstates[0], Info->HighestDstates[1],
- Info->HighestDstates[2], Info->HighestDstates[3]);
- }
- if (Info->Valid & ACPI_VALID_SXWS)
- {
- AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
- Info->LowestDstates[0], Info->LowestDstates[1],
- Info->LowestDstates[2], Info->LowestDstates[3],
- Info->LowestDstates[4]);
- }
+ AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
+ ACPI_FORMAT_UINT64 (Info->Address),
+ Info->CurrentStatus, Info->Flags);
+
+ AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
+ Info->HighestDstates[0], Info->HighestDstates[1],
+ Info->HighestDstates[2], Info->HighestDstates[3]);
+
+ AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
+ Info->LowestDstates[0], Info->LowestDstates[1],
+ Info->LowestDstates[2], Info->LowestDstates[3],
+ Info->LowestDstates[4]);
if (Info->Valid & ACPI_VALID_HID)
{
@@ -719,11 +707,6 @@ AcpiDbDisplayObjectType (
AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
}
- if (Info->Valid & ACPI_VALID_SUB)
- {
- AcpiOsPrintf ("SUB: %s\n", Info->SubsystemId.String);
- }
-
if (Info->Valid & ACPI_VALID_CID)
{
for (i = 0; i < Info->CompatibleIdList.Count; i++)
@@ -760,6 +743,13 @@ AcpiDbDisplayResultObject (
ACPI_WALK_STATE *WalkState)
{
+#ifndef ACPI_APPLICATION
+ if (AcpiGbl_DbThreadId != AcpiOsGetThreadId())
+ {
+ return;
+ }
+#endif
+
/* Only display if single stepping */
if (!AcpiGbl_CmSingleStep)
@@ -792,6 +782,13 @@ AcpiDbDisplayArgumentObject (
ACPI_WALK_STATE *WalkState)
{
+#ifndef ACPI_APPLICATION
+ if (AcpiGbl_DbThreadId != AcpiOsGetThreadId())
+ {
+ return;
+ }
+#endif
+
if (!AcpiGbl_CmSingleStep)
{
return;
@@ -1171,7 +1168,7 @@ AcpiDbDisplayNonRootHandlers (
return (AE_OK);
}
- Pathname = AcpiNsGetExternalPathname (Node);
+ Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!Pathname)
{
return (AE_OK);
diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c
index af01ca277f41a..b2836eb55db84 100644
--- a/source/components/debugger/dbexec.c
+++ b/source/components/debugger/dbexec.c
@@ -528,8 +528,8 @@ AcpiDbExecute (
/* Dump a _PLD buffer if present */
if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
- AcpiGbl_DbMethodInfo.Method)->Name.Ascii),
- METHOD_NAME__PLD))
+ AcpiGbl_DbMethodInfo.Method)->Name.Ascii),
+ METHOD_NAME__PLD))
{
AcpiDbDumpPldBuffer (ReturnObj.Pointer);
}
@@ -627,7 +627,8 @@ AcpiDbMethodThread (
if (ReturnObj.Length)
{
AcpiOsPrintf ("Evaluation of %s returned object %p Buflen %X\n",
- Info->Pathname, ReturnObj.Pointer, (UINT32) ReturnObj.Length);
+ Info->Pathname, ReturnObj.Pointer,
+ (UINT32) ReturnObj.Length);
AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
}
#endif
@@ -694,7 +695,7 @@ AcpiDbCreateExecutionThreads (
/* Get the arguments */
NumThreads = strtoul (NumThreadsArg, NULL, 0);
- NumLoops = strtoul (NumLoopsArg, NULL, 0);
+ NumLoops = strtoul (NumLoopsArg, NULL, 0);
if (!NumThreads || !NumLoops)
{
@@ -810,7 +811,7 @@ AcpiDbCreateExecutionThreads (
for (i = 0; i < (NumThreads); i++)
{
- Status = AcpiOsExecute (OSL_DEBUGGER_THREAD, AcpiDbMethodThread,
+ Status = AcpiOsExecute (OSL_DEBUGGER_EXEC_THREAD, AcpiDbMethodThread,
&AcpiGbl_DbMethodInfo);
if (ACPI_FAILURE (Status))
{
diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c
index aaeda4527f861..9ce3f2ff6a526 100644
--- a/source/components/debugger/dbfileio.c
+++ b/source/components/debugger/dbfileio.c
@@ -46,7 +46,10 @@
#include "accommon.h"
#include "acdebug.h"
#include "actables.h"
-
+#include <stdio.h>
+#ifdef ACPI_APPLICATION
+#include "acapps.h"
+#endif
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbfileio")
@@ -121,134 +124,35 @@ AcpiDbOpenDebugFile (
#endif
-#ifdef ACPI_APPLICATION
-#include "acapps.h"
-
/*******************************************************************************
*
- * FUNCTION: AeLocalLoadTable
+ * FUNCTION: AcpiDbLoadTables
*
- * PARAMETERS: Table - pointer to a buffer containing the entire
- * table to be loaded
+ * PARAMETERS: ListHead - List of ACPI tables to load
*
* RETURN: Status
*
- * DESCRIPTION: This function is called to load a table from the caller's
- * buffer. The buffer must contain an entire ACPI Table including
- * a valid header. The header fields will be verified, and if it
- * is determined that the table is invalid, the call will fail.
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AeLocalLoadTable (
- ACPI_TABLE_HEADER *Table)
-{
- ACPI_STATUS Status = AE_OK;
-
-
- ACPI_FUNCTION_TRACE (AeLocalLoadTable);
-
-#if 0
-/* ACPI_TABLE_DESC TableInfo; */
-
- if (!Table)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- TableInfo.Pointer = Table;
- Status = AcpiTbRecognizeTable (&TableInfo, ACPI_TABLE_ALL);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Install the new table into the local data structures */
-
- Status = AcpiTbInitTableDescriptor (&TableInfo);
- if (ACPI_FAILURE (Status))
- {
- if (Status == AE_ALREADY_EXISTS)
- {
- /* Table already exists, no error */
-
- Status = AE_OK;
- }
-
- /* Free table allocated by AcpiTbGetTable */
-
- AcpiTbDeleteSingleTable (&TableInfo);
- return_ACPI_STATUS (Status);
- }
-
-#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
-
- Status = AcpiNsLoadTable (TableInfo.InstalledDesc, AcpiGbl_RootNode);
- if (ACPI_FAILURE (Status))
- {
- /* Uninstall table and free the buffer */
-
- AcpiTbDeleteTablesByType (ACPI_TABLE_ID_DSDT);
- return_ACPI_STATUS (Status);
- }
-#endif
-#endif
-
- return_ACPI_STATUS (Status);
-}
-#endif
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDbGetTableFromFile
- *
- * PARAMETERS: Filename - File where table is located
- * ReturnTable - Where a pointer to the table is returned
- *
- * RETURN: Status
- *
- * DESCRIPTION: Load an ACPI table from a file
+ * DESCRIPTION: Load ACPI tables from a previously constructed table list.
*
******************************************************************************/
ACPI_STATUS
-AcpiDbGetTableFromFile (
- char *Filename,
- ACPI_TABLE_HEADER **ReturnTable,
- BOOLEAN MustBeAmlFile)
+AcpiDbLoadTables (
+ ACPI_NEW_TABLE_DESC *ListHead)
{
-#ifdef ACPI_APPLICATION
ACPI_STATUS Status;
+ ACPI_NEW_TABLE_DESC *TableListHead;
ACPI_TABLE_HEADER *Table;
- BOOLEAN IsAmlTable = TRUE;
- Status = AcpiUtReadTableFromFile (Filename, &Table);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- if (MustBeAmlFile)
- {
- IsAmlTable = AcpiUtIsAmlTable (Table);
- if (!IsAmlTable)
- {
- ACPI_EXCEPTION ((AE_INFO, AE_OK,
- "Input for -e is not an AML table: "
- "\"%4.4s\" (must be DSDT/SSDT)",
- Table->Signature));
- return (AE_TYPE);
- }
- }
+ /* Load all ACPI tables in the list */
- if (IsAmlTable)
+ TableListHead = ListHead;
+ while (TableListHead)
{
- /* Attempt to recognize and install the table */
+ Table = TableListHead->Table;
- Status = AeLocalLoadTable (Table);
+ Status = AcpiLoadTable (Table);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
@@ -265,20 +169,12 @@ AcpiDbGetTableFromFile (
return (Status);
}
- AcpiTbPrintTableHeader (0, Table);
-
fprintf (stderr,
"Acpi table [%4.4s] successfully installed and loaded\n",
Table->Signature);
- }
- AcpiGbl_AcpiHardwarePresent = FALSE;
- if (ReturnTable)
- {
- *ReturnTable = Table;
+ TableListHead = TableListHead->Next;
}
-
-#endif /* ACPI_APPLICATION */
return (AE_OK);
}
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index 1b9a9175e294a..68043cbed6f8b 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -45,6 +45,9 @@
#include "accommon.h"
#include "acdebug.h"
+#ifdef ACPI_APPLICATION
+#include "acapps.h"
+#endif
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbinput")
@@ -679,10 +682,7 @@ AcpiDbGetLine (
/* Uppercase the actual command */
- if (AcpiGbl_DbArgs[0])
- {
- AcpiUtStrupr (AcpiGbl_DbArgs[0]);
- }
+ AcpiUtStrupr (AcpiGbl_DbArgs[0]);
Count = i;
if (Count)
@@ -762,7 +762,7 @@ AcpiDbCommandDispatch (
/* If AcpiTerminate has been called, terminate this thread */
- if (AcpiGbl_DbTerminateThreads)
+ if (AcpiGbl_DbTerminateLoop)
{
return (AE_CTRL_TERMINATE);
}
@@ -942,8 +942,8 @@ AcpiDbCommandDispatch (
else if (ParamCount == 2)
{
Temp = AcpiGbl_DbConsoleDebugLevel;
- AcpiGbl_DbConsoleDebugLevel = strtoul (AcpiGbl_DbArgs[1],
- NULL, 16);
+ AcpiGbl_DbConsoleDebugLevel =
+ strtoul (AcpiGbl_DbArgs[1], NULL, 16);
AcpiOsPrintf (
"Debug Level for console output was %8.8lX, now %8.8lX\n",
Temp, AcpiGbl_DbConsoleDebugLevel);
@@ -1119,8 +1119,16 @@ AcpiDbCommandDispatch (
break;
case CMD_LOAD:
+ {
+ ACPI_NEW_TABLE_DESC *ListHead = NULL;
- Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL, FALSE);
+ Status = AcpiAcGetAllTablesFromFile (AcpiGbl_DbArgs[1],
+ ACPI_GET_ALL_TABLES, &ListHead);
+ if (ACPI_SUCCESS (Status))
+ {
+ AcpiDbLoadTables (ListHead);
+ }
+ }
break;
case CMD_OPEN:
@@ -1140,6 +1148,7 @@ AcpiDbCommandDispatch (
* re-creating the semaphores!
*/
+ AcpiGbl_DbTerminateLoop = TRUE;
/* AcpiInitialize (NULL); */
break;
@@ -1184,7 +1193,7 @@ AcpiDbCommandDispatch (
#ifdef ACPI_APPLICATION
AcpiDbCloseDebugFile ();
#endif
- AcpiGbl_DbTerminateThreads = TRUE;
+ AcpiGbl_DbTerminateLoop = TRUE;
return (AE_CTRL_TERMINATE);
case CMD_NOT_FOUND:
@@ -1224,7 +1233,7 @@ AcpiDbExecuteThread (
ACPI_STATUS MStatus;
- while (Status != AE_CTRL_TERMINATE)
+ while (Status != AE_CTRL_TERMINATE && !AcpiGbl_DbTerminateLoop)
{
AcpiGbl_MethodExecuting = FALSE;
AcpiGbl_StepToNextCall = FALSE;
@@ -1240,6 +1249,7 @@ AcpiDbExecuteThread (
AcpiOsReleaseMutex (AcpiGbl_DbCommandComplete);
}
+ AcpiGbl_DbThreadsTerminated = TRUE;
}
@@ -1294,7 +1304,7 @@ AcpiDbUserCommands (
/* TBD: [Restructure] Need a separate command line buffer for step mode */
- while (!AcpiGbl_DbTerminateThreads)
+ while (!AcpiGbl_DbTerminateLoop)
{
/* Force output to console until a command is entered */
@@ -1330,10 +1340,6 @@ AcpiDbUserCommands (
* and wait for the command to complete.
*/
AcpiOsReleaseMutex (AcpiGbl_DbCommandReady);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete,
ACPI_WAIT_FOREVER);
@@ -1350,14 +1356,5 @@ AcpiDbUserCommands (
}
}
- /* Shut down the debugger */
-
- AcpiTerminateDebugger ();
-
- /*
- * Only this thread (the original thread) should actually terminate the
- * subsystem, because all the semaphores are deleted during termination
- */
- Status = AcpiTerminate ();
return (Status);
}
diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c
index ee13baef979c9..6351b2a0d132f 100644
--- a/source/components/debugger/dbmethod.c
+++ b/source/components/debugger/dbmethod.c
@@ -89,7 +89,7 @@ AcpiDbSetMethodBreakpoint (
Address = strtoul (Location, NULL, 16);
AmlOffset = (UINT32) ACPI_PTR_DIFF (Op->Common.Aml,
- WalkState->ParserState.AmlStart);
+ WalkState->ParserState.AmlStart);
if (Address <= AmlOffset)
{
AcpiOsPrintf ("Breakpoint %X is beyond current address %X\n",
diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c
index 6b41dc6ea2a70..f9b192574c258 100644
--- a/source/components/debugger/dbnames.c
+++ b/source/components/debugger/dbnames.c
@@ -198,7 +198,7 @@ AcpiDbSetScope (
/* Build the final pathname */
if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf),
- Name))
+ Name))
{
Status = AE_BUFFER_OVERFLOW;
goto ErrorExit;
@@ -499,7 +499,7 @@ AcpiDbWalkForPredefinedNames (
return (AE_OK);
}
- Pathname = AcpiNsGetExternalPathname (Node);
+ Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!Pathname)
{
return (AE_OK);
@@ -560,7 +560,8 @@ AcpiDbCheckPredefinedNames (
/* Search all nodes in namespace */
(void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, AcpiDbWalkForPredefinedNames, NULL, (void *) &Count, NULL);
+ ACPI_UINT32_MAX, AcpiDbWalkForPredefinedNames,
+ NULL, (void *) &Count, NULL);
AcpiOsPrintf ("Found %u predefined names in the namespace\n", Count);
}
@@ -962,7 +963,7 @@ AcpiDbBusWalk (
/* Exit if there is no _PRT under this device */
Status = AcpiGetHandle (Node, METHOD_NAME__PRT,
- ACPI_CAST_PTR (ACPI_HANDLE, &TempNode));
+ ACPI_CAST_PTR (ACPI_HANDLE, &TempNode));
if (ACPI_FAILURE (Status))
{
return (AE_OK);
diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c
index 019e8115fc0db..da9ff396101b0 100644
--- a/source/components/debugger/dbobject.c
+++ b/source/components/debugger/dbobject.c
@@ -495,7 +495,8 @@ AcpiDbDecodeLocals (
}
else
{
- AcpiOsPrintf ("No Local Variables are initialized for method [%4.4s]\n",
+ AcpiOsPrintf (
+ "No Local Variables are initialized for method [%4.4s]\n",
AcpiUtGetNodeName (Node));
}
}
@@ -572,7 +573,8 @@ AcpiDbDecodeArguments (
}
else
{
- AcpiOsPrintf ("No Arguments are initialized for method [%4.4s]\n",
+ AcpiOsPrintf (
+ "No Arguments are initialized for method [%4.4s]\n",
AcpiUtGetNodeName (Node));
}
}
diff --git a/source/components/debugger/dbstats.c b/source/components/debugger/dbstats.c
index e1ff8bb00c3c0..cc781762956c2 100644
--- a/source/components/debugger/dbstats.c
+++ b/source/components/debugger/dbstats.c
@@ -339,7 +339,7 @@ AcpiDbClassifyOneObject (
Op = AcpiPsGetDepthNext (Root, Op);
SizeOfParseTree = (NumGrammarElements - NumMethodElements) *
- (UINT32) sizeof (ACPI_PARSE_OBJECT);
+ (UINT32) sizeof (ACPI_PARSE_OBJECT);
SizeOfMethodTrees = NumMethodElements * (UINT32) sizeof (ACPI_PARSE_OBJECT);
SizeOfNodeEntries = NumNodes * (UINT32) sizeof (ACPI_NAMESPACE_NODE);
SizeOfAcpiObjects = NumNodes * (UINT32) sizeof (ACPI_OPERAND_OBJECT);
@@ -439,6 +439,7 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", AcpiUtGetTypeName (i),
AcpiGbl_NodeTypeCount [i], AcpiGbl_ObjTypeCount [i]);
}
+
AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "Misc/Unknown",
AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);
diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c
index 840d371d11c05..83a2c9ec6312a 100644
--- a/source/components/debugger/dbtest.c
+++ b/source/components/debugger/dbtest.c
@@ -980,7 +980,8 @@ AcpiDbEvaluateAllPredefinedNames (
ACPI_UINT32_MAX, AcpiDbEvaluateOnePredefinedName, NULL,
(void *) &Info, NULL);
- AcpiOsPrintf ("Evaluated %u predefined names in the namespace\n", Info.Count);
+ AcpiOsPrintf (
+ "Evaluated %u predefined names in the namespace\n", Info.Count);
}
@@ -1033,7 +1034,7 @@ AcpiDbEvaluateOnePredefinedName (
return (AE_OK);
}
- Pathname = AcpiNsGetExternalPathname (Node);
+ Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!Pathname)
{
return (AE_OK);
diff --git a/source/components/debugger/dbutils.c b/source/components/debugger/dbutils.c
index 90fd949cf4454..4d4ee60ab4f75 100644
--- a/source/components/debugger/dbutils.c
+++ b/source/components/debugger/dbutils.c
@@ -199,6 +199,7 @@ AcpiDbDumpExternalObject (
{
AcpiOsPrintf ("\n");
}
+
AcpiUtDebugDumpBuffer (
ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
ObjDesc->Buffer.Length, DB_BYTE_DISPLAY, _COMPONENT);
diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c
index 9e7c31d6c0c8a..cc636dece49ac 100644
--- a/source/components/debugger/dbxface.c
+++ b/source/components/debugger/dbxface.c
@@ -152,6 +152,40 @@ AcpiDbStartCommand (
/*******************************************************************************
*
+ * FUNCTION: AcpiDbSignalBreakPoint
+ *
+ * PARAMETERS: WalkState - Current walk
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Called for AML_BREAK_POINT_OP
+ *
+ ******************************************************************************/
+
+void
+AcpiDbSignalBreakPoint (
+ ACPI_WALK_STATE *WalkState)
+{
+
+#ifndef ACPI_APPLICATION
+ if (AcpiGbl_DbThreadId != AcpiOsGetThreadId ())
+ {
+ return;
+ }
+#endif
+
+ /*
+ * Set the single-step flag. This will cause the debugger (if present)
+ * to break to the console within the AML debugger at the start of the
+ * next AML instruction.
+ */
+ AcpiGbl_CmSingleStep = TRUE;
+ AcpiOsPrintf ("**break** Executed AML BreakPoint opcode\n");
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDbSingleStep
*
* PARAMETERS: WalkState - Current walk
@@ -181,6 +215,13 @@ AcpiDbSingleStep (
ACPI_FUNCTION_ENTRY ();
+#ifndef ACPI_APPLICATION
+ if (AcpiGbl_DbThreadId != AcpiOsGetThreadId ())
+ {
+ return (AE_OK);
+ }
+#endif
+
/* Check the abort flag */
if (AcpiGbl_AbortMethod)
@@ -439,6 +480,10 @@ AcpiInitializeDebugger (
AcpiGbl_DbScopeBuf [1] = 0;
AcpiGbl_DbScopeNode = AcpiGbl_RootNode;
+ /* Initialize user commands loop */
+
+ AcpiGbl_DbTerminateLoop = FALSE;
+
/*
* If configured for multi-thread support, the debug executor runs in
* a separate thread so that the front end can be in another address
@@ -466,15 +511,21 @@ AcpiInitializeDebugger (
/* Create the debug execution thread to execute commands */
- Status = AcpiOsExecute (OSL_DEBUGGER_THREAD,
+ AcpiGbl_DbThreadsTerminated = FALSE;
+ Status = AcpiOsExecute (OSL_DEBUGGER_MAIN_THREAD,
AcpiDbExecuteThread, NULL);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
"Could not start debugger thread"));
+ AcpiGbl_DbThreadsTerminated = TRUE;
return_ACPI_STATUS (Status);
}
}
+ else
+ {
+ AcpiGbl_DbThreadId = AcpiOsGetThreadId ();
+ }
return_ACPI_STATUS (AE_OK);
}
@@ -499,6 +550,22 @@ AcpiTerminateDebugger (
void)
{
+ /* Terminate the AML Debugger */
+
+ AcpiGbl_DbTerminateLoop = TRUE;
+
+ if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)
+ {
+ AcpiOsReleaseMutex (AcpiGbl_DbCommandReady);
+
+ /* Wait the AML Debugger threads */
+
+ while (!AcpiGbl_DbThreadsTerminated)
+ {
+ AcpiOsSleep (100);
+ }
+ }
+
if (AcpiGbl_DbBuffer)
{
AcpiOsFree (AcpiGbl_DbBuffer);
@@ -511,3 +578,25 @@ AcpiTerminateDebugger (
}
ACPI_EXPORT_SYMBOL (AcpiTerminateDebugger)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiSetDebuggerThreadId
+ *
+ * PARAMETERS: ThreadId - Debugger thread ID
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Set debugger thread ID
+ *
+ ******************************************************************************/
+
+void
+AcpiSetDebuggerThreadId (
+ ACPI_THREAD_ID ThreadId)
+{
+ AcpiGbl_DbThreadId = ThreadId;
+}
+
+ACPI_EXPORT_SYMBOL (AcpiSetDebuggerThreadId)
diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c
index 7bab89fe4140e..596dbf12f48c0 100644
--- a/source/components/disassembler/dmbuffer.c
+++ b/source/components/disassembler/dmbuffer.c
@@ -254,7 +254,8 @@ AcpiDmByteList (
{
case ACPI_DASM_RESOURCE:
- AcpiDmResourceTemplate (Info, Op->Common.Parent, ByteData, ByteCount);
+ AcpiDmResourceTemplate (
+ Info, Op->Common.Parent, ByteData, ByteCount);
break;
case ACPI_DASM_STRING:
@@ -751,13 +752,17 @@ AcpiDmPldBuffer (
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Lid", PldInfo->Lid);
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Panel",
AcpiDmFindNameByIndex(PldInfo->Panel, DmPanelList));
+
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_VerticalPosition",
AcpiDmFindNameByIndex(PldInfo->VerticalPosition, DmVerticalPositionList));
+
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_HorizontalPosition",
AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, DmHorizontalPositionList));
+
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Shape",
AcpiDmFindNameByIndex(PldInfo->Shape, DmShapeList));
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupOrientation", PldInfo->GroupOrientation);
+
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupToken", PldInfo->GroupToken);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupPosition", PldInfo->GroupPosition);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Bay", PldInfo->Bay);
diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c
index 7616723d9a9ea..4402eb09a44c7 100644
--- a/source/components/disassembler/dmcstyle.c
+++ b/source/components/disassembler/dmcstyle.c
@@ -685,6 +685,7 @@ AcpiDmGetCompoundSymbol (
default:
/* No operator string for all other opcodes */
+
return (NULL);
}
diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c
index 35d5650f82ee4..c8bf5f10fde15 100644
--- a/source/components/disassembler/dmdeferred.c
+++ b/source/components/disassembler/dmdeferred.c
@@ -105,7 +105,8 @@ AcpiDmParseDeferredOps (
case AML_PACKAGE_OP:
case AML_VAR_PACKAGE_OP:
- Status = AcpiDmDeferredParse (Op, Op->Named.Data, Op->Named.Length);
+ Status = AcpiDmDeferredParse (
+ Op, Op->Named.Data, Op->Named.Length);
if (ACPI_FAILURE (Status))
{
return (Status);
diff --git a/source/components/disassembler/dmnames.c b/source/components/disassembler/dmnames.c
index 99ca38e20fe77..022541e4c5f73 100644
--- a/source/components/disassembler/dmnames.c
+++ b/source/components/disassembler/dmnames.c
@@ -155,15 +155,15 @@ AcpiPsDisplayObjectPathname (
/* Node not defined in this scope, look it up */
Status = AcpiNsLookup (WalkState->ScopeInfo, Op->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
- WalkState, &(Node));
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
+ WalkState, &(Node));
if (ACPI_FAILURE (Status))
{
/*
- * We can't get the pathname since the object
- * is not in the namespace. This can happen during single
- * stepping where a dynamic named object is *about* to be created.
+ * We can't get the pathname since the object is not in the
+ * namespace. This can happen during single stepping
+ * where a dynamic named object is *about* to be created.
*/
AcpiOsPrintf (" [Path not found]");
goto Exit;
@@ -269,6 +269,7 @@ AcpiDmNamestring (
AcpiOsPrintf (".");
}
+
Name += ACPI_NAME_SIZE;
}
}
@@ -332,7 +333,6 @@ AcpiDmDisplayPath (
}
Prev = NULL; /* Start with Root Node */
-
while (Prev != Op)
{
/* Search upwards in the tree to find scope with "prev" as its parent */
@@ -390,6 +390,7 @@ AcpiDmDisplayPath (
DoDot = TRUE;
}
}
+
Prev = Search;
}
}
diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c
index 1d52cd794c3d0..02c51bdefa41b 100644
--- a/source/components/disassembler/dmopcode.c
+++ b/source/components/disassembler/dmopcode.c
@@ -820,7 +820,9 @@ AcpiDmDisassembleOneOp (
}
else if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
- AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ ");
+ AcpiOsPrintf (
+ "/**** Is ResourceTemplate, "
+ "but EndTag not at buffer end ****/ ");
}
}
@@ -895,7 +897,8 @@ AcpiDmDisassembleOneOp (
if (Op->Common.AmlOpcode == AML_INT_EXTACCESSFIELD_OP)
{
- AcpiOsPrintf (" (0x%2.2X)", (unsigned) ((Op->Common.Value.Integer >> 16) & 0xFF));
+ AcpiOsPrintf (" (0x%2.2X)", (unsigned)
+ ((Op->Common.Value.Integer >> 16) & 0xFF));
}
AcpiOsPrintf (")");
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index a12f0a95b7bdb..f1c9f5968a999 100644
--- a/source/components/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
@@ -212,6 +212,7 @@ AcpiDmBitList (
{
AcpiOsPrintf (",");
}
+
Previous = TRUE;
AcpiOsPrintf ("%u", i);
}
@@ -285,7 +286,8 @@ AcpiDmResourceTemplate (
Status = AcpiUtValidateResource (NULL, Aml, &ResourceIndex);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("/*** Could not validate Resource, type (%X) %s***/\n",
+ AcpiOsPrintf (
+ "/*** Could not validate Resource, type (%X) %s***/\n",
ResourceType, AcpiFormatException (Status));
return;
}
@@ -335,7 +337,8 @@ AcpiDmResourceTemplate (
AcpiDmIndent (Level);
AcpiOsPrintf (
- "/*** Disassembler: inserted missing EndDependentFn () ***/\n");
+ "/*** Disassembler: inserted "
+ "missing EndDependentFn () ***/\n");
}
return;
diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c
index 9a02058f3eebe..37c38f784431f 100644
--- a/source/components/disassembler/dmresrcl.c
+++ b/source/components/disassembler/dmresrcl.c
@@ -307,7 +307,8 @@ AcpiDmAddressCommon (
if ((ResourceType > 2) && (ResourceType < 0xC0))
{
- AcpiOsPrintf ("/**** Invalid Resource Type: 0x%X ****/", ResourceType);
+ AcpiOsPrintf (
+ "/**** Invalid Resource Type: 0x%X ****/", ResourceType);
return;
}
@@ -327,7 +328,8 @@ AcpiDmAddressCommon (
/* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */
- AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ACPI_GET_2BIT_FLAG (ResourceType)]);
+ AcpiOsPrintf ("%s (",
+ AcpiGbl_WordDecode [ACPI_GET_2BIT_FLAG (ResourceType)]);
/* Decode the general and type-specific flags */
@@ -340,7 +342,8 @@ AcpiDmAddressCommon (
AcpiDmIoFlags (Flags);
if (ResourceType == ACPI_IO_RANGE)
{
- AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [ACPI_GET_2BIT_FLAG (SpecificFlags)]);
+ AcpiOsPrintf (" %s,",
+ AcpiGbl_RngDecode [ACPI_GET_2BIT_FLAG (SpecificFlags)]);
}
}
}
@@ -735,7 +738,8 @@ AcpiDmExtendedDescriptor (
/* Dump resource name and flags */
- AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);
+ AcpiDmAddressCommon (
+ Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);
/* Dump the 5 contiguous QWORD values */
@@ -871,10 +875,12 @@ AcpiDmFixedMemory32Descriptor (
AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->FixedMemory32.Flags)]);
AcpiDmIndent (Level + 1);
- AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base");
+ AcpiDmDumpInteger32 (Resource->FixedMemory32.Address,
+ "Address Base");
AcpiDmIndent (Level + 1);
- AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length");
+ AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength,
+ "Address Length");
/* Insert a descriptor name */
diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c
index 76ef29975e394..60161e69b8238 100644
--- a/source/components/disassembler/dmresrcl2.c
+++ b/source/components/disassembler/dmresrcl2.c
@@ -152,6 +152,7 @@ AcpiDmDumpRawDataBuffer (
AcpiOsPrintf (", ");
}
+
AcpiOsPrintf ("\n");
AcpiDmIndent (Level + 2);
@@ -197,7 +198,8 @@ AcpiDmGpioCommon (
AcpiDmIndent (Level + 1);
if (Resource->Gpio.ResSourceOffset)
{
- DeviceName = ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
+ DeviceName = ACPI_ADD_PTR (char,
+ Resource, Resource->Gpio.ResSourceOffset),
AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
}
@@ -241,13 +243,15 @@ AcpiDmGpioCommon (
for (i = 0; i < PinCount; i++)
{
AcpiDmIndent (Level + 2);
- AcpiOsPrintf ("0x%4.4X%s\n", PinList[i], ((i + 1) < PinCount) ? "," : "");
+ AcpiOsPrintf ("0x%4.4X%s\n", PinList[i],
+ ((i + 1) < PinCount) ? "," : "");
}
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("}\n");
- MpSaveGpioInfo (Info->MappingOp, Resource, PinCount, PinList, DeviceName);
+ MpSaveGpioInfo (Info->MappingOp, Resource,
+ PinCount, PinList, DeviceName);
}
diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c
index d1165b16c2978..705319dc793d4 100644
--- a/source/components/disassembler/dmresrcs.c
+++ b/source/components/disassembler/dmresrcs.c
@@ -171,7 +171,8 @@ AcpiDmFixedDmaDescriptor (
}
else
{
- AcpiOsPrintf ("%X /* INVALID DMA WIDTH */, ", Resource->FixedDma.Width);
+ AcpiOsPrintf ("%X /* INVALID DMA WIDTH */, ",
+ Resource->FixedDma.Width);
}
/* Insert a descriptor name */
diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c
index 8cbc1c3f9a7e3..4a094789a7038 100644
--- a/source/components/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
@@ -464,7 +464,7 @@ AcpiDmDescendingOp (
if (Info->WalkState)
{
AmlOffset = (UINT32) ACPI_PTR_DIFF (Op->Common.Aml,
- Info->WalkState->ParserState.AmlStart);
+ Info->WalkState->ParserState.AmlStart);
if (AcpiGbl_DmOpt_Verbose)
{
AcpiOsPrintf (DB_FULL_OP_INFO,
@@ -487,8 +487,8 @@ AcpiDmDescendingOp (
}
}
else if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
- (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
- (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
+ (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
+ (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
{
/*
* This is a first-level element of a term list,
@@ -906,8 +906,8 @@ AcpiDmAscendingOp (
if (!AcpiDmCommaIfListMember (Op))
{
if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
- (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
- (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
+ (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
+ (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
{
/*
* This is a first-level element of a term list
@@ -968,8 +968,8 @@ AcpiDmAscendingOp (
if (!AcpiDmCommaIfListMember (Op))
{
if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
- (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
- (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
+ (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
+ (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
{
/*
* This is a first-level element of a term list
diff --git a/source/components/dispatcher/dsargs.c b/source/components/dispatcher/dsargs.c
index 5d2d5f5684ad1..353d9c1c2170c 100644
--- a/source/components/dispatcher/dsargs.c
+++ b/source/components/dispatcher/dsargs.c
@@ -114,7 +114,7 @@ AcpiDsExecuteArguments (
}
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, AmlStart,
- AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
+ AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -161,7 +161,7 @@ AcpiDsExecuteArguments (
/* Execute the opcode and arguments */
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, AmlStart,
- AmlLength, NULL, ACPI_IMODE_EXECUTE);
+ AmlLength, NULL, ACPI_IMODE_EXECUTE);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -214,8 +214,8 @@ AcpiDsGetBufferFieldArguments (
ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
Node = ObjDesc->BufferField.Node;
- ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_BUFFER_FIELD,
- Node, NULL));
+ ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
+ ACPI_TYPE_BUFFER_FIELD, Node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] BufferField Arg Init\n",
AcpiUtGetNodeName (Node)));
@@ -223,7 +223,7 @@ AcpiDsGetBufferFieldArguments (
/* Execute the AML code for the TermArg arguments */
Status = AcpiDsExecuteArguments (Node, Node->Parent,
- ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
+ ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
return_ACPI_STATUS (Status);
}
@@ -263,8 +263,8 @@ AcpiDsGetBankFieldArguments (
ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
Node = ObjDesc->BankField.Node;
- ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_LOCAL_BANK_FIELD,
- Node, NULL));
+ ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
+ ACPI_TYPE_LOCAL_BANK_FIELD, Node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] BankField Arg Init\n",
AcpiUtGetNodeName (Node)));
@@ -272,7 +272,7 @@ AcpiDsGetBankFieldArguments (
/* Execute the AML code for the TermArg arguments */
Status = AcpiDsExecuteArguments (Node, Node->Parent,
- ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
+ ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
return_ACPI_STATUS (Status);
}
@@ -312,7 +312,8 @@ AcpiDsGetBufferArguments (
if (!Node)
{
ACPI_ERROR ((AE_INFO,
- "No pointer back to namespace node in buffer object %p", ObjDesc));
+ "No pointer back to namespace node in buffer object %p",
+ ObjDesc));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -321,7 +322,7 @@ AcpiDsGetBufferArguments (
/* Execute the AML code for the TermArg arguments */
Status = AcpiDsExecuteArguments (Node, Node,
- ObjDesc->Buffer.AmlLength, ObjDesc->Buffer.AmlStart);
+ ObjDesc->Buffer.AmlLength, ObjDesc->Buffer.AmlStart);
return_ACPI_STATUS (Status);
}
@@ -370,7 +371,7 @@ AcpiDsGetPackageArguments (
/* Execute the AML code for the TermArg arguments */
Status = AcpiDsExecuteArguments (Node, Node,
- ObjDesc->Package.AmlLength, ObjDesc->Package.AmlStart);
+ ObjDesc->Package.AmlLength, ObjDesc->Package.AmlStart);
return_ACPI_STATUS (Status);
}
@@ -415,22 +416,23 @@ AcpiDsGetRegionArguments (
Node = ObjDesc->Region.Node;
- ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_REGION, Node, NULL));
+ ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
+ ACPI_TYPE_REGION, Node, NULL));
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Arg Init at AML %p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "[%4.4s] OpRegion Arg Init at AML %p\n",
AcpiUtGetNodeName (Node), ExtraDesc->Extra.AmlStart));
/* Execute the argument AML */
Status = AcpiDsExecuteArguments (Node, ExtraDesc->Extra.ScopeNode,
- ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
+ ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
Status = AcpiUtAddAddressRange (ObjDesc->Region.SpaceId,
- ObjDesc->Region.Address, ObjDesc->Region.Length,
- Node);
+ ObjDesc->Region.Address, ObjDesc->Region.Length, Node);
return_ACPI_STATUS (Status);
}
diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c
index fed1f4a9ed3fe..f5344e83a0c57 100644
--- a/source/components/dispatcher/dscontrol.c
+++ b/source/components/dispatcher/dscontrol.c
@@ -47,6 +47,7 @@
#include "amlcode.h"
#include "acdispat.h"
#include "acinterp.h"
+#include "acdebug.h"
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dscontrol")
@@ -119,9 +120,12 @@ AcpiDsExecBeginControlOp (
* Save a pointer to the predicate for multiple executions
* of a loop
*/
- ControlState->Control.AmlPredicateStart = WalkState->ParserState.Aml - 1;
- ControlState->Control.PackageEnd = WalkState->ParserState.PkgEnd;
- ControlState->Control.Opcode = Op->Common.AmlOpcode;
+ ControlState->Control.AmlPredicateStart =
+ WalkState->ParserState.Aml - 1;
+ ControlState->Control.PackageEnd =
+ WalkState->ParserState.PkgEnd;
+ ControlState->Control.Opcode =
+ Op->Common.AmlOpcode;
/* Push the control state on this walk's control stack */
@@ -232,7 +236,8 @@ AcpiDsExecEndControlOp (
* another time
*/
Status = AE_CTRL_PENDING;
- WalkState->AmlLastWhile = ControlState->Control.AmlPredicateStart;
+ WalkState->AmlLastWhile =
+ ControlState->Control.AmlPredicateStart;
break;
}
@@ -276,7 +281,8 @@ AcpiDsExecEndControlOp (
* an arg or local), resolve it now because it may
* cease to exist at the end of the method.
*/
- Status = AcpiExResolveToValue (&WalkState->Operands [0], WalkState);
+ Status = AcpiExResolveToValue (
+ &WalkState->Operands [0], WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -305,11 +311,15 @@ AcpiDsExecEndControlOp (
* Allow references created by the Index operator to return
* unchanged.
*/
- if ((ACPI_GET_DESCRIPTOR_TYPE (WalkState->Results->Results.ObjDesc[0]) == ACPI_DESC_TYPE_OPERAND) &&
- ((WalkState->Results->Results.ObjDesc [0])->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
- ((WalkState->Results->Results.ObjDesc [0])->Reference.Class != ACPI_REFCLASS_INDEX))
+ if ((ACPI_GET_DESCRIPTOR_TYPE (WalkState->Results->Results.ObjDesc[0]) ==
+ ACPI_DESC_TYPE_OPERAND) &&
+ ((WalkState->Results->Results.ObjDesc [0])->Common.Type ==
+ ACPI_TYPE_LOCAL_REFERENCE) &&
+ ((WalkState->Results->Results.ObjDesc [0])->Reference.Class !=
+ ACPI_REFCLASS_INDEX))
{
- Status = AcpiExResolveToValue (&WalkState->Results->Results.ObjDesc [0], WalkState);
+ Status = AcpiExResolveToValue (
+ &WalkState->Results->Results.ObjDesc [0], WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -327,9 +337,9 @@ AcpiDsExecEndControlOp (
AcpiUtRemoveReference (WalkState->Operands [0]);
}
- WalkState->Operands [0] = NULL;
- WalkState->NumOperands = 0;
- WalkState->ReturnDesc = NULL;
+ WalkState->Operands[0] = NULL;
+ WalkState->NumOperands = 0;
+ WalkState->ReturnDesc = NULL;
}
@@ -350,20 +360,12 @@ AcpiDsExecEndControlOp (
case AML_BREAK_POINT_OP:
- /*
- * Set the single-step flag. This will cause the debugger (if present)
- * to break to the console within the AML debugger at the start of the
- * next AML instruction.
- */
- ACPI_DEBUGGER_EXEC (
- AcpiGbl_CmSingleStep = TRUE);
- ACPI_DEBUGGER_EXEC (
- AcpiOsPrintf ("**break** Executed AML BreakPoint opcode\n"));
+ AcpiDbSignalBreakPoint (WalkState);
/* Call to the OSL in case OS wants a piece of the action */
Status = AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT,
- "Executed AML Breakpoint opcode");
+ "Executed AML Breakpoint opcode");
break;
case AML_BREAK_OP:
@@ -387,7 +389,8 @@ AcpiDsExecEndControlOp (
/* Was: WalkState->AmlLastWhile = WalkState->ControlState->Control.AmlPredicateStart; */
- WalkState->AmlLastWhile = WalkState->ControlState->Control.PackageEnd;
+ WalkState->AmlLastWhile =
+ WalkState->ControlState->Control.PackageEnd;
/* Return status depending on opcode */
diff --git a/source/components/dispatcher/dsdebug.c b/source/components/dispatcher/dsdebug.c
index b28f443620876..87c31c2d19416 100644
--- a/source/components/dispatcher/dsdebug.c
+++ b/source/components/dispatcher/dsdebug.c
@@ -175,6 +175,7 @@ AcpiDsDumpMethodStack (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"\n**** Exception %s during execution of method ",
AcpiFormatException (Status)));
+
AcpiDsPrintNodePathname (WalkState->MethodNode, NULL);
/* Display stack of executing methods */
@@ -191,8 +192,8 @@ AcpiDsDumpMethodStack (
if (MethodDesc)
{
AcpiExStopTraceMethod (
- (ACPI_NAMESPACE_NODE *) MethodDesc->Method.Node,
- MethodDesc, WalkState);
+ (ACPI_NAMESPACE_NODE *) MethodDesc->Method.Node,
+ MethodDesc, WalkState);
}
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
@@ -220,8 +221,8 @@ AcpiDsDumpMethodStack (
{
/*
* This method has called another method
- * NOTE: the method call parse subtree is already deleted at this
- * point, so we cannot disassemble the method invocation.
+ * NOTE: the method call parse subtree is already deleted at
+ * this point, so we cannot disassemble the method invocation.
*/
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Call to method "));
AcpiDsPrintNodePathname (PreviousMethod, NULL);
diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c
index 69437de249824..c4477fa3962a9 100644
--- a/source/components/dispatcher/dsfield.c
+++ b/source/components/dispatcher/dsfield.c
@@ -115,6 +115,7 @@ AcpiDsCreateExternalRegion (
* insert the name into the namespace.
*/
AcpiDmAddOpToExternalList (Op, Path, ACPI_TYPE_REGION, 0, 0);
+
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_REGION,
ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, WalkState, Node);
if (ACPI_FAILURE (Status))
@@ -210,7 +211,7 @@ AcpiDsCreateBufferField (
/* Creating new namespace node, should not already exist */
Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
- ACPI_NS_ERROR_IF_FOUND;
+ ACPI_NS_ERROR_IF_FOUND;
/*
* Mark node temporary if we are executing a normal control
@@ -224,9 +225,9 @@ AcpiDsCreateBufferField (
/* Enter the NameString into the namespace */
- Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1,
- Flags, WalkState, &Node);
+ Status = AcpiNsLookup (WalkState->ScopeInfo,
+ Arg->Common.Value.String, ACPI_TYPE_ANY,
+ ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
@@ -267,13 +268,13 @@ AcpiDsCreateBufferField (
}
/*
- * Remember location in AML stream of the field unit opcode and operands --
- * since the buffer and index operands must be evaluated.
+ * Remember location in AML stream of the field unit opcode and operands
+ * -- since the buffer and index operands must be evaluated.
*/
- SecondDesc = ObjDesc->Common.NextObject;
- SecondDesc->Extra.AmlStart = Op->Named.Data;
+ SecondDesc = ObjDesc->Common.NextObject;
+ SecondDesc->Extra.AmlStart = Op->Named.Data;
SecondDesc->Extra.AmlLength = Op->Named.Length;
- ObjDesc->BufferField.Node = Node;
+ ObjDesc->BufferField.Node = Node;
/* Attach constructed field descriptors to parent node */
@@ -341,8 +342,8 @@ AcpiDsGetFieldNames (
{
case AML_INT_RESERVEDFIELD_OP:
- Position = (UINT64) Info->FieldBitPosition
- + (UINT64) Arg->Common.Value.Size;
+ Position = (UINT64) Info->FieldBitPosition +
+ (UINT64) Arg->Common.Value.Size;
if (Position > ACPI_UINT32_MAX)
{
@@ -375,11 +376,13 @@ AcpiDsGetFieldNames (
/* AccessAttribute (AttribQuick, AttribByte, etc.) */
- Info->Attribute = (UINT8) ((Arg->Common.Value.Integer >> 8) & 0xFF);
+ Info->Attribute = (UINT8)
+ ((Arg->Common.Value.Integer >> 8) & 0xFF);
/* AccessLength (for serial/buffer protocols) */
- Info->AccessLength = (UINT8) ((Arg->Common.Value.Integer >> 16) & 0xFF);
+ Info->AccessLength = (UINT8)
+ ((Arg->Common.Value.Integer >> 16) & 0xFF);
break;
case AML_INT_CONNECTION_OP:
@@ -406,9 +409,9 @@ AcpiDsGetFieldNames (
/* Lookup the Connection() namepath, it should already exist */
Status = AcpiNsLookup (WalkState->ScopeInfo,
- Child->Common.Value.Name, ACPI_TYPE_ANY,
- ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
- WalkState, &Info->ConnectionNode);
+ Child->Common.Value.Name, ACPI_TYPE_ANY,
+ ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
+ WalkState, &Info->ConnectionNode);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (Child->Common.Value.Name, Status);
@@ -422,9 +425,9 @@ AcpiDsGetFieldNames (
/* Lookup the name, it should already exist */
Status = AcpiNsLookup (WalkState->ScopeInfo,
- (char *) &Arg->Named.Name, Info->FieldType,
- ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
- WalkState, &Info->FieldNode);
+ (char *) &Arg->Named.Name, Info->FieldType,
+ ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
+ WalkState, &Info->FieldNode);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
@@ -453,8 +456,8 @@ AcpiDsGetFieldNames (
/* Keep track of bit position for the next field */
- Position = (UINT64) Info->FieldBitPosition
- + (UINT64) Arg->Common.Value.Size;
+ Position = (UINT64) Info->FieldBitPosition +
+ (UINT64) Arg->Common.Value.Size;
if (Position > ACPI_UINT32_MAX)
{
@@ -471,7 +474,8 @@ AcpiDsGetFieldNames (
default:
ACPI_ERROR ((AE_INFO,
- "Invalid opcode in field list: 0x%X", Arg->Common.AmlOpcode));
+ "Invalid opcode in field list: 0x%X",
+ Arg->Common.AmlOpcode));
return_ACPI_STATUS (AE_AML_BAD_OPCODE);
}
@@ -517,8 +521,8 @@ AcpiDsCreateField (
if (!RegionNode)
{
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
- ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
- ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
+ ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
#ifdef ACPI_ASL_COMPILER
Status = AcpiDsCreateExternalRegion (Status, Arg,
Arg->Common.Value.Name, WalkState, &RegionNode);
@@ -624,7 +628,7 @@ AcpiDsInitFieldObjects (
/* Creating new namespace node(s), should not already exist */
Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
- ACPI_NS_ERROR_IF_FOUND;
+ ACPI_NS_ERROR_IF_FOUND;
/*
* Mark node(s) temporary if we are executing a normal control
@@ -649,8 +653,8 @@ AcpiDsInitFieldObjects (
if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
{
Status = AcpiNsLookup (WalkState->ScopeInfo,
- (char *) &Arg->Named.Name, Type, ACPI_IMODE_LOAD_PASS1,
- Flags, WalkState, &Node);
+ (char *) &Arg->Named.Name, Type, ACPI_IMODE_LOAD_PASS1,
+ Flags, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
@@ -710,8 +714,8 @@ AcpiDsCreateBankField (
if (!RegionNode)
{
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
- ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
- ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
+ ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
#ifdef ACPI_ASL_COMPILER
Status = AcpiDsCreateExternalRegion (Status, Arg,
Arg->Common.Value.Name, WalkState, &RegionNode);
@@ -727,8 +731,8 @@ AcpiDsCreateBankField (
Arg = Arg->Common.Next;
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
- ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
@@ -754,11 +758,12 @@ AcpiDsCreateBankField (
/*
* Use Info.DataRegisterNode to store BankField Op
- * It's safe because DataRegisterNode will never be used when create bank field
- * We store AmlStart and AmlLength in the BankField Op for late evaluation
- * Used in AcpiExPrepFieldValue(Info)
+ * It's safe because DataRegisterNode will never be used when create
+ * bank field \we store AmlStart and AmlLength in the BankField Op for
+ * late evaluation. Used in AcpiExPrepFieldValue(Info)
*
- * TBD: Or, should we add a field in ACPI_CREATE_FIELD_INFO, like "void *ParentOp"?
+ * TBD: Or, should we add a field in ACPI_CREATE_FIELD_INFO, like
+ * "void *ParentOp"?
*/
Info.DataRegisterNode = (ACPI_NAMESPACE_NODE*) Op;
@@ -799,8 +804,8 @@ AcpiDsCreateIndexField (
Arg = Op->Common.Value.Arg;
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
- ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
@@ -811,8 +816,8 @@ AcpiDsCreateIndexField (
Arg = Arg->Common.Next;
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
- ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode);
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c
index b3a9bdcf45d76..573d0ddf0745b 100644
--- a/source/components/dispatcher/dsinit.c
+++ b/source/components/dispatcher/dsinit.c
@@ -242,7 +242,7 @@ AcpiDsInitializeObjects (
* the namespace reader lock.
*/
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX,
- ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, NULL, &Info, NULL);
+ ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, NULL, &Info, NULL);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
@@ -259,7 +259,8 @@ AcpiDsInitializeObjects (
if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
{
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "\nInitializing Namespace objects:\n"));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
+ "\nInitializing Namespace objects:\n"));
}
/* Summary of objects initialized */
@@ -267,9 +268,10 @@ AcpiDsInitializeObjects (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
"Table [%4.4s:%8.8s] (id %.2X) - %4u Objects with %3u Devices, "
"%3u Regions, %4u Methods (%u/%u/%u Serial/Non/Cvt)\n",
- Table->Signature, Table->OemTableId, OwnerId, Info.ObjectCount, Info.DeviceCount,
- Info.OpRegionCount, Info.MethodCount, Info.SerialMethodCount,
- Info.NonSerialMethodCount, Info.SerializedMethodCount));
+ Table->Signature, Table->OemTableId, OwnerId, Info.ObjectCount,
+ Info.DeviceCount,Info.OpRegionCount, Info.MethodCount,
+ Info.SerialMethodCount, Info.NonSerialMethodCount,
+ Info.SerializedMethodCount));
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "%u Methods, %u Regions\n",
Info.MethodCount, Info.OpRegionCount));
diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c
index 95e0cb3f2a00c..0da02fd6c06fc 100644
--- a/source/components/dispatcher/dsmethod.c
+++ b/source/components/dispatcher/dsmethod.c
@@ -127,8 +127,8 @@ AcpiDsAutoSerializeMethod (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- Status = AcpiDsInitAmlWalk (WalkState, Op, Node, ObjDesc->Method.AmlStart,
- ObjDesc->Method.AmlLength, NULL, 0);
+ Status = AcpiDsInitAmlWalk (WalkState, Op, Node,
+ ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength, NULL, 0);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -251,12 +251,12 @@ AcpiDsMethodError (
* AE_OK, in which case the executing method will not be aborted.
*/
AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml,
- WalkState->ParserState.AmlStart);
+ WalkState->ParserState.AmlStart);
Status = AcpiGbl_ExceptionHandler (Status,
- WalkState->MethodNode ?
- WalkState->MethodNode->Name.Integer : 0,
- WalkState->Opcode, AmlOffset, NULL);
+ WalkState->MethodNode ?
+ WalkState->MethodNode->Name.Integer : 0,
+ WalkState->Opcode, AmlOffset, NULL);
AcpiExEnterInterpreter ();
}
@@ -400,10 +400,12 @@ AcpiDsBeginMethodExecution (
*/
if (WalkState &&
(!(ObjDesc->Method.InfoFlags & ACPI_METHOD_IGNORE_SYNC_LEVEL)) &&
- (WalkState->Thread->CurrentSyncLevel > ObjDesc->Method.Mutex->Mutex.SyncLevel))
+ (WalkState->Thread->CurrentSyncLevel >
+ ObjDesc->Method.Mutex->Mutex.SyncLevel))
{
ACPI_ERROR ((AE_INFO,
- "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%u)",
+ "Cannot acquire Mutex for method [%4.4s]"
+ ", current SyncLevel is too large (%u)",
AcpiUtGetNodeName (MethodNode),
WalkState->Thread->CurrentSyncLevel));
@@ -416,14 +418,15 @@ AcpiDsBeginMethodExecution (
*/
if (!WalkState ||
!ObjDesc->Method.Mutex->Mutex.ThreadId ||
- (WalkState->Thread->ThreadId != ObjDesc->Method.Mutex->Mutex.ThreadId))
+ (WalkState->Thread->ThreadId !=
+ ObjDesc->Method.Mutex->Mutex.ThreadId))
{
/*
* Acquire the method mutex. This releases the interpreter if we
* block (and reacquires it before it returns)
*/
- Status = AcpiExSystemWaitMutex (ObjDesc->Method.Mutex->Mutex.OsMutex,
- ACPI_WAIT_FOREVER);
+ Status = AcpiExSystemWaitMutex (
+ ObjDesc->Method.Mutex->Mutex.OsMutex, ACPI_WAIT_FOREVER);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -436,8 +439,22 @@ AcpiDsBeginMethodExecution (
ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
WalkState->Thread->CurrentSyncLevel;
- ObjDesc->Method.Mutex->Mutex.ThreadId = WalkState->Thread->ThreadId;
- WalkState->Thread->CurrentSyncLevel = ObjDesc->Method.SyncLevel;
+ ObjDesc->Method.Mutex->Mutex.ThreadId =
+ WalkState->Thread->ThreadId;
+
+ /*
+ * Update the current SyncLevel only if this is not an auto-
+ * serialized method. In the auto case, we have to ignore
+ * the sync level for the method mutex (created for the
+ * auto-serialization) because we have no idea of what the
+ * sync level should be. Therefore, just ignore it.
+ */
+ if (!(ObjDesc->Method.InfoFlags &
+ ACPI_METHOD_IGNORE_SYNC_LEVEL))
+ {
+ WalkState->Thread->CurrentSyncLevel =
+ ObjDesc->Method.SyncLevel;
+ }
}
else
{
@@ -515,7 +532,8 @@ AcpiDsCallControlMethod (
ACPI_FUNCTION_TRACE_PTR (DsCallControlMethod, ThisWalkState);
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Calling method %p, currentstate=%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ "Calling method %p, currentstate=%p\n",
ThisWalkState->PrevOp, ThisWalkState));
/*
@@ -535,8 +553,8 @@ AcpiDsCallControlMethod (
/* Init for new method, possibly wait on method mutex */
- Status = AcpiDsBeginMethodExecution (MethodNode, ObjDesc,
- ThisWalkState);
+ Status = AcpiDsBeginMethodExecution (
+ MethodNode, ObjDesc, ThisWalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -544,8 +562,8 @@ AcpiDsCallControlMethod (
/* Begin method parse/execution. Create a new walk state */
- NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwnerId,
- NULL, ObjDesc, Thread);
+ NextWalkState = AcpiDsCreateWalkState (
+ ObjDesc->Method.OwnerId, NULL, ObjDesc, Thread);
if (!NextWalkState)
{
Status = AE_NO_MEMORY;
@@ -574,8 +592,8 @@ AcpiDsCallControlMethod (
Info->Parameters = &ThisWalkState->Operands[0];
Status = AcpiDsInitAmlWalk (NextWalkState, NULL, MethodNode,
- ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,
- Info, ACPI_IMODE_EXECUTE);
+ ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,
+ Info, ACPI_IMODE_EXECUTE);
ACPI_FREE (Info);
if (ACPI_FAILURE (Status))
@@ -770,7 +788,8 @@ AcpiDsTerminateControlMethod (
WalkState->Thread->CurrentSyncLevel =
MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel;
- AcpiOsReleaseMutex (MethodDesc->Method.Mutex->Mutex.OsMutex);
+ AcpiOsReleaseMutex (
+ MethodDesc->Method.Mutex->Mutex.OsMutex);
MethodDesc->Method.Mutex->Mutex.ThreadId = 0;
}
}
@@ -800,7 +819,8 @@ AcpiDsTerminateControlMethod (
if (MethodDesc->Method.InfoFlags & ACPI_METHOD_MODIFIED_NAMESPACE)
{
AcpiNsDeleteNamespaceByOwner (MethodDesc->Method.OwnerId);
- MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_MODIFIED_NAMESPACE;
+ MethodDesc->Method.InfoFlags &=
+ ~ACPI_METHOD_MODIFIED_NAMESPACE;
}
}
}
@@ -848,7 +868,8 @@ AcpiDsTerminateControlMethod (
if (WalkState)
{
ACPI_INFO ((AE_INFO,
- "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error",
+ "Marking method %4.4s as Serialized "
+ "because of AE_ALREADY_EXISTS error",
WalkState->MethodNode->Name.Ascii));
}
@@ -863,7 +884,9 @@ AcpiDsTerminateControlMethod (
* marking the method permanently as Serialized when the last
* thread exits here.
*/
- MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_SERIALIZED_PENDING;
+ MethodDesc->Method.InfoFlags &=
+ ~ACPI_METHOD_SERIALIZED_PENDING;
+
MethodDesc->Method.InfoFlags |=
(ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL);
MethodDesc->Method.SyncLevel = 0;
@@ -878,7 +901,7 @@ AcpiDsTerminateControlMethod (
}
AcpiExStopTraceMethod ((ACPI_NAMESPACE_NODE *) MethodDesc->Method.Node,
- MethodDesc, WalkState);
+ MethodDesc, WalkState);
return_VOID;
}
diff --git a/source/components/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c
index fe98692994517..2040a33397826 100644
--- a/source/components/dispatcher/dsmthdat.c
+++ b/source/components/dispatcher/dsmthdat.c
@@ -110,7 +110,9 @@ AcpiDsMethodDataInit (
for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
{
- ACPI_MOVE_32_TO_32 (&WalkState->Arguments[i].Name, NAMEOF_ARG_NTE);
+ ACPI_MOVE_32_TO_32 (&WalkState->Arguments[i].Name,
+ NAMEOF_ARG_NTE);
+
WalkState->Arguments[i].Name.Integer |= (i << 24);
WalkState->Arguments[i].DescriptorType = ACPI_DESC_TYPE_NAMED;
WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
@@ -121,7 +123,8 @@ AcpiDsMethodDataInit (
for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
{
- ACPI_MOVE_32_TO_32 (&WalkState->LocalVariables[i].Name, NAMEOF_LOCAL_NTE);
+ ACPI_MOVE_32_TO_32 (&WalkState->LocalVariables[i].Name,
+ NAMEOF_LOCAL_NTE);
WalkState->LocalVariables[i].Name.Integer |= (i << 24);
WalkState->LocalVariables[i].DescriptorType = ACPI_DESC_TYPE_NAMED;
@@ -163,7 +166,7 @@ AcpiDsMethodDataDeleteAll (
if (WalkState->LocalVariables[Index].Object)
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Local%u=%p\n",
- Index, WalkState->LocalVariables[Index].Object));
+ Index, WalkState->LocalVariables[Index].Object));
/* Detach object (if present) and remove a reference */
@@ -178,7 +181,7 @@ AcpiDsMethodDataDeleteAll (
if (WalkState->Arguments[Index].Object)
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Arg%u=%p\n",
- Index, WalkState->Arguments[Index].Object));
+ Index, WalkState->Arguments[Index].Object));
/* Detach object (if present) and remove a reference */
@@ -221,7 +224,8 @@ AcpiDsMethodDataInitArgs (
if (!Params)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "No param list passed to method\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "No parameter list passed to method\n"));
return_ACPI_STATUS (AE_OK);
}
@@ -236,8 +240,8 @@ AcpiDsMethodDataInitArgs (
* Store the argument in the method/walk descriptor.
* Do not copy the arg in order to implement call by reference
*/
- Status = AcpiDsMethodDataSetValue (ACPI_REFCLASS_ARG, Index,
- Params[Index], WalkState);
+ Status = AcpiDsMethodDataSetValue (
+ ACPI_REFCLASS_ARG, Index, Params[Index], WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -627,7 +631,8 @@ AcpiDsStoreObjectToLocal (
NewObjDesc = ObjDesc;
if (ObjDesc->Common.ReferenceCount > 1)
{
- Status = AcpiUtCopyIobjectToIobject (ObjDesc, &NewObjDesc, WalkState);
+ Status = AcpiUtCopyIobjectToIobject (
+ ObjDesc, &NewObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -664,13 +669,16 @@ AcpiDsStoreObjectToLocal (
* If we have a valid reference object that came from RefOf(),
* do the indirect store
*/
- if ((ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) == ACPI_DESC_TYPE_OPERAND) &&
- (CurrentObjDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
- (CurrentObjDesc->Reference.Class == ACPI_REFCLASS_REFOF))
+ if ((ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) ==
+ ACPI_DESC_TYPE_OPERAND) &&
+ (CurrentObjDesc->Common.Type ==
+ ACPI_TYPE_LOCAL_REFERENCE) &&
+ (CurrentObjDesc->Reference.Class ==
+ ACPI_REFCLASS_REFOF))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "Arg (%p) is an ObjRef(Node), storing in node %p\n",
- NewObjDesc, CurrentObjDesc));
+ "Arg (%p) is an ObjRef(Node), storing in node %p\n",
+ NewObjDesc, CurrentObjDesc));
/*
* Store this object to the Node (perform the indirect store)
@@ -678,8 +686,8 @@ AcpiDsStoreObjectToLocal (
* specification rules on storing to Locals/Args.
*/
Status = AcpiExStoreObjectToNode (NewObjDesc,
- CurrentObjDesc->Reference.Object, WalkState,
- ACPI_NO_IMPLICIT_CONVERSION);
+ CurrentObjDesc->Reference.Object, WalkState,
+ ACPI_NO_IMPLICIT_CONVERSION);
/* Remove local reference if we copied the object above */
@@ -687,6 +695,7 @@ AcpiDsStoreObjectToLocal (
{
AcpiUtRemoveReference (NewObjDesc);
}
+
return_ACPI_STATUS (Status);
}
}
diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c
index cdc84314c9143..8c22423eca23a 100644
--- a/source/components/dispatcher/dsobject.c
+++ b/source/components/dispatcher/dsobject.c
@@ -102,10 +102,10 @@ AcpiDsBuildInternalObject (
if (!Op->Common.Node)
{
Status = AcpiNsLookup (WalkState->ScopeInfo,
- Op->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
- ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
- ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &(Op->Common.Node)));
+ Op->Common.Value.String,
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &(Op->Common.Node)));
if (ACPI_FAILURE (Status))
{
/* Check if we are resolving a named reference within a package */
@@ -161,8 +161,8 @@ AcpiDsBuildInternalObject (
ObjDesc = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Op->Common.Node);
Status = AcpiExResolveNodeToValue (
- ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc),
- WalkState);
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc),
+ WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -222,14 +222,14 @@ AcpiDsBuildInternalObject (
/* Create and init a new internal ACPI object */
ObjDesc = AcpiUtCreateInternalObject (
- (AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode))->ObjectType);
+ (AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode))->ObjectType);
if (!ObjDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- Status = AcpiDsInitObjectFromOp (WalkState, Op, Op->Common.AmlOpcode,
- &ObjDesc);
+ Status = AcpiDsInitObjectFromOp (
+ WalkState, Op, Op->Common.AmlOpcode, &ObjDesc);
if (ACPI_FAILURE (Status))
{
AcpiUtRemoveReference (ObjDesc);
@@ -336,8 +336,8 @@ AcpiDsBuildInternalBufferObj (
}
else
{
- ObjDesc->Buffer.Pointer = ACPI_ALLOCATE_ZEROED (
- ObjDesc->Buffer.Length);
+ ObjDesc->Buffer.Pointer =
+ ACPI_ALLOCATE_ZEROED (ObjDesc->Buffer.Length);
if (!ObjDesc->Buffer.Pointer)
{
AcpiUtDeleteObjectDesc (ObjDesc);
@@ -349,7 +349,7 @@ AcpiDsBuildInternalBufferObj (
if (ByteList)
{
memcpy (ObjDesc->Buffer.Pointer, ByteList->Named.Data,
- ByteListLength);
+ ByteListLength);
}
}
@@ -468,8 +468,8 @@ AcpiDsBuildInternalPackageObj (
* invocation, so we special case it here
*/
Arg->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
- Status = AcpiDsBuildInternalObject (WalkState, Arg,
- &ObjDesc->Package.Elements[i]);
+ Status = AcpiDsBuildInternalObject (
+ WalkState, Arg, &ObjDesc->Package.Elements[i]);
}
else
{
@@ -481,8 +481,8 @@ AcpiDsBuildInternalPackageObj (
}
else
{
- Status = AcpiDsBuildInternalObject (WalkState, Arg,
- &ObjDesc->Package.Elements[i]);
+ Status = AcpiDsBuildInternalObject (
+ WalkState, Arg, &ObjDesc->Package.Elements[i]);
}
if (*ObjDescPtr)
@@ -539,7 +539,8 @@ AcpiDsBuildInternalPackageObj (
}
ACPI_INFO ((AE_INFO,
- "Actual Package length (%u) is larger than NumElements field (%u), truncated",
+ "Actual Package length (%u) is larger than "
+ "NumElements field (%u), truncated",
i, ElementCount));
}
else if (i < ElementCount)
@@ -549,7 +550,8 @@ AcpiDsBuildInternalPackageObj (
* Note: this is not an error, the package is padded out with NULLs.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Package List length (%u) smaller than NumElements count (%u), padded with null elements\n",
+ "Package List length (%u) smaller than NumElements "
+ "count (%u), padded with null elements\n",
i, ElementCount));
}
@@ -605,8 +607,8 @@ AcpiDsCreateNode (
/* Build an internal object for the argument(s) */
- Status = AcpiDsBuildInternalObject (WalkState, Op->Common.Value.Arg,
- &ObjDesc);
+ Status = AcpiDsBuildInternalObject (
+ WalkState, Op->Common.Value.Arg, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -678,9 +680,9 @@ AcpiDsInitObjectFromOp (
/*
* Defer evaluation of Buffer TermArg operand
*/
- ObjDesc->Buffer.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
- WalkState->Operands[0]);
- ObjDesc->Buffer.AmlStart = Op->Named.Data;
+ ObjDesc->Buffer.Node = ACPI_CAST_PTR (
+ ACPI_NAMESPACE_NODE, WalkState->Operands[0]);
+ ObjDesc->Buffer.AmlStart = Op->Named.Data;
ObjDesc->Buffer.AmlLength = Op->Named.Length;
break;
@@ -688,9 +690,9 @@ AcpiDsInitObjectFromOp (
/*
* Defer evaluation of Package TermArg operand
*/
- ObjDesc->Package.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
- WalkState->Operands[0]);
- ObjDesc->Package.AmlStart = Op->Named.Data;
+ ObjDesc->Package.Node = ACPI_CAST_PTR (
+ ACPI_NAMESPACE_NODE, WalkState->Operands[0]);
+ ObjDesc->Package.AmlStart = Op->Named.Data;
ObjDesc->Package.AmlLength = Op->Named.Length;
break;
@@ -800,9 +802,9 @@ AcpiDsInitObjectFromOp (
#ifndef ACPI_NO_METHOD_EXECUTION
Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_LOCAL,
- ObjDesc->Reference.Value, WalkState,
- ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
- &ObjDesc->Reference.Object));
+ ObjDesc->Reference.Value, WalkState,
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
+ &ObjDesc->Reference.Object));
#endif
break;
@@ -815,9 +817,9 @@ AcpiDsInitObjectFromOp (
#ifndef ACPI_NO_METHOD_EXECUTION
Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_ARG,
- ObjDesc->Reference.Value, WalkState,
- ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
- &ObjDesc->Reference.Object));
+ ObjDesc->Reference.Value, WalkState,
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
+ &ObjDesc->Reference.Object));
#endif
break;
diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c
index ede5f416b9716..68de21c2227a1 100644
--- a/source/components/dispatcher/dsopcode.c
+++ b/source/components/dispatcher/dsopcode.c
@@ -259,8 +259,8 @@ AcpiDsInitBufferField (
* For FieldFlags, use LOCK_RULE = 0 (NO_LOCK),
* UPDATE_RULE = 0 (UPDATE_PRESERVE)
*/
- Status = AcpiExPrepCommonFieldObject (ObjDesc, FieldFlags, 0,
- BitOffset, BitCount);
+ Status = AcpiExPrepCommonFieldObject (
+ ObjDesc, FieldFlags, 0, BitOffset, BitCount);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -357,8 +357,8 @@ AcpiDsEvalBufferFieldOperands (
/* Resolve the operands */
- Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
- ACPI_WALK_OPERANDS, WalkState);
+ Status = AcpiExResolveOperands (
+ Op->Common.AmlOpcode, ACPI_WALK_OPERANDS, WalkState);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO, "(%s) bad operand(s), status 0x%X",
@@ -374,16 +374,16 @@ AcpiDsEvalBufferFieldOperands (
/* NOTE: Slightly different operands for this opcode */
Status = AcpiDsInitBufferField (Op->Common.AmlOpcode, ObjDesc,
- WalkState->Operands[0], WalkState->Operands[1],
- WalkState->Operands[2], WalkState->Operands[3]);
+ WalkState->Operands[0], WalkState->Operands[1],
+ WalkState->Operands[2], WalkState->Operands[3]);
}
else
{
/* All other, CreateXxxField opcodes */
Status = AcpiDsInitBufferField (Op->Common.AmlOpcode, ObjDesc,
- WalkState->Operands[0], WalkState->Operands[1],
- NULL, WalkState->Operands[2]);
+ WalkState->Operands[0], WalkState->Operands[1],
+ NULL, WalkState->Operands[2]);
}
return_ACPI_STATUS (Status);
@@ -443,8 +443,8 @@ AcpiDsEvalRegionOperands (
/* Resolve the length and address operands to numbers */
- Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
- ACPI_WALK_OPERANDS, WalkState);
+ Status = AcpiExResolveOperands (
+ Op->Common.AmlOpcode, ACPI_WALK_OPERANDS, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -472,18 +472,16 @@ AcpiDsEvalRegionOperands (
OperandDesc = WalkState->Operands[WalkState->NumOperands - 2];
ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS)
- OperandDesc->Integer.Value;
+ OperandDesc->Integer.Value;
AcpiUtRemoveReference (OperandDesc);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
- ObjDesc,
- ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
+ ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
ObjDesc->Region.Length));
/* Now the address and length are valid for this opregion */
ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;
-
return_ACPI_STATUS (Status);
}
@@ -546,8 +544,8 @@ AcpiDsEvalTableRegionOperands (
* Resolve the Signature string, OemId string,
* and OemTableId string operands
*/
- Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
- ACPI_WALK_OPERANDS, WalkState);
+ Status = AcpiExResolveOperands (
+ Op->Common.AmlOpcode, ACPI_WALK_OPERANDS, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -556,9 +554,9 @@ AcpiDsEvalTableRegionOperands (
/* Find the ACPI table */
Status = AcpiTbFindTable (
- Operand[0]->String.Pointer,
- Operand[1]->String.Pointer,
- Operand[2]->String.Pointer, &TableIndex);
+ Operand[0]->String.Pointer,
+ Operand[1]->String.Pointer,
+ Operand[2]->String.Pointer, &TableIndex);
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
@@ -649,8 +647,8 @@ AcpiDsEvalDataObjectOperands (
}
Status = AcpiExResolveOperands (WalkState->Opcode,
- &(WalkState->Operands [WalkState->NumOperands -1]),
- WalkState);
+ &(WalkState->Operands [WalkState->NumOperands -1]),
+ WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -678,13 +676,15 @@ AcpiDsEvalDataObjectOperands (
{
case AML_BUFFER_OP:
- Status = AcpiDsBuildInternalBufferObj (WalkState, Op, Length, &ObjDesc);
+ Status = AcpiDsBuildInternalBufferObj (
+ WalkState, Op, Length, &ObjDesc);
break;
case AML_PACKAGE_OP:
case AML_VAR_PACKAGE_OP:
- Status = AcpiDsBuildInternalPackageObj (WalkState, Op, Length, &ObjDesc);
+ Status = AcpiDsBuildInternalPackageObj (
+ WalkState, Op, Length, &ObjDesc);
break;
default:
diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c
index 15c54fb21489d..a32b3d4817829 100644
--- a/source/components/dispatcher/dsutils.c
+++ b/source/components/dispatcher/dsutils.c
@@ -140,9 +140,9 @@ AcpiDsDoImplicitReturn (
}
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "Result %p will be implicitly returned; Prev=%p\n",
- ReturnDesc,
- WalkState->ImplicitReturnObj));
+ "Result %p will be implicitly returned; Prev=%p\n",
+ ReturnDesc,
+ WalkState->ImplicitReturnObj));
/*
* Delete any "stale" implicit return value first. However, in
@@ -266,7 +266,8 @@ AcpiDsIsResultUsed (
* If we are executing the predicate AND this is the predicate op,
* we will use the return value
*/
- if ((WalkState->ControlState->Common.State == ACPI_CONTROL_PREDICATE_EXECUTING) &&
+ if ((WalkState->ControlState->Common.State ==
+ ACPI_CONTROL_PREDICATE_EXECUTING) &&
(WalkState->ControlState->Control.PredicateOp == Op))
{
goto ResultUsed;
@@ -523,8 +524,8 @@ AcpiDsCreateOperand (
/* Get the entire name string from the AML stream */
- Status = AcpiExGetNameString (ACPI_TYPE_ANY, Arg->Common.Value.Buffer,
- &NameString, &NameLength);
+ Status = AcpiExGetNameString (ACPI_TYPE_ANY,
+ Arg->Common.Value.Buffer, &NameString, &NameLength);
if (ACPI_FAILURE (Status))
{
@@ -544,10 +545,11 @@ AcpiDsCreateOperand (
*/
if ((WalkState->DeferredNode) &&
(WalkState->DeferredNode->Type == ACPI_TYPE_BUFFER_FIELD) &&
- (ArgIndex == (UINT32) ((WalkState->Opcode == AML_CREATE_FIELD_OP) ? 3 : 2)))
+ (ArgIndex == (UINT32)
+ ((WalkState->Opcode == AML_CREATE_FIELD_OP) ? 3 : 2)))
{
ObjDesc = ACPI_CAST_PTR (
- ACPI_OPERAND_OBJECT, WalkState->DeferredNode);
+ ACPI_OPERAND_OBJECT, WalkState->DeferredNode);
Status = AE_OK;
}
else /* All other opcodes */
@@ -560,6 +562,7 @@ AcpiDsCreateOperand (
*/
ParentOp = Arg->Common.Parent;
OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Common.AmlOpcode);
+
if ((OpInfo->Flags & AML_NSNODE) &&
(ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
(ParentOp->Common.AmlOpcode != AML_REGION_OP) &&
@@ -577,10 +580,9 @@ AcpiDsCreateOperand (
}
Status = AcpiNsLookup (WalkState->ScopeInfo, NameString,
- ACPI_TYPE_ANY, InterpreterMode,
- ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
- WalkState,
- ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc));
+ ACPI_TYPE_ANY, InterpreterMode,
+ ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, WalkState,
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc));
/*
* The only case where we pass through (ignore) a NOT_FOUND
* error is for the CondRefOf opcode.
@@ -596,7 +598,7 @@ AcpiDsCreateOperand (
* object to the root
*/
ObjDesc = ACPI_CAST_PTR (
- ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
+ ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
Status = AE_OK;
}
else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
@@ -642,7 +644,8 @@ AcpiDsCreateOperand (
{
return_ACPI_STATUS (Status);
}
- ACPI_DEBUGGER_EXEC (AcpiDbDisplayArgumentObject (ObjDesc, WalkState));
+
+ AcpiDbDisplayArgumentObject (ObjDesc, WalkState);
}
else
{
@@ -675,13 +678,14 @@ AcpiDsCreateOperand (
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
}
- if ((OpInfo->Flags & AML_HAS_RETVAL) || (Arg->Common.Flags & ACPI_PARSEOP_IN_STACK))
+ if ((OpInfo->Flags & AML_HAS_RETVAL) ||
+ (Arg->Common.Flags & ACPI_PARSEOP_IN_STACK))
{
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Argument previously created, already stacked\n"));
- ACPI_DEBUGGER_EXEC (AcpiDbDisplayArgumentObject (
- WalkState->Operands [WalkState->NumOperands - 1], WalkState));
+ AcpiDbDisplayArgumentObject (
+ WalkState->Operands [WalkState->NumOperands - 1], WalkState);
/*
* Use value that was already previously returned
@@ -712,7 +716,7 @@ AcpiDsCreateOperand (
/* Initialize the new object */
Status = AcpiDsInitObjectFromOp (
- WalkState, Arg, Opcode, &ObjDesc);
+ WalkState, Arg, Opcode, &ObjDesc);
if (ACPI_FAILURE (Status))
{
AcpiUtDeleteObjectDesc (ObjDesc);
@@ -728,7 +732,7 @@ AcpiDsCreateOperand (
return_ACPI_STATUS (Status);
}
- ACPI_DEBUGGER_EXEC (AcpiDbDisplayArgumentObject (ObjDesc, WalkState));
+ AcpiDbDisplayArgumentObject (ObjDesc, WalkState);
}
return_ACPI_STATUS (AE_OK);
@@ -898,7 +902,8 @@ AcpiDsEvaluateNamePath (
AcpiUtRemoveReference (*Operand);
- Status = AcpiUtCopyIobjectToIobject (*Operand, &NewObjDesc, WalkState);
+ Status = AcpiUtCopyIobjectToIobject (
+ *Operand, &NewObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
goto Exit;
diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c
index f5f9072fedce6..d604b74e3cba5 100644
--- a/source/components/dispatcher/dswexec.c
+++ b/source/components/dispatcher/dswexec.c
@@ -189,12 +189,13 @@ AcpiDsGetPredicateValue (
Cleanup:
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Completed a predicate eval=%X Op=%p\n",
WalkState->ControlState->Common.Value, WalkState->Op));
- /* Break to debugger to display result */
+ /* Break to debugger to display result */
- ACPI_DEBUGGER_EXEC (AcpiDbDisplayResultObject (LocalObjDesc, WalkState));
+ AcpiDbDisplayResultObject (LocalObjDesc, WalkState);
/*
* Delete the predicate result object (we know that
@@ -286,10 +287,12 @@ AcpiDsExecBeginOp (
(WalkState->ControlState->Common.State ==
ACPI_CONTROL_CONDITIONAL_EXECUTING))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Exec predicate Op=%p State=%p\n",
- Op, WalkState));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Exec predicate Op=%p State=%p\n",
+ Op, WalkState));
- WalkState->ControlState->Common.State = ACPI_CONTROL_PREDICATE_EXECUTING;
+ WalkState->ControlState->Common.State =
+ ACPI_CONTROL_PREDICATE_EXECUTING;
/* Save start of predicate */
@@ -337,8 +340,8 @@ AcpiDsExecBeginOp (
}
else
{
- Status = AcpiDsScopeStackPush (Op->Named.Node,
- Op->Named.Node->Type, WalkState);
+ Status = AcpiDsScopeStackPush (
+ Op->Named.Node, Op->Named.Node->Type, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -397,8 +400,8 @@ AcpiDsExecEndOp (
ACPI_FUNCTION_TRACE_PTR (DsExecEndOp, WalkState);
- Op = WalkState->Op;
- OpType = WalkState->OpInfo->Type;
+ Op = WalkState->Op;
+ OpType = WalkState->OpInfo->Type;
OpClass = WalkState->OpInfo->Class;
if (OpClass == AML_CLASS_UNKNOWN)
@@ -418,8 +421,11 @@ AcpiDsExecEndOp (
/* Call debugger for single step support (DEBUG build only) */
- ACPI_DEBUGGER_EXEC (Status = AcpiDbSingleStep (WalkState, Op, OpClass));
- ACPI_DEBUGGER_EXEC (if (ACPI_FAILURE (Status)) {return_ACPI_STATUS (Status);});
+ Status = AcpiDbSingleStep (WalkState, Op, OpClass);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
/* Decode the Opcode Class */
@@ -456,8 +462,8 @@ AcpiDsExecEndOp (
/* Resolve all operands */
Status = AcpiExResolveOperands (WalkState->Opcode,
- &(WalkState->Operands [WalkState->NumOperands -1]),
- WalkState);
+ &(WalkState->Operands [WalkState->NumOperands -1]),
+ WalkState);
}
if (ACPI_SUCCESS (Status))
@@ -534,7 +540,8 @@ AcpiDsExecEndOp (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Method Reference in a Package, Op=%p\n", Op));
- Op->Common.Node = (ACPI_NAMESPACE_NODE *) Op->Asl.Value.Arg->Asl.Node;
+ Op->Common.Node = (ACPI_NAMESPACE_NODE *)
+ Op->Asl.Value.Arg->Asl.Node;
AcpiUtAddReference (Op->Asl.Value.Arg->Asl.Node->Object);
return_ACPI_STATUS (AE_OK);
}
@@ -616,12 +623,12 @@ AcpiDsExecEndOp (
* Put the Node on the object stack (Contains the ACPI Name
* of this object)
*/
- WalkState->Operands[0] = (void *) Op->Common.Parent->Common.Node;
+ WalkState->Operands[0] = (void *)
+ Op->Common.Parent->Common.Node;
WalkState->NumOperands = 1;
Status = AcpiDsCreateNode (WalkState,
- Op->Common.Parent->Common.Node,
- Op->Common.Parent);
+ Op->Common.Parent->Common.Node, Op->Common.Parent);
if (ACPI_FAILURE (Status))
{
break;
@@ -633,7 +640,7 @@ AcpiDsExecEndOp (
case AML_INT_EVAL_SUBTREE_OP:
Status = AcpiDsEvalDataObjectOperands (WalkState, Op,
- AcpiNsGetAttachedObject (Op->Common.Parent->Common.Node));
+ AcpiNsGetAttachedObject (Op->Common.Parent->Common.Node));
break;
default:
@@ -714,7 +721,8 @@ AcpiDsExecEndOp (
default:
ACPI_ERROR ((AE_INFO,
- "Unimplemented opcode, class=0x%X type=0x%X Opcode=0x%X Op=%p",
+ "Unimplemented opcode, class=0x%X "
+ "type=0x%X Opcode=0x%X Op=%p",
OpClass, OpType, Op->Common.AmlOpcode, Op));
Status = AE_NOT_IMPLEMENTED;
@@ -749,8 +757,7 @@ Cleanup:
{
/* Break to debugger to display result */
- ACPI_DEBUGGER_EXEC (AcpiDbDisplayResultObject (WalkState->ResultObj,
- WalkState));
+ AcpiDbDisplayResultObject (WalkState->ResultObj,WalkState);
/*
* Delete the result op if and only if:
diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c
index bcc786801154a..0c6d848579e70 100644
--- a/source/components/dispatcher/dswload.c
+++ b/source/components/dispatcher/dswload.c
@@ -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))
@@ -329,20 +330,20 @@ AcpiDsLoad1BeginOp (
{
Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[%s] Override allowed\n",
- AcpiUtGetTypeName (ObjectType)));
+ AcpiUtGetTypeName (ObjectType)));
}
else
{
Flags |= ACPI_NS_ERROR_IF_FOUND;
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[%s] Cannot already exist\n",
- AcpiUtGetTypeName (ObjectType)));
+ AcpiUtGetTypeName (ObjectType)));
}
}
else
{
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"[%s] Both Find or Create allowed\n",
- AcpiUtGetTypeName (ObjectType)));
+ AcpiUtGetTypeName (ObjectType)));
}
/*
@@ -352,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)
@@ -372,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);
@@ -494,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);
@@ -504,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);
@@ -556,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;
diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c
index f6095d971900a..4c7392045b85b 100644
--- a/source/components/dispatcher/dswload2.c
+++ b/source/components/dispatcher/dswload2.c
@@ -159,8 +159,8 @@ AcpiDsLoad2BeginOp (
* for use later.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
- ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
- WalkState, &(Node));
+ ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
+ WalkState, &(Node));
break;
case AML_SCOPE_OP:
@@ -185,8 +185,8 @@ AcpiDsLoad2BeginOp (
* for use later.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
- ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
- WalkState, &(Node));
+ ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
+ WalkState, &(Node));
if (ACPI_FAILURE (Status))
{
#ifdef ACPI_ASL_COMPILER
@@ -323,7 +323,7 @@ AcpiDsLoad2BeginOp (
/* Add new entry or lookup existing entry */
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
- ACPI_IMODE_LOAD_PASS2, Flags, WalkState, &Node);
+ ACPI_IMODE_LOAD_PASS2, Flags, WalkState, &Node);
if (ACPI_SUCCESS (Status) && (Flags & ACPI_NS_TEMPORARY))
{
@@ -401,7 +401,7 @@ AcpiDsLoad2EndOp (
Op = WalkState->Op;
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Opcode [%s] Op %p State %p\n",
- WalkState->OpInfo->Name, Op, WalkState));
+ WalkState->OpInfo->Name, Op, WalkState));
/* Check if opcode had an associated namespace object */
@@ -507,8 +507,8 @@ AcpiDsLoad2EndOp (
{
case AML_INDEX_FIELD_OP:
- Status = AcpiDsCreateIndexField (Op, (ACPI_HANDLE) Arg->Common.Node,
- WalkState);
+ Status = AcpiDsCreateIndexField (
+ Op, (ACPI_HANDLE) Arg->Common.Node, WalkState);
break;
case AML_BANK_FIELD_OP:
@@ -593,7 +593,7 @@ AcpiDsLoad2EndOp (
if (Op->Common.AmlOpcode == AML_REGION_OP)
{
RegionSpace = (ACPI_ADR_SPACE_TYPE)
- ((Op->Common.Value.Arg)->Common.Value.Integer);
+ ((Op->Common.Value.Arg)->Common.Value.Integer);
}
else
{
@@ -618,8 +618,8 @@ AcpiDsLoad2EndOp (
* Executing a method: initialize the region and unlock
* the interpreter
*/
- Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length,
- RegionSpace, WalkState);
+ Status = AcpiExCreateRegion (Op->Named.Data,
+ Op->Named.Length, RegionSpace, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -628,8 +628,8 @@ AcpiDsLoad2EndOp (
AcpiExExitInterpreter ();
}
- Status = AcpiEvInitializeRegion (AcpiNsGetAttachedObject (Node),
- FALSE);
+ Status = AcpiEvInitializeRegion (
+ AcpiNsGetAttachedObject (Node), FALSE);
if (WalkState->MethodNode)
{
AcpiExEnterInterpreter ();
@@ -672,12 +672,14 @@ AcpiDsLoad2EndOp (
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);
+ Status = AcpiExCreateMethod (
+ Op->Named.Data, Op->Named.Length, WalkState);
}
+
WalkState->Operands[0] = NULL;
WalkState->NumOperands = 0;
@@ -712,9 +714,9 @@ AcpiDsLoad2EndOp (
* Lookup the method name and save the Node
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS2,
- ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
- WalkState, &(NewNode));
+ ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS2,
+ ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
+ WalkState, &(NewNode));
if (ACPI_SUCCESS (Status))
{
/*
diff --git a/source/components/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c
index fe9a2566edf5a..f67f2c4be784d 100644
--- a/source/components/dispatcher/dswscope.c
+++ b/source/components/dispatcher/dswscope.c
@@ -82,6 +82,7 @@ AcpiDsScopeStackClear (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Popped object type (%s)\n",
AcpiUtGetTypeName (ScopeInfo->Common.Value)));
+
AcpiUtDeleteGenericState (ScopeInfo);
}
}
diff --git a/source/components/dispatcher/dswstate.c b/source/components/dispatcher/dswstate.c
index b45974f964d78..8b7aa74fc97ad 100644
--- a/source/components/dispatcher/dswstate.c
+++ b/source/components/dispatcher/dswstate.c
@@ -299,8 +299,8 @@ AcpiDsResultStackPop (
if (WalkState->Results == NULL)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Result stack underflow - State=%p\n",
- WalkState));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Result stack underflow - State=%p\n", WalkState));
return (AE_AML_NO_OPERAND);
}
@@ -707,7 +707,8 @@ AcpiDsInitAmlWalk (
/* Push start scope on scope stack and make it current */
- Status = AcpiDsScopeStackPush (MethodNode, ACPI_TYPE_METHOD, WalkState);
+ Status = AcpiDsScopeStackPush (
+ MethodNode, ACPI_TYPE_METHOD, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -750,7 +751,7 @@ AcpiDsInitAmlWalk (
/* Push start scope on scope stack and make it current */
Status = AcpiDsScopeStackPush (ParserState->StartNode,
- ParserState->StartNode->Type, WalkState);
+ ParserState->StartNode->Type, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/events/evevent.c b/source/components/events/evevent.c
index 96e4682c0ec94..d7c38cd7512ff 100644
--- a/source/components/events/evevent.c
+++ b/source/components/events/evevent.c
@@ -203,8 +203,8 @@ AcpiEvFixedEventInitialize (
if (AcpiGbl_FixedEventInfo[i].EnableRegisterId != 0xFF)
{
Status = AcpiWriteBitRegister (
- AcpiGbl_FixedEventInfo[i].EnableRegisterId,
- ACPI_DISABLE_EVENT);
+ AcpiGbl_FixedEventInfo[i].EnableRegisterId,
+ ACPI_DISABLE_EVENT);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -307,8 +307,8 @@ AcpiEvFixedEventDispatch (
/* Clear the status bit */
(void) AcpiWriteBitRegister (
- AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
- ACPI_CLEAR_STATUS);
+ AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
+ ACPI_CLEAR_STATUS);
/*
* Make sure that a handler exists. If not, report an error
@@ -317,8 +317,8 @@ AcpiEvFixedEventDispatch (
if (!AcpiGbl_FixedEventHandlers[Event].Handler)
{
(void) AcpiWriteBitRegister (
- AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- ACPI_DISABLE_EVENT);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
+ ACPI_DISABLE_EVENT);
ACPI_ERROR ((AE_INFO,
"No installed handler for fixed event - %s (%u), disabling",
@@ -330,7 +330,7 @@ AcpiEvFixedEventDispatch (
/* Invoke the Fixed Event handler */
return ((AcpiGbl_FixedEventHandlers[Event].Handler)(
- AcpiGbl_FixedEventHandlers[Event].Context));
+ AcpiGbl_FixedEventHandlers[Event].Context));
}
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/source/components/events/evglock.c b/source/components/events/evglock.c
index 7617d5cefeb06..ce137340f5294 100644
--- a/source/components/events/evglock.c
+++ b/source/components/events/evglock.c
@@ -90,7 +90,7 @@ AcpiEvInitGlobalLockHandler (
/* Attempt installation of the global lock handler */
Status = AcpiInstallFixedEventHandler (ACPI_EVENT_GLOBAL,
- AcpiEvGlobalLockHandler, NULL);
+ AcpiEvGlobalLockHandler, NULL);
/*
* If the global lock does not exist on this platform, the attempt to
@@ -140,9 +140,10 @@ AcpiEvRemoveGlobalLockHandler (
ACPI_FUNCTION_TRACE (EvRemoveGlobalLockHandler);
+
AcpiGbl_GlobalLockPresent = FALSE;
Status = AcpiRemoveFixedEventHandler (ACPI_EVENT_GLOBAL,
- AcpiEvGlobalLockHandler);
+ AcpiEvGlobalLockHandler);
AcpiOsDeleteLock (AcpiGbl_GlobalLockPendingLock);
return_ACPI_STATUS (Status);
@@ -302,8 +303,8 @@ AcpiEvAcquireGlobalLock (
* Wait for handshake with the global lock interrupt handler.
* This interface releases the interpreter if we must wait.
*/
- Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore,
- ACPI_WAIT_FOREVER);
+ Status = AcpiExSystemWaitSemaphore (
+ AcpiGbl_GlobalLockSemaphore, ACPI_WAIT_FOREVER);
Flags = AcpiOsAcquireLock (AcpiGbl_GlobalLockPendingLock);
@@ -361,7 +362,7 @@ AcpiEvReleaseGlobalLock (
if (Pending)
{
Status = AcpiWriteBitRegister (
- ACPI_BITREG_GLOBAL_LOCK_RELEASE, ACPI_ENABLE_EVENT);
+ ACPI_BITREG_GLOBAL_LOCK_RELEASE, ACPI_ENABLE_EVENT);
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Released hardware Global Lock\n"));
diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c
index 2ce57f9d460ce..04a1f1e0b713a 100644
--- a/source/components/events/evgpe.c
+++ b/source/components/events/evgpe.c
@@ -104,8 +104,8 @@ AcpiEvUpdateGpeEnableMask (
{
ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, (UINT8) RegisterBit);
}
- GpeRegisterInfo->EnableMask = GpeRegisterInfo->EnableForRun;
+ GpeRegisterInfo->EnableMask = GpeRegisterInfo->EnableForRun;
return_ACPI_STATUS (AE_OK);
}
@@ -327,7 +327,7 @@ AcpiEvGetGpeEventInfo (
for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++)
{
GpeInfo = AcpiEvLowGetGpeInfo (GpeNumber,
- AcpiGbl_GpeFadtBlocks[i]);
+ AcpiGbl_GpeFadtBlocks[i]);
if (GpeInfo)
{
return (GpeInfo);
@@ -588,8 +588,8 @@ AcpiEvAsynchExecuteGpeMethod (
Notify = GpeEventInfo->Dispatch.NotifyList;
while (ACPI_SUCCESS (Status) && Notify)
{
- Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode,
- ACPI_NOTIFY_DEVICE_WAKE);
+ Status = AcpiEvQueueNotifyRequest (
+ Notify->DeviceNode, ACPI_NOTIFY_DEVICE_WAKE);
Notify = Notify->Next;
}
@@ -633,7 +633,7 @@ AcpiEvAsynchExecuteGpeMethod (
/* Defer enabling of GPE until all notify handlers are done */
Status = AcpiOsExecute (OSL_NOTIFY_HANDLER,
- AcpiEvAsynchEnableGpe, GpeEventInfo);
+ AcpiEvAsynchEnableGpe, GpeEventInfo);
if (ACPI_SUCCESS (Status))
{
return_VOID;
@@ -778,8 +778,8 @@ AcpiEvGpeDispatch (
{
ACPI_EXCEPTION ((AE_INFO, Status,
"Unable to clear GPE %02X", GpeNumber));
- (void) AcpiHwLowSetGpe (GpeEventInfo,
- ACPI_GPE_CONDITIONAL_ENABLE);
+ (void) AcpiHwLowSetGpe (
+ GpeEventInfo, ACPI_GPE_CONDITIONAL_ENABLE);
return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED);
}
}
@@ -816,7 +816,7 @@ AcpiEvGpeDispatch (
* NOTE: Level-triggered GPEs are cleared after the method completes.
*/
Status = AcpiOsExecute (OSL_GPE_HANDLER,
- AcpiEvAsynchExecuteGpeMethod, GpeEventInfo);
+ AcpiEvAsynchExecuteGpeMethod, GpeEventInfo);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c
index d3342a5b0f6b0..8d266bfe33b0a 100644
--- a/source/components/events/evgpeblk.c
+++ b/source/components/events/evgpeblk.c
@@ -193,6 +193,7 @@ AcpiEvDeleteGpeBlock (
{
GpeBlock->Next->Previous = GpeBlock->Previous;
}
+
AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
}
@@ -241,8 +242,8 @@ AcpiEvCreateGpeInfoBlocks (
/* Allocate the GPE register information block */
GpeRegisterInfo = ACPI_ALLOCATE_ZEROED (
- (ACPI_SIZE) GpeBlock->RegisterCount *
- sizeof (ACPI_GPE_REGISTER_INFO));
+ (ACPI_SIZE) GpeBlock->RegisterCount *
+ sizeof (ACPI_GPE_REGISTER_INFO));
if (!GpeRegisterInfo)
{
ACPI_ERROR ((AE_INFO,
@@ -255,7 +256,7 @@ AcpiEvCreateGpeInfoBlocks (
* per register. Initialization to zeros is sufficient.
*/
GpeEventInfo = ACPI_ALLOCATE_ZEROED ((ACPI_SIZE) GpeBlock->GpeCount *
- sizeof (ACPI_GPE_EVENT_INFO));
+ sizeof (ACPI_GPE_EVENT_INFO));
if (!GpeEventInfo)
{
ACPI_ERROR ((AE_INFO,
@@ -267,7 +268,7 @@ AcpiEvCreateGpeInfoBlocks (
/* Save the new Info arrays in the GPE block */
GpeBlock->RegisterInfo = GpeRegisterInfo;
- GpeBlock->EventInfo = GpeEventInfo;
+ GpeBlock->EventInfo = GpeEventInfo;
/*
* Initialize the GPE Register and Event structures. A goal of these
@@ -276,7 +277,7 @@ AcpiEvCreateGpeInfoBlocks (
* first half, and the enable registers occupy the second half.
*/
ThisRegister = GpeRegisterInfo;
- ThisEvent = GpeEventInfo;
+ ThisEvent = GpeEventInfo;
for (i = 0; i < GpeBlock->RegisterCount; i++)
{
@@ -434,8 +435,8 @@ AcpiEvCreateGpeBlock (
WalkInfo.ExecuteByOwnerId = FALSE;
Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
- ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
- AcpiEvMatchGpeMethod, NULL, &WalkInfo, NULL);
+ ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
+ AcpiEvMatchGpeMethod, NULL, &WalkInfo, NULL);
/* Return the new block */
diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c
index d23a345263d4d..dc421d53ca120 100644
--- a/source/components/events/evgpeinit.c
+++ b/source/components/events/evgpeinit.c
@@ -138,10 +138,10 @@ AcpiEvGpeInitialize (
/* Install GPE Block 0 */
Status = AcpiEvCreateGpeBlock (AcpiGbl_FadtGpeDevice,
- AcpiGbl_FADT.XGpe0Block.Address,
- AcpiGbl_FADT.XGpe0Block.SpaceId,
- RegisterCount0, 0,
- AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[0]);
+ AcpiGbl_FADT.XGpe0Block.Address,
+ AcpiGbl_FADT.XGpe0Block.SpaceId,
+ RegisterCount0, 0,
+ AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[0]);
if (ACPI_FAILURE (Status))
{
@@ -178,11 +178,11 @@ AcpiEvGpeInitialize (
/* Install GPE Block 1 */
Status = AcpiEvCreateGpeBlock (AcpiGbl_FadtGpeDevice,
- AcpiGbl_FADT.XGpe1Block.Address,
- AcpiGbl_FADT.XGpe1Block.SpaceId,
- RegisterCount1,
- AcpiGbl_FADT.Gpe1Base,
- AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[1]);
+ AcpiGbl_FADT.XGpe1Block.Address,
+ AcpiGbl_FADT.XGpe1Block.SpaceId,
+ RegisterCount1,
+ AcpiGbl_FADT.Gpe1Base,
+ AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[1]);
if (ACPI_FAILURE (Status))
{
@@ -195,7 +195,7 @@ AcpiEvGpeInitialize (
* space. However, GPE0 always starts at GPE number zero.
*/
GpeNumberMax = AcpiGbl_FADT.Gpe1Base +
- ((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
+ ((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
}
}
@@ -275,9 +275,9 @@ AcpiEvUpdateGpes (
WalkInfo.GpeDevice = GpeBlock->Node;
Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD,
- WalkInfo.GpeDevice, ACPI_UINT32_MAX,
- ACPI_NS_WALK_NO_UNLOCK, AcpiEvMatchGpeMethod,
- NULL, &WalkInfo, NULL);
+ WalkInfo.GpeDevice, ACPI_UINT32_MAX,
+ ACPI_NS_WALK_NO_UNLOCK, AcpiEvMatchGpeMethod,
+ NULL, &WalkInfo, NULL);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
@@ -430,7 +430,7 @@ AcpiEvMatchGpeMethod (
}
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
- ACPI_GPE_DISPATCH_METHOD)
+ ACPI_GPE_DISPATCH_METHOD)
{
/*
* If there is already a method, ignore this method. But check
diff --git a/source/components/events/evgpeutil.c b/source/components/events/evgpeutil.c
index 18cbbf7cc706a..e4431bf3e8a89 100644
--- a/source/components/events/evgpeutil.c
+++ b/source/components/events/evgpeutil.c
@@ -238,7 +238,7 @@ AcpiEvGetGpeXruptBlock (
if (InterruptNumber != AcpiGbl_FADT.SciInterrupt)
{
Status = AcpiOsInstallInterruptHandler (InterruptNumber,
- AcpiEvGpeXruptHandler, GpeXrupt);
+ AcpiEvGpeXruptHandler, GpeXrupt);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
@@ -288,7 +288,7 @@ AcpiEvDeleteGpeXrupt (
/* Disable this interrupt */
Status = AcpiOsRemoveInterruptHandler (
- GpeXrupt->InterruptNumber, AcpiEvGpeXruptHandler);
+ GpeXrupt->InterruptNumber, AcpiEvGpeXruptHandler);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -374,7 +374,7 @@ AcpiEvDeleteGpeHandlers (
GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
}
else if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
- ACPI_GPE_DISPATCH_NOTIFY)
+ ACPI_GPE_DISPATCH_NOTIFY)
{
/* Delete the implicit notification device list */
@@ -385,6 +385,7 @@ AcpiEvDeleteGpeHandlers (
ACPI_FREE (Notify);
Notify = Next;
}
+
GpeEventInfo->Dispatch.NotifyList = NULL;
GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
}
diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c
index c797abe1f7d79..e2d5955a089c6 100644
--- a/source/components/events/evhandler.c
+++ b/source/components/events/evhandler.c
@@ -122,8 +122,8 @@ AcpiEvInstallRegionHandlers (
for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++)
{
Status = AcpiEvInstallSpaceHandler (AcpiGbl_RootNode,
- AcpiGbl_DefaultAddressSpaces[i],
- ACPI_DEFAULT_HANDLER, NULL, NULL);
+ AcpiGbl_DefaultAddressSpaces[i],
+ ACPI_DEFAULT_HANDLER, NULL, NULL);
switch (Status)
{
case AE_OK:
@@ -184,7 +184,7 @@ AcpiEvHasDefaultHandler (
if (HandlerObj->AddressSpace.SpaceId == SpaceId)
{
if (HandlerObj->AddressSpace.HandlerFlags &
- ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)
+ ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)
{
return (TRUE);
}
@@ -282,7 +282,7 @@ AcpiEvInstallHandler (
/* Found a handler, is it for the same address space? */
if (NextHandlerObj->AddressSpace.SpaceId ==
- HandlerObj->AddressSpace.SpaceId)
+ HandlerObj->AddressSpace.SpaceId)
{
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Found handler for region [%s] in device %p(%p) "
@@ -574,8 +574,8 @@ AcpiEvInstallSpaceHandler (
* of the branch
*/
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
- ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler, NULL,
- HandlerObj, NULL);
+ ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler, NULL,
+ HandlerObj, NULL);
UnlockAndExit:
return_ACPI_STATUS (Status);
diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c
index accf22298b92b..0a69c239b44ff 100644
--- a/source/components/events/evmisc.c
+++ b/source/components/events/evmisc.c
@@ -75,6 +75,7 @@ BOOLEAN
AcpiEvIsNotifyObject (
ACPI_NAMESPACE_NODE *Node)
{
+
switch (Node->Type)
{
case ACPI_TYPE_DEVICE:
@@ -183,8 +184,8 @@ AcpiEvQueueNotifyRequest (
AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
NotifyValue, AcpiUtGetNotifyName (NotifyValue, ACPI_TYPE_ANY), Node));
- Status = AcpiOsExecute (OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch,
- Info);
+ Status = AcpiOsExecute (OSL_NOTIFY_HANDLER,
+ AcpiEvNotifyDispatch, Info);
if (ACPI_FAILURE (Status))
{
AcpiUtDeleteGenericState (Info);
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c
index 298a1dbf535e2..c2f2292706550 100644
--- a/source/components/events/evregion.c
+++ b/source/components/events/evregion.c
@@ -110,7 +110,7 @@ AcpiEvInitializeOpRegions (
AcpiGbl_DefaultAddressSpaces[i]))
{
Status = AcpiEvExecuteRegMethods (AcpiGbl_RootNode,
- AcpiGbl_DefaultAddressSpaces[i]);
+ AcpiGbl_DefaultAddressSpaces[i]);
}
}
@@ -210,7 +210,7 @@ AcpiEvAddressSpaceDispatch (
AcpiExExitInterpreter ();
Status = RegionSetup (RegionObj, ACPI_REGION_ACTIVATE,
- Context, &RegionContext);
+ Context, &RegionContext);
/* Re-enter the interpreter */
@@ -292,7 +292,7 @@ AcpiEvAddressSpaceDispatch (
AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
if (!(HandlerDesc->AddressSpace.HandlerFlags &
- ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
+ ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
{
/*
* For handlers other than the default (supplied) handlers, we must
@@ -314,7 +314,7 @@ AcpiEvAddressSpaceDispatch (
}
if (!(HandlerDesc->AddressSpace.HandlerFlags &
- ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
+ ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
{
/*
* We just returned from a non-default handler, we must re-enter the
diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c
index 6cf1b031fbfae..cc0240d9de178 100644
--- a/source/components/events/evrgnini.c
+++ b/source/components/events/evrgnini.c
@@ -248,9 +248,9 @@ AcpiEvPciConfigRegionSetup (
/* Install a handler for this PCI root bridge */
Status = AcpiInstallAddressSpaceHandler (
- (ACPI_HANDLE) PciRootNode,
- ACPI_ADR_SPACE_PCI_CONFIG,
- ACPI_DEFAULT_HANDLER, NULL, NULL);
+ (ACPI_HANDLE) PciRootNode,
+ ACPI_ADR_SPACE_PCI_CONFIG,
+ ACPI_DEFAULT_HANDLER, NULL, NULL);
if (ACPI_FAILURE (Status))
{
if (Status == AE_SAME_HANDLER)
@@ -324,7 +324,7 @@ AcpiEvPciConfigRegionSetup (
* contained in the parent's scope.
*/
Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR,
- PciDeviceNode, &PciValue);
+ PciDeviceNode, &PciValue);
/*
* The default is zero, and since the allocation above zeroed the data,
@@ -339,7 +339,7 @@ AcpiEvPciConfigRegionSetup (
/* The PCI segment number comes from the _SEG method */
Status = AcpiUtEvaluateNumericObject (METHOD_NAME__SEG,
- PciRootNode, &PciValue);
+ PciRootNode, &PciValue);
if (ACPI_SUCCESS (Status))
{
PciId->Segment = ACPI_LOWORD (PciValue);
@@ -348,7 +348,7 @@ AcpiEvPciConfigRegionSetup (
/* The PCI bus number comes from the _BBN method */
Status = AcpiUtEvaluateNumericObject (METHOD_NAME__BBN,
- PciRootNode, &PciValue);
+ PciRootNode, &PciValue);
if (ACPI_SUCCESS (Status))
{
PciId->Bus = ACPI_LOWORD (PciValue);
@@ -604,7 +604,7 @@ AcpiEvInitializeRegion (
/* Find any "_REG" method associated with this region definition */
Status = AcpiNsSearchOneScope (
- *RegNamePtr, Node, ACPI_TYPE_METHOD, &MethodNode);
+ *RegNamePtr, Node, ACPI_TYPE_METHOD, &MethodNode);
if (ACPI_SUCCESS (Status))
{
/*
@@ -680,7 +680,7 @@ AcpiEvInitializeRegion (
HandlerObj, RegionObj, ObjDesc));
Status = AcpiEvAttachRegion (HandlerObj, RegionObj,
- AcpiNsLocked);
+ AcpiNsLocked);
/*
* Tell all users that this region is usable by
diff --git a/source/components/events/evsci.c b/source/components/events/evsci.c
index 93b307e4c1b53..f2218656e0892 100644
--- a/source/components/events/evsci.c
+++ b/source/components/events/evsci.c
@@ -218,7 +218,7 @@ AcpiEvInstallSciHandler (
Status = AcpiOsInstallInterruptHandler ((UINT32) AcpiGbl_FADT.SciInterrupt,
- AcpiEvSciXruptHandler, AcpiGbl_GpeXruptListHead);
+ AcpiEvSciXruptHandler, AcpiGbl_GpeXruptListHead);
return_ACPI_STATUS (Status);
}
@@ -257,7 +257,7 @@ AcpiEvRemoveAllSciHandlers (
/* Just let the OS remove the handler and disable the level */
Status = AcpiOsRemoveInterruptHandler ((UINT32) AcpiGbl_FADT.SciInterrupt,
- AcpiEvSciXruptHandler);
+ AcpiEvSciXruptHandler);
if (!AcpiGbl_SciHandlerList)
{
diff --git a/source/components/events/evxface.c b/source/components/events/evxface.c
index 0a3b6c8311682..c6b1c2e3bec5d 100644
--- a/source/components/events/evxface.c
+++ b/source/components/events/evxface.c
@@ -1002,8 +1002,8 @@ AcpiInstallGpeHandler (
ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
- Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, FALSE,
- Address, Context);
+ Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type,
+ FALSE, Address, Context);
return_ACPI_STATUS (Status);
}
@@ -1043,8 +1043,8 @@ AcpiInstallGpeRawHandler (
ACPI_FUNCTION_TRACE (AcpiInstallGpeRawHandler);
- Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, TRUE,
- Address, Context);
+ Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type,
+ TRUE, Address, Context);
return_ACPI_STATUS (Status);
}
@@ -1210,7 +1210,7 @@ AcpiAcquireGlobalLock (
AcpiExEnterInterpreter ();
Status = AcpiExAcquireMutexObject (Timeout,
- AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
+ AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
if (ACPI_SUCCESS (Status))
{
diff --git a/source/components/events/evxfevnt.c b/source/components/events/evxfevnt.c
index fe46dfb993cb0..e633cebcd881d 100644
--- a/source/components/events/evxfevnt.c
+++ b/source/components/events/evxfevnt.c
@@ -76,7 +76,7 @@ AcpiEnable (
/* ACPI tables must be present */
- if (!AcpiTbTablesLoaded ())
+ if (AcpiGbl_FadtIndex == ACPI_INVALID_TABLE_INDEX)
{
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
}
@@ -92,7 +92,8 @@ AcpiEnable (
if (AcpiHwGetMode() == ACPI_SYS_MODE_ACPI)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in ACPI mode\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
+ "System is already in ACPI mode\n"));
}
else
{
@@ -162,7 +163,8 @@ AcpiDisable (
return_ACPI_STATUS (Status);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI mode disabled\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
+ "ACPI mode disabled\n"));
}
return_ACPI_STATUS (Status);
@@ -208,8 +210,8 @@ AcpiEnableEvent (
* register bit)
*/
Status = AcpiWriteBitRegister (
- AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- ACPI_ENABLE_EVENT);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
+ ACPI_ENABLE_EVENT);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -218,7 +220,7 @@ AcpiEnableEvent (
/* Make sure that the hardware responded */
Status = AcpiReadBitRegister (
- AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &Value);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &Value);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -274,15 +276,15 @@ AcpiDisableEvent (
* register bit)
*/
Status = AcpiWriteBitRegister (
- AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- ACPI_DISABLE_EVENT);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
+ ACPI_DISABLE_EVENT);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
Status = AcpiReadBitRegister (
- AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &Value);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &Value);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -335,8 +337,8 @@ AcpiClearEvent (
* register bit)
*/
Status = AcpiWriteBitRegister (
- AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
- ACPI_CLEAR_STATUS);
+ AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
+ ACPI_CLEAR_STATUS);
return_ACPI_STATUS (Status);
}
@@ -393,7 +395,7 @@ AcpiGetEventStatus (
/* Fixed event currently enabled? */
Status = AcpiReadBitRegister (
- AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &InByte);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &InByte);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -408,7 +410,7 @@ AcpiGetEventStatus (
/* Fixed event currently active? */
Status = AcpiReadBitRegister (
- AcpiGbl_FixedEventInfo[Event].StatusRegisterId, &InByte);
+ AcpiGbl_FixedEventInfo[Event].StatusRegisterId, &InByte);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c
index 79a055c833c4d..44b0a4793ce01 100644
--- a/source/components/events/evxfgpe.c
+++ b/source/components/events/evxfgpe.c
@@ -440,7 +440,7 @@ AcpiSetupGpeForWake (
* level-triggered (for windows compatibility).
*/
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
- ACPI_GPE_DISPATCH_NONE)
+ ACPI_GPE_DISPATCH_NONE)
{
/*
* This is the first device for implicit notify on this GPE.
@@ -455,7 +455,7 @@ AcpiSetupGpeForWake (
* this device to the notify list.
*/
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
- ACPI_GPE_DISPATCH_NOTIFY)
+ ACPI_GPE_DISPATCH_NOTIFY)
{
/* Ensure that the device is not already in the list */
@@ -920,8 +920,8 @@ AcpiInstallGpeBlock (
* is always zero
*/
Status = AcpiEvCreateGpeBlock (Node, GpeBlockAddress->Address,
- GpeBlockAddress->SpaceId, RegisterCount,
- 0, InterruptNumber, &GpeBlock);
+ GpeBlockAddress->SpaceId, RegisterCount,
+ 0, InterruptNumber, &GpeBlock);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
diff --git a/source/components/events/evxfregn.c b/source/components/events/evxfregn.c
index 1126bbe53b781..d26f3bf053dde 100644
--- a/source/components/events/evxfregn.c
+++ b/source/components/events/evxfregn.c
@@ -114,7 +114,8 @@ AcpiInstallAddressSpaceHandler (
/* Install the handler for all Regions for this Space ID */
- Status = AcpiEvInstallSpaceHandler (Node, SpaceId, Handler, Setup, Context);
+ Status = AcpiEvInstallSpaceHandler (
+ Node, SpaceId, Handler, Setup, Context);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@@ -144,6 +145,7 @@ AcpiInstallAddressSpaceHandler (
if (!AcpiGbl_RegMethodsExecuted)
{
/* We will defer execution of the _REG methods for this space */
+
goto UnlockAndExit;
}
break;
diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c
index 361367d67914c..75d1ff01af4ac 100644
--- a/source/components/executer/exconfig.c
+++ b/source/components/executer/exconfig.c
@@ -181,9 +181,9 @@ AcpiExLoadTableOp (
/* Find the ACPI table in the RSDT/XSDT */
Status = AcpiTbFindTable (
- Operand[0]->String.Pointer,
- Operand[1]->String.Pointer,
- Operand[2]->String.Pointer, &TableIndex);
+ Operand[0]->String.Pointer,
+ Operand[1]->String.Pointer,
+ Operand[2]->String.Pointer, &TableIndex);
if (ACPI_FAILURE (Status))
{
if (Status != AE_NOT_FOUND)
@@ -217,7 +217,7 @@ AcpiExLoadTableOp (
* location within the namespace where the table will be loaded.
*/
Status = AcpiNsGetNode (StartNode, Operand[3]->String.Pointer,
- ACPI_NS_SEARCH_PARENT, &ParentNode);
+ ACPI_NS_SEARCH_PARENT, &ParentNode);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -241,7 +241,7 @@ AcpiExLoadTableOp (
/* Find the node referenced by the ParameterPathString */
Status = AcpiNsGetNode (StartNode, Operand[4]->String.Pointer,
- ACPI_NS_SEARCH_PARENT, &ParameterNode);
+ ACPI_NS_SEARCH_PARENT, &ParameterNode);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -263,8 +263,7 @@ AcpiExLoadTableOp (
/* Store the parameter data into the optional parameter object */
Status = AcpiExStore (Operand[5],
- ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, ParameterNode),
- WalkState);
+ ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, ParameterNode), WalkState);
if (ACPI_FAILURE (Status))
{
(void) AcpiExUnloadTable (DdbHandle);
@@ -286,7 +285,7 @@ AcpiExLoadTableOp (
if (AcpiGbl_TableHandler)
{
(void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table,
- AcpiGbl_TableHandlerContext);
+ AcpiGbl_TableHandlerContext);
}
*ReturnDesc = DdbHandle;
@@ -326,7 +325,7 @@ AcpiExRegionRead (
for (i = 0; i < Length; i++)
{
Status = AcpiEvAddressSpaceDispatch (ObjDesc, NULL, ACPI_READ,
- RegionOffset, 8, &Value);
+ RegionOffset, 8, &Value);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -396,8 +395,8 @@ AcpiExLoadOp (
}
/*
- * If the Region Address and Length have not been previously evaluated,
- * evaluate them now and save the results.
+ * If the Region Address and Length have not been previously
+ * evaluated, evaluate them now and save the results.
*/
if (!(ObjDesc->Common.Flags & AOPOBJ_DATA_VALID))
{
@@ -417,7 +416,7 @@ AcpiExLoadOp (
}
Status = AcpiExRegionRead (ObjDesc, sizeof (ACPI_TABLE_HEADER),
- ACPI_CAST_PTR (UINT8, TableHeader));
+ ACPI_CAST_PTR (UINT8, TableHeader));
Length = TableHeader->Length;
ACPI_FREE (TableHeader);
@@ -460,7 +459,7 @@ AcpiExLoadOp (
/* Read the entire table */
Status = AcpiExRegionRead (ObjDesc, Length,
- ACPI_CAST_PTR (UINT8, Table));
+ ACPI_CAST_PTR (UINT8, Table));
if (ACPI_FAILURE (Status))
{
ACPI_FREE (Table);
@@ -482,7 +481,8 @@ AcpiExLoadOp (
/* Get the actual table length from the table header */
- TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ObjDesc->Buffer.Pointer);
+ TableHeader = ACPI_CAST_PTR (
+ ACPI_TABLE_HEADER, ObjDesc->Buffer.Pointer);
Length = TableHeader->Length;
/* Table cannot extend beyond the buffer */
@@ -497,8 +497,8 @@ AcpiExLoadOp (
}
/*
- * Copy the table from the buffer because the buffer could be modified
- * or even deleted in the future
+ * Copy the table from the buffer because the buffer could be
+ * modified or even deleted in the future
*/
Table = ACPI_ALLOCATE (Length);
if (!Table)
@@ -520,8 +520,8 @@ AcpiExLoadOp (
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),
- ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, TRUE,
- &TableIndex);
+ ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, TRUE,
+ &TableIndex);
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
if (ACPI_FAILURE (Status))
@@ -536,7 +536,8 @@ AcpiExLoadOp (
* Note: Now table is "INSTALLED", it must be validated before
* loading.
*/
- Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[TableIndex]);
+ Status = AcpiTbValidateTable (
+ &AcpiGbl_RootTableList.Tables[TableIndex]);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -579,7 +580,7 @@ AcpiExLoadOp (
if (AcpiGbl_TableHandler)
{
(void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table,
- AcpiGbl_TableHandlerContext);
+ AcpiGbl_TableHandlerContext);
}
return_ACPI_STATUS (Status);
@@ -656,7 +657,7 @@ AcpiExUnloadTable (
if (ACPI_SUCCESS (Status))
{
(void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD, Table,
- AcpiGbl_TableHandlerContext);
+ AcpiGbl_TableHandlerContext);
}
}
diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c
index c964217816c26..592206ce92335 100644
--- a/source/components/executer/exconvrt.c
+++ b/source/components/executer/exconvrt.c
@@ -251,9 +251,7 @@ AcpiExConvertToBuffer (
/* Copy the integer to the buffer, LSB first */
NewBuf = ReturnDesc->Buffer.Pointer;
- memcpy (NewBuf,
- &ObjDesc->Integer.Value,
- AcpiGbl_IntegerByteWidth);
+ memcpy (NewBuf, &ObjDesc->Integer.Value, AcpiGbl_IntegerByteWidth);
break;
case ACPI_TYPE_STRING:
@@ -266,8 +264,8 @@ AcpiExConvertToBuffer (
* ASL/AML code that depends on the null being transferred to the new
* buffer.
*/
- ReturnDesc = AcpiUtCreateBufferObject (
- (ACPI_SIZE) ObjDesc->String.Length + 1);
+ ReturnDesc = AcpiUtCreateBufferObject ((ACPI_SIZE)
+ ObjDesc->String.Length + 1);
if (!ReturnDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -390,7 +388,8 @@ AcpiExConvertToAscii (
{
/* Get one hex digit, most significant digits first */
- String[k] = (UINT8) AcpiUtHexToAsciiChar (Integer, ACPI_MUL_4 (j));
+ String[k] = (UINT8)
+ AcpiUtHexToAsciiChar (Integer, ACPI_MUL_4 (j));
k++;
}
break;
@@ -491,8 +490,8 @@ AcpiExConvertToString (
/* Convert integer to string */
- StringLength = AcpiExConvertToAscii (ObjDesc->Integer.Value, Base,
- NewBuf, AcpiGbl_IntegerByteWidth);
+ StringLength = AcpiExConvertToAscii (
+ ObjDesc->Integer.Value, Base, NewBuf, AcpiGbl_IntegerByteWidth);
/* Null terminate at the correct place */
@@ -581,8 +580,7 @@ AcpiExConvertToString (
for (i = 0; i < ObjDesc->Buffer.Length; i++)
{
NewBuf += AcpiExConvertToAscii (
- (UINT64) ObjDesc->Buffer.Pointer[i], Base,
- NewBuf, 1);
+ (UINT64) ObjDesc->Buffer.Pointer[i], Base, NewBuf, 1);
*NewBuf++ = Separator; /* each separated by a comma or space */
}
@@ -685,8 +683,7 @@ AcpiExConvertToTargetType (
* These types require an Integer operand. We can convert
* a Buffer or a String to an Integer if necessary.
*/
- Status = AcpiExConvertToInteger (SourceDesc, ResultDesc,
- 16);
+ Status = AcpiExConvertToInteger (SourceDesc, ResultDesc, 16);
break;
case ACPI_TYPE_STRING:
@@ -695,7 +692,7 @@ AcpiExConvertToTargetType (
* Integer or Buffer if necessary
*/
Status = AcpiExConvertToString (SourceDesc, ResultDesc,
- ACPI_IMPLICIT_CONVERT_HEX);
+ ACPI_IMPLICIT_CONVERT_HEX);
break;
case ACPI_TYPE_BUFFER:
@@ -708,7 +705,8 @@ AcpiExConvertToTargetType (
default:
- ACPI_ERROR ((AE_INFO, "Bad destination type during conversion: 0x%X",
+ ACPI_ERROR ((AE_INFO,
+ "Bad destination type during conversion: 0x%X",
DestinationType));
Status = AE_AML_INTERNAL;
break;
diff --git a/source/components/executer/excreate.c b/source/components/executer/excreate.c
index 9a002b88b6573..5e67346091d7d 100644
--- a/source/components/executer/excreate.c
+++ b/source/components/executer/excreate.c
@@ -147,7 +147,7 @@ AcpiExCreateAlias (
* target node or the alias Node
*/
Status = AcpiNsAttachObject (AliasNode,
- AcpiNsGetAttachedObject (TargetNode), TargetNode->Type);
+ AcpiNsGetAttachedObject (TargetNode), TargetNode->Type);
break;
}
@@ -192,7 +192,7 @@ AcpiExCreateEvent (
* that the event is created in an unsignalled state
*/
Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT, 0,
- &ObjDesc->Event.OsSemaphore);
+ &ObjDesc->Event.OsSemaphore);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -200,8 +200,9 @@ AcpiExCreateEvent (
/* Attach object to the Node */
- Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) WalkState->Operands[0],
- ObjDesc, ACPI_TYPE_EVENT);
+ Status = AcpiNsAttachObject (
+ (ACPI_NAMESPACE_NODE *) WalkState->Operands[0],
+ ObjDesc, ACPI_TYPE_EVENT);
Cleanup:
/*
@@ -260,7 +261,8 @@ AcpiExCreateMutex (
ObjDesc->Mutex.SyncLevel = (UINT8) WalkState->Operands[1]->Integer.Value;
ObjDesc->Mutex.Node = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0];
- Status = AcpiNsAttachObject (ObjDesc->Mutex.Node, ObjDesc, ACPI_TYPE_MUTEX);
+ Status = AcpiNsAttachObject (
+ ObjDesc->Mutex.Node, ObjDesc, ACPI_TYPE_MUTEX);
Cleanup:
@@ -328,7 +330,8 @@ AcpiExCreateRegion (
* a table load for this exception. Instead, if the region is
* actually used at runtime, abort the executing method.
*/
- ACPI_ERROR ((AE_INFO, "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
+ ACPI_ERROR ((AE_INFO,
+ "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
}
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n",
@@ -423,7 +426,7 @@ AcpiExCreateProcessor (
/* Install the processor object in the parent Node */
Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0],
- ObjDesc, ACPI_TYPE_PROCESSOR);
+ ObjDesc, ACPI_TYPE_PROCESSOR);
/* Remove local reference to the object */
@@ -474,7 +477,7 @@ AcpiExCreatePowerResource (
/* Install the power resource object in the parent Node */
Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0],
- ObjDesc, ACPI_TYPE_POWER);
+ ObjDesc, ACPI_TYPE_POWER);
/* Remove local reference to the object */
@@ -533,7 +536,8 @@ AcpiExCreateMethod (
* flag, and SyncLevel for efficiency.
*/
MethodFlags = (UINT8) Operand[1]->Integer.Value;
- ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & AML_METHOD_ARG_COUNT);
+ ObjDesc->Method.ParamCount = (UINT8)
+ (MethodFlags & AML_METHOD_ARG_COUNT);
/*
* Get the SyncLevel. If method is serialized, a mutex will be
@@ -554,7 +558,7 @@ AcpiExCreateMethod (
/* Attach the new object to the method Node */
Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0],
- ObjDesc, ACPI_TYPE_METHOD);
+ ObjDesc, ACPI_TYPE_METHOD);
/* Remove local reference to the object */
diff --git a/source/components/executer/exdebug.c b/source/components/executer/exdebug.c
index f50d07b17945e..4d97cda0d3721 100644
--- a/source/components/executer/exdebug.c
+++ b/source/components/executer/exdebug.c
@@ -43,26 +43,13 @@
#include "acpi.h"
#include "accommon.h"
-#include "acnamesp.h"
#include "acinterp.h"
-#include "acparser.h"
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME ("exdebug")
-static ACPI_OPERAND_OBJECT *AcpiGbl_TraceMethodObject = NULL;
-
-/* Local prototypes */
-
-#ifdef ACPI_DEBUG_OUTPUT
-static const char *
-AcpiExGetTraceEventName (
- ACPI_TRACE_EVENT_TYPE Type);
-#endif
-
-
#ifndef ACPI_NO_ERROR_MESSAGES
/*******************************************************************************
*
@@ -153,7 +140,7 @@ AcpiExDoDebugObject (
{
AcpiOsPrintf ("%s: %p\n",
AcpiUtGetTypeName (((ACPI_NAMESPACE_NODE *) SourceDesc)->Type),
- SourceDesc);
+ SourceDesc);
return_VOID;
}
else
@@ -205,7 +192,7 @@ AcpiExDoDebugObject (
for (i = 0; i < SourceDesc->Package.Count; i++)
{
AcpiExDoDebugObject (SourceDesc->Package.Elements[i],
- Level+4, i+1);
+ Level + 4, i + 1);
}
break;
@@ -241,7 +228,7 @@ AcpiExDoDebugObject (
if (SourceDesc->Reference.Node)
{
if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Node) !=
- ACPI_DESC_TYPE_NAMED)
+ ACPI_DESC_TYPE_NAMED)
{
AcpiOsPrintf (" %p - Not a valid namespace node\n",
SourceDesc->Reference.Node);
@@ -266,7 +253,7 @@ AcpiExDoDebugObject (
default:
AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
- Level+4, 0);
+ Level + 4, 0);
break;
}
}
@@ -274,11 +261,11 @@ AcpiExDoDebugObject (
else if (SourceDesc->Reference.Object)
{
if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Object) ==
- ACPI_DESC_TYPE_NAMED)
+ ACPI_DESC_TYPE_NAMED)
{
AcpiExDoDebugObject (((ACPI_NAMESPACE_NODE *)
SourceDesc->Reference.Object)->Object,
- Level+4, 0);
+ Level + 4, 0);
}
else
{
@@ -327,362 +314,3 @@ AcpiExDoDebugObject (
return_VOID;
}
#endif
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiExInterpreterTraceEnabled
- *
- * PARAMETERS: Name - Whether method name should be matched,
- * this should be checked before starting
- * the tracer
- *
- * RETURN: TRUE if interpreter trace is enabled.
- *
- * DESCRIPTION: Check whether interpreter trace is enabled
- *
- ******************************************************************************/
-
-static BOOLEAN
-AcpiExInterpreterTraceEnabled (
- char *Name)
-{
-
- /* Check if tracing is enabled */
-
- if (!(AcpiGbl_TraceFlags & ACPI_TRACE_ENABLED))
- {
- return (FALSE);
- }
-
- /*
- * Check if tracing is filtered:
- *
- * 1. If the tracer is started, AcpiGbl_TraceMethodObject should have
- * been filled by the trace starter
- * 2. If the tracer is not started, AcpiGbl_TraceMethodName should be
- * matched if it is specified
- * 3. If the tracer is oneshot style, AcpiGbl_TraceMethodName should
- * not be cleared by the trace stopper during the first match
- */
- if (AcpiGbl_TraceMethodObject)
- {
- return (TRUE);
- }
- if (Name &&
- (AcpiGbl_TraceMethodName &&
- strcmp (AcpiGbl_TraceMethodName, Name)))
- {
- return (FALSE);
- }
- if ((AcpiGbl_TraceFlags & ACPI_TRACE_ONESHOT) &&
- !AcpiGbl_TraceMethodName)
- {
- return (FALSE);
- }
-
- return (TRUE);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiExGetTraceEventName
- *
- * PARAMETERS: Type - Trace event type
- *
- * RETURN: Trace event name.
- *
- * DESCRIPTION: Used to obtain the full trace event name.
- *
- ******************************************************************************/
-
-#ifdef ACPI_DEBUG_OUTPUT
-
-static const char *
-AcpiExGetTraceEventName (
- ACPI_TRACE_EVENT_TYPE Type)
-{
- switch (Type)
- {
- case ACPI_TRACE_AML_METHOD:
-
- return "Method";
-
- case ACPI_TRACE_AML_OPCODE:
-
- return "Opcode";
-
- case ACPI_TRACE_AML_REGION:
-
- return "Region";
-
- default:
-
- return "";
- }
-}
-
-#endif
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiExTracePoint
- *
- * PARAMETERS: Type - Trace event type
- * Begin - TRUE if before execution
- * Aml - Executed AML address
- * Pathname - Object path
- *
- * RETURN: None
- *
- * DESCRIPTION: Internal interpreter execution trace.
- *
- ******************************************************************************/
-
-void
-AcpiExTracePoint (
- ACPI_TRACE_EVENT_TYPE Type,
- BOOLEAN Begin,
- UINT8 *Aml,
- char *Pathname)
-{
-
- ACPI_FUNCTION_NAME (ExTracePoint);
-
-
- if (Pathname)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_TRACE_POINT,
- "%s %s [0x%p:%s] execution.\n",
- AcpiExGetTraceEventName (Type), Begin ? "Begin" : "End",
- Aml, Pathname));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_TRACE_POINT,
- "%s %s [0x%p] execution.\n",
- AcpiExGetTraceEventName (Type), Begin ? "Begin" : "End",
- Aml));
- }
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiExStartTraceMethod
- *
- * PARAMETERS: MethodNode - Node of the method
- * ObjDesc - The method object
- * WalkState - current state, NULL if not yet executing
- * a method.
- *
- * RETURN: None
- *
- * DESCRIPTION: Start control method execution trace
- *
- ******************************************************************************/
-
-void
-AcpiExStartTraceMethod (
- ACPI_NAMESPACE_NODE *MethodNode,
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_STATUS Status;
- char *Pathname = NULL;
- BOOLEAN Enabled = FALSE;
-
-
- ACPI_FUNCTION_NAME (ExStartTraceMethod);
-
-
- if (MethodNode)
- {
- Pathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
- if (ACPI_FAILURE (Status))
- {
- goto Exit;
- }
-
- Enabled = AcpiExInterpreterTraceEnabled (Pathname);
- if (Enabled && !AcpiGbl_TraceMethodObject)
- {
- AcpiGbl_TraceMethodObject = ObjDesc;
- AcpiGbl_OriginalDbgLevel = AcpiDbgLevel;
- AcpiGbl_OriginalDbgLayer = AcpiDbgLayer;
- AcpiDbgLevel = ACPI_TRACE_LEVEL_ALL;
- AcpiDbgLayer = ACPI_TRACE_LAYER_ALL;
-
- if (AcpiGbl_TraceDbgLevel)
- {
- AcpiDbgLevel = AcpiGbl_TraceDbgLevel;
- }
- if (AcpiGbl_TraceDbgLayer)
- {
- AcpiDbgLayer = AcpiGbl_TraceDbgLayer;
- }
- }
- (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
-
-Exit:
- if (Enabled)
- {
- ACPI_TRACE_POINT (ACPI_TRACE_AML_METHOD, TRUE,
- ObjDesc ? ObjDesc->Method.AmlStart : NULL, Pathname);
- }
- if (Pathname)
- {
- ACPI_FREE (Pathname);
- }
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiExStopTraceMethod
- *
- * PARAMETERS: MethodNode - Node of the method
- * ObjDesc - The method object
- * WalkState - current state, NULL if not yet executing
- * a method.
- *
- * RETURN: None
- *
- * DESCRIPTION: Stop control method execution trace
- *
- ******************************************************************************/
-
-void
-AcpiExStopTraceMethod (
- ACPI_NAMESPACE_NODE *MethodNode,
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_STATUS Status;
- char *Pathname = NULL;
- BOOLEAN Enabled;
-
-
- ACPI_FUNCTION_NAME (ExStopTraceMethod);
-
-
- if (MethodNode)
- {
- Pathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
- if (ACPI_FAILURE (Status))
- {
- goto ExitPath;
- }
-
- Enabled = AcpiExInterpreterTraceEnabled (NULL);
-
- (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
-
- if (Enabled)
- {
- ACPI_TRACE_POINT (ACPI_TRACE_AML_METHOD, FALSE,
- ObjDesc ? ObjDesc->Method.AmlStart : NULL, Pathname);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
- if (ACPI_FAILURE (Status))
- {
- goto ExitPath;
- }
-
- /* Check whether the tracer should be stopped */
-
- if (AcpiGbl_TraceMethodObject == ObjDesc)
- {
- /* Disable further tracing if type is one-shot */
-
- if (AcpiGbl_TraceFlags & ACPI_TRACE_ONESHOT)
- {
- AcpiGbl_TraceMethodName = NULL;
- }
-
- AcpiDbgLevel = AcpiGbl_OriginalDbgLevel;
- AcpiDbgLayer = AcpiGbl_OriginalDbgLayer;
- AcpiGbl_TraceMethodObject = NULL;
- }
-
- (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
-
-ExitPath:
- if (Pathname)
- {
- ACPI_FREE (Pathname);
- }
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiExStartTraceOpcode
- *
- * PARAMETERS: Op - The parser opcode object
- * WalkState - current state, NULL if not yet executing
- * a method.
- *
- * RETURN: None
- *
- * DESCRIPTION: Start opcode execution trace
- *
- ******************************************************************************/
-
-void
-AcpiExStartTraceOpcode (
- ACPI_PARSE_OBJECT *Op,
- ACPI_WALK_STATE *WalkState)
-{
-
- ACPI_FUNCTION_NAME (ExStartTraceOpcode);
-
-
- if (AcpiExInterpreterTraceEnabled (NULL) &&
- (AcpiGbl_TraceFlags & ACPI_TRACE_OPCODE))
- {
- ACPI_TRACE_POINT (ACPI_TRACE_AML_OPCODE, TRUE,
- Op->Common.Aml, Op->Common.AmlOpName);
- }
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiExStopTraceOpcode
- *
- * PARAMETERS: Op - The parser opcode object
- * WalkState - current state, NULL if not yet executing
- * a method.
- *
- * RETURN: None
- *
- * DESCRIPTION: Stop opcode execution trace
- *
- ******************************************************************************/
-
-void
-AcpiExStopTraceOpcode (
- ACPI_PARSE_OBJECT *Op,
- ACPI_WALK_STATE *WalkState)
-{
-
- ACPI_FUNCTION_NAME (ExStopTraceOpcode);
-
-
- if (AcpiExInterpreterTraceEnabled (NULL) &&
- (AcpiGbl_TraceFlags & ACPI_TRACE_OPCODE))
- {
- ACPI_TRACE_POINT (ACPI_TRACE_AML_OPCODE, FALSE,
- Op->Common.Aml, Op->Common.AmlOpName);
- }
-}
diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c
index f64c6ff42612e..ebd78d9af5fd4 100644
--- a/source/components/executer/exdump.c
+++ b/source/components/executer/exdump.c
@@ -453,7 +453,8 @@ AcpiExDumpObject (
case ACPI_EXD_BUFFER:
- ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
+ ACPI_DUMP_BUFFER (
+ ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
break;
case ACPI_EXD_PACKAGE:
@@ -472,7 +473,8 @@ AcpiExDumpObject (
case ACPI_EXD_REFERENCE:
ReferenceName = AcpiUtGetReferenceName (ObjDesc);
- AcpiExOutString ("Class Name", ACPI_CAST_PTR (char, ReferenceName));
+ AcpiExOutString (
+ "Class Name", ACPI_CAST_PTR (char, ReferenceName));
AcpiExDumpReferenceObj (ObjDesc);
break;
@@ -501,7 +503,8 @@ AcpiExDumpObject (
if ((Next == Start) || (Next == Data))
{
- AcpiOsPrintf ("\n**** Error: Object list appears to be circular linked");
+ AcpiOsPrintf (
+ "\n**** Error: Object list appears to be circular linked");
break;
}
}
@@ -535,7 +538,8 @@ AcpiExDumpObject (
if ((Next == Start) || (Next == Data))
{
- AcpiOsPrintf ("\n**** Error: Handler list appears to be circular linked");
+ AcpiOsPrintf (
+ "\n**** Error: Handler list appears to be circular linked");
break;
}
}
@@ -569,7 +573,8 @@ AcpiExDumpObject (
if ((Next == Start) || (Next == Data))
{
- AcpiOsPrintf ("\n**** Error: Region list appears to be circular linked");
+ AcpiOsPrintf (
+ "\n**** Error: Region list appears to be circular linked");
break;
}
}
@@ -677,7 +682,8 @@ AcpiExDumpOperand (
{
case ACPI_TYPE_LOCAL_REFERENCE:
- AcpiOsPrintf ("Reference: [%s] ", AcpiUtGetReferenceName (ObjDesc));
+ AcpiOsPrintf ("Reference: [%s] ",
+ AcpiUtGetReferenceName (ObjDesc));
switch (ObjDesc->Reference.Class)
{
@@ -705,7 +711,8 @@ AcpiExDumpOperand (
case ACPI_REFCLASS_NAME:
- AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
+ AcpiOsPrintf ("- [%4.4s]\n",
+ ObjDesc->Reference.Node->Name.Ascii);
break;
case ACPI_REFCLASS_ARG:
@@ -736,8 +743,8 @@ AcpiExDumpOperand (
Length = 128;
}
- AcpiOsPrintf ("Buffer Contents: (displaying length 0x%.2X)\n",
- Length);
+ AcpiOsPrintf (
+ "Buffer Contents: (displaying length 0x%.2X)\n", Length);
ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
}
break;
@@ -763,7 +770,8 @@ AcpiExDumpOperand (
{
for (Index = 0; Index < ObjDesc->Package.Count; Index++)
{
- AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1);
+ AcpiExDumpOperand (
+ ObjDesc->Package.Elements[Index], Depth + 1);
}
}
break;
@@ -816,7 +824,7 @@ AcpiExDumpOperand (
ObjDesc->Field.BaseByteOffset,
ObjDesc->Field.StartFieldBitOffset);
- AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
+ AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth + 1);
break;
case ACPI_TYPE_LOCAL_INDEX_FIELD:
@@ -836,13 +844,13 @@ AcpiExDumpOperand (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL*\n"));
}
else if ((ObjDesc->BufferField.BufferObj)->Common.Type !=
- ACPI_TYPE_BUFFER)
+ ACPI_TYPE_BUFFER)
{
AcpiOsPrintf ("*not a Buffer*\n");
}
else
{
- AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
+ AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth + 1);
}
break;
@@ -1142,7 +1150,8 @@ AcpiExDumpPackageObj (
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
if (ObjDesc->Buffer.Length)
{
- AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
+ AcpiUtDebugDumpBuffer (
+ ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
}
else
@@ -1158,7 +1167,8 @@ AcpiExDumpPackageObj (
for (i = 0; i < ObjDesc->Package.Count; i++)
{
- AcpiExDumpPackageObj (ObjDesc->Package.Elements[i], Level+1, i);
+ AcpiExDumpPackageObj (
+ ObjDesc->Package.Elements[i], Level + 1, i);
}
break;
@@ -1256,7 +1266,8 @@ DumpObject:
ObjDesc = ObjDesc->Common.NextObject;
if (ObjDesc->Common.Type > ACPI_TYPE_LOCAL_MAX)
{
- AcpiOsPrintf ("Secondary object is not a known object type: %2.2X\n",
+ AcpiOsPrintf (
+ "Secondary object is not a known object type: %2.2X\n",
ObjDesc->Common.Type);
return_VOID;
diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c
index d0ebcf04cadb5..fc4f90520bfa1 100644
--- a/source/components/executer/exfield.c
+++ b/source/components/executer/exfield.c
@@ -184,28 +184,31 @@ AcpiExReadDataFromField (
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
{
/*
- * This is an SMBus, GSBus or IPMI read. We must create a buffer to hold
- * the data and then directly access the region handler.
+ * This is an SMBus, GSBus or IPMI read. We must create a buffer to
+ * hold the data and then directly access the region handler.
*
- * Note: SMBus and GSBus protocol value is passed in upper 16-bits of Function
+ * Note: SMBus and GSBus protocol value is passed in upper 16-bits
+ * of Function
*/
- if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS)
+ if (ObjDesc->Field.RegionObj->Region.SpaceId ==
+ ACPI_ADR_SPACE_SMBUS)
{
Length = ACPI_SMBUS_BUFFER_SIZE;
Function = ACPI_READ | (ObjDesc->Field.Attribute << 16);
}
- else if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS)
+ else if (ObjDesc->Field.RegionObj->Region.SpaceId ==
+ ACPI_ADR_SPACE_GSBUS)
{
AccessorType = ObjDesc->Field.Attribute;
- Length = AcpiExGetSerialAccessLength (AccessorType,
- ObjDesc->Field.AccessLength);
+ Length = AcpiExGetSerialAccessLength (
+ AccessorType, ObjDesc->Field.AccessLength);
/*
* Add additional 2 bytes for the GenericSerialBus data buffer:
*
- * Status; (Byte 0 of the data buffer)
- * Length; (Byte 1 of the data buffer)
- * Data[x-1]; (Bytes 2-x of the arbitrary length data buffer)
+ * Status; (Byte 0 of the data buffer)
+ * Length; (Byte 1 of the data buffer)
+ * Data[x-1]: (Bytes 2-x of the arbitrary length data buffer)
*/
Length += 2;
Function = ACPI_READ | (AccessorType << 16);
@@ -229,8 +232,8 @@ AcpiExReadDataFromField (
/* Call the region handler for the read */
Status = AcpiExAccessRegion (ObjDesc, 0,
- ACPI_CAST_PTR (UINT64, BufferDesc->Buffer.Pointer),
- Function);
+ ACPI_CAST_PTR (UINT64, BufferDesc->Buffer.Pointer), Function);
+
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
goto Exit;
}
@@ -245,7 +248,9 @@ AcpiExReadDataFromField (
*
* Note: Field.length is in bits.
*/
- Length = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->Field.BitLength);
+ Length = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES (
+ ObjDesc->Field.BitLength);
+
if (Length > AcpiGbl_IntegerByteWidth)
{
/* Field is too large for an Integer, create a Buffer instead */
@@ -290,8 +295,9 @@ AcpiExReadDataFromField (
/* Perform the write */
- Status = AcpiExAccessRegion (ObjDesc, 0,
- (UINT64 *) Buffer, ACPI_READ);
+ Status = AcpiExAccessRegion (
+ ObjDesc, 0, (UINT64 *) Buffer, ACPI_READ);
+
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
if (ACPI_FAILURE (Status))
{
@@ -396,42 +402,47 @@ AcpiExWriteDataToField (
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
{
/*
- * This is an SMBus, GSBus or IPMI write. We will bypass the entire field
- * mechanism and handoff the buffer directly to the handler. For
- * these address spaces, the buffer is bi-directional; on a write,
- * return data is returned in the same buffer.
+ * This is an SMBus, GSBus or IPMI write. We will bypass the entire
+ * field mechanism and handoff the buffer directly to the handler.
+ * For these address spaces, the buffer is bi-directional; on a
+ * write, return data is returned in the same buffer.
*
* Source must be a buffer of sufficient size:
- * ACPI_SMBUS_BUFFER_SIZE, ACPI_GSBUS_BUFFER_SIZE, or ACPI_IPMI_BUFFER_SIZE.
+ * ACPI_SMBUS_BUFFER_SIZE, ACPI_GSBUS_BUFFER_SIZE, or
+ * ACPI_IPMI_BUFFER_SIZE.
*
- * Note: SMBus and GSBus protocol type is passed in upper 16-bits of Function
+ * Note: SMBus and GSBus protocol type is passed in upper 16-bits
+ * of Function
*/
if (SourceDesc->Common.Type != ACPI_TYPE_BUFFER)
{
ACPI_ERROR ((AE_INFO,
- "SMBus/IPMI/GenericSerialBus write requires Buffer, found type %s",
+ "SMBus/IPMI/GenericSerialBus write requires "
+ "Buffer, found type %s",
AcpiUtGetObjectTypeName (SourceDesc)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
- if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS)
+ if (ObjDesc->Field.RegionObj->Region.SpaceId ==
+ ACPI_ADR_SPACE_SMBUS)
{
Length = ACPI_SMBUS_BUFFER_SIZE;
Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16);
}
- else if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS)
+ else if (ObjDesc->Field.RegionObj->Region.SpaceId ==
+ ACPI_ADR_SPACE_GSBUS)
{
AccessorType = ObjDesc->Field.Attribute;
- Length = AcpiExGetSerialAccessLength (AccessorType,
- ObjDesc->Field.AccessLength);
+ Length = AcpiExGetSerialAccessLength (
+ AccessorType, ObjDesc->Field.AccessLength);
/*
* Add additional 2 bytes for the GenericSerialBus data buffer:
*
- * Status; (Byte 0 of the data buffer)
- * Length; (Byte 1 of the data buffer)
- * Data[x-1]; (Bytes 2-x of the arbitrary length data buffer)
+ * Status; (Byte 0 of the data buffer)
+ * Length; (Byte 1 of the data buffer)
+ * Data[x-1]: (Bytes 2-x of the arbitrary length data buffer)
*/
Length += 2;
Function = ACPI_WRITE | (AccessorType << 16);
@@ -445,7 +456,8 @@ AcpiExWriteDataToField (
if (SourceDesc->Buffer.Length < Length)
{
ACPI_ERROR ((AE_INFO,
- "SMBus/IPMI/GenericSerialBus write requires Buffer of length %u, found length %u",
+ "SMBus/IPMI/GenericSerialBus write requires "
+ "Buffer of length %u, found length %u",
Length, SourceDesc->Buffer.Length));
return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);
@@ -470,8 +482,8 @@ AcpiExWriteDataToField (
* Perform the write (returns status and perhaps data in the
* same buffer)
*/
- Status = AcpiExAccessRegion (ObjDesc, 0,
- (UINT64 *) Buffer, Function);
+ Status = AcpiExAccessRegion (
+ ObjDesc, 0, (UINT64 *) Buffer, Function);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
*ResultDesc = BufferDesc;
@@ -494,7 +506,7 @@ AcpiExWriteDataToField (
}
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "GPIO FieldWrite [FROM]: (%s:%X), Val %.8X [TO]: Pin %u Bits %u\n",
+ "GPIO FieldWrite [FROM]: (%s:%X), Val %.8X [TO]: Pin %u Bits %u\n",
AcpiUtGetTypeName (SourceDesc->Common.Type),
SourceDesc->Common.Type, (UINT32) SourceDesc->Integer.Value,
ObjDesc->Field.PinNumberIndex, ObjDesc->Field.BitLength));
@@ -507,8 +519,8 @@ AcpiExWriteDataToField (
/* Perform the write */
- Status = AcpiExAccessRegion (ObjDesc, 0,
- (UINT64 *) Buffer, ACPI_WRITE);
+ Status = AcpiExAccessRegion (
+ ObjDesc, 0, (UINT64 *) Buffer, ACPI_WRITE);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
return_ACPI_STATUS (Status);
}
diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c
index 5c95223b2c64d..c5d9399cafd21 100644
--- a/source/components/executer/exfldio.c
+++ b/source/components/executer/exfldio.c
@@ -120,7 +120,8 @@ AcpiExSetupRegion (
if (!AcpiIsValidSpaceId (SpaceId))
{
- ACPI_ERROR ((AE_INFO, "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
+ ACPI_ERROR ((AE_INFO,
+ "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
@@ -170,8 +171,8 @@ AcpiExSetupRegion (
* (Region length is specified in bytes)
*/
if (RgnDesc->Region.Length <
- (ObjDesc->CommonField.BaseByteOffset + FieldDatumByteOffset +
- ObjDesc->CommonField.AccessByteWidth))
+ (ObjDesc->CommonField.BaseByteOffset + FieldDatumByteOffset +
+ ObjDesc->CommonField.AccessByteWidth))
{
if (AcpiGbl_EnableInterpreterSlack)
{
@@ -198,7 +199,8 @@ AcpiExSetupRegion (
* byte, and a field with Dword access specified.
*/
ACPI_ERROR ((AE_INFO,
- "Field [%4.4s] access width (%u bytes) too large for region [%4.4s] (length %u)",
+ "Field [%4.4s] access width (%u bytes) "
+ "too large for region [%4.4s] (length %u)",
AcpiUtGetNodeName (ObjDesc->CommonField.Node),
ObjDesc->CommonField.AccessByteWidth,
AcpiUtGetNodeName (RgnDesc->Region.Node),
@@ -210,7 +212,8 @@ AcpiExSetupRegion (
* exceeds region length, indicate an error
*/
ACPI_ERROR ((AE_INFO,
- "Field [%4.4s] Base+Offset+Width %u+%u+%u is beyond end of region [%4.4s] (length %u)",
+ "Field [%4.4s] Base+Offset+Width %u+%u+%u "
+ "is beyond end of region [%4.4s] (length %u)",
AcpiUtGetNodeName (ObjDesc->CommonField.Node),
ObjDesc->CommonField.BaseByteOffset,
FieldDatumByteOffset, ObjDesc->CommonField.AccessByteWidth,
@@ -300,8 +303,8 @@ AcpiExAccessRegion (
/* Invoke the appropriate AddressSpace/OpRegion handler */
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ObjDesc,
- Function, RegionOffset,
- ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth), Value);
+ Function, RegionOffset,
+ ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth), Value);
if (ACPI_FAILURE (Status))
{
@@ -512,8 +515,8 @@ AcpiExFieldDatumIo (
* For simple RegionFields, we just directly access the owning
* Operation Region.
*/
- Status = AcpiExAccessRegion (ObjDesc, FieldDatumByteOffset, Value,
- ReadWrite);
+ Status = AcpiExAccessRegion (
+ ObjDesc, FieldDatumByteOffset, Value, ReadWrite);
break;
case ACPI_TYPE_LOCAL_INDEX_FIELD:
@@ -536,8 +539,7 @@ AcpiExFieldDatumIo (
FieldDatumByteOffset));
Status = AcpiExInsertIntoField (ObjDesc->IndexField.IndexObj,
- &FieldDatumByteOffset,
- sizeof (FieldDatumByteOffset));
+ &FieldDatumByteOffset, sizeof (FieldDatumByteOffset));
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -550,8 +552,8 @@ AcpiExFieldDatumIo (
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"Read from Data Register\n"));
- Status = AcpiExExtractFromField (ObjDesc->IndexField.DataObj,
- Value, sizeof (UINT64));
+ Status = AcpiExExtractFromField (
+ ObjDesc->IndexField.DataObj, Value, sizeof (UINT64));
}
else
{
@@ -561,8 +563,8 @@ AcpiExFieldDatumIo (
"Write to Data Register: Value %8.8X%8.8X\n",
ACPI_FORMAT_UINT64 (*Value)));
- Status = AcpiExInsertIntoField (ObjDesc->IndexField.DataObj,
- Value, sizeof (UINT64));
+ Status = AcpiExInsertIntoField (
+ ObjDesc->IndexField.DataObj, Value, sizeof (UINT64));
}
break;
@@ -644,14 +646,14 @@ AcpiExWriteWithUpdateRule (
* ones) The left shift drops the bits we want to ignore.
*/
if ((~Mask << (ACPI_MUL_8 (sizeof (Mask)) -
- ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth))) != 0)
+ ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth))) != 0)
{
/*
* Read the current contents of the byte/word/dword containing
* the field, and merge with the new field value.
*/
- Status = AcpiExFieldDatumIo (ObjDesc, FieldDatumByteOffset,
- &CurrentValue, ACPI_READ);
+ Status = AcpiExFieldDatumIo (
+ ObjDesc, FieldDatumByteOffset, &CurrentValue, ACPI_READ);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -679,13 +681,15 @@ AcpiExWriteWithUpdateRule (
ACPI_ERROR ((AE_INFO,
"Unknown UpdateRule value: 0x%X",
- (ObjDesc->CommonField.FieldFlags & AML_FIELD_UPDATE_RULE_MASK)));
+ (ObjDesc->CommonField.FieldFlags &
+ AML_FIELD_UPDATE_RULE_MASK)));
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
}
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Mask %8.8X%8.8X, DatumOffset %X, Width %X, Value %8.8X%8.8X, MergedValue %8.8X%8.8X\n",
+ "Mask %8.8X%8.8X, DatumOffset %X, Width %X, "
+ "Value %8.8X%8.8X, MergedValue %8.8X%8.8X\n",
ACPI_FORMAT_UINT64 (Mask),
FieldDatumByteOffset,
ObjDesc->CommonField.AccessByteWidth,
@@ -694,8 +698,8 @@ AcpiExWriteWithUpdateRule (
/* Write the merged value */
- Status = AcpiExFieldDatumIo (ObjDesc, FieldDatumByteOffset,
- &MergedValue, ACPI_WRITE);
+ Status = AcpiExFieldDatumIo (
+ ObjDesc, FieldDatumByteOffset, &MergedValue, ACPI_WRITE);
return_ACPI_STATUS (Status);
}
@@ -806,8 +810,8 @@ AcpiExExtractFromField (
/* Get next input datum from the field */
FieldOffset += ObjDesc->CommonField.AccessByteWidth;
- Status = AcpiExFieldDatumIo (ObjDesc, FieldOffset,
- &RawDatum, ACPI_READ);
+ Status = AcpiExFieldDatumIo (
+ ObjDesc, FieldOffset, &RawDatum, ACPI_READ);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -904,7 +908,8 @@ AcpiExInsertIntoField (
NewBuffer = NULL;
RequiredLength = ACPI_ROUND_BITS_UP_TO_BYTES (
- ObjDesc->CommonField.BitLength);
+ ObjDesc->CommonField.BitLength);
+
/*
* We must have a buffer that is at least as long as the field
* we are writing to. This is because individual fields are
@@ -982,8 +987,8 @@ AcpiExInsertIntoField (
/* Write merged datum to the target field */
MergedDatum &= Mask;
- Status = AcpiExWriteWithUpdateRule (ObjDesc, Mask,
- MergedDatum, FieldOffset);
+ Status = AcpiExWriteWithUpdateRule (
+ ObjDesc, Mask, MergedDatum, FieldOffset);
if (ACPI_FAILURE (Status))
{
goto Exit;
@@ -1040,8 +1045,8 @@ AcpiExInsertIntoField (
/* Write the last datum to the field */
MergedDatum &= Mask;
- Status = AcpiExWriteWithUpdateRule (ObjDesc,
- Mask, MergedDatum, FieldOffset);
+ Status = AcpiExWriteWithUpdateRule (
+ ObjDesc, Mask, MergedDatum, FieldOffset);
Exit:
/* Free temporary buffer if we used one */
diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c
index 2a7b6202a6632..ab01f6ea50dd5 100644
--- a/source/components/executer/exmisc.c
+++ b/source/components/executer/exmisc.c
@@ -287,8 +287,8 @@ AcpiExDoConcatenate (
case ACPI_TYPE_STRING:
- Status = AcpiExConvertToString (Operand1, &LocalOperand1,
- ACPI_IMPLICIT_CONVERT_HEX);
+ Status = AcpiExConvertToString (
+ Operand1, &LocalOperand1, ACPI_IMPLICIT_CONVERT_HEX);
break;
case ACPI_TYPE_BUFFER:
@@ -328,8 +328,8 @@ AcpiExDoConcatenate (
/* Result of two Integers is a Buffer */
/* Need enough buffer space for two integers */
- ReturnDesc = AcpiUtCreateBufferObject ((ACPI_SIZE)
- ACPI_MUL_2 (AcpiGbl_IntegerByteWidth));
+ ReturnDesc = AcpiUtCreateBufferObject (
+ (ACPI_SIZE) ACPI_MUL_2 (AcpiGbl_IntegerByteWidth));
if (!ReturnDesc)
{
Status = AE_NO_MEMORY;
@@ -341,13 +341,12 @@ AcpiExDoConcatenate (
/* Copy the first integer, LSB first */
memcpy (NewBuf, &Operand0->Integer.Value,
- AcpiGbl_IntegerByteWidth);
+ AcpiGbl_IntegerByteWidth);
/* Copy the second integer (LSB first) after the first */
memcpy (NewBuf + AcpiGbl_IntegerByteWidth,
- &LocalOperand1->Integer.Value,
- AcpiGbl_IntegerByteWidth);
+ &LocalOperand1->Integer.Value, AcpiGbl_IntegerByteWidth);
break;
case ACPI_TYPE_STRING:
@@ -355,8 +354,8 @@ AcpiExDoConcatenate (
/* Result of two Strings is a String */
ReturnDesc = AcpiUtCreateStringObject (
- ((ACPI_SIZE) Operand0->String.Length +
- LocalOperand1->String.Length));
+ ((ACPI_SIZE) Operand0->String.Length +
+ LocalOperand1->String.Length));
if (!ReturnDesc)
{
Status = AE_NO_MEMORY;
@@ -369,7 +368,7 @@ AcpiExDoConcatenate (
strcpy (NewBuf, Operand0->String.Pointer);
strcpy (NewBuf + Operand0->String.Length,
- LocalOperand1->String.Pointer);
+ LocalOperand1->String.Pointer);
break;
case ACPI_TYPE_BUFFER:
@@ -377,8 +376,8 @@ AcpiExDoConcatenate (
/* Result of two Buffers is a Buffer */
ReturnDesc = AcpiUtCreateBufferObject (
- ((ACPI_SIZE) Operand0->Buffer.Length +
- LocalOperand1->Buffer.Length));
+ ((ACPI_SIZE) Operand0->Buffer.Length +
+ LocalOperand1->Buffer.Length));
if (!ReturnDesc)
{
Status = AE_NO_MEMORY;
@@ -390,10 +389,10 @@ AcpiExDoConcatenate (
/* Concatenate the buffers */
memcpy (NewBuf, Operand0->Buffer.Pointer,
- Operand0->Buffer.Length);
+ Operand0->Buffer.Length);
memcpy (NewBuf + Operand0->Buffer.Length,
- LocalOperand1->Buffer.Pointer,
- LocalOperand1->Buffer.Length);
+ LocalOperand1->Buffer.Pointer,
+ LocalOperand1->Buffer.Length);
break;
default:
@@ -635,8 +634,8 @@ AcpiExDoLogicalOp (
case ACPI_TYPE_STRING:
- Status = AcpiExConvertToString (Operand1, &LocalOperand1,
- ACPI_IMPLICIT_CONVERT_HEX);
+ Status = AcpiExConvertToString (
+ Operand1, &LocalOperand1, ACPI_IMPLICIT_CONVERT_HEX);
break;
case ACPI_TYPE_BUFFER:
@@ -713,8 +712,8 @@ AcpiExDoLogicalOp (
/* Lexicographic compare: compare the data bytes */
Compare = memcmp (Operand0->Buffer.Pointer,
- LocalOperand1->Buffer.Pointer,
- (Length0 > Length1) ? Length1 : Length0);
+ LocalOperand1->Buffer.Pointer,
+ (Length0 > Length1) ? Length1 : Length0);
switch (Opcode)
{
diff --git a/source/components/executer/exmutex.c b/source/components/executer/exmutex.c
index acbb6f84806be..3ed546aa1bafe 100644
--- a/source/components/executer/exmutex.c
+++ b/source/components/executer/exmutex.c
@@ -209,8 +209,7 @@ AcpiExAcquireMutexObject (
}
else
{
- Status = AcpiExSystemWaitMutex (ObjDesc->Mutex.OsMutex,
- Timeout);
+ Status = AcpiExSystemWaitMutex (ObjDesc->Mutex.OsMutex, Timeout);
}
if (ACPI_FAILURE (Status))
@@ -273,33 +272,48 @@ AcpiExAcquireMutex (
}
/*
- * Current sync level must be less than or equal to the sync level of the
- * mutex. This mechanism provides some deadlock prevention
+ * Current sync level must be less than or equal to the sync level
+ * of the mutex. This mechanism provides some deadlock prevention.
*/
if (WalkState->Thread->CurrentSyncLevel > ObjDesc->Mutex.SyncLevel)
{
ACPI_ERROR ((AE_INFO,
- "Cannot acquire Mutex [%4.4s], current SyncLevel is too large (%u)",
+ "Cannot acquire Mutex [%4.4s], "
+ "current SyncLevel is too large (%u)",
AcpiUtGetNodeName (ObjDesc->Mutex.Node),
WalkState->Thread->CurrentSyncLevel));
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Acquiring: Mutex SyncLevel %u, Thread SyncLevel %u, "
+ "Depth %u TID %p\n",
+ ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
+ ObjDesc->Mutex.AcquisitionDepth, WalkState->Thread));
+
Status = AcpiExAcquireMutexObject ((UINT16) TimeDesc->Integer.Value,
- ObjDesc, WalkState->Thread->ThreadId);
+ ObjDesc, WalkState->Thread->ThreadId);
+
if (ACPI_SUCCESS (Status) && ObjDesc->Mutex.AcquisitionDepth == 1)
{
/* Save Thread object, original/current sync levels */
ObjDesc->Mutex.OwnerThread = WalkState->Thread;
- ObjDesc->Mutex.OriginalSyncLevel = WalkState->Thread->CurrentSyncLevel;
- WalkState->Thread->CurrentSyncLevel = ObjDesc->Mutex.SyncLevel;
+ ObjDesc->Mutex.OriginalSyncLevel =
+ WalkState->Thread->CurrentSyncLevel;
+ WalkState->Thread->CurrentSyncLevel =
+ ObjDesc->Mutex.SyncLevel;
/* Link the mutex to the current thread for force-unlock at method exit */
AcpiExLinkMutex (ObjDesc, WalkState->Thread);
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Acquired: Mutex SyncLevel %u, Thread SyncLevel %u, Depth %u\n",
+ ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
+ ObjDesc->Mutex.AcquisitionDepth));
+
return_ACPI_STATUS (Status);
}
@@ -395,9 +409,9 @@ AcpiExReleaseMutex (
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_WALK_STATE *WalkState)
{
- ACPI_STATUS Status = AE_OK;
UINT8 PreviousSyncLevel;
ACPI_THREAD_STATE *OwnerThread;
+ ACPI_STATUS Status = AE_OK;
ACPI_FUNCTION_TRACE (ExReleaseMutex);
@@ -455,7 +469,8 @@ AcpiExReleaseMutex (
if (ObjDesc->Mutex.SyncLevel != OwnerThread->CurrentSyncLevel)
{
ACPI_ERROR ((AE_INFO,
- "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %u current %u",
+ "Cannot release Mutex [%4.4s], SyncLevel mismatch: "
+ "mutex %u current %u",
AcpiUtGetNodeName (ObjDesc->Mutex.Node),
ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel));
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
@@ -469,6 +484,13 @@ AcpiExReleaseMutex (
PreviousSyncLevel =
OwnerThread->AcquiredMutexList->Mutex.OriginalSyncLevel;
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Releasing: Object SyncLevel %u, Thread SyncLevel %u, "
+ "Prev SyncLevel %u, Depth %u TID %p\n",
+ ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
+ PreviousSyncLevel, ObjDesc->Mutex.AcquisitionDepth,
+ WalkState->Thread));
+
Status = AcpiExReleaseMutexObject (ObjDesc);
if (ACPI_FAILURE (Status))
{
@@ -482,6 +504,12 @@ AcpiExReleaseMutex (
OwnerThread->CurrentSyncLevel = PreviousSyncLevel;
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Released: Object SyncLevel %u, Thread SyncLevel, %u, "
+ "Prev SyncLevel %u, Depth %u\n",
+ ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
+ PreviousSyncLevel, ObjDesc->Mutex.AcquisitionDepth));
+
return_ACPI_STATUS (Status);
}
@@ -512,7 +540,7 @@ AcpiExReleaseAllMutexes (
ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_FUNCTION_NAME (ExReleaseAllMutexes);
+ ACPI_FUNCTION_TRACE (ExReleaseAllMutexes);
/* Traverse the list of owned mutexes, releasing each one */
@@ -520,14 +548,10 @@ AcpiExReleaseAllMutexes (
while (Next)
{
ObjDesc = Next;
- Next = ObjDesc->Mutex.Next;
-
- ObjDesc->Mutex.Prev = NULL;
- ObjDesc->Mutex.Next = NULL;
- ObjDesc->Mutex.AcquisitionDepth = 0;
-
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "Force-releasing held mutex: %p\n", ObjDesc));
+ "Mutex [%4.4s] force-release, SyncLevel %u Depth %u\n",
+ ObjDesc->Mutex.Node->Name.Ascii, ObjDesc->Mutex.SyncLevel,
+ ObjDesc->Mutex.AcquisitionDepth));
/* Release the mutex, special case for Global Lock */
@@ -542,13 +566,20 @@ AcpiExReleaseAllMutexes (
AcpiOsReleaseMutex (ObjDesc->Mutex.OsMutex);
}
+ /* Update Thread SyncLevel (Last mutex is the important one) */
+
+ Thread->CurrentSyncLevel = ObjDesc->Mutex.OriginalSyncLevel;
+
/* Mark mutex unowned */
+ Next = ObjDesc->Mutex.Next;
+
+ ObjDesc->Mutex.Prev = NULL;
+ ObjDesc->Mutex.Next = NULL;
+ ObjDesc->Mutex.AcquisitionDepth = 0;
ObjDesc->Mutex.OwnerThread = NULL;
ObjDesc->Mutex.ThreadId = 0;
-
- /* Update Thread SyncLevel (Last mutex is the important one) */
-
- Thread->CurrentSyncLevel = ObjDesc->Mutex.OriginalSyncLevel;
}
+
+ return_VOID;
}
diff --git a/source/components/executer/exnames.c b/source/components/executer/exnames.c
index 61a5bbd7d29c5..f679de6550b00 100644
--- a/source/components/executer/exnames.c
+++ b/source/components/executer/exnames.c
@@ -160,6 +160,7 @@ AcpiExAllocateNameString (
return_PTR (NameString);
}
+
/*******************************************************************************
*
* FUNCTION: AcpiExNameSegment
@@ -189,8 +190,8 @@ AcpiExNameSegment (
/*
- * If first character is a digit, then we know that we aren't looking at a
- * valid name segment
+ * If first character is a digit, then we know that we aren't looking
+ * at a valid name segment
*/
CharBuf[0] = *AmlAddress;
@@ -394,7 +395,8 @@ AcpiExGetNameString (
AmlAddress++;
NumSegments = *AmlAddress;
- NameString = AcpiExAllocateNameString (PrefixCount, NumSegments);
+ NameString = AcpiExAllocateNameString (
+ PrefixCount, NumSegments);
if (!NameString)
{
Status = AE_NO_MEMORY;
diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c
index e44dda7763314..4d2d88f648625 100644
--- a/source/components/executer/exoparg1.c
+++ b/source/components/executer/exoparg1.c
@@ -331,7 +331,7 @@ AcpiExOpcode_1A_1T_1R (
* endian unsigned value, so this boundary condition is valid.
*/
for (Temp32 = 0; ReturnDesc->Integer.Value &&
- Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
+ Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
{
ReturnDesc->Integer.Value >>= 1;
}
@@ -348,7 +348,7 @@ AcpiExOpcode_1A_1T_1R (
* endian unsigned value, so this boundary condition is valid.
*/
for (Temp32 = 0; ReturnDesc->Integer.Value &&
- Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
+ Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
{
ReturnDesc->Integer.Value <<= 1;
}
@@ -454,7 +454,7 @@ AcpiExOpcode_1A_1T_1R (
/* Get the object reference, store it, and remove our reference */
Status = AcpiExGetObjectReference (Operand[0],
- &ReturnDesc2, WalkState);
+ &ReturnDesc2, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -509,28 +509,30 @@ AcpiExOpcode_1A_1T_1R (
*/
case AML_COPY_OP: /* Copy (Source, Target) */
- Status = AcpiUtCopyIobjectToIobject (Operand[0], &ReturnDesc,
- WalkState);
+ Status = AcpiUtCopyIobjectToIobject (
+ Operand[0], &ReturnDesc, WalkState);
break;
case AML_TO_DECSTRING_OP: /* ToDecimalString (Data, Result) */
- Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
- ACPI_EXPLICIT_CONVERT_DECIMAL);
+ Status = AcpiExConvertToString (
+ Operand[0], &ReturnDesc, ACPI_EXPLICIT_CONVERT_DECIMAL);
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
case AML_TO_HEXSTRING_OP: /* ToHexString (Data, Result) */
- Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
- ACPI_EXPLICIT_CONVERT_HEX);
+ Status = AcpiExConvertToString (
+ Operand[0], &ReturnDesc, ACPI_EXPLICIT_CONVERT_HEX);
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
@@ -541,17 +543,19 @@ AcpiExOpcode_1A_1T_1R (
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
case AML_TO_INTEGER_OP: /* ToInteger (Data, Result) */
- Status = AcpiExConvertToInteger (Operand[0], &ReturnDesc,
- ACPI_ANY_BASE);
+ Status = AcpiExConvertToInteger (
+ Operand[0], &ReturnDesc, ACPI_ANY_BASE);
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
@@ -702,11 +706,11 @@ AcpiExOpcode_1A_0T_1R (
*/
if (WalkState->Opcode == AML_INCREMENT_OP)
{
- ReturnDesc->Integer.Value = TempDesc->Integer.Value +1;
+ ReturnDesc->Integer.Value = TempDesc->Integer.Value + 1;
}
else
{
- ReturnDesc->Integer.Value = TempDesc->Integer.Value -1;
+ ReturnDesc->Integer.Value = TempDesc->Integer.Value - 1;
}
/* Finished with this Integer object */
@@ -754,8 +758,8 @@ AcpiExOpcode_1A_0T_1R (
/* Get the base object */
- Status = AcpiExResolveMultiple (WalkState,
- Operand[0], &Type, &TempDesc);
+ Status = AcpiExResolveMultiple (
+ WalkState, Operand[0], &Type, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -801,8 +805,10 @@ AcpiExOpcode_1A_0T_1R (
default:
ACPI_ERROR ((AE_INFO,
- "Operand must be Buffer/Integer/String/Package - found type %s",
+ "Operand must be Buffer/Integer/String/Package"
+ " - found type %s",
AcpiUtGetTypeName (Type)));
+
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
@@ -827,7 +833,8 @@ AcpiExOpcode_1A_0T_1R (
case AML_REF_OF_OP: /* RefOf (SourceObject) */
- Status = AcpiExGetObjectReference (Operand[0], &ReturnDesc, WalkState);
+ Status = AcpiExGetObjectReference (
+ Operand[0], &ReturnDesc, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -874,9 +881,9 @@ AcpiExOpcode_1A_0T_1R (
/* Set Operand[0] to the value of the local/arg */
Status = AcpiDsMethodDataGetValue (
- Operand[0]->Reference.Class,
- Operand[0]->Reference.Value,
- WalkState, &TempDesc);
+ Operand[0]->Reference.Class,
+ Operand[0]->Reference.Value,
+ WalkState, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -930,19 +937,19 @@ AcpiExOpcode_1A_0T_1R (
* Field, so we need to resolve the node to a value.
*/
Status = AcpiNsGetNode (WalkState->ScopeInfo->Scope.Node,
- Operand[0]->String.Pointer,
- ACPI_NS_SEARCH_PARENT,
- ACPI_CAST_INDIRECT_PTR (
- ACPI_NAMESPACE_NODE, &ReturnDesc));
+ Operand[0]->String.Pointer,
+ ACPI_NS_SEARCH_PARENT,
+ ACPI_CAST_INDIRECT_PTR (
+ ACPI_NAMESPACE_NODE, &ReturnDesc));
if (ACPI_FAILURE (Status))
{
goto Cleanup;
}
Status = AcpiExResolveNodeToValue (
- ACPI_CAST_INDIRECT_PTR (
- ACPI_NAMESPACE_NODE, &ReturnDesc),
- WalkState);
+ ACPI_CAST_INDIRECT_PTR (
+ ACPI_NAMESPACE_NODE, &ReturnDesc),
+ WalkState);
goto Cleanup;
}
}
@@ -958,7 +965,7 @@ AcpiExOpcode_1A_0T_1R (
* dereferenced above.
*/
ReturnDesc = AcpiNsGetAttachedObject (
- (ACPI_NAMESPACE_NODE *) Operand[0]);
+ (ACPI_NAMESPACE_NODE *) Operand[0]);
AcpiUtAddReference (ReturnDesc);
}
else
@@ -1025,6 +1032,7 @@ AcpiExOpcode_1A_0T_1R (
ACPI_ERROR ((AE_INFO,
"Unknown Index TargetType 0x%X in reference object %p",
Operand[0]->Reference.TargetType, Operand[0]));
+
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
@@ -1055,8 +1063,8 @@ AcpiExOpcode_1A_0T_1R (
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
- Status = AcpiExReadDataFromField (WalkState,
- ReturnDesc, &TempDesc);
+ Status = AcpiExReadDataFromField (
+ WalkState, ReturnDesc, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -1091,6 +1099,7 @@ AcpiExOpcode_1A_0T_1R (
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
+
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c
index a5b1513e40282..25b4be3b75d8c 100644
--- a/source/components/executer/exoparg2.c
+++ b/source/components/executer/exoparg2.c
@@ -203,10 +203,11 @@ AcpiExOpcode_2A_2T_1R (
/* Quotient to ReturnDesc1, remainder to ReturnDesc2 */
- Status = AcpiUtDivide (Operand[0]->Integer.Value,
- Operand[1]->Integer.Value,
- &ReturnDesc1->Integer.Value,
- &ReturnDesc2->Integer.Value);
+ Status = AcpiUtDivide (
+ Operand[0]->Integer.Value,
+ Operand[1]->Integer.Value,
+ &ReturnDesc1->Integer.Value,
+ &ReturnDesc2->Integer.Value);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -217,6 +218,7 @@ AcpiExOpcode_2A_2T_1R (
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
+
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
@@ -301,9 +303,10 @@ AcpiExOpcode_2A_1T_1R (
goto Cleanup;
}
- ReturnDesc->Integer.Value = AcpiExDoMathOp (WalkState->Opcode,
- Operand[0]->Integer.Value,
- Operand[1]->Integer.Value);
+ ReturnDesc->Integer.Value = AcpiExDoMathOp (
+ WalkState->Opcode,
+ Operand[0]->Integer.Value,
+ Operand[1]->Integer.Value);
goto StoreResultToTarget;
}
@@ -320,16 +323,17 @@ AcpiExOpcode_2A_1T_1R (
/* ReturnDesc will contain the remainder */
- Status = AcpiUtDivide (Operand[0]->Integer.Value,
- Operand[1]->Integer.Value,
- NULL,
- &ReturnDesc->Integer.Value);
+ Status = AcpiUtDivide (
+ Operand[0]->Integer.Value,
+ Operand[1]->Integer.Value,
+ NULL,
+ &ReturnDesc->Integer.Value);
break;
case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */
- Status = AcpiExDoConcatenate (Operand[0], Operand[1],
- &ReturnDesc, WalkState);
+ Status = AcpiExDoConcatenate (
+ Operand[0], Operand[1], &ReturnDesc, WalkState);
break;
case AML_TO_STRING_OP: /* ToString (Buffer, Length, Result) (ACPI 2.0) */
@@ -376,8 +380,8 @@ AcpiExOpcode_2A_1T_1R (
/* ConcatenateResTemplate (Buffer, Buffer, Result) (ACPI 2.0) */
- Status = AcpiExConcatTemplate (Operand[0], Operand[1],
- &ReturnDesc, WalkState);
+ Status = AcpiExConcatTemplate (
+ Operand[0], Operand[1], &ReturnDesc, WalkState);
break;
case AML_INDEX_OP: /* Index (Source Index Result) */
@@ -560,8 +564,8 @@ AcpiExOpcode_2A_0T_1R (
/* LogicalOp (Operand0, Operand1) */
Status = AcpiExDoLogicalNumericOp (WalkState->Opcode,
- Operand[0]->Integer.Value, Operand[1]->Integer.Value,
- &LogicalResult);
+ Operand[0]->Integer.Value, Operand[1]->Integer.Value,
+ &LogicalResult);
goto StoreLogicalResult;
}
else if (WalkState->OpInfo->Flags & AML_LOGICAL)
@@ -569,7 +573,7 @@ AcpiExOpcode_2A_0T_1R (
/* LogicalOp (Operand0, Operand1) */
Status = AcpiExDoLogicalOp (WalkState->Opcode, Operand[0],
- Operand[1], &LogicalResult);
+ Operand[1], &LogicalResult);
goto StoreLogicalResult;
}
@@ -600,6 +604,7 @@ AcpiExOpcode_2A_0T_1R (
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
+
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
diff --git a/source/components/executer/exoparg3.c b/source/components/executer/exoparg3.c
index aa42edbfbfb98..6d777bfb8e64d 100644
--- a/source/components/executer/exoparg3.c
+++ b/source/components/executer/exoparg3.c
@@ -105,7 +105,8 @@ AcpiExOpcode_3A_0T_0R (
case AML_FATAL_OP: /* Fatal (FatalType FatalCode FatalArg) */
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "FatalOp: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
+ "FatalOp: Type %X Code %X Arg %X "
+ "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
(UINT32) Operand[0]->Integer.Value,
(UINT32) Operand[1]->Integer.Value,
(UINT32) Operand[2]->Integer.Value));
@@ -113,8 +114,8 @@ AcpiExOpcode_3A_0T_0R (
Fatal = ACPI_ALLOCATE (sizeof (ACPI_SIGNAL_FATAL_INFO));
if (Fatal)
{
- Fatal->Type = (UINT32) Operand[0]->Integer.Value;
- Fatal->Code = (UINT32) Operand[1]->Integer.Value;
+ Fatal->Type = (UINT32) Operand[0]->Integer.Value;
+ Fatal->Code = (UINT32) Operand[1]->Integer.Value;
Fatal->Argument = (UINT32) Operand[2]->Integer.Value;
}
@@ -142,6 +143,7 @@ AcpiExOpcode_3A_0T_0R (
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
+
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
@@ -189,7 +191,7 @@ AcpiExOpcode_3A_1T_1R (
* either a String or a Buffer, so just use its type.
*/
ReturnDesc = AcpiUtCreateInternalObject (
- (Operand[0])->Common.Type);
+ (Operand[0])->Common.Type);
if (!ReturnDesc)
{
Status = AE_NO_MEMORY;
@@ -214,8 +216,8 @@ AcpiExOpcode_3A_1T_1R (
else if ((Index + Length) > Operand[0]->String.Length)
{
- Length = (ACPI_SIZE) Operand[0]->String.Length -
- (ACPI_SIZE) Index;
+ Length =
+ (ACPI_SIZE) Operand[0]->String.Length - (ACPI_SIZE) Index;
}
/* Strings always have a sub-pointer, not so for buffers */
@@ -261,8 +263,8 @@ AcpiExOpcode_3A_1T_1R (
{
/* We have a buffer, copy the portion requested */
- memcpy (Buffer, Operand[0]->String.Pointer + Index,
- Length);
+ memcpy (Buffer,
+ Operand[0]->String.Pointer + Index, Length);
}
/* Set the length of the new String/Buffer */
@@ -279,6 +281,7 @@ AcpiExOpcode_3A_1T_1R (
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
+
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
@@ -296,12 +299,12 @@ Cleanup:
AcpiUtRemoveReference (ReturnDesc);
WalkState->ResultObj = NULL;
}
-
- /* Set the return object and exit */
-
else
{
+ /* Set the return object and exit */
+
WalkState->ResultObj = ReturnDesc;
}
+
return_ACPI_STATUS (Status);
}
diff --git a/source/components/executer/exoparg6.c b/source/components/executer/exoparg6.c
index ccc1c7881eb33..5b68b3833f21c 100644
--- a/source/components/executer/exoparg6.c
+++ b/source/components/executer/exoparg6.c
@@ -132,8 +132,8 @@ AcpiExDoMatch (
* True if equal: (P[i] == M)
* Change to: (M == P[i])
*/
- Status = AcpiExDoLogicalOp (AML_LEQUAL_OP, MatchObj, PackageObj,
- &LogicalResult);
+ Status = AcpiExDoLogicalOp (
+ AML_LEQUAL_OP, MatchObj, PackageObj, &LogicalResult);
if (ACPI_FAILURE (Status))
{
return (FALSE);
@@ -145,8 +145,8 @@ AcpiExDoMatch (
* True if less than or equal: (P[i] <= M) (P[i] NotGreater than M)
* Change to: (M >= P[i]) (M NotLess than P[i])
*/
- Status = AcpiExDoLogicalOp (AML_LLESS_OP, MatchObj, PackageObj,
- &LogicalResult);
+ Status = AcpiExDoLogicalOp (
+ AML_LLESS_OP, MatchObj, PackageObj, &LogicalResult);
if (ACPI_FAILURE (Status))
{
return (FALSE);
@@ -159,8 +159,8 @@ AcpiExDoMatch (
* True if less than: (P[i] < M)
* Change to: (M > P[i])
*/
- Status = AcpiExDoLogicalOp (AML_LGREATER_OP, MatchObj, PackageObj,
- &LogicalResult);
+ Status = AcpiExDoLogicalOp (
+ AML_LGREATER_OP, MatchObj, PackageObj, &LogicalResult);
if (ACPI_FAILURE (Status))
{
return (FALSE);
@@ -172,8 +172,8 @@ AcpiExDoMatch (
* True if greater than or equal: (P[i] >= M) (P[i] NotLess than M)
* Change to: (M <= P[i]) (M NotGreater than P[i])
*/
- Status = AcpiExDoLogicalOp (AML_LGREATER_OP, MatchObj, PackageObj,
- &LogicalResult);
+ Status = AcpiExDoLogicalOp (
+ AML_LGREATER_OP, MatchObj, PackageObj, &LogicalResult);
if (ACPI_FAILURE (Status))
{
return (FALSE);
@@ -186,8 +186,8 @@ AcpiExDoMatch (
* True if greater than: (P[i] > M)
* Change to: (M < P[i])
*/
- Status = AcpiExDoLogicalOp (AML_LLESS_OP, MatchObj, PackageObj,
- &LogicalResult);
+ Status = AcpiExDoLogicalOp (
+ AML_LLESS_OP, MatchObj, PackageObj, &LogicalResult);
if (ACPI_FAILURE (Status))
{
return (FALSE);
@@ -303,13 +303,13 @@ AcpiExOpcode_6A_0T_1R (
* non-match.
*/
if (!AcpiExDoMatch ((UINT32) Operand[1]->Integer.Value,
- ThisElement, Operand[2]))
+ ThisElement, Operand[2]))
{
continue;
}
if (!AcpiExDoMatch ((UINT32) Operand[3]->Integer.Value,
- ThisElement, Operand[4]))
+ ThisElement, Operand[4]))
{
continue;
}
@@ -330,6 +330,7 @@ AcpiExOpcode_6A_0T_1R (
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
+
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c
index 6cadb507703e2..7676e25ca445d 100644
--- a/source/components/executer/exprep.c
+++ b/source/components/executer/exprep.c
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
+ * Module Name: exprep - ACPI AML field prep utilities
*
*****************************************************************************/
@@ -69,6 +69,7 @@ AcpiExGenerateAccess (
UINT32 FieldBitLength,
UINT32 RegionLength);
+
/*******************************************************************************
*
* FUNCTION: AcpiExGenerateAccess
@@ -113,10 +114,13 @@ AcpiExGenerateAccess (
/* Round Field start offset and length to "minimal" byte boundaries */
- FieldByteOffset = ACPI_DIV_8 (ACPI_ROUND_DOWN (FieldBitOffset, 8));
- FieldByteEndOffset = ACPI_DIV_8 (ACPI_ROUND_UP (FieldBitLength +
- FieldBitOffset, 8));
- FieldByteLength = FieldByteEndOffset - FieldByteOffset;
+ FieldByteOffset = ACPI_DIV_8 (
+ ACPI_ROUND_DOWN (FieldBitOffset, 8));
+
+ FieldByteEndOffset = ACPI_DIV_8 (
+ ACPI_ROUND_UP (FieldBitLength + FieldBitOffset, 8));
+
+ FieldByteLength = FieldByteEndOffset - FieldByteOffset;
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"Bit length %u, Bit offset %u\n",
@@ -141,7 +145,8 @@ AcpiExGenerateAccess (
* are done. (This does not optimize for the perfectly aligned
* case yet).
*/
- if (ACPI_ROUND_UP (FieldByteEndOffset, AccessByteWidth) <= RegionLength)
+ if (ACPI_ROUND_UP (FieldByteEndOffset, AccessByteWidth) <=
+ RegionLength)
{
FieldStartOffset =
ACPI_ROUND_DOWN (FieldByteOffset, AccessByteWidth) /
@@ -165,7 +170,8 @@ AcpiExGenerateAccess (
if (Accesses <= 1)
{
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Entire field can be accessed with one operation of size %u\n",
+ "Entire field can be accessed "
+ "with one operation of size %u\n",
AccessByteWidth));
return_VALUE (AccessByteWidth);
}
@@ -176,14 +182,15 @@ AcpiExGenerateAccess (
*/
if (Accesses < MinimumAccesses)
{
- MinimumAccesses = Accesses;
+ MinimumAccesses = Accesses;
MinimumAccessWidth = AccessByteWidth;
}
}
else
{
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "AccessWidth %u end is NOT within region\n", AccessByteWidth));
+ "AccessWidth %u end is NOT within region\n",
+ AccessByteWidth));
if (AccessByteWidth == 1)
{
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
@@ -211,6 +218,7 @@ AcpiExGenerateAccess (
*/
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"Cannot access field in one operation, using width 8\n"));
+
return_VALUE (8);
}
#endif /* ACPI_UNDER_DEVELOPMENT */
@@ -295,6 +303,7 @@ AcpiExDecodeFieldAccess (
ACPI_ERROR ((AE_INFO,
"Unknown field access type 0x%X",
Access));
+
return_UINT32 (0);
}
@@ -374,8 +383,8 @@ AcpiExPrepCommonFieldObject (
* For all other access types (Byte, Word, Dword, Qword), the Bitwidth is
* the same (equivalent) as the ByteAlignment.
*/
- AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags,
- &ByteAlignment);
+ AccessBitWidth = AcpiExDecodeFieldAccess (
+ ObjDesc, FieldFlags, &ByteAlignment);
if (!AccessBitWidth)
{
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
@@ -471,8 +480,8 @@ AcpiExPrepFieldValue (
ObjDesc->CommonField.Node = Info->FieldNode;
Status = AcpiExPrepCommonFieldObject (ObjDesc,
- Info->FieldFlags, Info->Attribute,
- Info->FieldBitPosition, Info->FieldBitLength);
+ Info->FieldFlags, Info->Attribute,
+ Info->FieldBitPosition, Info->FieldBitLength);
if (ACPI_FAILURE (Status))
{
AcpiUtDeleteObjectDesc (ObjDesc);
@@ -504,8 +513,10 @@ AcpiExPrepFieldValue (
}
}
- ObjDesc->Field.ResourceBuffer = SecondDesc->Buffer.Pointer;
- ObjDesc->Field.ResourceLength = (UINT16) SecondDesc->Buffer.Length;
+ ObjDesc->Field.ResourceBuffer =
+ SecondDesc->Buffer.Pointer;
+ ObjDesc->Field.ResourceLength =
+ (UINT16) SecondDesc->Buffer.Length;
}
else if (Info->ResourceBuffer)
{
@@ -527,7 +538,8 @@ AcpiExPrepFieldValue (
if (AccessByteWidth < 256)
{
- ObjDesc->CommonField.AccessByteWidth = (UINT8) AccessByteWidth;
+ ObjDesc->CommonField.AccessByteWidth =
+ (UINT8) AccessByteWidth;
}
}
@@ -537,8 +549,10 @@ AcpiExPrepFieldValue (
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
- ObjDesc->Field.StartFieldBitOffset, ObjDesc->Field.BaseByteOffset,
- ObjDesc->Field.AccessByteWidth, ObjDesc->Field.RegionObj));
+ ObjDesc->Field.StartFieldBitOffset,
+ ObjDesc->Field.BaseByteOffset,
+ ObjDesc->Field.AccessByteWidth,
+ ObjDesc->Field.RegionObj));
break;
case ACPI_TYPE_LOCAL_BANK_FIELD:
@@ -618,7 +632,8 @@ AcpiExPrepFieldValue (
ObjDesc->IndexField.AccessByteWidth);
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "IndexField: BitOff %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n",
+ "IndexField: BitOff %X, Off %X, Value %X, "
+ "Gran %X, Index %p, Data %p\n",
ObjDesc->IndexField.StartFieldBitOffset,
ObjDesc->IndexField.BaseByteOffset,
ObjDesc->IndexField.Value,
@@ -638,10 +653,11 @@ AcpiExPrepFieldValue (
* Store the constructed descriptor (ObjDesc) into the parent Node,
* preserving the current type of that NamedObj.
*/
- Status = AcpiNsAttachObject (Info->FieldNode, ObjDesc,
- AcpiNsGetType (Info->FieldNode));
+ Status = AcpiNsAttachObject (
+ Info->FieldNode, ObjDesc, AcpiNsGetType (Info->FieldNode));
- ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Set NamedObj %p [%4.4s], ObjDesc %p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+ "Set NamedObj %p [%4.4s], ObjDesc %p\n",
Info->FieldNode, AcpiUtGetNodeName (Info->FieldNode), ObjDesc));
/* Remove local reference to the object */
diff --git a/source/components/executer/exregion.c b/source/components/executer/exregion.c
index 6aaf69c84b5ae..6e779097d84f1 100644
--- a/source/components/executer/exregion.c
+++ b/source/components/executer/exregion.c
@@ -417,7 +417,8 @@ AcpiExPciConfigSpaceHandler (
PciRegister = (UINT16) (UINT32) Address;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Pci-Config %u (%u) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n",
+ "Pci-Config %u (%u) Seg(%04x) Bus(%04x) "
+ "Dev(%04x) Func(%04x) Reg(%04x)\n",
Function, BitWidth, PciId->Segment, PciId->Bus, PciId->Device,
PciId->Function, PciRegister));
@@ -426,14 +427,14 @@ AcpiExPciConfigSpaceHandler (
case ACPI_READ:
*Value = 0;
- Status = AcpiOsReadPciConfiguration (PciId, PciRegister,
- Value, BitWidth);
+ Status = AcpiOsReadPciConfiguration (
+ PciId, PciRegister, Value, BitWidth);
break;
case ACPI_WRITE:
- Status = AcpiOsWritePciConfiguration (PciId, PciRegister,
- *Value, BitWidth);
+ Status = AcpiOsWritePciConfiguration (
+ PciId, PciRegister, *Value, BitWidth);
break;
default:
diff --git a/source/components/executer/exresnte.c b/source/components/executer/exresnte.c
index 0aa52629e85e3..c094663717c35 100644
--- a/source/components/executer/exresnte.c
+++ b/source/components/executer/exresnte.c
@@ -98,9 +98,9 @@ AcpiExResolveNodeToValue (
* The stack pointer points to a ACPI_NAMESPACE_NODE (Node). Get the
* object that is attached to the Node.
*/
- Node = *ObjectPtr;
+ Node = *ObjectPtr;
SourceDesc = AcpiNsGetAttachedObject (Node);
- EntryType = AcpiNsGetType ((ACPI_HANDLE) Node);
+ EntryType = AcpiNsGetType ((ACPI_HANDLE) Node);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Entry=%p SourceDesc=%p [%s]\n",
Node, SourceDesc, AcpiUtGetTypeName (EntryType)));
@@ -110,15 +110,15 @@ AcpiExResolveNodeToValue (
{
/* There is always exactly one level of indirection */
- Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Node->Object);
+ Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Node->Object);
SourceDesc = AcpiNsGetAttachedObject (Node);
- EntryType = AcpiNsGetType ((ACPI_HANDLE) Node);
+ EntryType = AcpiNsGetType ((ACPI_HANDLE) Node);
*ObjectPtr = Node;
}
/*
* Several object types require no further processing:
- * 1) Device/Thermal objects don't have a "real" subobject, return the Node
+ * 1) Device/Thermal objects don't have a "real" subobject, return Node
* 2) Method locals and arguments have a pseudo-Node
* 3) 10/2007: Added method type to assist with Package construction.
*/
diff --git a/source/components/executer/exresolv.c b/source/components/executer/exresolv.c
index 79878c669aa0b..2678e59cca4e4 100644
--- a/source/components/executer/exresolv.c
+++ b/source/components/executer/exresolv.c
@@ -119,8 +119,8 @@ AcpiExResolveToValue (
if (ACPI_GET_DESCRIPTOR_TYPE (*StackPtr) == ACPI_DESC_TYPE_NAMED)
{
Status = AcpiExResolveNodeToValue (
- ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, StackPtr),
- WalkState);
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, StackPtr),
+ WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -179,7 +179,7 @@ AcpiExResolveObjectToValue (
* Note: this increments the local's object reference count
*/
Status = AcpiDsMethodDataGetValue (RefType,
- StackDesc->Reference.Value, WalkState, &ObjDesc);
+ StackDesc->Reference.Value, WalkState, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -235,7 +235,8 @@ AcpiExResolveObjectToValue (
* the package, can't dereference it
*/
ACPI_ERROR ((AE_INFO,
- "Attempt to dereference an Index to NULL package element Idx=%p",
+ "Attempt to dereference an Index to "
+ "NULL package element Idx=%p",
StackDesc));
Status = AE_AML_UNINITIALIZED_ELEMENT;
}
@@ -286,7 +287,8 @@ AcpiExResolveObjectToValue (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Reference type 0x%X in %p", RefType, StackDesc));
+ "Unknown Reference type 0x%X in %p",
+ RefType, StackDesc));
Status = AE_AML_INTERNAL;
break;
}
@@ -307,7 +309,8 @@ AcpiExResolveObjectToValue (
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "FieldRead SourceDesc=%p Type=%X\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "FieldRead SourceDesc=%p Type=%X\n",
StackDesc, StackDesc->Common.Type));
Status = AcpiExReadDataFromField (WalkState, StackDesc, &ObjDesc);
@@ -378,7 +381,8 @@ AcpiExResolveMultiple (
if (Type == ACPI_TYPE_LOCAL_ALIAS)
{
Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
+ ObjDesc = AcpiNsGetAttachedObject (
+ (ACPI_NAMESPACE_NODE *) ObjDesc);
}
if (!ObjDesc)
@@ -492,7 +496,7 @@ AcpiExResolveMultiple (
if (ReturnDesc)
{
Status = AcpiDsMethodDataGetValue (ObjDesc->Reference.Class,
- ObjDesc->Reference.Value, WalkState, &ObjDesc);
+ ObjDesc->Reference.Value, WalkState, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -502,7 +506,7 @@ AcpiExResolveMultiple (
else
{
Status = AcpiDsMethodDataGetNode (ObjDesc->Reference.Class,
- ObjDesc->Reference.Value, WalkState, &Node);
+ ObjDesc->Reference.Value, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -527,7 +531,8 @@ AcpiExResolveMultiple (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Reference Class 0x%2.2X", ObjDesc->Reference.Class));
+ "Unknown Reference Class 0x%2.2X",
+ ObjDesc->Reference.Class));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
}
diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c
index d4c528905fd70..3fec899eb44b4 100644
--- a/source/components/executer/exresop.c
+++ b/source/components/executer/exresop.c
@@ -99,7 +99,8 @@ AcpiExCheckObjectType (
* specification, a store to a constant is a noop.)
*/
if ((ThisType == ACPI_TYPE_INTEGER) &&
- (((ACPI_OPERAND_OBJECT *) Object)->Common.Flags & AOPOBJ_AML_CONSTANT))
+ (((ACPI_OPERAND_OBJECT *) Object)->Common.Flags &
+ AOPOBJ_AML_CONSTANT))
{
return (AE_OK);
}
@@ -216,7 +217,8 @@ AcpiExResolveOperands (
*/
if (ObjectType == ACPI_TYPE_LOCAL_ALIAS)
{
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
+ ObjDesc = AcpiNsGetAttachedObject (
+ (ACPI_NAMESPACE_NODE *) ObjDesc);
*StackPtr = ObjDesc;
ObjectType = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
}
@@ -297,7 +299,8 @@ AcpiExResolveOperands (
{
case ARGI_REF_OR_STRING: /* Can be a String or Reference */
- if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND) &&
+ if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) ==
+ ACPI_DESC_TYPE_OPERAND) &&
(ObjDesc->Common.Type == ACPI_TYPE_STRING))
{
/*
@@ -331,8 +334,8 @@ AcpiExResolveOperands (
goto NextOperand;
}
- Status = AcpiExCheckObjectType (ACPI_TYPE_LOCAL_REFERENCE,
- ObjectType, ObjDesc);
+ Status = AcpiExCheckObjectType (
+ ACPI_TYPE_LOCAL_REFERENCE, ObjectType, ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -483,8 +486,8 @@ AcpiExResolveOperands (
* But we can implicitly convert from a BUFFER or INTEGER
* Aka - "Implicit Source Operand Conversion"
*/
- Status = AcpiExConvertToString (ObjDesc, StackPtr,
- ACPI_IMPLICIT_CONVERT_HEX);
+ Status = AcpiExConvertToString (
+ ObjDesc, StackPtr, ACPI_IMPLICIT_CONVERT_HEX);
if (ACPI_FAILURE (Status))
{
if (Status == AE_TYPE)
@@ -617,8 +620,10 @@ AcpiExResolveOperands (
case ARGI_REGION_OR_BUFFER: /* Used by Load() only */
- /* Need an operand of type REGION or a BUFFER (which could be a resolved region field) */
-
+ /*
+ * Need an operand of type REGION or a BUFFER
+ * (which could be a resolved region field)
+ */
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_BUFFER:
@@ -662,9 +667,9 @@ AcpiExResolveOperands (
if (AcpiGbl_EnableInterpreterSlack)
{
/*
- * Enable original behavior of Store(), allowing any and all
- * objects as the source operand. The ACPI spec does not
- * allow this, however.
+ * Enable original behavior of Store(), allowing any
+ * and all objects as the source operand. The ACPI
+ * spec does not allow this, however.
*/
break;
}
@@ -677,7 +682,8 @@ AcpiExResolveOperands (
}
ACPI_ERROR ((AE_INFO,
- "Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p",
+ "Needed Integer/Buffer/String/Package/Ref/Ddb]"
+ ", found [%s] %p",
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -699,8 +705,8 @@ AcpiExResolveOperands (
* Make sure that the original object was resolved to the
* required object type (Simple cases only).
*/
- Status = AcpiExCheckObjectType (TypeNeeded,
- (*StackPtr)->Common.Type, *StackPtr);
+ Status = AcpiExCheckObjectType (
+ TypeNeeded, (*StackPtr)->Common.Type, *StackPtr);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/executer/exstore.c b/source/components/executer/exstore.c
index 1f2f912170faa..026bc166462cc 100644
--- a/source/components/executer/exstore.c
+++ b/source/components/executer/exstore.c
@@ -117,8 +117,8 @@ AcpiExStore (
* Storing an object into a Named node.
*/
Status = AcpiExStoreObjectToNode (SourceDesc,
- (ACPI_NAMESPACE_NODE *) DestDesc, WalkState,
- ACPI_IMPLICIT_CONVERSION);
+ (ACPI_NAMESPACE_NODE *) DestDesc, WalkState,
+ ACPI_IMPLICIT_CONVERSION);
return_ACPI_STATUS (Status);
}
@@ -168,8 +168,8 @@ AcpiExStore (
/* Storing an object into a Name "container" */
Status = AcpiExStoreObjectToNode (SourceDesc,
- RefDesc->Reference.Object,
- WalkState, ACPI_IMPLICIT_CONVERSION);
+ RefDesc->Reference.Object,
+ WalkState, ACPI_IMPLICIT_CONVERSION);
break;
case ACPI_REFCLASS_INDEX:
@@ -185,7 +185,7 @@ AcpiExStore (
/* Store to a method local/arg */
Status = AcpiDsStoreObjectToLocal (RefDesc->Reference.Class,
- RefDesc->Reference.Value, SourceDesc, WalkState);
+ RefDesc->Reference.Value, SourceDesc, WalkState);
break;
case ACPI_REFCLASS_DEBUG:
@@ -274,7 +274,8 @@ AcpiExStoreObjectToIndex (
{
/* Normal object, copy it */
- Status = AcpiUtCopyIobjectToIobject (SourceDesc, &NewDesc, WalkState);
+ Status = AcpiUtCopyIobjectToIobject (
+ SourceDesc, &NewDesc, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -487,7 +488,8 @@ AcpiExStoreObjectToNode (
case ACPI_TYPE_THERMAL:
ACPI_ERROR ((AE_INFO,
- "Target must be [Buffer/Integer/String/Reference], found [%s] (%4.4s)",
+ "Target must be [Buffer/Integer/String/Reference]"
+ ", found [%s] (%4.4s)",
AcpiUtGetTypeName (Node->Type), Node->Name.Ascii));
return_ACPI_STATUS (AE_AML_TARGET_TYPE);
@@ -527,8 +529,7 @@ AcpiExStoreObjectToNode (
* an implicit conversion, as per the ACPI specification.
* A direct store is performed instead.
*/
- Status = AcpiExStoreDirectToNode (SourceDesc, Node,
- WalkState);
+ Status = AcpiExStoreDirectToNode (SourceDesc, Node, WalkState);
break;
}
@@ -552,8 +553,8 @@ AcpiExStoreObjectToNode (
* store has been performed such that the node/object type
* has been changed.
*/
- Status = AcpiNsAttachObject (Node, NewDesc,
- NewDesc->Common.Type);
+ Status = AcpiNsAttachObject (
+ Node, NewDesc, NewDesc->Common.Type);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Store type [%s] into [%s] via Convert/Attach\n",
@@ -585,8 +586,7 @@ AcpiExStoreObjectToNode (
* operator. (Note, for this default case, all normal
* Store/Target operations exited above with an error).
*/
- Status = AcpiExStoreDirectToNode (SourceDesc, Node,
- WalkState);
+ Status = AcpiExStoreDirectToNode (SourceDesc, Node, WalkState);
break;
}
diff --git a/source/components/executer/exstoren.c b/source/components/executer/exstoren.c
index f5844387d5723..b2cc7829f9727 100644
--- a/source/components/executer/exstoren.c
+++ b/source/components/executer/exstoren.c
@@ -124,7 +124,7 @@ AcpiExResolveObject (
(SourceDesc->Common.Type != ACPI_TYPE_BUFFER) &&
(SourceDesc->Common.Type != ACPI_TYPE_STRING) &&
!((SourceDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
- (SourceDesc->Reference.Class== ACPI_REFCLASS_TABLE)))
+ (SourceDesc->Reference.Class== ACPI_REFCLASS_TABLE)))
{
/* Conversion successful but still not a valid type */
@@ -233,7 +233,7 @@ AcpiExStoreObjectToObject (
* converted object.
*/
Status = AcpiExConvertToTargetType (DestDesc->Common.Type,
- SourceDesc, &ActualSrcDesc, WalkState);
+ SourceDesc, &ActualSrcDesc, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/executer/exstorob.c b/source/components/executer/exstorob.c
index 87791c03904a0..6b1a488e318b5 100644
--- a/source/components/executer/exstorob.c
+++ b/source/components/executer/exstorob.c
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Module Name: exstorob - AML Interpreter object store support, store to object
+ * Module Name: exstorob - AML object store support, store to object
*
*****************************************************************************/
@@ -221,8 +221,9 @@ AcpiExStoreStringToString (
ACPI_FREE (TargetDesc->String.Pointer);
}
- TargetDesc->String.Pointer = ACPI_ALLOCATE_ZEROED (
- (ACPI_SIZE) Length + 1);
+ TargetDesc->String.Pointer =
+ ACPI_ALLOCATE_ZEROED ((ACPI_SIZE) Length + 1);
+
if (!TargetDesc->String.Pointer)
{
return_ACPI_STATUS (AE_NO_MEMORY);
diff --git a/source/components/executer/exsystem.c b/source/components/executer/exsystem.c
index 2862c0d5209f1..f467c26462b8a 100644
--- a/source/components/executer/exsystem.c
+++ b/source/components/executer/exsystem.c
@@ -86,7 +86,6 @@ AcpiExSystemWaitSemaphore (
/* We must wait, so unlock the interpreter */
AcpiExExitInterpreter ();
-
Status = AcpiOsWaitSemaphore (Semaphore, 1, Timeout);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
@@ -139,7 +138,6 @@ AcpiExSystemWaitMutex (
/* We must wait, so unlock the interpreter */
AcpiExExitInterpreter ();
-
Status = AcpiOsAcquireMutex (Mutex, Timeout);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
@@ -190,8 +188,8 @@ AcpiExSystemDoStall (
* (ACPI specifies 100 usec as max, but this gives some slack in
* order to support existing BIOSs)
*/
- ACPI_ERROR ((AE_INFO, "Time parameter is too large (%u)",
- HowLong));
+ ACPI_ERROR ((AE_INFO,
+ "Time parameter is too large (%u)", HowLong));
Status = AE_AML_OPERAND_VALUE;
}
else
@@ -306,7 +304,7 @@ AcpiExSystemWaitEvent (
if (ObjDesc)
{
Status = AcpiExSystemWaitSemaphore (ObjDesc->Event.OsSemaphore,
- (UINT16) TimeDesc->Integer.Value);
+ (UINT16) TimeDesc->Integer.Value);
}
return_ACPI_STATUS (Status);
diff --git a/source/components/executer/extrace.c b/source/components/executer/extrace.c
new file mode 100644
index 0000000000000..9bf2e92e8982e
--- /dev/null
+++ b/source/components/executer/extrace.c
@@ -0,0 +1,427 @@
+/******************************************************************************
+ *
+ * Module Name: extrace - Support for interpreter execution tracing
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "acpi.h"
+#include "accommon.h"
+#include "acnamesp.h"
+#include "acinterp.h"
+
+
+#define _COMPONENT ACPI_EXECUTER
+ ACPI_MODULE_NAME ("extrace")
+
+
+static ACPI_OPERAND_OBJECT *AcpiGbl_TraceMethodObject = NULL;
+
+/* Local prototypes */
+
+#ifdef ACPI_DEBUG_OUTPUT
+static const char *
+AcpiExGetTraceEventName (
+ ACPI_TRACE_EVENT_TYPE Type);
+#endif
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExInterpreterTraceEnabled
+ *
+ * PARAMETERS: Name - Whether method name should be matched,
+ * this should be checked before starting
+ * the tracer
+ *
+ * RETURN: TRUE if interpreter trace is enabled.
+ *
+ * DESCRIPTION: Check whether interpreter trace is enabled
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiExInterpreterTraceEnabled (
+ char *Name)
+{
+
+ /* Check if tracing is enabled */
+
+ if (!(AcpiGbl_TraceFlags & ACPI_TRACE_ENABLED))
+ {
+ return (FALSE);
+ }
+
+ /*
+ * Check if tracing is filtered:
+ *
+ * 1. If the tracer is started, AcpiGbl_TraceMethodObject should have
+ * been filled by the trace starter
+ * 2. If the tracer is not started, AcpiGbl_TraceMethodName should be
+ * matched if it is specified
+ * 3. If the tracer is oneshot style, AcpiGbl_TraceMethodName should
+ * not be cleared by the trace stopper during the first match
+ */
+ if (AcpiGbl_TraceMethodObject)
+ {
+ return (TRUE);
+ }
+
+ if (Name &&
+ (AcpiGbl_TraceMethodName &&
+ strcmp (AcpiGbl_TraceMethodName, Name)))
+ {
+ return (FALSE);
+ }
+
+ if ((AcpiGbl_TraceFlags & ACPI_TRACE_ONESHOT) &&
+ !AcpiGbl_TraceMethodName)
+ {
+ return (FALSE);
+ }
+
+ return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExGetTraceEventName
+ *
+ * PARAMETERS: Type - Trace event type
+ *
+ * RETURN: Trace event name.
+ *
+ * DESCRIPTION: Used to obtain the full trace event name.
+ *
+ ******************************************************************************/
+
+#ifdef ACPI_DEBUG_OUTPUT
+
+static const char *
+AcpiExGetTraceEventName (
+ ACPI_TRACE_EVENT_TYPE Type)
+{
+
+ switch (Type)
+ {
+ case ACPI_TRACE_AML_METHOD:
+
+ return "Method";
+
+ case ACPI_TRACE_AML_OPCODE:
+
+ return "Opcode";
+
+ case ACPI_TRACE_AML_REGION:
+
+ return "Region";
+
+ default:
+
+ return "";
+ }
+}
+
+#endif
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExTracePoint
+ *
+ * PARAMETERS: Type - Trace event type
+ * Begin - TRUE if before execution
+ * Aml - Executed AML address
+ * Pathname - Object path
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Internal interpreter execution trace.
+ *
+ ******************************************************************************/
+
+void
+AcpiExTracePoint (
+ ACPI_TRACE_EVENT_TYPE Type,
+ BOOLEAN Begin,
+ UINT8 *Aml,
+ char *Pathname)
+{
+
+ ACPI_FUNCTION_NAME (ExTracePoint);
+
+
+ if (Pathname)
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_TRACE_POINT,
+ "%s %s [0x%p:%s] execution.\n",
+ AcpiExGetTraceEventName (Type), Begin ? "Begin" : "End",
+ Aml, Pathname));
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_TRACE_POINT,
+ "%s %s [0x%p] execution.\n",
+ AcpiExGetTraceEventName (Type), Begin ? "Begin" : "End",
+ Aml));
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExStartTraceMethod
+ *
+ * PARAMETERS: MethodNode - Node of the method
+ * ObjDesc - The method object
+ * WalkState - current state, NULL if not yet executing
+ * a method.
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Start control method execution trace
+ *
+ ******************************************************************************/
+
+void
+AcpiExStartTraceMethod (
+ ACPI_NAMESPACE_NODE *MethodNode,
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status;
+ char *Pathname = NULL;
+ BOOLEAN Enabled = FALSE;
+
+
+ ACPI_FUNCTION_NAME (ExStartTraceMethod);
+
+
+ if (MethodNode)
+ {
+ Pathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Exit;
+ }
+
+ Enabled = AcpiExInterpreterTraceEnabled (Pathname);
+ if (Enabled && !AcpiGbl_TraceMethodObject)
+ {
+ AcpiGbl_TraceMethodObject = ObjDesc;
+ AcpiGbl_OriginalDbgLevel = AcpiDbgLevel;
+ AcpiGbl_OriginalDbgLayer = AcpiDbgLayer;
+ AcpiDbgLevel = ACPI_TRACE_LEVEL_ALL;
+ AcpiDbgLayer = ACPI_TRACE_LAYER_ALL;
+
+ if (AcpiGbl_TraceDbgLevel)
+ {
+ AcpiDbgLevel = AcpiGbl_TraceDbgLevel;
+ }
+
+ if (AcpiGbl_TraceDbgLayer)
+ {
+ AcpiDbgLayer = AcpiGbl_TraceDbgLayer;
+ }
+ }
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+
+Exit:
+ if (Enabled)
+ {
+ ACPI_TRACE_POINT (ACPI_TRACE_AML_METHOD, TRUE,
+ ObjDesc ? ObjDesc->Method.AmlStart : NULL, Pathname);
+ }
+
+ if (Pathname)
+ {
+ ACPI_FREE (Pathname);
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExStopTraceMethod
+ *
+ * PARAMETERS: MethodNode - Node of the method
+ * ObjDesc - The method object
+ * WalkState - current state, NULL if not yet executing
+ * a method.
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Stop control method execution trace
+ *
+ ******************************************************************************/
+
+void
+AcpiExStopTraceMethod (
+ ACPI_NAMESPACE_NODE *MethodNode,
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status;
+ char *Pathname = NULL;
+ BOOLEAN Enabled;
+
+
+ ACPI_FUNCTION_NAME (ExStopTraceMethod);
+
+
+ if (MethodNode)
+ {
+ Pathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (Status))
+ {
+ goto ExitPath;
+ }
+
+ Enabled = AcpiExInterpreterTraceEnabled (NULL);
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+
+ if (Enabled)
+ {
+ ACPI_TRACE_POINT (ACPI_TRACE_AML_METHOD, FALSE,
+ ObjDesc ? ObjDesc->Method.AmlStart : NULL, Pathname);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (Status))
+ {
+ goto ExitPath;
+ }
+
+ /* Check whether the tracer should be stopped */
+
+ if (AcpiGbl_TraceMethodObject == ObjDesc)
+ {
+ /* Disable further tracing if type is one-shot */
+
+ if (AcpiGbl_TraceFlags & ACPI_TRACE_ONESHOT)
+ {
+ AcpiGbl_TraceMethodName = NULL;
+ }
+
+ AcpiDbgLevel = AcpiGbl_OriginalDbgLevel;
+ AcpiDbgLayer = AcpiGbl_OriginalDbgLayer;
+ AcpiGbl_TraceMethodObject = NULL;
+ }
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+
+ExitPath:
+ if (Pathname)
+ {
+ ACPI_FREE (Pathname);
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExStartTraceOpcode
+ *
+ * PARAMETERS: Op - The parser opcode object
+ * WalkState - current state, NULL if not yet executing
+ * a method.
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Start opcode execution trace
+ *
+ ******************************************************************************/
+
+void
+AcpiExStartTraceOpcode (
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_WALK_STATE *WalkState)
+{
+
+ ACPI_FUNCTION_NAME (ExStartTraceOpcode);
+
+
+ if (AcpiExInterpreterTraceEnabled (NULL) &&
+ (AcpiGbl_TraceFlags & ACPI_TRACE_OPCODE))
+ {
+ ACPI_TRACE_POINT (ACPI_TRACE_AML_OPCODE, TRUE,
+ Op->Common.Aml, Op->Common.AmlOpName);
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExStopTraceOpcode
+ *
+ * PARAMETERS: Op - The parser opcode object
+ * WalkState - current state, NULL if not yet executing
+ * a method.
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Stop opcode execution trace
+ *
+ ******************************************************************************/
+
+void
+AcpiExStopTraceOpcode (
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_WALK_STATE *WalkState)
+{
+
+ ACPI_FUNCTION_NAME (ExStopTraceOpcode);
+
+
+ if (AcpiExInterpreterTraceEnabled (NULL) &&
+ (AcpiGbl_TraceFlags & ACPI_TRACE_OPCODE))
+ {
+ ACPI_TRACE_POINT (ACPI_TRACE_AML_OPCODE, FALSE,
+ Op->Common.Aml, Op->Common.AmlOpName);
+ }
+}
diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c
index a4cc73af04042..d3aef8a542842 100644
--- a/source/components/executer/exutils.c
+++ b/source/components/executer/exutils.c
@@ -187,8 +187,8 @@ AcpiExTruncateFor32bitTable (
(ObjDesc->Integer.Value > (UINT64) ACPI_UINT32_MAX))
{
/*
- * We are executing in a 32-bit ACPI table.
- * Truncate the value to 32 bits by zeroing out the upper 32-bit field
+ * We are executing in a 32-bit ACPI table. Truncate
+ * the value to 32 bits by zeroing out the upper 32-bit field
*/
ObjDesc->Integer.Value &= (UINT64) ACPI_UINT32_MAX;
return (TRUE);
@@ -232,7 +232,7 @@ AcpiExAcquireGlobalLock (
/* Attempt to get the global lock, wait forever */
Status = AcpiExAcquireMutexObject (ACPI_WAIT_FOREVER,
- AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
+ AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
if (ACPI_FAILURE (Status))
{
@@ -369,7 +369,8 @@ AcpiExEisaIdToString (
if (CompressedId > ACPI_UINT32_MAX)
{
ACPI_WARNING ((AE_INFO,
- "Expected EISAID is larger than 32 bits: 0x%8.8X%8.8X, truncating",
+ "Expected EISAID is larger than 32 bits: "
+ "0x%8.8X%8.8X, truncating",
ACPI_FORMAT_UINT64 (CompressedId)));
}
@@ -496,5 +497,4 @@ AcpiIsValidSpaceId (
return (TRUE);
}
-
#endif
diff --git a/source/components/hardware/hwacpi.c b/source/components/hardware/hwacpi.c
index dd92c9d064143..d22546f60a138 100644
--- a/source/components/hardware/hwacpi.c
+++ b/source/components/hardware/hwacpi.c
@@ -113,7 +113,7 @@ AcpiHwSetMode (
/* BIOS should have disabled ALL fixed and GP events */
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
- (UINT32) AcpiGbl_FADT.AcpiEnable, 8);
+ (UINT32) AcpiGbl_FADT.AcpiEnable, 8);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Attempting to enable ACPI mode\n"));
break;
@@ -123,9 +123,9 @@ AcpiHwSetMode (
* enable bits to default
*/
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
- (UINT32) AcpiGbl_FADT.AcpiDisable, 8);
+ (UINT32) AcpiGbl_FADT.AcpiDisable, 8);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Attempting to enable Legacy (non-ACPI) mode\n"));
+ "Attempting to enable Legacy (non-ACPI) mode\n"));
break;
default:
@@ -149,8 +149,8 @@ AcpiHwSetMode (
{
if (AcpiHwGetMode () == Mode)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode %X successfully enabled\n",
- Mode));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Mode %X successfully enabled\n", Mode));
return_ACPI_STATUS (AE_OK);
}
AcpiOsStall (ACPI_USEC_PER_MSEC);
diff --git a/source/components/hardware/hwesleep.c b/source/components/hardware/hwesleep.c
index 4d53c25316cb4..adfc5c4d80e18 100644
--- a/source/components/hardware/hwesleep.c
+++ b/source/components/hardware/hwesleep.c
@@ -130,7 +130,8 @@ AcpiHwExtendedSleep (
/* Clear wake status (WAK_STS) */
- Status = AcpiWrite ((UINT64) ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
+ Status = AcpiWrite ((UINT64) ACPI_X_WAKE_STATUS,
+ &AcpiGbl_FADT.SleepStatus);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -202,7 +203,7 @@ AcpiHwExtendedWakePrep (
Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
+ &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
if (ACPI_SUCCESS (Status))
{
SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
diff --git a/source/components/hardware/hwgpe.c b/source/components/hardware/hwgpe.c
index 1458f4fed22c4..c4b3b6f9c30e4 100644
--- a/source/components/hardware/hwgpe.c
+++ b/source/components/hardware/hwgpe.c
@@ -208,9 +208,7 @@ AcpiHwClearGpe (
*/
RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
- Status = AcpiHwWrite (RegisterBit,
- &GpeRegisterInfo->StatusAddress);
-
+ Status = AcpiHwWrite (RegisterBit, &GpeRegisterInfo->StatusAddress);
return (Status);
}
@@ -251,7 +249,7 @@ AcpiHwGetGpeStatus (
/* GPE currently handled? */
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
- ACPI_GPE_DISPATCH_NONE)
+ ACPI_GPE_DISPATCH_NONE)
{
LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER;
}
@@ -333,8 +331,8 @@ AcpiHwGpeEnableWrite (
GpeRegisterInfo->EnableMask = EnableMask;
- Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
+ Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
return (Status);
}
@@ -459,7 +457,7 @@ AcpiHwEnableRuntimeGpeBlock (
/* Enable all "runtime" GPEs in this register */
Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForRun,
- GpeRegisterInfo);
+ GpeRegisterInfo);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -506,7 +504,7 @@ AcpiHwEnableWakeupGpeBlock (
* remaining ones.
*/
Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForWake,
- GpeRegisterInfo);
+ GpeRegisterInfo);
if (ACPI_FAILURE (Status))
{
return (Status);
diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c
index 60e3fef8b4a7b..d7ef3ca0a9e2d 100644
--- a/source/components/hardware/hwregs.c
+++ b/source/components/hardware/hwregs.c
@@ -68,6 +68,7 @@ AcpiHwWriteMultiple (
#endif /* !ACPI_REDUCED_HARDWARE */
+
/******************************************************************************
*
* FUNCTION: AcpiHwValidateRegister
@@ -196,14 +197,14 @@ AcpiHwRead (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, &Value64, Reg->BitWidth);
+ Address, &Value64, Reg->BitWidth);
*Value = (UINT32) Value64;
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
- Address, Value, Reg->BitWidth);
+ Address, Value, Reg->BitWidth);
}
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
@@ -257,12 +258,12 @@ AcpiHwWrite (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, (UINT64) Value, Reg->BitWidth);
+ Address, (UINT64) Value, Reg->BitWidth);
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
- Address, Value, Reg->BitWidth);
+ Address, Value, Reg->BitWidth);
}
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
@@ -307,7 +308,7 @@ AcpiHwClearAcpiStatus (
/* Clear the fixed events in PM1 A/B */
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS,
- ACPI_BITMASK_ALL_FIXED_STATUS);
+ ACPI_BITMASK_ALL_FIXED_STATUS);
AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags);
@@ -426,22 +427,22 @@ AcpiHwRegisterRead (
case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */
Status = AcpiHwReadMultiple (&Value,
- &AcpiGbl_XPm1aStatus,
- &AcpiGbl_XPm1bStatus);
+ &AcpiGbl_XPm1aStatus,
+ &AcpiGbl_XPm1bStatus);
break;
case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access each */
Status = AcpiHwReadMultiple (&Value,
- &AcpiGbl_XPm1aEnable,
- &AcpiGbl_XPm1bEnable);
+ &AcpiGbl_XPm1aEnable,
+ &AcpiGbl_XPm1bEnable);
break;
case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */
Status = AcpiHwReadMultiple (&Value,
- &AcpiGbl_FADT.XPm1aControlBlock,
- &AcpiGbl_FADT.XPm1bControlBlock);
+ &AcpiGbl_FADT.XPm1aControlBlock,
+ &AcpiGbl_FADT.XPm1bControlBlock);
/*
* Zero the write-only bits. From the ACPI specification, "Hardware
@@ -537,15 +538,15 @@ AcpiHwRegisterWrite (
Value &= ~ACPI_PM1_STATUS_PRESERVED_BITS;
Status = AcpiHwWriteMultiple (Value,
- &AcpiGbl_XPm1aStatus,
- &AcpiGbl_XPm1bStatus);
+ &AcpiGbl_XPm1aStatus,
+ &AcpiGbl_XPm1bStatus);
break;
case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access each */
Status = AcpiHwWriteMultiple (Value,
- &AcpiGbl_XPm1aEnable,
- &AcpiGbl_XPm1bEnable);
+ &AcpiGbl_XPm1aEnable,
+ &AcpiGbl_XPm1bEnable);
break;
case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */
@@ -554,8 +555,8 @@ AcpiHwRegisterWrite (
* Note: This includes SCI_EN, we never want to change this bit
*/
Status = AcpiHwReadMultiple (&ReadValue,
- &AcpiGbl_FADT.XPm1aControlBlock,
- &AcpiGbl_FADT.XPm1bControlBlock);
+ &AcpiGbl_FADT.XPm1aControlBlock,
+ &AcpiGbl_FADT.XPm1bControlBlock);
if (ACPI_FAILURE (Status))
{
goto Exit;
@@ -568,8 +569,8 @@ AcpiHwRegisterWrite (
/* Now we can write the data */
Status = AcpiHwWriteMultiple (Value,
- &AcpiGbl_FADT.XPm1aControlBlock,
- &AcpiGbl_FADT.XPm1bControlBlock);
+ &AcpiGbl_FADT.XPm1aControlBlock,
+ &AcpiGbl_FADT.XPm1bControlBlock);
break;
case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c
index f56110e04c2a3..9517ad3a380b9 100644
--- a/source/components/hardware/hwsleep.c
+++ b/source/components/hardware/hwsleep.c
@@ -83,7 +83,8 @@ AcpiHwLegacySleep (
/* Clear wake status */
- Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
+ Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS,
+ ACPI_CLEAR_STATUS);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -117,7 +118,7 @@ AcpiHwLegacySleep (
/* Get current value of PM1A control */
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
- &Pm1aControl);
+ &Pm1aControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -128,7 +129,7 @@ AcpiHwLegacySleep (
/* Clear the SLP_EN and SLP_TYP fields */
Pm1aControl &= ~(SleepTypeRegInfo->AccessBitMask |
- SleepEnableRegInfo->AccessBitMask);
+ SleepEnableRegInfo->AccessBitMask);
Pm1bControl = Pm1aControl;
/* Insert the SLP_TYP bits */
@@ -182,7 +183,7 @@ AcpiHwLegacySleep (
AcpiOsStall (10 * ACPI_USEC_PER_SEC);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_CONTROL,
- SleepEnableRegInfo->AccessBitMask);
+ SleepEnableRegInfo->AccessBitMask);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -238,7 +239,7 @@ AcpiHwLegacyWakePrep (
* by some machines.
*/
Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
+ &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
if (ACPI_SUCCESS (Status))
{
SleepTypeRegInfo =
@@ -249,7 +250,7 @@ AcpiHwLegacyWakePrep (
/* Get current value of PM1A control */
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
- &Pm1aControl);
+ &Pm1aControl);
if (ACPI_SUCCESS (Status))
{
/* Clear the SLP_EN and SLP_TYP fields */
@@ -334,7 +335,8 @@ AcpiHwLegacyWake (
* and use it to determine whether the system is rebooting or
* resuming. Clear WAK_STS for compatibility.
*/
- (void) AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
+ (void) AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS,
+ ACPI_CLEAR_STATUS);
AcpiGbl_SystemAwakeAndRunning = TRUE;
/* Enable power button */
diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c
index 7a8b5a2a91cda..ab6a3277860b1 100644
--- a/source/components/hardware/hwxface.c
+++ b/source/components/hardware/hwxface.c
@@ -169,7 +169,7 @@ AcpiRead (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, ReturnValue, Reg->BitWidth);
+ Address, ReturnValue, Reg->BitWidth);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -187,7 +187,7 @@ AcpiRead (
}
Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
- Address, &ValueLo, Width);
+ Address, &ValueLo, Width);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -198,7 +198,7 @@ AcpiRead (
/* Read the top 32 bits */
Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
- (Address + 4), &ValueHi, 32);
+ (Address + 4), &ValueHi, 32);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -263,7 +263,7 @@ AcpiWrite (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, Value, Reg->BitWidth);
+ Address, Value, Reg->BitWidth);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -278,7 +278,7 @@ AcpiWrite (
}
Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
- Address, ACPI_LODWORD (Value), Width);
+ Address, ACPI_LODWORD (Value), Width);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -287,7 +287,7 @@ AcpiWrite (
if (Reg->BitWidth == 64)
{
Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
- (Address + 4), ACPI_HIDWORD (Value), 32);
+ (Address + 4), ACPI_HIDWORD (Value), 32);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -358,7 +358,7 @@ AcpiReadBitRegister (
/* Read the entire parent register */
Status = AcpiHwRegisterRead (BitRegInfo->ParentRegister,
- &RegisterValue);
+ &RegisterValue);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -367,7 +367,7 @@ AcpiReadBitRegister (
/* Normalize the value that was read, mask off other bits */
Value = ((RegisterValue & BitRegInfo->AccessBitMask)
- >> BitRegInfo->BitPosition);
+ >> BitRegInfo->BitPosition);
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
"BitReg %X, ParentReg %X, Actual %8.8X, ReturnValue %8.8X\n",
@@ -439,7 +439,7 @@ AcpiWriteBitRegister (
* interested in
*/
Status = AcpiHwRegisterRead (BitRegInfo->ParentRegister,
- &RegisterValue);
+ &RegisterValue);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@@ -453,7 +453,7 @@ AcpiWriteBitRegister (
BitRegInfo->AccessBitMask, Value);
Status = AcpiHwRegisterWrite (BitRegInfo->ParentRegister,
- RegisterValue);
+ RegisterValue);
}
else
{
@@ -473,7 +473,7 @@ AcpiWriteBitRegister (
if (RegisterValue)
{
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS,
- RegisterValue);
+ RegisterValue);
}
}
@@ -565,12 +565,20 @@ AcpiGetSleepTypeData (
* Evaluate the \_Sx namespace object containing the register values
* for this state
*/
- Info->RelativePathname = ACPI_CAST_PTR (
- char, AcpiGbl_SleepStateNames[SleepState]);
+ Info->RelativePathname = ACPI_CAST_PTR (char,
+ AcpiGbl_SleepStateNames[SleepState]);
+
Status = AcpiNsEvaluate (Info);
if (ACPI_FAILURE (Status))
{
- goto Cleanup;
+ if (Status == AE_NOT_FOUND)
+ {
+ /* The _Sx states are optional, ignore NOT_FOUND */
+
+ goto FinalCleanup;
+ }
+
+ goto WarningCleanup;
}
/* Must have a return object */
@@ -580,7 +588,7 @@ AcpiGetSleepTypeData (
ACPI_ERROR ((AE_INFO, "No Sleep State object returned from [%s]",
Info->RelativePathname));
Status = AE_AML_NO_RETURN_VALUE;
- goto Cleanup;
+ goto WarningCleanup;
}
/* Return object must be of type Package */
@@ -589,7 +597,7 @@ AcpiGetSleepTypeData (
{
ACPI_ERROR ((AE_INFO, "Sleep State return object is not a Package"));
Status = AE_AML_OPERAND_TYPE;
- goto Cleanup1;
+ goto ReturnValueCleanup;
}
/*
@@ -636,16 +644,18 @@ AcpiGetSleepTypeData (
break;
}
-Cleanup1:
+ReturnValueCleanup:
AcpiUtRemoveReference (Info->ReturnObject);
-Cleanup:
+WarningCleanup:
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "While evaluating Sleep State [%s]", Info->RelativePathname));
+ "While evaluating Sleep State [%s]",
+ Info->RelativePathname));
}
+FinalCleanup:
ACPI_FREE (Info);
return_ACPI_STATUS (Status);
}
diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c
index 892c4a092d23d..15eaef4199790 100644
--- a/source/components/hardware/hwxfsleep.c
+++ b/source/components/hardware/hwxfsleep.c
@@ -172,7 +172,7 @@ AcpiSetFirmwareWakingVector (
if (AcpiGbl_FACS)
{
(void) AcpiHwSetFirmwareWakingVector (AcpiGbl_FACS,
- PhysicalAddress, PhysicalAddress64);
+ PhysicalAddress, PhysicalAddress64);
}
return_ACPI_STATUS (AE_OK);
@@ -239,7 +239,7 @@ AcpiEnterSleepStateS4bios (
ACPI_FLUSH_CPU_CACHE ();
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
- (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
+ (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
do {
AcpiOsStall (ACPI_USEC_PER_MSEC);
@@ -248,6 +248,7 @@ AcpiEnterSleepStateS4bios (
{
return_ACPI_STATUS (Status);
}
+
} while (!InValue);
return_ACPI_STATUS (AE_OK);
@@ -343,7 +344,7 @@ AcpiEnterSleepStatePrep (
Status = AcpiGetSleepTypeData (SleepState,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
+ &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c
index 615257aefee41..774d7c0b74bb6 100644
--- a/source/components/namespace/nsaccess.c
+++ b/source/components/namespace/nsaccess.c
@@ -117,8 +117,8 @@ AcpiNsRootInitialize (
}
Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type,
- ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
- NULL, &NewNode);
+ ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
+ NULL, &NewNode);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
@@ -219,7 +219,7 @@ AcpiNsRootInitialize (
/* Create additional counting semaphore for global lock */
Status = AcpiOsCreateSemaphore (
- 1, 0, &AcpiGbl_GlobalLockSemaphore);
+ 1, 0, &AcpiGbl_GlobalLockSemaphore);
if (ACPI_FAILURE (Status))
{
AcpiUtRemoveReference (ObjDesc);
@@ -240,7 +240,7 @@ AcpiNsRootInitialize (
/* Store pointer to value descriptor in the Node */
Status = AcpiNsAttachObject (NewNode, ObjDesc,
- ObjDesc->Common.Type);
+ ObjDesc->Common.Type);
/* Remove local reference to the object */
@@ -257,7 +257,7 @@ UnlockAndExit:
if (ACPI_SUCCESS (Status))
{
Status = AcpiNsGetNode (NULL, "\\_GPE", ACPI_NS_NO_UPSEARCH,
- &AcpiGbl_FadtGpeDevice);
+ &AcpiGbl_FadtGpeDevice);
}
return_ACPI_STATUS (Status);
@@ -589,7 +589,7 @@ AcpiNsLookup (
/* Try to find the single (4 character) ACPI name */
Status = AcpiNsSearchAndEnter (SimpleName, WalkState, CurrentNode,
- InterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
+ InterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c
index 1939cac6f4dfe..f42fe2653a12f 100644
--- a/source/components/namespace/nsalloc.c
+++ b/source/components/namespace/nsalloc.c
@@ -85,7 +85,7 @@ AcpiNsCreateNode (
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
Temp = AcpiGbl_NsNodeList->TotalAllocated -
- AcpiGbl_NsNodeList->TotalFreed;
+ AcpiGbl_NsNodeList->TotalFreed;
if (Temp > AcpiGbl_NsNodeList->MaxOccupied)
{
AcpiGbl_NsNodeList->MaxOccupied = Temp;
@@ -277,7 +277,8 @@ AcpiNsInstallNode (
* modified the namespace. This is used for cleanup when the
* method exits.
*/
- WalkState->MethodDesc->Method.InfoFlags |= ACPI_METHOD_MODIFIED_NAMESPACE;
+ WalkState->MethodDesc->Method.InfoFlags |=
+ ACPI_METHOD_MODIFIED_NAMESPACE;
}
}
diff --git a/source/components/namespace/nsarguments.c b/source/components/namespace/nsarguments.c
index 93cf7a02e0f2a..054150d256250 100644
--- a/source/components/namespace/nsarguments.c
+++ b/source/components/namespace/nsarguments.c
@@ -137,7 +137,8 @@ AcpiNsCheckAcpiCompliance (
/* Get the ACPI-required arg count from the predefined info table */
- RequiredParamCount = METHOD_GET_ARG_COUNT (Predefined->Info.ArgumentList);
+ RequiredParamCount =
+ METHOD_GET_ARG_COUNT (Predefined->Info.ArgumentList);
/*
* If this object is not a control method, we can check if the ACPI
@@ -283,7 +284,8 @@ AcpiNsCheckArgumentCount (
* Some methods are allowed to have a "minimum" number of args (_SCP)
* because their definition in ACPI has changed over time.
*/
- RequiredParamCount = METHOD_GET_ARG_COUNT (Predefined->Info.ArgumentList);
+ RequiredParamCount =
+ METHOD_GET_ARG_COUNT (Predefined->Info.ArgumentList);
if (UserParamCount < RequiredParamCount)
{
diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c
index c3ca5b8679be2..84eeec1fa48a4 100644
--- a/source/components/namespace/nsconvert.c
+++ b/source/components/namespace/nsconvert.c
@@ -84,7 +84,7 @@ AcpiNsConvertToInteger (
/* String-to-Integer conversion */
Status = AcpiUtStrtoul64 (OriginalObject->String.Pointer,
- ACPI_ANY_BASE, &Value);
+ ACPI_ANY_BASE, &Value);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -104,7 +104,8 @@ AcpiNsConvertToInteger (
for (i = 0; i < OriginalObject->Buffer.Length; i++)
{
- Value |= ((UINT64) OriginalObject->Buffer.Pointer[i] << (i * 8));
+ Value |= ((UINT64)
+ OriginalObject->Buffer.Pointer[i] << (i * 8));
}
break;
@@ -167,8 +168,8 @@ AcpiNsConvertToString (
}
else
{
- Status = AcpiExConvertToString (OriginalObject, &NewObject,
- ACPI_IMPLICIT_CONVERT_HEX);
+ Status = AcpiExConvertToString (OriginalObject,
+ &NewObject, ACPI_IMPLICIT_CONVERT_HEX);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -263,7 +264,8 @@ AcpiNsConvertToBuffer (
/* String-to-Buffer conversion. Simple data copy */
- NewObject = AcpiUtCreateBufferObject (OriginalObject->String.Length);
+ NewObject = AcpiUtCreateBufferObject
+ (OriginalObject->String.Length);
if (!NewObject)
{
return (AE_NO_MEMORY);
diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c
index 0e692baf3f960..93e24df4c1d36 100644
--- a/source/components/namespace/nsdump.c
+++ b/source/components/namespace/nsdump.c
@@ -258,7 +258,8 @@ AcpiNsDumpOneObject (
if (Type > ACPI_TYPE_LOCAL_MAX)
{
- ACPI_WARNING ((AE_INFO, "Invalid ACPI Object Type 0x%08X", Type));
+ ACPI_WARNING ((AE_INFO,
+ "Invalid ACPI Object Type 0x%08X", Type));
}
AcpiOsPrintf ("%4.4s", AcpiUtGetNodeName (ThisNode));
@@ -267,7 +268,7 @@ AcpiNsDumpOneObject (
/* Now we can print out the pertinent information */
AcpiOsPrintf (" %-12s %p %2.2X ",
- AcpiUtGetTypeName (Type), ThisNode, ThisNode->OwnerId);
+ AcpiUtGetTypeName (Type), ThisNode, ThisNode->OwnerId);
DbgLevel = AcpiDbgLevel;
AcpiDbgLevel = 0;
@@ -354,7 +355,7 @@ AcpiNsDumpOneObject (
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
{
AcpiOsPrintf ("Len %.2X",
- ObjDesc->Buffer.Length);
+ ObjDesc->Buffer.Length);
/* Dump some of the buffer */
@@ -535,9 +536,9 @@ AcpiNsDumpOneObject (
/* If there is an attached object, display it */
- DbgLevel = AcpiDbgLevel;
+ DbgLevel = AcpiDbgLevel;
AcpiDbgLevel = 0;
- ObjDesc = AcpiNsGetAttachedObject (ThisNode);
+ ObjDesc = AcpiNsGetAttachedObject (ThisNode);
AcpiDbgLevel = DbgLevel;
/* Dump attached objects */
@@ -564,14 +565,18 @@ AcpiNsDumpOneObject (
if (ObjType > ACPI_TYPE_LOCAL_MAX)
{
- AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n",
+ AcpiOsPrintf (
+ "(Pointer to ACPI Object type %.2X [UNKNOWN])\n",
ObjType);
+
BytesToDump = 32;
}
else
{
- AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [%s])\n",
+ AcpiOsPrintf (
+ "(Pointer to ACPI Object type %.2X [%s])\n",
ObjType, AcpiUtGetTypeName (ObjType));
+
BytesToDump = sizeof (ACPI_OPERAND_OBJECT);
}
@@ -601,7 +606,8 @@ AcpiNsDumpOneObject (
*/
BytesToDump = ObjDesc->String.Length;
ObjDesc = (void *) ObjDesc->String.Pointer;
- AcpiOsPrintf ( "(Buffer/String pointer %p length %X)\n",
+
+ AcpiOsPrintf ("(Buffer/String pointer %p length %X)\n",
ObjDesc, BytesToDump);
ACPI_DUMP_BUFFER (ObjDesc, BytesToDump);
goto Cleanup;
@@ -702,8 +708,8 @@ AcpiNsDumpObjects (
Info.DisplayType = DisplayType;
(void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth,
- ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
- AcpiNsDumpOneObject, NULL, (void *) &Info, NULL);
+ ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
+ AcpiNsDumpOneObject, NULL, (void *) &Info, NULL);
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
}
@@ -753,7 +759,7 @@ AcpiNsDumpOneObjectPath (
return (AE_OK);
}
- Pathname = AcpiNsGetExternalPathname (Node);
+ Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
PathIndent = 1;
if (Level <= MaxLevel)
@@ -839,14 +845,14 @@ AcpiNsDumpObjectPaths (
/* Get the max depth of the namespace tree, for formatting later */
(void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth,
- ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
- AcpiNsGetMaxDepth, NULL, (void *) &MaxLevel, NULL);
+ ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
+ AcpiNsGetMaxDepth, NULL, (void *) &MaxLevel, NULL);
/* Now dump the entire namespace */
(void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth,
- ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
- AcpiNsDumpOneObjectPath, NULL, (void *) &MaxLevel, NULL);
+ ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
+ AcpiNsDumpOneObjectPath, NULL, (void *) &MaxLevel, NULL);
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
}
@@ -917,7 +923,8 @@ AcpiNsDumpTables (
* If the name space has not been initialized,
* there is nothing to dump.
*/
- ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "namespace not initialized!\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_TABLES,
+ "namespace not initialized!\n"));
return_VOID;
}
@@ -930,7 +937,7 @@ AcpiNsDumpTables (
}
AcpiNsDumpObjects (ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, MaxDepth,
- ACPI_OWNER_ID_MAX, SearchHandle);
+ ACPI_OWNER_ID_MAX, SearchHandle);
return_VOID;
}
#endif
diff --git a/source/components/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c
index 0bfc029e7cc7a..818694e5c1be1 100644
--- a/source/components/namespace/nsdumpdv.c
+++ b/source/components/namespace/nsdumpdv.c
@@ -149,8 +149,8 @@ AcpiNsDumpRootDevices (
"Display of all devices in the namespace:\n"));
Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, SysBusHandle,
- ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
- AcpiNsDumpOneDevice, NULL, NULL, NULL);
+ ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
+ AcpiNsDumpOneDevice, NULL, NULL, NULL);
}
#endif
diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c
index bc7cdcfcc688f..0509c80e7a0c7 100644
--- a/source/components/namespace/nseval.c
+++ b/source/components/namespace/nseval.c
@@ -144,7 +144,7 @@ AcpiNsEvaluate (
/* Get the full pathname to the object, for use in warning messages */
- Info->FullPathname = AcpiNsGetExternalPathname (Info->Node);
+ Info->FullPathname = AcpiNsGetNormalizedPathname (Info->Node, TRUE);
if (!Info->FullPathname)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -441,7 +441,7 @@ AcpiNsExecModuleCode (
* of the method object descriptor.
*/
ParentNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
- MethodObj->Method.NextObject);
+ MethodObj->Method.NextObject);
Type = AcpiNsGetType (ParentNode);
/*
@@ -480,7 +480,7 @@ AcpiNsExecModuleCode (
/* Install the method (module-level code) in the parent node */
Status = AcpiNsAttachObject (ParentNode, MethodObj,
- ACPI_TYPE_METHOD);
+ ACPI_TYPE_METHOD);
if (ACPI_FAILURE (Status))
{
goto Exit;
diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c
index c80d2c88255a5..b2e2be324a0bd 100644
--- a/source/components/namespace/nsinit.c
+++ b/source/components/namespace/nsinit.c
@@ -110,8 +110,8 @@ AcpiNsInitializeObjects (
/* Walk entire namespace from the supplied root */
Status = AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, AcpiNsInitOneObject, NULL,
- &Info, NULL);
+ ACPI_UINT32_MAX, AcpiNsInitOneObject, NULL,
+ &Info, NULL);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
@@ -173,7 +173,7 @@ AcpiNsInitializeDevices (
/* Tree analysis: find all subtrees that contain _INI methods */
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, FALSE, AcpiNsFindIniMethods, NULL, &Info, NULL);
+ ACPI_UINT32_MAX, FALSE, AcpiNsFindIniMethods, NULL, &Info, NULL);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
@@ -207,7 +207,7 @@ AcpiNsInitializeDevices (
/* Walk namespace to execute all _INIs on present devices */
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, FALSE, AcpiNsInitOneDevice, NULL, &Info, NULL);
+ ACPI_UINT32_MAX, FALSE, AcpiNsInitOneDevice, NULL, &Info, NULL);
/*
* Any _OSI requests should be completed by now. If the BIOS has
@@ -631,7 +631,7 @@ AcpiNsInitOneDevice (
{
/* Ignore error and move on to next device */
- char *ScopeName = AcpiNsGetExternalPathname (Info->Node);
+ char *ScopeName = AcpiNsGetNormalizedPathname (DeviceNode, TRUE);
ACPI_EXCEPTION ((AE_INFO, Status, "during %s._INI execution",
ScopeName));
diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c
index f893348e9670b..b1b6afa70615c 100644
--- a/source/components/namespace/nsload.c
+++ b/source/components/namespace/nsload.c
@@ -259,8 +259,8 @@ AcpiNsDeleteSubtree (
ParentHandle = StartHandle;
- ChildHandle = NULL;
- Level = 1;
+ ChildHandle = NULL;
+ Level = 1;
/*
* Traverse the tree of objects until we bubble back up
@@ -271,7 +271,7 @@ AcpiNsDeleteSubtree (
/* Attempt to get the next object in this scope */
Status = AcpiGetNextObject (ACPI_TYPE_ANY, ParentHandle,
- ChildHandle, &NextChildHandle);
+ ChildHandle, &NextChildHandle);
ChildHandle = NextChildHandle;
@@ -282,7 +282,7 @@ AcpiNsDeleteSubtree (
/* Check if this object has any children */
if (ACPI_SUCCESS (AcpiGetNextObject (ACPI_TYPE_ANY, ChildHandle,
- NULL, &Dummy)))
+ NULL, &Dummy)))
{
/*
* There is at least one child of this object,
@@ -360,7 +360,6 @@ AcpiNsUnloadNamespace (
/* This function does the real work */
Status = AcpiNsDeleteSubtree (Handle);
-
return_ACPI_STATUS (Status);
}
#endif
diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c
index ea10930d1e4ba..d132d9e1c4cda 100644
--- a/source/components/namespace/nsnames.c
+++ b/source/components/namespace/nsnames.c
@@ -77,7 +77,6 @@ AcpiNsGetExternalPathname (
NameBuffer = AcpiNsGetNormalizedPathname (Node, FALSE);
-
return_PTR (NameBuffer);
}
@@ -105,7 +104,6 @@ AcpiNsGetPathnameLength (
Size = AcpiNsBuildNormalizedPath (Node, NULL, 0, FALSE);
-
return (Size);
}
@@ -165,7 +163,7 @@ AcpiNsHandleToPathname (
/* Build the path in the caller buffer */
(void) AcpiNsBuildNormalizedPath (Node, Buffer->Pointer,
- RequiredSize, NoTrailing);
+ RequiredSize, NoTrailing);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -246,6 +244,7 @@ AcpiNsBuildNormalizedPath (
{
ACPI_PATH_PUT8(FullPath, PathSize, AML_DUAL_NAME_PREFIX, Length);
}
+
ACPI_MOVE_32_TO_32 (Name, &NextNode->Name);
DoNoTrailing = NoTrailing;
for (i = 0; i < 4; i++)
@@ -260,8 +259,10 @@ AcpiNsBuildNormalizedPath (
ACPI_PATH_PUT8(FullPath, PathSize, c, Length);
}
}
+
NextNode = NextNode->Parent;
}
+
ACPI_PATH_PUT8(FullPath, PathSize, AML_ROOT_PREFIX, Length);
/* Reverse the path string */
@@ -269,7 +270,8 @@ AcpiNsBuildNormalizedPath (
if (Length <= PathSize)
{
Left = FullPath;
- Right = FullPath+Length-1;
+ Right = FullPath+Length - 1;
+
while (Left < Right)
{
c = *Left;
@@ -281,7 +283,7 @@ AcpiNsBuildNormalizedPath (
/* Append the trailing null */
BuildTrailingNull:
- ACPI_PATH_PUT8(FullPath, PathSize, '\0', Length);
+ ACPI_PATH_PUT8 (FullPath, PathSize, '\0', Length);
#undef ACPI_PATH_PUT8
@@ -331,7 +333,8 @@ AcpiNsGetNormalizedPathname (
NameBuffer = ACPI_ALLOCATE_ZEROED (Size);
if (!NameBuffer)
{
- ACPI_ERROR ((AE_INFO, "Could not allocate %u bytes", (UINT32) Size));
+ ACPI_ERROR ((AE_INFO,
+ "Could not allocate %u bytes", (UINT32) Size));
return_PTR (NULL);
}
diff --git a/source/components/namespace/nsobject.c b/source/components/namespace/nsobject.c
index a72fc93e4b52c..3bac53e3be019 100644
--- a/source/components/namespace/nsobject.c
+++ b/source/components/namespace/nsobject.c
@@ -145,7 +145,7 @@ AcpiNsAttachObject (
* Value passed is a name handle and that name has a
* non-null value. Use that name's value and type.
*/
- ObjDesc = ((ACPI_NAMESPACE_NODE *) Object)->Object;
+ ObjDesc = ((ACPI_NAMESPACE_NODE *) Object)->Object;
ObjectType = ((ACPI_NAMESPACE_NODE *) Object)->Type;
}
@@ -195,8 +195,8 @@ AcpiNsAttachObject (
LastObjDesc->Common.NextObject = Node->Object;
}
- Node->Type = (UINT8) ObjectType;
- Node->Object = ObjDesc;
+ Node->Type = (UINT8) ObjectType;
+ Node->Object = ObjDesc;
return_ACPI_STATUS (AE_OK);
}
diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c
index 996db01747fb0..331be76da6939 100644
--- a/source/components/namespace/nsparse.c
+++ b/source/components/namespace/nsparse.c
@@ -124,7 +124,7 @@ AcpiNsOneCompleteParse (
}
Status = AcpiDsInitAmlWalk (WalkState, ParseRoot, NULL,
- AmlStart, AmlLength, NULL, (UINT8) PassNumber);
+ AmlStart, AmlLength, NULL, (UINT8) PassNumber);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -143,7 +143,8 @@ AcpiNsOneCompleteParse (
if (StartNode && StartNode != AcpiGbl_RootNode)
{
- Status = AcpiDsScopeStackPush (StartNode, ACPI_TYPE_METHOD, WalkState);
+ Status = AcpiDsScopeStackPush (
+ StartNode, ACPI_TYPE_METHOD, WalkState);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -153,7 +154,8 @@ AcpiNsOneCompleteParse (
/* Parse the AML */
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "*PARSE* pass %u parse\n", PassNumber));
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "*PARSE* pass %u parse\n", PassNumber));
Status = AcpiPsParseAml (WalkState);
Cleanup:
@@ -197,8 +199,9 @@ AcpiNsParseTable (
* performs another complete parse of the AML.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 1\n"));
+
Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS1,
- TableIndex, StartNode);
+ TableIndex, StartNode);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -215,7 +218,7 @@ AcpiNsParseTable (
*/
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 2\n"));
Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2,
- TableIndex, StartNode);
+ TableIndex, StartNode);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/namespace/nsprepkg.c b/source/components/namespace/nsprepkg.c
index 599af7e6a563c..beec84de88fa2 100644
--- a/source/components/namespace/nsprepkg.c
+++ b/source/components/namespace/nsprepkg.c
@@ -171,8 +171,8 @@ AcpiNsCheckPackage (
/* Validate all elements of the returned package */
Status = AcpiNsCheckPackageElements (Info, Elements,
- Package->RetInfo.ObjectType1, Package->RetInfo.Count1,
- Package->RetInfo.ObjectType2, Package->RetInfo.Count2, 0);
+ Package->RetInfo.ObjectType1, Package->RetInfo.Count1,
+ Package->RetInfo.ObjectType2, Package->RetInfo.Count2, 0);
break;
case ACPI_PTYPE1_VAR:
@@ -183,7 +183,7 @@ AcpiNsCheckPackage (
for (i = 0; i < Count; i++)
{
Status = AcpiNsCheckObjectType (Info, Elements,
- Package->RetInfo.ObjectType1, i);
+ Package->RetInfo.ObjectType1, i);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -215,7 +215,7 @@ AcpiNsCheckPackage (
/* These are the required package elements (0, 1, or 2) */
Status = AcpiNsCheckObjectType (Info, Elements,
- Package->RetInfo3.ObjectType[i], i);
+ Package->RetInfo3.ObjectType[i], i);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -226,7 +226,7 @@ AcpiNsCheckPackage (
/* These are the optional package elements */
Status = AcpiNsCheckObjectType (Info, Elements,
- Package->RetInfo3.TailObjectType, i);
+ Package->RetInfo3.TailObjectType, i);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -240,8 +240,8 @@ AcpiNsCheckPackage (
/* First element is the (Integer) revision */
- Status = AcpiNsCheckObjectType (Info, Elements,
- ACPI_RTYPE_INTEGER, 0);
+ Status = AcpiNsCheckObjectType (
+ Info, Elements, ACPI_RTYPE_INTEGER, 0);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -259,8 +259,8 @@ AcpiNsCheckPackage (
/* First element is the (Integer) count of subpackages to follow */
- Status = AcpiNsCheckObjectType (Info, Elements,
- ACPI_RTYPE_INTEGER, 0);
+ Status = AcpiNsCheckObjectType (
+ Info, Elements, ACPI_RTYPE_INTEGER, 0);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -303,7 +303,8 @@ AcpiNsCheckPackage (
{
/* Create the new outer package and populate it */
- Status = AcpiNsWrapWithPackage (Info, ReturnObject, ReturnObjectPtr);
+ Status = AcpiNsWrapWithPackage (
+ Info, ReturnObject, ReturnObjectPtr);
if (ACPI_FAILURE (Status))
{
return (Status);
diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c
index 160d84308561b..d98e11022eefa 100644
--- a/source/components/namespace/nsrepair.c
+++ b/source/components/namespace/nsrepair.c
@@ -222,7 +222,7 @@ AcpiNsSimpleRepair (
ACPI_WARN_ALWAYS, "Found unexpected NULL package element"));
Status = AcpiNsRepairNullElement (Info, ExpectedBtypes,
- PackageIndex, ReturnObjectPtr);
+ PackageIndex, ReturnObjectPtr);
if (ACPI_SUCCESS (Status))
{
return (AE_OK); /* Repair was successful */
@@ -380,6 +380,7 @@ AcpiNsMatchSimpleRepair (
return (NULL);
}
+
ThisName++;
}
@@ -464,11 +465,13 @@ AcpiNsRepairNullElement (
/* Set the reference count according to the parent Package object */
- NewObject->Common.ReferenceCount = Info->ParentPackage->Common.ReferenceCount;
+ NewObject->Common.ReferenceCount =
+ Info->ParentPackage->Common.ReferenceCount;
ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
"%s: Converted NULL package element to expected %s at index %u\n",
- Info->FullPathname, AcpiUtGetObjectTypeName (NewObject), PackageIndex));
+ Info->FullPathname, AcpiUtGetObjectTypeName (NewObject),
+ PackageIndex));
*ReturnObjectPtr = NewObject;
Info->ReturnFlags |= ACPI_OBJECT_REPAIRED;
@@ -551,6 +554,7 @@ AcpiNsRemoveNullElements (
*Dest = *Source;
Dest++;
}
+
Source++;
}
@@ -607,8 +611,8 @@ AcpiNsWrapWithPackage (
/*
- * Create the new outer package and populate it. The new package will
- * have a single element, the lone sub-object.
+ * Create the new outer package and populate it. The new
+ * package will have a single element, the lone sub-object.
*/
PkgObjDesc = AcpiUtCreatePackageObject (1);
if (!PkgObjDesc)
diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c
index f68f8bcced320..17c3ce5c5e108 100644
--- a/source/components/namespace/nsrepair2.c
+++ b/source/components/namespace/nsrepair2.c
@@ -254,6 +254,7 @@ AcpiNsMatchComplexRepair (
{
return (ThisName);
}
+
ThisName++;
}
@@ -286,7 +287,7 @@ AcpiNsRepair_ALR (
Status = AcpiNsCheckSortedList (Info, ReturnObject, 0, 2, 1,
- ACPI_SORT_ASCENDING, "AmbientIlluminance");
+ ACPI_SORT_ASCENDING, "AmbientIlluminance");
return (Status);
}
@@ -339,7 +340,8 @@ AcpiNsRepair_FDE (
if (ReturnObject->Buffer.Length != ACPI_FDE_BYTE_BUFFER_SIZE)
{
- ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ ACPI_WARN_PREDEFINED ((AE_INFO,
+ Info->FullPathname, Info->NodeFlags,
"Incorrect return buffer length %u, expected %u",
ReturnObject->Buffer.Length, ACPI_FDE_DWORD_BUFFER_SIZE));
@@ -348,7 +350,8 @@ AcpiNsRepair_FDE (
/* Create the new (larger) buffer object */
- BufferObject = AcpiUtCreateBufferObject (ACPI_FDE_DWORD_BUFFER_SIZE);
+ BufferObject = AcpiUtCreateBufferObject (
+ ACPI_FDE_DWORD_BUFFER_SIZE);
if (!BufferObject)
{
return (AE_NO_MEMORY);
@@ -357,7 +360,8 @@ AcpiNsRepair_FDE (
/* Expand each byte to a DWORD */
ByteBuffer = ReturnObject->Buffer.Pointer;
- DwordBuffer = ACPI_CAST_PTR (UINT32, BufferObject->Buffer.Pointer);
+ DwordBuffer = ACPI_CAST_PTR (UINT32,
+ BufferObject->Buffer.Pointer);
for (i = 0; i < ACPI_FDE_FIELD_COUNT; i++)
{
@@ -510,7 +514,8 @@ AcpiNsRepair_CST (
if ((*OuterElements)->Package.Count == 0)
{
- ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ ACPI_WARN_PREDEFINED ((AE_INFO,
+ Info->FullPathname, Info->NodeFlags,
"SubPackage[%u] - removing entry due to zero count", i));
Removing = TRUE;
goto RemoveElement;
@@ -519,7 +524,8 @@ AcpiNsRepair_CST (
ObjDesc = (*OuterElements)->Package.Elements[1]; /* Index1 = Type */
if ((UINT32) ObjDesc->Integer.Value == 0)
{
- ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ ACPI_WARN_PREDEFINED ((AE_INFO,
+ Info->FullPathname, Info->NodeFlags,
"SubPackage[%u] - removing entry due to invalid Type(0)", i));
Removing = TRUE;
}
@@ -546,7 +552,7 @@ RemoveElement:
* C-state type, in ascending order.
*/
Status = AcpiNsCheckSortedList (Info, ReturnObject, 1, 4, 1,
- ACPI_SORT_ASCENDING, "C-State Type");
+ ACPI_SORT_ASCENDING, "C-State Type");
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -594,7 +600,8 @@ AcpiNsRepair_HID (
if (ReturnObject->String.Length == 0)
{
- ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ ACPI_WARN_PREDEFINED ((AE_INFO,
+ Info->FullPathname, Info->NodeFlags,
"Invalid zero-length _HID or _CID string"));
/* Return AE_OK anyway, let driver handle it */
@@ -756,8 +763,8 @@ AcpiNsRepair_PSS (
* incorrectly sorted, sort it. We sort by CpuFrequency, since this
* should be proportional to the power.
*/
- Status =AcpiNsCheckSortedList (Info, ReturnObject, 0, 6, 0,
- ACPI_SORT_DESCENDING, "CpuFrequency");
+ Status = AcpiNsCheckSortedList (Info, ReturnObject, 0, 6, 0,
+ ACPI_SORT_DESCENDING, "CpuFrequency");
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -778,7 +785,8 @@ AcpiNsRepair_PSS (
if ((UINT32) ObjDesc->Integer.Value > PreviousValue)
{
- ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ ACPI_WARN_PREDEFINED ((AE_INFO,
+ Info->FullPathname, Info->NodeFlags,
"SubPackage[%u,%u] - suspicious power dissipation values",
i-1, i));
}
@@ -832,7 +840,7 @@ AcpiNsRepair_TSS (
}
Status = AcpiNsCheckSortedList (Info, ReturnObject, 0, 5, 1,
- ACPI_SORT_DESCENDING, "PowerDissipation");
+ ACPI_SORT_DESCENDING, "PowerDissipation");
return (Status);
}
@@ -1064,6 +1072,7 @@ AcpiNsRemoveElement (
*Dest = *Source;
Dest++;
}
+
Source++;
}
diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c
index bdd4e8684e1a5..fa6fc87806d3b 100644
--- a/source/components/namespace/nssearch.c
+++ b/source/components/namespace/nssearch.c
@@ -112,7 +112,7 @@ AcpiNsSearchOneScope (
{
char *ScopeName;
- ScopeName = AcpiNsGetExternalPathname (ParentNode);
+ ScopeName = AcpiNsGetNormalizedPathname (ParentNode, TRUE);
if (ScopeName)
{
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
@@ -248,7 +248,7 @@ AcpiNsSearchParentTree (
* the actual name we are searching for. Typechecking comes later.
*/
Status = AcpiNsSearchOneScope (
- TargetName, ParentNode, ACPI_TYPE_ANY, ReturnNode);
+ TargetName, ParentNode, ACPI_TYPE_ANY, ReturnNode);
if (ACPI_SUCCESS (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c
index 35a96c1b4b027..126794fde5d45 100644
--- a/source/components/namespace/nsutils.c
+++ b/source/components/namespace/nsutils.c
@@ -196,9 +196,10 @@ AcpiNsGetInternalNameLength (
Info->FullyQualified = FALSE;
/*
- * For the internal name, the required length is 4 bytes per segment, plus
- * 1 each for RootPrefix, MultiNamePrefixOp, segment count, trailing null
- * (which is not really needed, but no there's harm in putting it there)
+ * For the internal name, the required length is 4 bytes per segment,
+ * plus 1 each for RootPrefix, MultiNamePrefixOp, segment count,
+ * trailing null (which is not really needed, but no there's harm in
+ * putting it there)
*
* strlen() + 1 covers the first NameSeg, which has no path separator
*/
@@ -243,7 +244,7 @@ AcpiNsGetInternalNameLength (
}
Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) +
- 4 + Info->NumCarats;
+ 4 + Info->NumCarats;
Info->NextExternalChar = NextExternalChar;
}
@@ -574,7 +575,7 @@ AcpiNsExternalizeName (
* punctuation ('.') between object names, plus the NULL terminator.
*/
RequiredLength = PrefixLength + (4 * NumSegments) +
- ((NumSegments > 0) ? (NumSegments - 1) : 0) + 1;
+ ((NumSegments > 0) ? (NumSegments - 1) : 0) + 1;
/*
* Check to see if we're still in bounds. If not, there's a problem
@@ -612,7 +613,8 @@ AcpiNsExternalizeName (
/* Copy and validate the 4-char name segment */
- ACPI_MOVE_NAME (&(*ConvertedName)[j], &InternalName[NamesIndex]);
+ ACPI_MOVE_NAME (&(*ConvertedName)[j],
+ &InternalName[NamesIndex]);
AcpiUtRepairName (&(*ConvertedName)[j]);
j += ACPI_NAME_SIZE;
@@ -813,6 +815,7 @@ AcpiNsGetNode (
{
*ReturnNode = AcpiGbl_RootNode;
}
+
return_ACPI_STATUS (AE_OK);
}
@@ -847,12 +850,12 @@ AcpiNsGetNode (
/* Lookup the name in the namespace */
Status = AcpiNsLookup (&ScopeInfo, InternalPath, ACPI_TYPE_ANY,
- ACPI_IMODE_EXECUTE, (Flags | ACPI_NS_DONT_OPEN_SCOPE),
- NULL, ReturnNode);
+ ACPI_IMODE_EXECUTE, (Flags | ACPI_NS_DONT_OPEN_SCOPE),
+ NULL, ReturnNode);
if (ACPI_FAILURE (Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s, %s\n",
- Pathname, AcpiFormatException (Status)));
+ Pathname, AcpiFormatException (Status)));
}
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c
index c1cec4347697b..2deee0eb3827f 100644
--- a/source/components/namespace/nswalk.c
+++ b/source/components/namespace/nswalk.c
@@ -218,10 +218,10 @@ AcpiNsWalkNamespace (
/* Null child means "get first node" */
- ParentNode = StartNode;
- ChildNode = AcpiNsGetNextNode (ParentNode, NULL);
- ChildType = ACPI_TYPE_ANY;
- Level = 1;
+ ParentNode = StartNode;
+ ChildNode = AcpiNsGetNextNode (ParentNode, NULL);
+ ChildType = ACPI_TYPE_ANY;
+ Level = 1;
/*
* Traverse the tree of nodes until we bubble back up to where we
@@ -279,7 +279,7 @@ AcpiNsWalkNamespace (
if (DescendingCallback)
{
Status = DescendingCallback (ChildNode, Level,
- Context, ReturnValue);
+ Context, ReturnValue);
}
}
else
@@ -287,7 +287,7 @@ AcpiNsWalkNamespace (
if (AscendingCallback)
{
Status = AscendingCallback (ChildNode, Level,
- Context, ReturnValue);
+ Context, ReturnValue);
}
}
diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c
index 1a867bda8366c..e279f40959c52 100644
--- a/source/components/namespace/nsxfeval.c
+++ b/source/components/namespace/nsxfeval.c
@@ -432,13 +432,13 @@ AcpiEvaluateObject (
/* Get the size of the returned object */
Status = AcpiUtGetObjectSize (Info->ReturnObject,
- &BufferSpaceNeeded);
+ &BufferSpaceNeeded);
if (ACPI_SUCCESS (Status))
{
/* Validate/Allocate/Clear caller buffer */
Status = AcpiUtInitializeBuffer (ReturnBuffer,
- BufferSpaceNeeded);
+ BufferSpaceNeeded);
if (ACPI_FAILURE (Status))
{
/*
@@ -454,8 +454,8 @@ AcpiEvaluateObject (
{
/* We have enough space for the object, build it */
- Status = AcpiUtCopyIobjectToEobject (Info->ReturnObject,
- ReturnBuffer);
+ Status = AcpiUtCopyIobjectToEobject (
+ Info->ReturnObject, ReturnBuffer);
}
}
}
@@ -668,8 +668,8 @@ AcpiWalkNamespace (
}
Status = AcpiNsWalkNamespace (Type, StartObject, MaxDepth,
- ACPI_NS_WALK_UNLOCK, DescendingCallback,
- AscendingCallback, Context, ReturnValue);
+ ACPI_NS_WALK_UNLOCK, DescendingCallback,
+ AscendingCallback, Context, ReturnValue);
UnlockAndExit2:
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
@@ -820,8 +820,8 @@ AcpiNsGetDeviceCallback (
/* We have a valid device, invoke the user function */
- Status = Info->UserFunction (ObjHandle, NestingLevel, Info->Context,
- ReturnValue);
+ Status = Info->UserFunction (ObjHandle, NestingLevel,
+ Info->Context, ReturnValue);
return (Status);
}
@@ -876,8 +876,8 @@ AcpiGetDevices (
* We're going to call their callback from OUR callback, so we need
* to know what it is, and their context parameter.
*/
- Info.Hid = HID;
- Info.Context = Context;
+ Info.Hid = HID;
+ Info.Context = Context;
Info.UserFunction = UserFunction;
/*
@@ -893,8 +893,8 @@ AcpiGetDevices (
}
Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
- AcpiNsGetDeviceCallback, NULL, &Info, ReturnValue);
+ ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
+ AcpiNsGetDeviceCallback, NULL, &Info, ReturnValue);
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (Status);
diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c
index 311431b2de842..757e6bc7675a7 100644
--- a/source/components/namespace/nsxfname.c
+++ b/source/components/namespace/nsxfname.c
@@ -177,7 +177,7 @@ AcpiGetName (
{
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node;
- char *NodeName;
+ const char *NodeName;
/* Parameter validation */
@@ -199,7 +199,7 @@ AcpiGetName (
/* Get the full pathname (From the namespace root) */
Status = AcpiNsHandleToPathname (Handle, Buffer,
- NameType == ACPI_FULL_PATHNAME ? FALSE : TRUE);
+ NameType == ACPI_FULL_PATHNAME ? FALSE : TRUE);
return (Status);
}
@@ -265,7 +265,6 @@ AcpiNsCopyDeviceId (
ACPI_PNP_DEVICE_ID *Source,
char *StringArea)
{
-
/* Create the destination PNP_DEVICE_ID */
Dest->String = StringArea;
@@ -291,11 +290,18 @@ AcpiNsCopyDeviceId (
* namespace node and possibly by running several standard
* control methods (Such as in the case of a device.)
*
- * For Device and Processor objects, run the Device _HID, _UID, _CID, _SUB,
- * _CLS, _STA, _ADR, _SxW, and _SxD methods.
+ * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA,
+ * _CLS, _ADR, _SxW, and _SxD methods.
*
* Note: Allocates the return buffer, must be freed by the caller.
*
+ * Note: This interface is intended to be used during the initial device
+ * discovery namespace traversal. Therefore, no complex methods can be
+ * executed, especially those that access operation regions. Therefore, do
+ * not add any additional methods that could cause problems in this area.
+ * this was the fate of the _SUB method which was found to cause such
+ * problems and was removed (11/2015).
+ *
******************************************************************************/
ACPI_STATUS
@@ -308,7 +314,6 @@ AcpiGetObjectInfo (
ACPI_PNP_DEVICE_ID_LIST *CidList = NULL;
ACPI_PNP_DEVICE_ID *Hid = NULL;
ACPI_PNP_DEVICE_ID *Uid = NULL;
- ACPI_PNP_DEVICE_ID *Sub = NULL;
ACPI_PNP_DEVICE_ID *Cls = NULL;
char *NextIdString;
ACPI_OBJECT_TYPE Type;
@@ -362,7 +367,7 @@ AcpiGetObjectInfo (
{
/*
* Get extra info for ACPI Device/Processor objects only:
- * Run the Device _HID, _UID, _SUB, _CID, and _CLS methods.
+ * Run the Device _HID, _UID, _CLS, and _CID methods.
*
* Note: none of these methods are required, so they may or may
* not be present for this device. The Info->Valid bitfield is used
@@ -387,15 +392,6 @@ AcpiGetObjectInfo (
Valid |= ACPI_VALID_UID;
}
- /* Execute the Device._SUB method */
-
- Status = AcpiUtExecute_SUB (Node, &Sub);
- if (ACPI_SUCCESS (Status))
- {
- InfoSize += Sub->Length;
- Valid |= ACPI_VALID_SUB;
- }
-
/* Execute the Device._CID method */
Status = AcpiUtExecute_CID (Node, &CidList);
@@ -458,7 +454,7 @@ AcpiGetObjectInfo (
/* Execute the Device._ADR method */
Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, Node,
- &Info->Address);
+ &Info->Address);
if (ACPI_SUCCESS (Status))
{
Valid |= ACPI_VALID_ADR;
@@ -467,8 +463,8 @@ AcpiGetObjectInfo (
/* Execute the Device._SxW methods */
Status = AcpiUtExecutePowerMethods (Node,
- AcpiGbl_LowestDstateNames, ACPI_NUM_SxW_METHODS,
- Info->LowestDstates);
+ AcpiGbl_LowestDstateNames, ACPI_NUM_SxW_METHODS,
+ Info->LowestDstates);
if (ACPI_SUCCESS (Status))
{
Valid |= ACPI_VALID_SXWS;
@@ -477,8 +473,8 @@ AcpiGetObjectInfo (
/* Execute the Device._SxD methods */
Status = AcpiUtExecutePowerMethods (Node,
- AcpiGbl_HighestDstateNames, ACPI_NUM_SxD_METHODS,
- Info->HighestDstates);
+ AcpiGbl_HighestDstateNames, ACPI_NUM_SxD_METHODS,
+ Info->HighestDstates);
if (ACPI_SUCCESS (Status))
{
Valid |= ACPI_VALID_SXDS;
@@ -498,9 +494,8 @@ AcpiGetObjectInfo (
}
/*
- * Copy the HID, UID, SUB, and CIDs to the return buffer.
- * The variable-length strings are copied to the reserved area
- * at the end of the buffer.
+ * Copy the HID, UID, and CIDs to the return buffer. The variable-length
+ * strings are copied to the reserved area at the end of the buffer.
*
* For HID and CID, check if the ID is a PCI Root Bridge.
*/
@@ -521,12 +516,6 @@ AcpiGetObjectInfo (
Uid, NextIdString);
}
- if (Sub)
- {
- NextIdString = AcpiNsCopyDeviceId (&Info->SubsystemId,
- Sub, NextIdString);
- }
-
if (CidList)
{
Info->CompatibleIdList.Count = CidList->Count;
@@ -573,10 +562,6 @@ Cleanup:
{
ACPI_FREE (Uid);
}
- if (Sub)
- {
- ACPI_FREE (Sub);
- }
if (CidList)
{
ACPI_FREE (CidList);
@@ -652,6 +637,7 @@ AcpiInstallMethod (
ParserState.Aml += AcpiPsGetOpcodeSize (Opcode);
ParserState.PkgEnd = AcpiPsGetNextPackageEnd (&ParserState);
Path = AcpiPsGetNextNamestring (&ParserState);
+
MethodFlags = *ParserState.Aml++;
AmlStart = ParserState.Aml;
AmlLength = ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart);
@@ -684,7 +670,7 @@ AcpiInstallMethod (
/* The lookup either returns an existing node or creates a new one */
Status = AcpiNsLookup (NULL, Path, ACPI_TYPE_METHOD, ACPI_IMODE_LOAD_PASS1,
- ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, NULL, &Node);
+ ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, NULL, &Node);
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
diff --git a/source/components/namespace/nsxfobj.c b/source/components/namespace/nsxfobj.c
index 6fed2b8709c3d..b23c32e02d36f 100644
--- a/source/components/namespace/nsxfobj.c
+++ b/source/components/namespace/nsxfobj.c
@@ -81,10 +81,8 @@ AcpiGetType (
return (AE_BAD_PARAMETER);
}
- /*
- * Special case for the predefined Root Node
- * (return type ANY)
- */
+ /* Special case for the predefined Root Node (return type ANY) */
+
if (Handle == ACPI_ROOT_OBJECT)
{
*RetType = ACPI_TYPE_ANY;
@@ -108,7 +106,6 @@ AcpiGetType (
*RetType = Node->Type;
-
Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return (Status);
}
diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c
index 538b73eebd1fc..7876a0eb49887 100644
--- a/source/components/parser/psargs.c
+++ b/source/components/parser/psargs.c
@@ -287,8 +287,8 @@ AcpiPsGetNextNamepath (
* the upsearch)
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Path,
- ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
- ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
/*
* If this name is a control method invocation, we must
@@ -359,7 +359,7 @@ AcpiPsGetNextNamepath (
/* 1) NotFound is ok during load pass 1/2 (allow forward references) */
if ((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) !=
- ACPI_PARSE_EXECUTE)
+ ACPI_PARSE_EXECUTE)
{
Status = AE_OK;
}
@@ -391,7 +391,7 @@ AcpiPsGetNextNamepath (
ACPI_ERROR_NAMESPACE (Path, Status);
if ((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) ==
- ACPI_PARSE_EXECUTE)
+ ACPI_PARSE_EXECUTE)
{
/* Report a control method execution error */
@@ -787,6 +787,7 @@ AcpiPsGetNextArg (
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
+
AcpiPsGetNextSimpleArg (ParserState, ArgType, Arg);
break;
@@ -835,7 +836,7 @@ AcpiPsGetNextArg (
/* Non-empty list */
Arg = AcpiPsAllocOp (AML_INT_BYTELIST_OP,
- ParserState->Aml);
+ ParserState->Aml);
if (!Arg)
{
return_ACPI_STATUS (AE_NO_MEMORY);
diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c
index 244037fac11fa..044cf9d3e77ef 100644
--- a/source/components/parser/psloop.c
+++ b/source/components/parser/psloop.c
@@ -120,7 +120,8 @@ AcpiPsGetArguments (
case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */
- Status = AcpiPsGetNextNamepath (WalkState, &(WalkState->ParserState), Op, 1);
+ Status = AcpiPsGetNextNamepath (
+ WalkState, &(WalkState->ParserState), Op, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -133,12 +134,13 @@ AcpiPsGetArguments (
/*
* Op is not a constant or string, append each argument to the Op
*/
- while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) && !WalkState->ArgCount)
+ while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) &&
+ !WalkState->ArgCount)
{
WalkState->Aml = WalkState->ParserState.Aml;
Status = AcpiPsGetNextArg (WalkState, &(WalkState->ParserState),
- GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
+ GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -550,7 +552,7 @@ AcpiPsParseLoop (
* prepare for argument
*/
Status = AcpiPsPushScope (ParserState, Op,
- WalkState->ArgTypes, WalkState->ArgCount);
+ WalkState->ArgTypes, WalkState->ArgCount);
if (ACPI_FAILURE (Status))
{
Status = AcpiPsCompleteOp (WalkState, &Op, Status);
diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c
index b9d8e8ce69bb1..8acde2e16133e 100644
--- a/source/components/parser/psobject.c
+++ b/source/components/parser/psobject.c
@@ -109,7 +109,7 @@ AcpiPsGetAmlOpcode (
if (WalkState->PassNumber == 2)
{
AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml,
- WalkState->ParserState.AmlStart);
+ WalkState->ParserState.AmlStart);
ACPI_ERROR ((AE_INFO,
"Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring",
@@ -151,7 +151,8 @@ AcpiPsGetAmlOpcode (
/* Found opcode info, this is a normal opcode */
- WalkState->ParserState.Aml += AcpiPsGetOpcodeSize (WalkState->Opcode);
+ WalkState->ParserState.Aml +=
+ AcpiPsGetOpcodeSize (WalkState->Opcode);
WalkState->ArgTypes = WalkState->OpInfo->ParseArgs;
break;
}
@@ -201,7 +202,7 @@ AcpiPsBuildNamedOp (
(GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) != ARGP_NAME))
{
Status = AcpiPsGetNextArg (WalkState, &(WalkState->ParserState),
- GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
+ GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c
index 49ab6313a1acb..d4d045a2686cb 100644
--- a/source/components/parser/psparse.c
+++ b/source/components/parser/psparse.c
@@ -200,8 +200,8 @@ AcpiPsCompleteThisOp (
* These opcodes contain TermArg operands. The current
* op must be replaced by a placeholder return op
*/
- ReplacementOp = AcpiPsAllocOp (AML_INT_RETURN_VALUE_OP,
- Op->Common.Aml);
+ ReplacementOp = AcpiPsAllocOp (
+ AML_INT_RETURN_VALUE_OP, Op->Common.Aml);
if (!ReplacementOp)
{
Status = AE_NO_MEMORY;
@@ -220,8 +220,8 @@ AcpiPsCompleteThisOp (
(Op->Common.Parent->Common.AmlOpcode == AML_BANK_FIELD_OP) ||
(Op->Common.Parent->Common.AmlOpcode == AML_VAR_PACKAGE_OP))
{
- ReplacementOp = AcpiPsAllocOp (AML_INT_RETURN_VALUE_OP,
- Op->Common.Aml);
+ ReplacementOp = AcpiPsAllocOp (
+ AML_INT_RETURN_VALUE_OP, Op->Common.Aml);
if (!ReplacementOp)
{
Status = AE_NO_MEMORY;
@@ -235,7 +235,7 @@ AcpiPsCompleteThisOp (
(Op->Common.AmlOpcode == AML_VAR_PACKAGE_OP))
{
ReplacementOp = AcpiPsAllocOp (Op->Common.AmlOpcode,
- Op->Common.Aml);
+ Op->Common.Aml);
if (!ReplacementOp)
{
Status = AE_NO_MEMORY;
@@ -251,8 +251,8 @@ AcpiPsCompleteThisOp (
default:
- ReplacementOp = AcpiPsAllocOp (AML_INT_RETURN_VALUE_OP,
- Op->Common.Aml);
+ ReplacementOp = AcpiPsAllocOp (
+ AML_INT_RETURN_VALUE_OP, Op->Common.Aml);
if (!ReplacementOp)
{
Status = AE_NO_MEMORY;
@@ -267,11 +267,11 @@ AcpiPsCompleteThisOp (
if (ReplacementOp)
{
- ReplacementOp->Common.Parent = Op->Common.Parent;
- ReplacementOp->Common.Value.Arg = NULL;
- ReplacementOp->Common.Node = Op->Common.Node;
+ ReplacementOp->Common.Parent = Op->Common.Parent;
+ ReplacementOp->Common.Value.Arg = NULL;
+ ReplacementOp->Common.Node = Op->Common.Node;
Op->Common.Parent->Common.Value.Arg = ReplacementOp;
- ReplacementOp->Common.Next = Op->Common.Next;
+ ReplacementOp->Common.Next = Op->Common.Next;
}
else
{
@@ -290,11 +290,11 @@ AcpiPsCompleteThisOp (
{
if (ReplacementOp)
{
- ReplacementOp->Common.Parent = Op->Common.Parent;
+ ReplacementOp->Common.Parent = Op->Common.Parent;
ReplacementOp->Common.Value.Arg = NULL;
- ReplacementOp->Common.Node = Op->Common.Node;
- Prev->Common.Next = ReplacementOp;
- ReplacementOp->Common.Next = Op->Common.Next;
+ ReplacementOp->Common.Node = Op->Common.Node;
+ Prev->Common.Next = ReplacementOp;
+ ReplacementOp->Common.Next = Op->Common.Next;
Next = NULL;
}
else
@@ -494,7 +494,8 @@ AcpiPsParseAml (
*/
if (WalkState->MethodDesc)
{
- WalkState->Thread->CurrentSyncLevel = WalkState->MethodDesc->Method.SyncLevel;
+ WalkState->Thread->CurrentSyncLevel =
+ WalkState->MethodDesc->Method.SyncLevel;
}
AcpiDsPushWalkState (WalkState, Thread);
@@ -540,8 +541,8 @@ AcpiPsParseAml (
}
/*
- * If the transfer to the new method method call worked, a new walk
- * state was created -- get it
+ * If the transfer to the new method method call worked
+ *, a new walk state was created -- get it
*/
WalkState = AcpiDsGetCurrentWalkState (Thread);
continue;
@@ -560,7 +561,8 @@ AcpiPsParseAml (
/* Check for possible multi-thread reentrancy problem */
if ((Status == AE_ALREADY_EXISTS) &&
- (!(WalkState->MethodDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED)))
+ (!(WalkState->MethodDesc->Method.InfoFlags &
+ ACPI_METHOD_SERIALIZED)))
{
/*
* Method is not serialized and tried to create an object
@@ -586,7 +588,8 @@ AcpiPsParseAml (
* encountered an error during the method parse phase, there's lots of
* cleanup to do
*/
- if (((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) ||
+ if (((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) ==
+ ACPI_PARSE_EXECUTE) ||
(ACPI_FAILURE (Status)))
{
AcpiDsTerminateControlMethod (WalkState->MethodDesc, WalkState);
@@ -633,7 +636,7 @@ AcpiPsParseAml (
/* Restart the calling control method */
Status = AcpiDsRestartControlMethod (WalkState,
- PreviousWalkState->ImplicitReturnObj);
+ PreviousWalkState->ImplicitReturnObj);
}
else
{
@@ -644,7 +647,7 @@ AcpiPsParseAml (
AcpiDsClearImplicitReturn (PreviousWalkState);
Status = AcpiDsRestartControlMethod (WalkState,
- PreviousWalkState->ReturnDesc);
+ PreviousWalkState->ReturnDesc);
}
if (ACPI_SUCCESS (Status))
{
diff --git a/source/components/parser/psscope.c b/source/components/parser/psscope.c
index 09fbb10edb53a..a1779b829b15e 100644
--- a/source/components/parser/psscope.c
+++ b/source/components/parser/psscope.c
@@ -236,9 +236,9 @@ AcpiPsPopScope (
/* Return to parsing previous op */
- *Op = Scope->ParseScope.Op;
- *ArgList = Scope->ParseScope.ArgList;
- *ArgCount = Scope->ParseScope.ArgCount;
+ *Op = Scope->ParseScope.Op;
+ *ArgList = Scope->ParseScope.ArgList;
+ *ArgCount = Scope->ParseScope.ArgCount;
ParserState->PkgEnd = Scope->ParseScope.PkgEnd;
/* All done with this scope state structure */
@@ -249,8 +249,8 @@ AcpiPsPopScope (
{
/* Empty parse stack, prepare to fetch next opcode */
- *Op = NULL;
- *ArgList = 0;
+ *Op = NULL;
+ *ArgList = 0;
*ArgCount = 0;
}
diff --git a/source/components/parser/psutils.c b/source/components/parser/psutils.c
index ec0d20c8e0827..b7bebab58aac9 100644
--- a/source/components/parser/psutils.c
+++ b/source/components/parser/psutils.c
@@ -105,8 +105,8 @@ AcpiPsInitOp (
Op->Common.AmlOpcode = Opcode;
ACPI_DISASM_ONLY_MEMBERS (strncpy (Op->Common.AmlOpName,
- (AcpiPsGetOpcodeInfo (Opcode))->Name,
- sizeof (Op->Common.AmlOpName)));
+ (AcpiPsGetOpcodeInfo (Opcode))->Name,
+ sizeof (Op->Common.AmlOpName)));
}
@@ -205,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)
diff --git a/source/components/parser/pswalk.c b/source/components/parser/pswalk.c
index 2cc2fb5cf58b4..69d71f3b2da41 100644
--- a/source/components/parser/pswalk.c
+++ b/source/components/parser/pswalk.c
@@ -106,6 +106,7 @@ AcpiPsDeleteParseTree (
{
return_VOID;
}
+
if (Next)
{
Op = Next;
diff --git a/source/components/parser/psxface.c b/source/components/parser/psxface.c
index ae072b7dce7b4..273a75ad33106 100644
--- a/source/components/parser/psxface.c
+++ b/source/components/parser/psxface.c
@@ -183,7 +183,7 @@ AcpiPsExecuteMethod (
Info->PassNumber = ACPI_IMODE_EXECUTE;
WalkState = AcpiDsCreateWalkState (
- Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
+ Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
if (!WalkState)
{
Status = AE_NO_MEMORY;
@@ -191,8 +191,8 @@ AcpiPsExecuteMethod (
}
Status = AcpiDsInitAmlWalk (WalkState, Op, Info->Node,
- Info->ObjDesc->Method.AmlStart,
- Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber);
+ Info->ObjDesc->Method.AmlStart,
+ Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -303,7 +303,8 @@ AcpiPsUpdateParameterList (
{
/* Ignore errors, just do them all */
- (void) AcpiUtUpdateObjectReference (Info->Parameters[i], Action);
+ (void) AcpiUtUpdateObjectReference (
+ Info->Parameters[i], Action);
}
}
}
diff --git a/source/components/resources/rsaddr.c b/source/components/resources/rsaddr.c
index 0ec02ef793f57..260f6c2dfd6f7 100644
--- a/source/components/resources/rsaddr.c
+++ b/source/components/resources/rsaddr.c
@@ -328,30 +328,35 @@ AcpiRsGetAddressCommon (
/* Validate the Resource Type */
- if ((Aml->Address.ResourceType > 2) && (Aml->Address.ResourceType < 0xC0))
+ if ((Aml->Address.ResourceType > 2) &&
+ (Aml->Address.ResourceType < 0xC0))
{
return (FALSE);
}
/* Get the Resource Type and General Flags */
- (void) AcpiRsConvertAmlToResource (Resource, Aml, AcpiRsConvertGeneralFlags);
+ (void) AcpiRsConvertAmlToResource (
+ Resource, Aml, AcpiRsConvertGeneralFlags);
/* Get the Type-Specific Flags (Memory and I/O descriptors only) */
if (Resource->Data.Address.ResourceType == ACPI_MEMORY_RANGE)
{
- (void) AcpiRsConvertAmlToResource (Resource, Aml, AcpiRsConvertMemFlags);
+ (void) AcpiRsConvertAmlToResource (
+ Resource, Aml, AcpiRsConvertMemFlags);
}
else if (Resource->Data.Address.ResourceType == ACPI_IO_RANGE)
{
- (void) AcpiRsConvertAmlToResource (Resource, Aml, AcpiRsConvertIoFlags);
+ (void) AcpiRsConvertAmlToResource (
+ Resource, Aml, AcpiRsConvertIoFlags);
}
else
{
/* Generic resource type, just grab the TypeSpecific byte */
- Resource->Data.Address.Info.TypeSpecific = Aml->Address.SpecificFlags;
+ Resource->Data.Address.Info.TypeSpecific =
+ Aml->Address.SpecificFlags;
}
return (TRUE);
@@ -382,22 +387,26 @@ AcpiRsSetAddressCommon (
/* Set the Resource Type and General Flags */
- (void) AcpiRsConvertResourceToAml (Resource, Aml, AcpiRsConvertGeneralFlags);
+ (void) AcpiRsConvertResourceToAml (
+ Resource, Aml, AcpiRsConvertGeneralFlags);
/* Set the Type-Specific Flags (Memory and I/O descriptors only) */
if (Resource->Data.Address.ResourceType == ACPI_MEMORY_RANGE)
{
- (void) AcpiRsConvertResourceToAml (Resource, Aml, AcpiRsConvertMemFlags);
+ (void) AcpiRsConvertResourceToAml (
+ Resource, Aml, AcpiRsConvertMemFlags);
}
else if (Resource->Data.Address.ResourceType == ACPI_IO_RANGE)
{
- (void) AcpiRsConvertResourceToAml (Resource, Aml, AcpiRsConvertIoFlags);
+ (void) AcpiRsConvertResourceToAml (
+ Resource, Aml, AcpiRsConvertIoFlags);
}
else
{
/* Generic resource type, just copy the TypeSpecific byte */
- Aml->Address.SpecificFlags = Resource->Data.Address.Info.TypeSpecific;
+ Aml->Address.SpecificFlags =
+ Resource->Data.Address.Info.TypeSpecific;
}
}
diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c
index d41dfeed78a42..5d3a92efc0d90 100644
--- a/source/components/resources/rscalc.c
+++ b/source/components/resources/rscalc.c
@@ -164,16 +164,17 @@ AcpiRsStreamOptionLength (
/*
- * The ResourceSourceIndex and ResourceSource are optional elements of some
- * Large-type resource descriptors.
+ * The ResourceSourceIndex and ResourceSource are optional elements of
+ * some Large-type resource descriptors.
*/
/*
- * If the length of the actual resource descriptor is greater than the ACPI
- * spec-defined minimum length, it means that a ResourceSourceIndex exists
- * and is followed by a (required) null terminated string. The string length
- * (including the null terminator) is the resource length minus the minimum
- * length, minus one byte for the ResourceSourceIndex itself.
+ * If the length of the actual resource descriptor is greater than the
+ * ACPI spec-defined minimum length, it means that a ResourceSourceIndex
+ * exists and is followed by a (required) null terminated string. The
+ * string length (including the null terminator) is the resource length
+ * minus the minimum length, minus one byte for the ResourceSourceIndex
+ * itself.
*/
if (ResourceLength > MinimumAmlResourceLength)
{
@@ -309,9 +310,9 @@ AcpiRsGetAmlLength (
* 16-Bit Address Resource:
* Add the size of the optional ResourceSource info
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize + AcpiRsStructOptionLength (
- &Resource->Data.Address16.ResourceSource));
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ AcpiRsStructOptionLength (
+ &Resource->Data.Address16.ResourceSource));
break;
@@ -320,9 +321,9 @@ AcpiRsGetAmlLength (
* 32-Bit Address Resource:
* Add the size of the optional ResourceSource info
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize + AcpiRsStructOptionLength (
- &Resource->Data.Address32.ResourceSource));
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ AcpiRsStructOptionLength (
+ &Resource->Data.Address32.ResourceSource));
break;
@@ -331,9 +332,9 @@ AcpiRsGetAmlLength (
* 64-Bit Address Resource:
* Add the size of the optional ResourceSource info
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize + AcpiRsStructOptionLength (
- &Resource->Data.Address64.ResourceSource));
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ AcpiRsStructOptionLength (
+ &Resource->Data.Address64.ResourceSource));
break;
@@ -343,8 +344,7 @@ AcpiRsGetAmlLength (
* Add the size of each additional optional interrupt beyond the
* required 1 (4 bytes for each UINT32 interrupt number)
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize +
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
((Resource->Data.ExtendedIrq.InterruptCount - 1) * 4) +
/* Add the size of the optional ResourceSource info */
@@ -356,7 +356,8 @@ AcpiRsGetAmlLength (
case ACPI_RESOURCE_TYPE_GPIO:
- TotalSize = (ACPI_RS_LENGTH) (TotalSize + (Resource->Data.Gpio.PinTableLength * 2) +
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ (Resource->Data.Gpio.PinTableLength * 2) +
Resource->Data.Gpio.ResourceSource.StringLength +
Resource->Data.Gpio.VendorLength);
@@ -365,7 +366,8 @@ AcpiRsGetAmlLength (
case ACPI_RESOURCE_TYPE_SERIAL_BUS:
- TotalSize = AcpiGbl_AmlResourceSerialBusSizes [Resource->Data.CommonSerialBus.Type];
+ TotalSize = AcpiGbl_AmlResourceSerialBusSizes [
+ Resource->Data.CommonSerialBus.Type];
TotalSize = (ACPI_RS_LENGTH) (TotalSize +
Resource->Data.I2cSerialBus.ResourceSource.StringLength +
@@ -544,12 +546,15 @@ AcpiRsGetListLength (
if (AmlResource->Gpio.VendorLength)
{
- ExtraStructBytes += AmlResource->Gpio.VendorOffset -
- AmlResource->Gpio.PinTableOffset + AmlResource->Gpio.VendorLength;
+ ExtraStructBytes +=
+ AmlResource->Gpio.VendorOffset -
+ AmlResource->Gpio.PinTableOffset +
+ AmlResource->Gpio.VendorLength;
}
else
{
- ExtraStructBytes += AmlResource->LargeHeader.ResourceLength +
+ ExtraStructBytes +=
+ AmlResource->LargeHeader.ResourceLength +
sizeof (AML_RESOURCE_LARGE_HEADER) -
AmlResource->Gpio.PinTableOffset;
}
@@ -559,7 +564,8 @@ AcpiRsGetListLength (
MinimumAmlResourceLength = AcpiGbl_ResourceAmlSerialBusSizes[
AmlResource->CommonSerialBus.Type];
- ExtraStructBytes += AmlResource->CommonSerialBus.ResourceLength -
+ ExtraStructBytes +=
+ AmlResource->CommonSerialBus.ResourceLength -
MinimumAmlResourceLength;
break;
@@ -574,7 +580,8 @@ AcpiRsGetListLength (
* Important: Round the size up for the appropriate alignment. This
* is a requirement on IA64.
*/
- if (AcpiUtGetResourceType (AmlBuffer) == ACPI_RESOURCE_NAME_SERIAL_BUS)
+ if (AcpiUtGetResourceType (AmlBuffer) ==
+ ACPI_RESOURCE_NAME_SERIAL_BUS)
{
BufferSize = AcpiGbl_ResourceStructSerialBusSizes[
AmlResource->CommonSerialBus.Type] + ExtraStructBytes;
@@ -582,10 +589,10 @@ AcpiRsGetListLength (
else
{
BufferSize = AcpiGbl_ResourceStructSizes[ResourceIndex] +
- ExtraStructBytes;
+ ExtraStructBytes;
}
- BufferSize = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (BufferSize);
+ BufferSize = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (BufferSize);
*SizeNeeded += BufferSize;
ACPI_DEBUG_PRINT ((ACPI_DB_RESOURCES,
@@ -722,7 +729,7 @@ AcpiRsGetPciRoutingTableLength (
else
{
TempSizeNeeded += AcpiNsGetPathnameLength (
- (*SubObjectList)->Reference.Node);
+ (*SubObjectList)->Reference.Node);
}
}
else
diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c
index 926d79b768c8e..3107ad43e2e40 100644
--- a/source/components/resources/rscreate.c
+++ b/source/components/resources/rscreate.c
@@ -86,8 +86,8 @@ AcpiBufferToResource (
/* Get the required length for the converted resource */
- Status = AcpiRsGetListLength (AmlBuffer, AmlBufferLength,
- &ListSizeNeeded);
+ Status = AcpiRsGetListLength (
+ AmlBuffer, AmlBufferLength, &ListSizeNeeded);
if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
Status = AE_OK;
@@ -109,7 +109,7 @@ AcpiBufferToResource (
/* Perform the AML-to-Resource conversion */
Status = AcpiUtWalkAmlResources (NULL, AmlBuffer, AmlBufferLength,
- AcpiRsConvertAmlToResources, &CurrentResourcePtr);
+ AcpiRsConvertAmlToResources, &CurrentResourcePtr);
if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
Status = AE_OK;
@@ -197,14 +197,14 @@ AcpiRsCreateResourceList (
Resource = OutputBuffer->Pointer;
Status = AcpiUtWalkAmlResources (NULL, AmlStart, AmlBufferLength,
- AcpiRsConvertAmlToResources, &Resource);
+ AcpiRsConvertAmlToResources, &Resource);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X\n",
- OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
+ OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
return_ACPI_STATUS (AE_OK);
}
@@ -255,8 +255,8 @@ AcpiRsCreatePciRoutingTable (
/* Get the required buffer length */
- Status = AcpiRsGetPciRoutingTableLength (PackageObject,
- &BufferSizeNeeded);
+ Status = AcpiRsGetPciRoutingTableLength (
+ PackageObject,&BufferSizeNeeded);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -278,10 +278,10 @@ AcpiRsCreatePciRoutingTable (
* package that in turn contains an UINT64 Address, a UINT8 Pin,
* a Name, and a UINT8 SourceIndex.
*/
- TopObjectList = PackageObject->Package.Elements;
+ TopObjectList = PackageObject->Package.Elements;
NumberOfElements = PackageObject->Package.Count;
- Buffer = OutputBuffer->Pointer;
- UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
+ Buffer = OutputBuffer->Pointer;
+ UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
for (Index = 0; Index < NumberOfElements; Index++)
{
@@ -295,9 +295,9 @@ AcpiRsCreatePciRoutingTable (
UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
/*
- * Fill in the Length field with the information we have at this point.
- * The minus four is to subtract the size of the UINT8 Source[4] member
- * because it is added below.
+ * Fill in the Length field with the information we have at this
+ * point. The minus four is to subtract the size of the UINT8
+ * Source[4] member because it is added below.
*/
UserPrt->Length = (sizeof (ACPI_PCI_ROUTING_TABLE) - 4);
@@ -323,7 +323,8 @@ AcpiRsCreatePciRoutingTable (
ObjDesc = SubObjectList[0];
if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
- ACPI_ERROR ((AE_INFO, "(PRT[%u].Address) Need Integer, found %s",
+ ACPI_ERROR ((AE_INFO,
+ "(PRT[%u].Address) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -366,12 +367,12 @@ AcpiRsCreatePciRoutingTable (
/* Use *remaining* length of the buffer as max for pathname */
PathBuffer.Length = OutputBuffer->Length -
- (UINT32) ((UINT8 *) UserPrt->Source -
- (UINT8 *) OutputBuffer->Pointer);
+ (UINT32) ((UINT8 *) UserPrt->Source -
+ (UINT8 *) OutputBuffer->Pointer);
PathBuffer.Pointer = UserPrt->Source;
- Status = AcpiNsHandleToPathname ((ACPI_HANDLE) Node,
- &PathBuffer, FALSE);
+ Status = AcpiNsHandleToPathname (
+ (ACPI_HANDLE) Node, &PathBuffer, FALSE);
/* +1 to include null terminator */
@@ -391,8 +392,8 @@ AcpiRsCreatePciRoutingTable (
case ACPI_TYPE_INTEGER:
/*
- * If this is a number, then the Source Name is NULL, since the
- * entire buffer was zeroed out, we can leave this alone.
+ * If this is a number, then the Source Name is NULL, since
+ * the entire buffer was zeroed out, we can leave this alone.
*
* Add to the Length field the length of the UINT32 NULL
*/
@@ -431,7 +432,7 @@ AcpiRsCreatePciRoutingTable (
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X\n",
- OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
+ OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
return_ACPI_STATUS (AE_OK);
}
@@ -472,8 +473,8 @@ AcpiRsCreateAmlResources (
/* Get the buffer size needed for the AML byte stream */
- Status = AcpiRsGetAmlLength (ResourceList->Pointer,
- ResourceList->Length, &AmlSizeNeeded);
+ Status = AcpiRsGetAmlLength (
+ ResourceList->Pointer, ResourceList->Length, &AmlSizeNeeded);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "AmlSizeNeeded=%X, %s\n",
(UINT32) AmlSizeNeeded, AcpiFormatException (Status)));
@@ -493,7 +494,7 @@ AcpiRsCreateAmlResources (
/* Do the conversion */
Status = AcpiRsConvertResourcesToAml (ResourceList->Pointer,
- AmlSizeNeeded, OutputBuffer->Pointer);
+ AmlSizeNeeded, OutputBuffer->Pointer);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c
index 6663317283294..04874c74233fd 100644
--- a/source/components/resources/rsdump.c
+++ b/source/components/resources/rsdump.c
@@ -545,6 +545,7 @@ AcpiRsOutString (
char *Title,
char *Value)
{
+
AcpiOsPrintf ("%27s : %s", Title, Value);
if (!*Value)
{
@@ -566,6 +567,7 @@ AcpiRsOutInteger16 (
char *Title,
UINT16 Value)
{
+
AcpiOsPrintf ("%27s : %4.4X\n", Title, Value);
}
@@ -574,6 +576,7 @@ AcpiRsOutInteger32 (
char *Title,
UINT32 Value)
{
+
AcpiOsPrintf ("%27s : %8.8X\n", Title, Value);
}
@@ -582,6 +585,7 @@ AcpiRsOutInteger64 (
char *Title,
UINT64 Value)
{
+
AcpiOsPrintf ("%27s : %8.8X%8.8X\n", Title,
ACPI_FORMAT_UINT64 (Value));
}
@@ -590,6 +594,7 @@ static void
AcpiRsOutTitle (
char *Title)
{
+
AcpiOsPrintf ("%27s : ", Title);
}
@@ -617,8 +622,7 @@ AcpiRsDumpByteList (
for (i = 0; i < Length; i++)
{
- AcpiOsPrintf ("%25s%2.2X : %2.2X\n",
- "Byte", i, Data[i]);
+ AcpiOsPrintf ("%25s%2.2X : %2.2X\n", "Byte", i, Data[i]);
}
}
@@ -634,6 +638,7 @@ AcpiRsDumpShortByteList (
{
AcpiOsPrintf ("%X ", Data[i]);
}
+
AcpiOsPrintf ("\n");
}
@@ -647,8 +652,7 @@ AcpiRsDumpDwordList (
for (i = 0; i < Length; i++)
{
- AcpiOsPrintf ("%25s%2.2X : %8.8X\n",
- "Dword", i, Data[i]);
+ AcpiOsPrintf ("%25s%2.2X : %8.8X\n", "Dword", i, Data[i]);
}
}
@@ -662,7 +666,6 @@ AcpiRsDumpWordList (
for (i = 0; i < Length; i++)
{
- AcpiOsPrintf ("%25s%2.2X : %4.4X\n",
- "Word", i, Data[i]);
+ AcpiOsPrintf ("%25s%2.2X : %4.4X\n", "Word", i, Data[i]);
}
}
diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c
index db910acd4c9c0..412835ff3129a 100644
--- a/source/components/resources/rslist.c
+++ b/source/components/resources/rslist.c
@@ -97,9 +97,12 @@ AcpiRsConvertAmlToResources (
/* Get the appropriate conversion info table */
AmlResource = ACPI_CAST_PTR (AML_RESOURCE, Aml);
- if (AcpiUtGetResourceType (Aml) == ACPI_RESOURCE_NAME_SERIAL_BUS)
+
+ if (AcpiUtGetResourceType (Aml) ==
+ ACPI_RESOURCE_NAME_SERIAL_BUS)
{
- if (AmlResource->CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)
+ if (AmlResource->CommonSerialBus.Type >
+ AML_RESOURCE_MAX_SERIALBUSTYPE)
{
ConversionTable = NULL;
}
@@ -107,15 +110,13 @@ AcpiRsConvertAmlToResources (
{
/* This is an I2C, SPI, or UART SerialBus descriptor */
- ConversionTable =
- AcpiGbl_ConvertResourceSerialBusDispatch[
- AmlResource->CommonSerialBus.Type];
+ ConversionTable = AcpiGbl_ConvertResourceSerialBusDispatch [
+ AmlResource->CommonSerialBus.Type];
}
}
else
{
- ConversionTable =
- AcpiGbl_GetResourceDispatch[ResourceIndex];
+ ConversionTable = AcpiGbl_GetResourceDispatch[ResourceIndex];
}
if (!ConversionTable)
@@ -210,7 +211,8 @@ AcpiRsConvertResourcesToAml (
if (Resource->Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
{
- if (Resource->Data.CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)
+ if (Resource->Data.CommonSerialBus.Type >
+ AML_RESOURCE_MAX_SERIALBUSTYPE)
{
ConversionTable = NULL;
}
@@ -236,8 +238,7 @@ AcpiRsConvertResourcesToAml (
}
Status = AcpiRsConvertResourceToAml (Resource,
- ACPI_CAST_PTR (AML_RESOURCE, Aml),
- ConversionTable);
+ ACPI_CAST_PTR (AML_RESOURCE, Aml), ConversionTable);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
@@ -248,8 +249,8 @@ AcpiRsConvertResourcesToAml (
/* Perform final sanity check on the new AML resource descriptor */
- Status = AcpiUtValidateResource (NULL,
- ACPI_CAST_PTR (AML_RESOURCE, Aml), NULL);
+ Status = AcpiUtValidateResource (
+ NULL, ACPI_CAST_PTR (AML_RESOURCE, Aml), NULL);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/source/components/resources/rsmisc.c b/source/components/resources/rsmisc.c
index 83f50aa95dacd..a47a8cce25667 100644
--- a/source/components/resources/rsmisc.c
+++ b/source/components/resources/rsmisc.c
@@ -121,7 +121,7 @@ AcpiRsConvertAmlToResource (
* Source is the external AML byte stream buffer,
* destination is the internal resource descriptor
*/
- Source = ACPI_ADD_PTR (void, Aml, Info->AmlOffset);
+ Source = ACPI_ADD_PTR (void, Aml, Info->AmlOffset);
Destination = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset);
switch (Info->Opcode)
@@ -200,8 +200,7 @@ AcpiRsConvertAmlToResource (
ItemCount = ACPI_GET8 (Source);
ACPI_SET8 (Destination, ItemCount);
- Resource->Length = Resource->Length +
- (Info->Value * ItemCount);
+ Resource->Length = Resource->Length + (Info->Value * ItemCount);
break;
case ACPI_RSC_COUNT_GPIO_RES:
@@ -273,7 +272,7 @@ AcpiRsConvertAmlToResource (
/* Generate and set the PIN data pointer */
Target = (char *) ACPI_ADD_PTR (void, Resource,
- (Resource->Length - ItemCount * 2));
+ (Resource->Length - ItemCount * 2));
*(UINT16 **) Destination = ACPI_CAST_PTR (UINT16, Target);
/* Copy the PIN data */
@@ -287,7 +286,7 @@ AcpiRsConvertAmlToResource (
/* Generate and set the ResourceSource string pointer */
Target = (char *) ACPI_ADD_PTR (void, Resource,
- (Resource->Length - ItemCount));
+ (Resource->Length - ItemCount));
*(UINT8 **) Destination = ACPI_CAST_PTR (UINT8, Target);
/* Copy the ResourceSource string */
@@ -301,7 +300,7 @@ AcpiRsConvertAmlToResource (
/* Generate and set the Vendor Data pointer */
Target = (char *) ACPI_ADD_PTR (void, Resource,
- (Resource->Length - ItemCount));
+ (Resource->Length - ItemCount));
*(UINT8 **) Destination = ACPI_CAST_PTR (UINT8, Target);
/* Copy the Vendor Data */
@@ -315,12 +314,13 @@ AcpiRsConvertAmlToResource (
/* Generate and set the ResourceSource string pointer */
Target = (char *) ACPI_ADD_PTR (void, Resource,
- (Resource->Length - ItemCount));
+ (Resource->Length - ItemCount));
*(UINT8 **) Destination = ACPI_CAST_PTR (UINT8, Target);
/* Copy the ResourceSource string */
- Source = ACPI_ADD_PTR (void, Aml, (ACPI_GET16 (Source) + Info->Value));
+ Source = ACPI_ADD_PTR (
+ void, Aml, (ACPI_GET16 (Source) + Info->Value));
AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode);
break;
@@ -442,7 +442,8 @@ Exit:
{
/* Round the resource struct length up to the next boundary (32 or 64) */
- Resource->Length = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (Resource->Length);
+ Resource->Length = (UINT32)
+ ACPI_ROUND_UP_TO_NATIVE_WORD (Resource->Length);
}
return_ACPI_STATUS (AE_OK);
}
@@ -498,7 +499,7 @@ AcpiRsConvertResourceToAml (
* Source is the internal resource descriptor,
* destination is the external AML byte stream buffer
*/
- Source = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset);
+ Source = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset);
Destination = ACPI_ADD_PTR (void, Aml, Info->AmlOffset);
switch (Info->Opcode)
@@ -507,7 +508,8 @@ AcpiRsConvertResourceToAml (
memset (Aml, 0, INIT_RESOURCE_LENGTH (Info));
AmlLength = INIT_RESOURCE_LENGTH (Info);
- AcpiRsSetResourceHeader (INIT_RESOURCE_TYPE (Info), AmlLength, Aml);
+ AcpiRsSetResourceHeader (
+ INIT_RESOURCE_TYPE (Info), AmlLength, Aml);
break;
case ACPI_RSC_INITGET:
@@ -549,7 +551,8 @@ AcpiRsConvertResourceToAml (
ItemCount = ACPI_GET8 (Source);
ACPI_SET8 (Destination, ItemCount);
- AmlLength = (UINT16) (AmlLength + (Info->Value * (ItemCount - 1)));
+ AmlLength = (UINT16)
+ (AmlLength + (Info->Value * (ItemCount - 1)));
break;
case ACPI_RSC_COUNT16:
@@ -575,7 +578,8 @@ AcpiRsConvertResourceToAml (
ItemCount = ACPI_GET16 (Source);
ACPI_SET16 (Destination, ItemCount);
- AmlLength = (UINT16) (AmlLength + (Info->Value * ItemCount));
+ AmlLength = (UINT16) (
+ AmlLength + (Info->Value * ItemCount));
AcpiRsSetResourceLength (AmlLength, Aml);
break;
@@ -636,7 +640,7 @@ AcpiRsConvertResourceToAml (
case ACPI_RSC_MOVE_GPIO_PIN:
Destination = (char *) ACPI_ADD_PTR (void, Aml,
- ACPI_GET16 (Destination));
+ ACPI_GET16 (Destination));
Source = * (UINT16 **) Source;
AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
break;
@@ -646,7 +650,7 @@ AcpiRsConvertResourceToAml (
/* Used for both ResourceSource string and VendorData */
Destination = (char *) ACPI_ADD_PTR (void, Aml,
- ACPI_GET16 (Destination));
+ ACPI_GET16 (Destination));
Source = * (UINT8 **) Source;
AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
break;
@@ -654,7 +658,7 @@ AcpiRsConvertResourceToAml (
case ACPI_RSC_MOVE_SERIAL_VEN:
Destination = (char *) ACPI_ADD_PTR (void, Aml,
- (AmlLength - ItemCount));
+ (AmlLength - ItemCount));
Source = * (UINT8 **) Source;
AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
break;
@@ -662,7 +666,7 @@ AcpiRsConvertResourceToAml (
case ACPI_RSC_MOVE_SERIAL_RES:
Destination = (char *) ACPI_ADD_PTR (void, Aml,
- (AmlLength - ItemCount));
+ (AmlLength - ItemCount));
Source = * (UINT8 **) Source;
AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
break;
@@ -679,7 +683,7 @@ AcpiRsConvertResourceToAml (
* Optional ResourceSource (Index and String)
*/
AmlLength = AcpiRsSetResourceSource (
- Aml, (ACPI_RS_LENGTH) AmlLength, Source);
+ Aml, (ACPI_RS_LENGTH) AmlLength, Source);
AcpiRsSetResourceLength (AmlLength, Aml);
break;
@@ -705,8 +709,8 @@ AcpiRsConvertResourceToAml (
/*
* 16-bit encoded bitmask (IRQ macro)
*/
- Temp16 = AcpiRsEncodeBitmask (Source,
- *ACPI_ADD_PTR (UINT8, Resource, Info->Value));
+ Temp16 = AcpiRsEncodeBitmask (
+ Source, *ACPI_ADD_PTR (UINT8, Resource, Info->Value));
ACPI_MOVE_16_TO_16 (Destination, &Temp16);
break;
@@ -729,7 +733,7 @@ AcpiRsConvertResourceToAml (
case ACPI_RSC_COMPARE_VALUE:
if (*ACPI_ADD_PTR (UINT8, Resource,
- COMPARE_TARGET (Info)) != COMPARE_VALUE (Info))
+ COMPARE_TARGET (Info)) != COMPARE_VALUE (Info))
{
goto Exit;
}
@@ -747,7 +751,7 @@ AcpiRsConvertResourceToAml (
* Control - Exit conversion if equal
*/
if (*ACPI_ADD_PTR (UINT8, Resource,
- COMPARE_TARGET (Info)) == COMPARE_VALUE (Info))
+ COMPARE_TARGET (Info)) == COMPARE_VALUE (Info))
{
goto Exit;
}
@@ -771,7 +775,8 @@ Exit:
#if 0
/* Previous resource validations */
- if (Aml->ExtAddress64.RevisionID != AML_RESOURCE_EXTENDED_ADDRESS_REVISION)
+ if (Aml->ExtAddress64.RevisionID !=
+ AML_RESOURCE_EXTENDED_ADDRESS_REVISION)
{
return_ACPI_STATUS (AE_SUPPORT);
}
diff --git a/source/components/resources/rsutils.c b/source/components/resources/rsutils.c
index a5517c6bff92f..bb48aef5fba80 100644
--- a/source/components/resources/rsutils.c
+++ b/source/components/resources/rsutils.c
@@ -185,20 +185,23 @@ AcpiRsMoveData (
case ACPI_RSC_MOVE16:
case ACPI_RSC_MOVE_GPIO_PIN:
- ACPI_MOVE_16_TO_16 (&ACPI_CAST_PTR (UINT16, Destination)[i],
- &ACPI_CAST_PTR (UINT16, Source)[i]);
+ ACPI_MOVE_16_TO_16 (
+ &ACPI_CAST_PTR (UINT16, Destination)[i],
+ &ACPI_CAST_PTR (UINT16, Source)[i]);
break;
case ACPI_RSC_MOVE32:
- ACPI_MOVE_32_TO_32 (&ACPI_CAST_PTR (UINT32, Destination)[i],
- &ACPI_CAST_PTR (UINT32, Source)[i]);
+ ACPI_MOVE_32_TO_32 (
+ &ACPI_CAST_PTR (UINT32, Destination)[i],
+ &ACPI_CAST_PTR (UINT32, Source)[i]);
break;
case ACPI_RSC_MOVE64:
- ACPI_MOVE_64_TO_64 (&ACPI_CAST_PTR (UINT64, Destination)[i],
- &ACPI_CAST_PTR (UINT64, Source)[i]);
+ ACPI_MOVE_64_TO_64 (
+ &ACPI_CAST_PTR (UINT64, Destination)[i],
+ &ACPI_CAST_PTR (UINT64, Source)[i]);
break;
default:
@@ -248,18 +251,18 @@ AcpiRsSetResourceLength (
{
/* Large descriptor -- bytes 1-2 contain the 16-bit length */
- ACPI_MOVE_16_TO_16 (&Aml->LargeHeader.ResourceLength, &ResourceLength);
+ ACPI_MOVE_16_TO_16 (
+ &Aml->LargeHeader.ResourceLength, &ResourceLength);
}
else
{
- /* Small descriptor -- bits 2:0 of byte 0 contain the length */
-
+ /*
+ * Small descriptor -- bits 2:0 of byte 0 contain the length
+ * Clear any existing length, preserving descriptor type bits
+ */
Aml->SmallHeader.DescriptorType = (UINT8)
-
- /* Clear any existing length, preserving descriptor type bits */
-
- ((Aml->SmallHeader.DescriptorType & ~ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK)
-
+ ((Aml->SmallHeader.DescriptorType &
+ ~ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK)
| ResourceLength);
}
}
@@ -378,8 +381,8 @@ AcpiRsGetResourceSource (
AmlResourceSource = ACPI_ADD_PTR (UINT8, Aml, MinimumLength);
/*
- * ResourceSource is present if the length of the descriptor is longer than
- * the minimum length.
+ * ResourceSource is present if the length of the descriptor is longer
+ * than the minimum length.
*
* Note: Some resource descriptors will have an additional null, so
* we add 1 to the minimum length.
@@ -397,8 +400,8 @@ AcpiRsGetResourceSource (
* String destination pointer is not specified; Set the String
* pointer to the end of the current ResourceSource structure.
*/
- ResourceSource->StringPtr = ACPI_ADD_PTR (char, ResourceSource,
- sizeof (ACPI_RESOURCE_SOURCE));
+ ResourceSource->StringPtr = ACPI_ADD_PTR (
+ char, ResourceSource, sizeof (ACPI_RESOURCE_SOURCE));
}
/*
@@ -410,13 +413,15 @@ AcpiRsGetResourceSource (
*/
TotalLength = (UINT32) strlen (
ACPI_CAST_PTR (char, &AmlResourceSource[1])) + 1;
+
TotalLength = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (TotalLength);
memset (ResourceSource->StringPtr, 0, TotalLength);
/* Copy the ResourceSource string to the destination */
- ResourceSource->StringLength = AcpiRsStrcpy (ResourceSource->StringPtr,
+ ResourceSource->StringLength = AcpiRsStrcpy (
+ ResourceSource->StringPtr,
ACPI_CAST_PTR (char, &AmlResourceSource[1]));
return ((ACPI_RS_LENGTH) TotalLength);
@@ -484,7 +489,8 @@ AcpiRsSetResourceSource (
* Add the length of the string (+ 1 for null terminator) to the
* final descriptor length
*/
- DescriptorLength += ((ACPI_RSDESC_SIZE) ResourceSource->StringLength + 1);
+ DescriptorLength += ((ACPI_RSDESC_SIZE)
+ ResourceSource->StringLength + 1);
}
/* Return the new total length of the AML descriptor */
@@ -527,8 +533,8 @@ AcpiRsGetPrtMethodData (
/* Execute the method, no parameters */
- Status = AcpiUtEvaluateObject (Node, METHOD_NAME__PRT,
- ACPI_BTYPE_PACKAGE, &ObjDesc);
+ Status = AcpiUtEvaluateObject (
+ Node, METHOD_NAME__PRT, ACPI_BTYPE_PACKAGE, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -581,8 +587,8 @@ AcpiRsGetCrsMethodData (
/* Execute the method, no parameters */
- Status = AcpiUtEvaluateObject (Node, METHOD_NAME__CRS,
- ACPI_BTYPE_BUFFER, &ObjDesc);
+ Status = AcpiUtEvaluateObject (
+ Node, METHOD_NAME__CRS, ACPI_BTYPE_BUFFER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -636,8 +642,8 @@ AcpiRsGetPrsMethodData (
/* Execute the method, no parameters */
- Status = AcpiUtEvaluateObject (Node, METHOD_NAME__PRS,
- ACPI_BTYPE_BUFFER, &ObjDesc);
+ Status = AcpiUtEvaluateObject (
+ Node, METHOD_NAME__PRS, ACPI_BTYPE_BUFFER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -691,8 +697,8 @@ AcpiRsGetAeiMethodData (
/* Execute the method, no parameters */
- Status = AcpiUtEvaluateObject (Node, METHOD_NAME__AEI,
- ACPI_BTYPE_BUFFER, &ObjDesc);
+ Status = AcpiUtEvaluateObject (
+ Node, METHOD_NAME__AEI, ACPI_BTYPE_BUFFER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -748,7 +754,8 @@ AcpiRsGetMethodData (
/* Execute the method, no parameters */
- Status = AcpiUtEvaluateObject (ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Handle),
+ Status = AcpiUtEvaluateObject (
+ ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Handle),
Path, ACPI_BTYPE_BUFFER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c
index 1008af010ff37..c1a9b1b60b13a 100644
--- a/source/components/resources/rsxface.c
+++ b/source/components/resources/rsxface.c
@@ -54,7 +54,7 @@
/* Local macros for 16,32-bit to 64-bit conversion */
#define ACPI_COPY_FIELD(Out, In, Field) ((Out)->Field = (In)->Field)
-#define ACPI_COPY_ADDRESS(Out, In) \
+#define ACPI_COPY_ADDRESS(Out, In) \
ACPI_COPY_FIELD(Out, In, ResourceType); \
ACPI_COPY_FIELD(Out, In, ProducerConsumer); \
ACPI_COPY_FIELD(Out, In, Decode); \
@@ -433,13 +433,15 @@ AcpiResourceToAddress64 (
{
case ACPI_RESOURCE_TYPE_ADDRESS16:
- Address16 = ACPI_CAST_PTR (ACPI_RESOURCE_ADDRESS16, &Resource->Data);
+ Address16 = ACPI_CAST_PTR (
+ ACPI_RESOURCE_ADDRESS16, &Resource->Data);
ACPI_COPY_ADDRESS (Out, Address16);
break;
case ACPI_RESOURCE_TYPE_ADDRESS32:
- Address32 = ACPI_CAST_PTR (ACPI_RESOURCE_ADDRESS32, &Resource->Data);
+ Address32 = ACPI_CAST_PTR (
+ ACPI_RESOURCE_ADDRESS32, &Resource->Data);
ACPI_COPY_ADDRESS (Out, Address32);
break;
@@ -504,8 +506,8 @@ AcpiGetVendorResource (
/* Walk the _CRS or _PRS resource list for this device */
- Status = AcpiWalkResources (DeviceHandle, Name, AcpiRsMatchVendorResource,
- &Info);
+ Status = AcpiWalkResources (
+ DeviceHandle, Name, AcpiRsMatchVendorResource, &Info);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -624,7 +626,8 @@ AcpiWalkResourceBuffer (
/* Buffer contains the resource list and length */
Resource = ACPI_CAST_PTR (ACPI_RESOURCE, Buffer->Pointer);
- ResourceEnd = ACPI_ADD_PTR (ACPI_RESOURCE, Buffer->Pointer, Buffer->Length);
+ ResourceEnd = ACPI_ADD_PTR (
+ ACPI_RESOURCE, Buffer->Pointer, Buffer->Length);
/* Walk the resource list until the EndTag is found (or buffer end) */
diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c
index 5769a8e705274..2943a08858022 100644
--- a/source/components/tables/tbdata.c
+++ b/source/components/tables/tbdata.c
@@ -122,7 +122,7 @@ AcpiTbAcquireTable (
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
- ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
+ ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
break;
default:
@@ -229,7 +229,7 @@ AcpiTbAcquireTempTable (
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
- ACPI_PHYSADDR_TO_PTR (Address));
+ ACPI_PHYSADDR_TO_PTR (Address));
if (!TableHeader)
{
return (AE_NO_MEMORY);
@@ -303,7 +303,7 @@ AcpiTbValidateTable (
if (!TableDesc->Pointer)
{
Status = AcpiTbAcquireTable (TableDesc, &TableDesc->Pointer,
- &TableDesc->Length, &TableDesc->Flags);
+ &TableDesc->Length, &TableDesc->Flags);
if (!TableDesc->Pointer)
{
Status = AE_NO_MEMORY;
@@ -444,6 +444,7 @@ AcpiTbVerifyTempTable (
AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
TableDesc->Signature.Ascii : "????",
ACPI_FORMAT_UINT64 (TableDesc->Address)));
+
goto InvalidateAndExit;
}
}
@@ -721,7 +722,7 @@ AcpiTbAllocateOwnerId (
if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount)
{
Status = AcpiUtAllocateOwnerId (
- &(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId));
+ &(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId));
}
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c
index bcbf576bc3680..bfb80e5557ae9 100644
--- a/source/components/tables/tbfadt.c
+++ b/source/components/tables/tbfadt.c
@@ -326,7 +326,7 @@ AcpiTbSelectAddress (
*
* FUNCTION: AcpiTbParseFadt
*
- * PARAMETERS: TableIndex - Index for the FADT
+ * PARAMETERS: None
*
* RETURN: None
*
@@ -337,7 +337,7 @@ AcpiTbSelectAddress (
void
AcpiTbParseFadt (
- UINT32 TableIndex)
+ void)
{
UINT32 Length;
ACPI_TABLE_HEADER *Table;
@@ -350,10 +350,10 @@ AcpiTbParseFadt (
* Get a local copy of the FADT and convert it to a common format
* Map entire FADT, assumed to be smaller than one page.
*/
- Length = AcpiGbl_RootTableList.Tables[TableIndex].Length;
+ Length = AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex].Length;
Table = AcpiOsMapMemory (
- AcpiGbl_RootTableList.Tables[TableIndex].Address, Length);
+ AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex].Address, Length);
if (!Table)
{
return;
diff --git a/source/components/tables/tbfind.c b/source/components/tables/tbfind.c
index 4d360ae8bee34..34cf12c13f47f 100644
--- a/source/components/tables/tbfind.c
+++ b/source/components/tables/tbfind.c
@@ -108,7 +108,7 @@ AcpiTbFindTable (
for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
{
if (memcmp (&(AcpiGbl_RootTableList.Tables[i].Signature),
- Header.Signature, ACPI_NAME_SIZE))
+ Header.Signature, ACPI_NAME_SIZE))
{
/* Not the requested table */
@@ -136,13 +136,13 @@ AcpiTbFindTable (
/* Check for table match on all IDs */
if (!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->Signature,
- Header.Signature, ACPI_NAME_SIZE) &&
+ Header.Signature, ACPI_NAME_SIZE) &&
(!OemId[0] ||
!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemId,
- Header.OemId, ACPI_OEM_ID_SIZE)) &&
+ Header.OemId, ACPI_OEM_ID_SIZE)) &&
(!OemTableId[0] ||
!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemTableId,
- Header.OemTableId, ACPI_OEM_TABLE_ID_SIZE)))
+ Header.OemTableId, ACPI_OEM_TABLE_ID_SIZE)))
{
*TableIndex = i;
diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c
index a98a68989ec49..6abcc86c013bd 100644
--- a/source/components/tables/tbinstal.c
+++ b/source/components/tables/tbinstal.c
@@ -83,7 +83,7 @@ AcpiTbCompareTables (
Status = AcpiTbAcquireTable (&AcpiGbl_RootTableList.Tables[TableIndex],
- &Table, &TableLength, &TableFlags);
+ &Table, &TableLength, &TableFlags);
if (ACPI_FAILURE (Status))
{
return (FALSE);
@@ -206,7 +206,7 @@ AcpiTbInstallFixedTable (
/* Fill a table descriptor for validation */
Status = AcpiTbAcquireTempTable (&NewTableDesc, Address,
- ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
+ ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
@@ -278,7 +278,8 @@ AcpiTbInstallStandardTable (
Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags);
if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
+ ACPI_ERROR ((AE_INFO,
+ "Could not acquire table length at %8.8X%8.8X",
ACPI_FORMAT_UINT64 (Address)));
return_ACPI_STATUS (Status);
}
@@ -291,7 +292,8 @@ AcpiTbInstallStandardTable (
AcpiGbl_DisableSsdtTableInstall &&
ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT))
{
- ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %8.8X%8.8X",
+ ACPI_INFO ((AE_INFO,
+ "Ignoring installation of %4.4s at %8.8X%8.8X",
NewTableDesc.Signature.Ascii, ACPI_FORMAT_UINT64 (Address)));
goto ReleaseAndExit;
}
@@ -359,7 +361,8 @@ AcpiTbInstallStandardTable (
* need to be unregistered when they are unloaded, and slots in the
* root table list should be reused when empty.
*/
- if (AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_IS_LOADED)
+ if (AcpiGbl_RootTableList.Tables[i].Flags &
+ ACPI_TABLE_IS_LOADED)
{
/* Table is still loaded, this is an error */
diff --git a/source/components/tables/tbprint.c b/source/components/tables/tbprint.c
index af73279cc6ee4..25f319967cd86 100644
--- a/source/components/tables/tbprint.c
+++ b/source/components/tables/tbprint.c
@@ -88,6 +88,7 @@ AcpiTbFixString (
{
*String = '?';
}
+
String++;
Length--;
}
@@ -156,8 +157,8 @@ AcpiTbPrintTableHeader (
{
/* RSDP has no common fields */
- memcpy (LocalHeader.OemId,
- ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->OemId, ACPI_OEM_ID_SIZE);
+ memcpy (LocalHeader.OemId, ACPI_CAST_PTR (ACPI_TABLE_RSDP,
+ Header)->OemId, ACPI_OEM_ID_SIZE);
AcpiTbFixString (LocalHeader.OemId, ACPI_OEM_ID_SIZE);
ACPI_INFO ((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c
index 988a3b18f6376..19daea867e35f 100644
--- a/source/components/tables/tbutils.c
+++ b/source/components/tables/tbutils.c
@@ -86,16 +86,16 @@ AcpiTbInitializeFacs (
return (AE_OK);
}
else if (AcpiGbl_FADT.XFacs &&
- (!AcpiGbl_FADT.Facs || !AcpiGbl_Use32BitFacsAddresses))
+ (!AcpiGbl_FADT.Facs || !AcpiGbl_Use32BitFacsAddresses))
{
(void) AcpiGetTableByIndex (AcpiGbl_XFacsIndex,
- ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
+ ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
AcpiGbl_FACS = Facs;
}
else if (AcpiGbl_FADT.Facs)
{
(void) AcpiGetTableByIndex (AcpiGbl_FacsIndex,
- ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
+ ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
AcpiGbl_FACS = Facs;
}
@@ -108,33 +108,6 @@ AcpiTbInitializeFacs (
/*******************************************************************************
*
- * FUNCTION: AcpiTbTablesLoaded
- *
- * PARAMETERS: None
- *
- * RETURN: TRUE if required ACPI tables are loaded
- *
- * DESCRIPTION: Determine if the minimum required ACPI tables are present
- * (FADT, FACS, DSDT)
- *
- ******************************************************************************/
-
-BOOLEAN
-AcpiTbTablesLoaded (
- void)
-{
-
- if (AcpiGbl_RootTableList.CurrentTableCount >= 4)
- {
- return (TRUE);
- }
-
- return (FALSE);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiTbCheckDsdtHeader
*
* PARAMETERS: None
@@ -160,6 +133,7 @@ AcpiTbCheckDsdtHeader (
ACPI_BIOS_ERROR ((AE_INFO,
"The DSDT has been corrupted or replaced - "
"old, new headers below"));
+
AcpiTbPrintTableHeader (0, &AcpiGbl_OriginalDsdtHeader);
AcpiTbPrintTableHeader (0, AcpiGbl_DSDT);
@@ -208,8 +182,8 @@ AcpiTbCopyDsdt (
AcpiTbInitTableDescriptor (
&AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex],
- ACPI_PTR_TO_PHYSADDR (NewTable), ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL,
- NewTable);
+ ACPI_PTR_TO_PHYSADDR (NewTable),
+ ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, NewTable);
ACPI_INFO ((AE_INFO,
"Forced DSDT copy: length 0x%05X copied locally, original unmapped",
@@ -254,7 +228,8 @@ AcpiTbGetRootTableEntry (
* 32-bit platform, RSDT: Return 32-bit table entry
* 64-bit platform, RSDT: Expand 32-bit to 64-bit and return
*/
- return ((ACPI_PHYSICAL_ADDRESS) (*ACPI_CAST_PTR (UINT32, TableEntry)));
+ return ((ACPI_PHYSICAL_ADDRESS) (*ACPI_CAST_PTR (
+ UINT32, TableEntry)));
}
else
{
@@ -420,10 +395,12 @@ AcpiTbParseRootTable (
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex);
if (ACPI_SUCCESS (Status) &&
- ACPI_COMPARE_NAME (&AcpiGbl_RootTableList.Tables[TableIndex].Signature,
+ ACPI_COMPARE_NAME (
+ &AcpiGbl_RootTableList.Tables[TableIndex].Signature,
ACPI_SIG_FADT))
{
- AcpiTbParseFadt (TableIndex);
+ AcpiGbl_FadtIndex = TableIndex;
+ AcpiTbParseFadt ();
}
NextTable:
@@ -432,7 +409,6 @@ NextTable:
}
AcpiOsUnmapMemory (Table, Length);
-
return_ACPI_STATUS (AE_OK);
}
diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c
index bcaf6af2a9906..f2c878618c805 100644
--- a/source/components/tables/tbxface.c
+++ b/source/components/tables/tbxface.c
@@ -246,8 +246,8 @@ AcpiGetTableHeader (
for (i = 0, j = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)
{
- if (!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
- Signature))
+ if (!ACPI_COMPARE_NAME (
+ &(AcpiGbl_RootTableList.Tables[i].Signature), Signature))
{
continue;
}
@@ -264,15 +264,14 @@ AcpiGetTableHeader (
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL)
{
Header = AcpiOsMapMemory (
- AcpiGbl_RootTableList.Tables[i].Address,
- sizeof (ACPI_TABLE_HEADER));
+ AcpiGbl_RootTableList.Tables[i].Address,
+ sizeof (ACPI_TABLE_HEADER));
if (!Header)
{
return (AE_NO_MEMORY);
}
- memcpy (OutTableHeader, Header,
- sizeof (ACPI_TABLE_HEADER));
+ memcpy (OutTableHeader, Header, sizeof (ACPI_TABLE_HEADER));
AcpiOsUnmapMemory (Header, sizeof (ACPI_TABLE_HEADER));
}
else
@@ -333,8 +332,8 @@ AcpiGetTable (
for (i = 0, j = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)
{
- if (!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
- Signature))
+ if (!ACPI_COMPARE_NAME (
+ &(AcpiGbl_RootTableList.Tables[i].Signature), Signature))
{
continue;
}
@@ -405,7 +404,8 @@ AcpiGetTableByIndex (
{
/* Table is not mapped, map it */
- Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[TableIndex]);
+ Status = AcpiTbValidateTable (
+ &AcpiGbl_RootTableList.Tables[TableIndex]);
if (ACPI_FAILURE (Status))
{
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c
index bd5f7d7bc41fe..b9b22259f11fc 100644
--- a/source/components/tables/tbxfload.c
+++ b/source/components/tables/tbxfload.c
@@ -210,6 +210,7 @@ AcpiTbLoadNamespace (
{
ACPI_EXCEPTION ((AE_INFO, Status, "(%4.4s:%8.8s) while loading table",
Table->Signature.Ascii, Table->Pointer->OemTableId));
+
TablesFailed++;
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
@@ -227,7 +228,7 @@ AcpiTbLoadNamespace (
if (!TablesFailed)
{
ACPI_INFO ((AE_INFO,
- "%u ACPI AML tables successfully acquired and loaded",
+ "%u ACPI AML tables successfully acquired and loaded\n",
TablesLoaded));
}
else
@@ -343,8 +344,8 @@ AcpiLoadTable (
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),
- ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, TRUE, FALSE,
- &TableIndex);
+ ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, TRUE, FALSE,
+ &TableIndex);
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
if (ACPI_FAILURE (Status))
@@ -356,7 +357,8 @@ AcpiLoadTable (
* Note: Now table is "INSTALLED", it must be validated before
* using.
*/
- Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[TableIndex]);
+ Status = AcpiTbValidateTable (
+ &AcpiGbl_RootTableList.Tables[TableIndex]);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@@ -369,7 +371,7 @@ AcpiLoadTable (
if (AcpiGbl_TableHandler)
{
(void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table,
- AcpiGbl_TableHandlerContext);
+ AcpiGbl_TableHandlerContext);
}
UnlockAndExit:
@@ -452,8 +454,8 @@ AcpiUnloadParentTable (
* that can create namespace objects.
*/
if (ACPI_COMPARE_NAME (
- AcpiGbl_RootTableList.Tables[i].Signature.Ascii,
- ACPI_SIG_DSDT))
+ AcpiGbl_RootTableList.Tables[i].Signature.Ascii,
+ ACPI_SIG_DSDT))
{
Status = AE_TYPE;
break;
@@ -472,8 +474,8 @@ AcpiUnloadParentTable (
if (AcpiGbl_TableHandler)
{
(void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD,
- AcpiGbl_RootTableList.Tables[i].Pointer,
- AcpiGbl_TableHandlerContext);
+ AcpiGbl_RootTableList.Tables[i].Pointer,
+ AcpiGbl_TableHandlerContext);
}
/*
diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c
index 92ace5cb02beb..455f13334dd28 100644
--- a/source/components/tables/tbxfroot.c
+++ b/source/components/tables/tbxfroot.c
@@ -171,8 +171,8 @@ AcpiFindRootPointer (
/* 1a) Get the location of the Extended BIOS Data Area (EBDA) */
TablePtr = AcpiOsMapMemory (
- (ACPI_PHYSICAL_ADDRESS) ACPI_EBDA_PTR_LOCATION,
- ACPI_EBDA_PTR_LENGTH);
+ (ACPI_PHYSICAL_ADDRESS) ACPI_EBDA_PTR_LOCATION,
+ ACPI_EBDA_PTR_LENGTH);
if (!TablePtr)
{
ACPI_ERROR ((AE_INFO,
@@ -198,8 +198,8 @@ AcpiFindRootPointer (
* minimum of 1K length)
*/
TablePtr = AcpiOsMapMemory (
- (ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
- ACPI_EBDA_WINDOW_SIZE);
+ (ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
+ ACPI_EBDA_WINDOW_SIZE);
if (!TablePtr)
{
ACPI_ERROR ((AE_INFO,
@@ -209,14 +209,16 @@ AcpiFindRootPointer (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_EBDA_WINDOW_SIZE);
+ MemRover = AcpiTbScanMemoryForRsdp (
+ TablePtr, ACPI_EBDA_WINDOW_SIZE);
AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE);
if (MemRover)
{
/* Return the physical address */
- PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr);
+ PhysicalAddress +=
+ (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr);
*TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
return_ACPI_STATUS (AE_OK);
@@ -227,8 +229,8 @@ AcpiFindRootPointer (
* 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
*/
TablePtr = AcpiOsMapMemory (
- (ACPI_PHYSICAL_ADDRESS) ACPI_HI_RSDP_WINDOW_BASE,
- ACPI_HI_RSDP_WINDOW_SIZE);
+ (ACPI_PHYSICAL_ADDRESS) ACPI_HI_RSDP_WINDOW_BASE,
+ ACPI_HI_RSDP_WINDOW_SIZE);
if (!TablePtr)
{
@@ -239,7 +241,8 @@ AcpiFindRootPointer (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
+ MemRover = AcpiTbScanMemoryForRsdp (
+ TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
AcpiOsUnmapMemory (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
if (MemRover)
@@ -297,7 +300,8 @@ AcpiTbScanMemoryForRsdp (
{
/* The RSDP signature and checksum must both be correct */
- Status = AcpiTbValidateRsdp (ACPI_CAST_PTR (ACPI_TABLE_RSDP, MemRover));
+ Status = AcpiTbValidateRsdp (
+ ACPI_CAST_PTR (ACPI_TABLE_RSDP, MemRover));
if (ACPI_SUCCESS (Status))
{
/* Sig and checksum valid, we have found a real RSDP */
diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c
index 2ebdea47e830f..3106c4d4e272b 100644
--- a/source/components/utilities/utaddress.c
+++ b/source/components/utilities/utaddress.c
@@ -263,7 +263,7 @@ AcpiUtCheckAddressRange (
OverlapCount++;
if (Warn) /* Optional warning message */
{
- Pathname = AcpiNsGetExternalPathname (RangeInfo->RegionNode);
+ Pathname = AcpiNsGetNormalizedPathname (RangeInfo->RegionNode, TRUE);
ACPI_WARNING ((AE_INFO,
"%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)",
diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c
index d0b5c920634c8..9fed8b84550f0 100644
--- a/source/components/utilities/utalloc.c
+++ b/source/components/utilities/utalloc.c
@@ -110,35 +110,35 @@ AcpiUtCreateCaches (
/* Object Caches, for frequently used objects */
Status = AcpiOsCreateCache ("Acpi-Namespace", sizeof (ACPI_NAMESPACE_NODE),
- ACPI_MAX_NAMESPACE_CACHE_DEPTH, &AcpiGbl_NamespaceCache);
+ ACPI_MAX_NAMESPACE_CACHE_DEPTH, &AcpiGbl_NamespaceCache);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Status = AcpiOsCreateCache ("Acpi-State", sizeof (ACPI_GENERIC_STATE),
- ACPI_MAX_STATE_CACHE_DEPTH, &AcpiGbl_StateCache);
+ ACPI_MAX_STATE_CACHE_DEPTH, &AcpiGbl_StateCache);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Status = AcpiOsCreateCache ("Acpi-Parse", sizeof (ACPI_PARSE_OBJ_COMMON),
- ACPI_MAX_PARSE_CACHE_DEPTH, &AcpiGbl_PsNodeCache);
+ ACPI_MAX_PARSE_CACHE_DEPTH, &AcpiGbl_PsNodeCache);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Status = AcpiOsCreateCache ("Acpi-ParseExt", sizeof (ACPI_PARSE_OBJ_NAMED),
- ACPI_MAX_EXTPARSE_CACHE_DEPTH, &AcpiGbl_PsNodeExtCache);
+ ACPI_MAX_EXTPARSE_CACHE_DEPTH, &AcpiGbl_PsNodeExtCache);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Status = AcpiOsCreateCache ("Acpi-Operand", sizeof (ACPI_OPERAND_OBJECT),
- ACPI_MAX_OBJECT_CACHE_DEPTH, &AcpiGbl_OperandCache);
+ ACPI_MAX_OBJECT_CACHE_DEPTH, &AcpiGbl_OperandCache);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -150,14 +150,14 @@ AcpiUtCreateCaches (
/* Memory allocation lists */
Status = AcpiUtCreateList ("Acpi-Global", 0,
- &AcpiGbl_GlobalList);
+ &AcpiGbl_GlobalList);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Status = AcpiUtCreateList ("Acpi-Namespace", sizeof (ACPI_NAMESPACE_NODE),
- &AcpiGbl_NsNodeList);
+ &AcpiGbl_NsNodeList);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -187,6 +187,7 @@ AcpiUtDeleteCaches (
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
char Buffer[7];
+
if (AcpiGbl_DisplayFinalMemStats)
{
strcpy (Buffer, "MEMORY");
diff --git a/source/components/utilities/utcache.c b/source/components/utilities/utcache.c
index 7a0f210dff6a7..01c04fab9335a 100644
--- a/source/components/utilities/utcache.c
+++ b/source/components/utilities/utcache.c
@@ -93,9 +93,9 @@ AcpiOsCreateCache (
/* Populate the cache object and return it */
memset (Cache, 0, sizeof (ACPI_MEMORY_LIST));
- Cache->ListName = CacheName;
+ Cache->ListName = CacheName;
Cache->ObjectSize = ObjectSize;
- Cache->MaxDepth = MaxDepth;
+ Cache->MaxDepth = MaxDepth;
*ReturnCache = Cache;
return (AE_OK);
diff --git a/source/components/utilities/utcopy.c b/source/components/utilities/utcopy.c
index dc5ecda7731cb..bab6b9f27013d 100644
--- a/source/components/utilities/utcopy.c
+++ b/source/components/utilities/utcopy.c
@@ -163,7 +163,7 @@ AcpiUtCopyIsimpleToEsimple (
ExternalObject->String.Pointer = (char *) DataSpace;
ExternalObject->String.Length = InternalObject->String.Length;
*BufferSpaceUsed = ACPI_ROUND_UP_TO_NATIVE_WORD (
- (ACPI_SIZE) InternalObject->String.Length + 1);
+ (ACPI_SIZE) InternalObject->String.Length + 1);
memcpy ((void *) DataSpace,
(void *) InternalObject->String.Pointer,
@@ -175,7 +175,7 @@ AcpiUtCopyIsimpleToEsimple (
ExternalObject->Buffer.Pointer = DataSpace;
ExternalObject->Buffer.Length = InternalObject->Buffer.Length;
*BufferSpaceUsed = ACPI_ROUND_UP_TO_NATIVE_WORD (
- InternalObject->String.Length);
+ InternalObject->String.Length);
memcpy ((void *) DataSpace,
(void *) InternalObject->Buffer.Pointer,
@@ -275,9 +275,9 @@ AcpiUtCopyIelementToEelement (
ACPI_FUNCTION_ENTRY ();
- ThisIndex = State->Pkg.Index;
- TargetObject = (ACPI_OBJECT *)
- &((ACPI_OBJECT *)(State->Pkg.DestObject))->Package.Elements[ThisIndex];
+ ThisIndex = State->Pkg.Index;
+ TargetObject = (ACPI_OBJECT *) &((ACPI_OBJECT *)
+ (State->Pkg.DestObject))->Package.Elements[ThisIndex];
switch (ObjectType)
{
@@ -286,7 +286,7 @@ AcpiUtCopyIelementToEelement (
* This is a simple or null object
*/
Status = AcpiUtCopyIsimpleToEsimple (SourceObject,
- TargetObject, Info->FreeSpace, &ObjectSpace);
+ TargetObject, Info->FreeSpace, &ObjectSpace);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -297,9 +297,9 @@ AcpiUtCopyIelementToEelement (
/*
* Build the package object
*/
- TargetObject->Type = ACPI_TYPE_PACKAGE;
- TargetObject->Package.Count = SourceObject->Package.Count;
- TargetObject->Package.Elements =
+ TargetObject->Type = ACPI_TYPE_PACKAGE;
+ TargetObject->Package.Count = SourceObject->Package.Count;
+ TargetObject->Package.Elements =
ACPI_CAST_PTR (ACPI_OBJECT, Info->FreeSpace);
/*
@@ -312,8 +312,8 @@ AcpiUtCopyIelementToEelement (
* update the buffer length counter
*/
ObjectSpace = ACPI_ROUND_UP_TO_NATIVE_WORD (
- (ACPI_SIZE) TargetObject->Package.Count *
- sizeof (ACPI_OBJECT));
+ (ACPI_SIZE) TargetObject->Package.Count *
+ sizeof (ACPI_OBJECT));
break;
default:
@@ -321,8 +321,8 @@ AcpiUtCopyIelementToEelement (
return (AE_BAD_PARAMETER);
}
- Info->FreeSpace += ObjectSpace;
- Info->Length += ObjectSpace;
+ Info->FreeSpace += ObjectSpace;
+ Info->Length += ObjectSpace;
return (Status);
}
@@ -368,28 +368,28 @@ AcpiUtCopyIpackageToEpackage (
/*
* Free space begins right after the first package
*/
- Info.Length = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
- Info.FreeSpace = Buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (
- sizeof (ACPI_OBJECT));
+ Info.Length = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
+ Info.FreeSpace = Buffer +
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
Info.ObjectSpace = 0;
Info.NumPackages = 1;
- ExternalObject->Type = InternalObject->Common.Type;
- ExternalObject->Package.Count = InternalObject->Package.Count;
- ExternalObject->Package.Elements = ACPI_CAST_PTR (ACPI_OBJECT,
- Info.FreeSpace);
+ ExternalObject->Type = InternalObject->Common.Type;
+ ExternalObject->Package.Count = InternalObject->Package.Count;
+ ExternalObject->Package.Elements =
+ ACPI_CAST_PTR (ACPI_OBJECT, Info.FreeSpace);
/*
* Leave room for an array of ACPI_OBJECTS in the buffer
* and move the free space past it
*/
- Info.Length += (ACPI_SIZE) ExternalObject->Package.Count *
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
+ Info.Length += (ACPI_SIZE) ExternalObject->Package.Count *
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
Info.FreeSpace += ExternalObject->Package.Count *
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
Status = AcpiUtWalkPackageTree (InternalObject, ExternalObject,
- AcpiUtCopyIelementToEelement, &Info);
+ AcpiUtCopyIelementToEelement, &Info);
*SpaceUsed = Info.Length;
return_ACPI_STATUS (Status);
@@ -428,7 +428,7 @@ AcpiUtCopyIobjectToEobject (
* nested packages)
*/
Status = AcpiUtCopyIpackageToEpackage (InternalObject,
- RetBuffer->Pointer, &RetBuffer->Length);
+ RetBuffer->Pointer, &RetBuffer->Length);
}
else
{
@@ -436,10 +436,10 @@ AcpiUtCopyIobjectToEobject (
* Build a simple object (no nested objects)
*/
Status = AcpiUtCopyIsimpleToEsimple (InternalObject,
- ACPI_CAST_PTR (ACPI_OBJECT, RetBuffer->Pointer),
- ACPI_ADD_PTR (UINT8, RetBuffer->Pointer,
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT))),
- &RetBuffer->Length);
+ ACPI_CAST_PTR (ACPI_OBJECT, RetBuffer->Pointer),
+ ACPI_ADD_PTR (UINT8, RetBuffer->Pointer,
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT))),
+ &RetBuffer->Length);
/*
* build simple does not include the object size in the length
* so we add it in here
@@ -489,7 +489,7 @@ AcpiUtCopyEsimpleToIsimple (
case ACPI_TYPE_LOCAL_REFERENCE:
InternalObject = AcpiUtCreateInternalObject (
- (UINT8) ExternalObject->Type);
+ (UINT8) ExternalObject->Type);
if (!InternalObject)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -529,10 +529,10 @@ AcpiUtCopyEsimpleToIsimple (
}
memcpy (InternalObject->String.Pointer,
- ExternalObject->String.Pointer,
- ExternalObject->String.Length);
+ ExternalObject->String.Pointer,
+ ExternalObject->String.Length);
- InternalObject->String.Length = ExternalObject->String.Length;
+ InternalObject->String.Length = ExternalObject->String.Length;
break;
case ACPI_TYPE_BUFFER:
@@ -545,10 +545,10 @@ AcpiUtCopyEsimpleToIsimple (
}
memcpy (InternalObject->Buffer.Pointer,
- ExternalObject->Buffer.Pointer,
- ExternalObject->Buffer.Length);
+ ExternalObject->Buffer.Pointer,
+ ExternalObject->Buffer.Length);
- InternalObject->Buffer.Length = ExternalObject->Buffer.Length;
+ InternalObject->Buffer.Length = ExternalObject->Buffer.Length;
/* Mark buffer data valid */
@@ -557,7 +557,7 @@ AcpiUtCopyEsimpleToIsimple (
case ACPI_TYPE_INTEGER:
- InternalObject->Integer.Value = ExternalObject->Integer.Value;
+ InternalObject->Integer.Value = ExternalObject->Integer.Value;
break;
case ACPI_TYPE_LOCAL_REFERENCE:
@@ -615,7 +615,8 @@ AcpiUtCopyEpackageToIpackage (
/* Create the package object */
- PackageObject = AcpiUtCreatePackageObject (ExternalObject->Package.Count);
+ PackageObject = AcpiUtCreatePackageObject (
+ ExternalObject->Package.Count);
if (!PackageObject)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -624,14 +625,14 @@ AcpiUtCopyEpackageToIpackage (
PackageElements = PackageObject->Package.Elements;
/*
- * Recursive implementation. Probably ok, since nested external packages
- * as parameters should be very rare.
+ * Recursive implementation. Probably ok, since nested external
+ * packages as parameters should be very rare.
*/
for (i = 0; i < ExternalObject->Package.Count; i++)
{
Status = AcpiUtCopyEobjectToIobject (
- &ExternalObject->Package.Elements[i],
- &PackageElements[i]);
+ &ExternalObject->Package.Elements[i],
+ &PackageElements[i]);
if (ACPI_FAILURE (Status))
{
/* Truncate package and delete it */
@@ -678,14 +679,16 @@ AcpiUtCopyEobjectToIobject (
if (ExternalObject->Type == ACPI_TYPE_PACKAGE)
{
- Status = AcpiUtCopyEpackageToIpackage (ExternalObject, InternalObject);
+ Status = AcpiUtCopyEpackageToIpackage (
+ ExternalObject, InternalObject);
}
else
{
/*
* Build a simple object (no nested objects)
*/
- Status = AcpiUtCopyEsimpleToIsimple (ExternalObject, InternalObject);
+ Status = AcpiUtCopyEsimpleToIsimple (ExternalObject,
+ InternalObject);
}
return_ACPI_STATUS (Status);
@@ -836,7 +839,7 @@ AcpiUtCopySimpleObject (
case ACPI_TYPE_EVENT:
Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT, 0,
- &DestDesc->Event.OsSemaphore);
+ &DestDesc->Event.OsSemaphore);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -882,9 +885,9 @@ AcpiUtCopyIelementToIelement (
ACPI_FUNCTION_ENTRY ();
- ThisIndex = State->Pkg.Index;
+ ThisIndex = State->Pkg.Index;
ThisTargetPtr = (ACPI_OPERAND_OBJECT **)
- &State->Pkg.DestObject->Package.Elements[ThisIndex];
+ &State->Pkg.DestObject->Package.Elements[ThisIndex];
switch (ObjectType)
{
@@ -898,7 +901,7 @@ AcpiUtCopyIelementToIelement (
* This is a simple object, just copy it
*/
TargetObject = AcpiUtCreateInternalObject (
- SourceObject->Common.Type);
+ SourceObject->Common.Type);
if (!TargetObject)
{
return (AE_NO_MEMORY);
@@ -925,7 +928,8 @@ AcpiUtCopyIelementToIelement (
* This object is a package - go down another nesting level
* Create and build the package object
*/
- TargetObject = AcpiUtCreatePackageObject (SourceObject->Package.Count);
+ TargetObject = AcpiUtCreatePackageObject (
+ SourceObject->Package.Count);
if (!TargetObject)
{
return (AE_NO_MEMORY);
@@ -982,16 +986,16 @@ AcpiUtCopyIpackageToIpackage (
ACPI_FUNCTION_TRACE (UtCopyIpackageToIpackage);
- DestObj->Common.Type = SourceObj->Common.Type;
- DestObj->Common.Flags = SourceObj->Common.Flags;
- DestObj->Package.Count = SourceObj->Package.Count;
+ DestObj->Common.Type = SourceObj->Common.Type;
+ DestObj->Common.Flags = SourceObj->Common.Flags;
+ DestObj->Package.Count = SourceObj->Package.Count;
/*
* Create the object array and walk the source package tree
*/
DestObj->Package.Elements = ACPI_ALLOCATE_ZEROED (
- ((ACPI_SIZE) SourceObj->Package.Count + 1) *
- sizeof (void *));
+ ((ACPI_SIZE) SourceObj->Package.Count + 1) *
+ sizeof (void *));
if (!DestObj->Package.Elements)
{
ACPI_ERROR ((AE_INFO, "Package allocation failure"));
@@ -1003,7 +1007,7 @@ AcpiUtCopyIpackageToIpackage (
* This handles nested packages of arbitrary depth.
*/
Status = AcpiUtWalkPackageTree (SourceObj, DestObj,
- AcpiUtCopyIelementToIelement, WalkState);
+ AcpiUtCopyIelementToIelement, WalkState);
if (ACPI_FAILURE (Status))
{
/* On failure, delete the destination package object */
@@ -1053,8 +1057,8 @@ AcpiUtCopyIobjectToIobject (
if (SourceDesc->Common.Type == ACPI_TYPE_PACKAGE)
{
- Status = AcpiUtCopyIpackageToIpackage (SourceDesc, *DestDesc,
- WalkState);
+ Status = AcpiUtCopyIpackageToIpackage (
+ SourceDesc, *DestDesc, WalkState);
}
else
{
@@ -1065,7 +1069,7 @@ AcpiUtCopyIobjectToIobject (
if (ACPI_FAILURE (Status))
{
- AcpiUtRemoveReference(*DestDesc);
+ AcpiUtRemoveReference (*DestDesc);
}
return_ACPI_STATUS (Status);
diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c
index fc21e205845b7..e8f380f0c51fb 100644
--- a/source/components/utilities/utdecode.c
+++ b/source/components/utilities/utdecode.c
@@ -119,7 +119,7 @@ const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
};
-char *
+const char *
AcpiUtGetRegionName (
UINT8 SpaceId)
{
@@ -141,7 +141,7 @@ AcpiUtGetRegionName (
return ("InvalidSpaceId");
}
- return (ACPI_CAST_PTR (char, AcpiGbl_RegionTypes[SpaceId]));
+ return (AcpiGbl_RegionTypes[SpaceId]);
}
@@ -169,7 +169,7 @@ static const char *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] =
};
-char *
+const char *
AcpiUtGetEventName (
UINT32 EventId)
{
@@ -179,7 +179,7 @@ AcpiUtGetEventName (
return ("InvalidEventID");
}
- return (ACPI_CAST_PTR (char, AcpiGbl_EventTypes[EventId]));
+ return (AcpiGbl_EventTypes[EventId]);
}
@@ -201,7 +201,8 @@ AcpiUtGetEventName (
*
* The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching;
* when stored in a table it really means that we have thus far seen no
- * evidence to indicate what type is actually going to be stored for this entry.
+ * evidence to indicate what type is actually going to be stored for this
+ & entry.
*/
static const char AcpiGbl_BadType[] = "UNDEFINED";
@@ -243,21 +244,21 @@ static const char *AcpiGbl_NsTypeNames[] =
};
-char *
+const char *
AcpiUtGetTypeName (
ACPI_OBJECT_TYPE Type)
{
if (Type > ACPI_TYPE_INVALID)
{
- return (ACPI_CAST_PTR (char, AcpiGbl_BadType));
+ return (AcpiGbl_BadType);
}
- return (ACPI_CAST_PTR (char, AcpiGbl_NsTypeNames[Type]));
+ return (AcpiGbl_NsTypeNames[Type]);
}
-char *
+const char *
AcpiUtGetObjectTypeName (
ACPI_OPERAND_OBJECT *ObjDesc)
{
@@ -299,7 +300,7 @@ AcpiUtGetObjectTypeName (
*
******************************************************************************/
-char *
+const char *
AcpiUtGetNodeName (
void *Object)
{
@@ -375,7 +376,7 @@ static const char *AcpiGbl_DescTypeNames[] =
};
-char *
+const char *
AcpiUtGetDescriptorName (
void *Object)
{
@@ -390,9 +391,7 @@ AcpiUtGetDescriptorName (
return ("Not a Descriptor");
}
- return (ACPI_CAST_PTR (char,
- AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]));
-
+ return (AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]);
}
@@ -469,7 +468,7 @@ AcpiUtGetReferenceName (
/* Names for internal mutex objects, used for debug output */
-static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] =
+static const char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] =
{
"ACPI_MTX_Interpreter",
"ACPI_MTX_Namespace",
@@ -479,7 +478,7 @@ static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] =
"ACPI_MTX_Memory",
};
-char *
+const char *
AcpiUtGetMutexName (
UINT32 MutexId)
{
diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c
index 17ccacb6e2a25..95521f060d3e7 100644
--- a/source/components/utilities/utdelete.c
+++ b/source/components/utilities/utdelete.c
@@ -220,6 +220,7 @@ AcpiUtDeleteInternalObj (
AcpiUtDeleteObjectDesc (Object->Method.Mutex);
Object->Method.Mutex = NULL;
}
+
if (Object->Method.Node)
{
Object->Method.Node = NULL;
@@ -553,8 +554,8 @@ AcpiUtUpdateObjectReference (
}
/*
- * All sub-objects must have their reference count incremented also.
- * Different object types have different subobjects.
+ * All sub-objects must have their reference count incremented
+ * also. Different object types have different subobjects.
*/
switch (Object->Common.Type)
{
@@ -614,7 +615,7 @@ AcpiUtUpdateObjectReference (
* for later processing (this eliminates recursion.)
*/
Status = AcpiUtCreateUpdateStateAndPush (
- NextObject, Action, &StateList);
+ NextObject, Action, &StateList);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
@@ -639,7 +640,7 @@ AcpiUtUpdateObjectReference (
NextObject = Object->BankField.BankObj;
Status = AcpiUtCreateUpdateStateAndPush (
- Object->BankField.RegionObj, Action, &StateList);
+ Object->BankField.RegionObj, Action, &StateList);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
@@ -650,7 +651,7 @@ AcpiUtUpdateObjectReference (
NextObject = Object->IndexField.IndexObj;
Status = AcpiUtCreateUpdateStateAndPush (
- Object->IndexField.DataObj, Action, &StateList);
+ Object->IndexField.DataObj, Action, &StateList);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c
index b5f532f2fbd71..756a259f94249 100644
--- a/source/components/utilities/uterror.c
+++ b/source/components/utilities/uterror.c
@@ -244,8 +244,8 @@ AcpiUtNamespaceError (
{
/* Convert path to external format */
- Status = AcpiNsExternalizeName (ACPI_UINT32_MAX,
- InternalName, NULL, &Name);
+ Status = AcpiNsExternalizeName (
+ ACPI_UINT32_MAX, InternalName, NULL, &Name);
/* Print target name */
@@ -307,8 +307,8 @@ AcpiUtMethodError (
if (Path)
{
- Status = AcpiNsGetNode (PrefixNode, Path, ACPI_NS_NO_UPSEARCH,
- &Node);
+ Status = AcpiNsGetNode (PrefixNode, Path,
+ ACPI_NS_NO_UPSEARCH, &Node);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("[Could not get node by pathname]");
diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c
index 542c691276c15..24afcad2a3cb1 100644
--- a/source/components/utilities/uteval.c
+++ b/source/components/utilities/uteval.c
@@ -231,7 +231,7 @@ AcpiUtEvaluateNumericObject (
Status = AcpiUtEvaluateObject (DeviceNode, ObjectName,
- ACPI_BTYPE_INTEGER, &ObjDesc);
+ ACPI_BTYPE_INTEGER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -278,7 +278,7 @@ AcpiUtExecute_STA (
Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__STA,
- ACPI_BTYPE_INTEGER, &ObjDesc);
+ ACPI_BTYPE_INTEGER, &ObjDesc);
if (ACPI_FAILURE (Status))
{
if (AE_NOT_FOUND == Status)
@@ -351,8 +351,8 @@ AcpiUtExecutePowerMethods (
* return type is an Integer.
*/
Status = AcpiUtEvaluateObject (DeviceNode,
- ACPI_CAST_PTR (char, MethodNames[i]),
- ACPI_BTYPE_INTEGER, &ObjDesc);
+ ACPI_CAST_PTR (char, MethodNames[i]),
+ ACPI_BTYPE_INTEGER, &ObjDesc);
if (ACPI_SUCCESS (Status))
{
OutValues[i] = (UINT8) ObjDesc->Integer.Value;
diff --git a/source/components/utilities/utfileio.c b/source/components/utilities/utfileio.c
deleted file mode 100644
index 8c503543507ed..0000000000000
--- a/source/components/utilities/utfileio.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- *
- * Module Name: utfileio - simple file I/O routines
- *
- ******************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2015, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * substantially similar to the "NO WARRANTY" disclaimer below
- * ("Disclaimer") and any redistribution must be conditioned upon
- * including a substantially similar Disclaimer requirement for further
- * binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include "acpi.h"
-#include "accommon.h"
-#include "actables.h"
-#include "acapps.h"
-#include "errno.h"
-
-#ifdef ACPI_ASL_COMPILER
-#include "aslcompiler.h"
-#endif
-
-
-#define _COMPONENT ACPI_CA_DEBUGGER
- ACPI_MODULE_NAME ("utfileio")
-
-
-#ifdef ACPI_APPLICATION
-
-/* Local prototypes */
-
-static ACPI_STATUS
-AcpiUtCheckTextModeCorruption (
- UINT8 *Table,
- UINT32 TableLength,
- UINT32 FileLength);
-
-static ACPI_STATUS
-AcpiUtReadTable (
- FILE *fp,
- ACPI_TABLE_HEADER **Table,
- UINT32 *TableLength);
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtCheckTextModeCorruption
- *
- * PARAMETERS: Table - Table buffer
- * TableLength - Length of table from the table header
- * FileLength - Length of the file that contains the table
- *
- * RETURN: Status
- *
- * DESCRIPTION: Check table for text mode file corruption where all linefeed
- * characters (LF) have been replaced by carriage return linefeed
- * pairs (CR/LF).
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiUtCheckTextModeCorruption (
- UINT8 *Table,
- UINT32 TableLength,
- UINT32 FileLength)
-{
- UINT32 i;
- UINT32 Pairs = 0;
-
-
- if (TableLength != FileLength)
- {
- ACPI_WARNING ((AE_INFO,
- "File length (0x%X) is not the same as the table length (0x%X)",
- FileLength, TableLength));
- }
-
- /* Scan entire table to determine if each LF has been prefixed with a CR */
-
- for (i = 1; i < FileLength; i++)
- {
- if (Table[i] == 0x0A)
- {
- if (Table[i - 1] != 0x0D)
- {
- /* The LF does not have a preceding CR, table not corrupted */
-
- return (AE_OK);
- }
- else
- {
- /* Found a CR/LF pair */
-
- Pairs++;
- }
- i++;
- }
- }
-
- if (!Pairs)
- {
- return (AE_OK);
- }
-
- /*
- * Entire table scanned, each CR is part of a CR/LF pair --
- * meaning that the table was treated as a text file somewhere.
- *
- * NOTE: We can't "fix" the table, because any existing CR/LF pairs in the
- * original table are left untouched by the text conversion process --
- * meaning that we cannot simply replace CR/LF pairs with LFs.
- */
- AcpiOsPrintf ("Table has been corrupted by text mode conversion\n");
- AcpiOsPrintf ("All LFs (%u) were changed to CR/LF pairs\n", Pairs);
- AcpiOsPrintf ("Table cannot be repaired!\n");
- return (AE_BAD_VALUE);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtReadTable
- *
- * PARAMETERS: fp - File that contains table
- * Table - Return value, buffer with table
- * TableLength - Return value, length of table
- *
- * RETURN: Status
- *
- * DESCRIPTION: Load the DSDT from the file pointer
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiUtReadTable (
- FILE *fp,
- ACPI_TABLE_HEADER **Table,
- UINT32 *TableLength)
-{
- ACPI_TABLE_HEADER TableHeader;
- UINT32 Actual;
- ACPI_STATUS Status;
- UINT32 FileSize;
- BOOLEAN StandardHeader = TRUE;
- INT32 Count;
-
- /* Get the file size */
-
- FileSize = CmGetFileSize (fp);
- if (FileSize == ACPI_UINT32_MAX)
- {
- return (AE_ERROR);
- }
-
- if (FileSize < 4)
- {
- return (AE_BAD_HEADER);
- }
-
- /* Read the signature */
-
- fseek (fp, 0, SEEK_SET);
-
- Count = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), fp);
- if (Count != sizeof (ACPI_TABLE_HEADER))
- {
- AcpiOsPrintf ("Could not read the table header\n");
- return (AE_BAD_HEADER);
- }
-
- /* The RSDP table does not have standard ACPI header */
-
- if (ACPI_VALIDATE_RSDP_SIG (TableHeader.Signature))
- {
- *TableLength = FileSize;
- StandardHeader = FALSE;
- }
- else
- {
-
-#if 0
- /* Validate the table header/length */
-
- Status = AcpiTbValidateTableHeader (&TableHeader);
- if (ACPI_FAILURE (Status))
- {
- AcpiOsPrintf ("Table header is invalid!\n");
- return (Status);
- }
-#endif
-
- /* File size must be at least as long as the Header-specified length */
-
- if (TableHeader.Length > FileSize)
- {
- AcpiOsPrintf (
- "TableHeader length [0x%X] greater than the input file size [0x%X]\n",
- TableHeader.Length, FileSize);
-
-#ifdef ACPI_ASL_COMPILER
- AcpiOsPrintf ("File is corrupt or is ASCII text -- "
- "it must be a binary file\n");
-#endif
- return (AE_BAD_HEADER);
- }
-
-#ifdef ACPI_OBSOLETE_CODE
- /* We only support a limited number of table types */
-
- if (!ACPI_COMPARE_NAME ((char *) TableHeader.Signature, ACPI_SIG_DSDT) &&
- !ACPI_COMPARE_NAME ((char *) TableHeader.Signature, ACPI_SIG_PSDT) &&
- !ACPI_COMPARE_NAME ((char *) TableHeader.Signature, ACPI_SIG_SSDT))
- {
- AcpiOsPrintf ("Table signature [%4.4s] is invalid or not supported\n",
- (char *) TableHeader.Signature);
- ACPI_DUMP_BUFFER (&TableHeader, sizeof (ACPI_TABLE_HEADER));
- return (AE_ERROR);
- }
-#endif
-
- *TableLength = TableHeader.Length;
- }
-
- /* Allocate a buffer for the table */
-
- *Table = AcpiOsAllocate ((size_t) FileSize);
- if (!*Table)
- {
- AcpiOsPrintf (
- "Could not allocate memory for ACPI table %4.4s (size=0x%X)\n",
- TableHeader.Signature, *TableLength);
- return (AE_NO_MEMORY);
- }
-
- /* Get the rest of the table */
-
- fseek (fp, 0, SEEK_SET);
- Actual = fread (*Table, 1, (size_t) FileSize, fp);
- if (Actual == FileSize)
- {
- if (StandardHeader)
- {
- /* Now validate the checksum */
-
- Status = AcpiTbVerifyChecksum ((void *) *Table,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER, *Table)->Length);
-
- if (Status == AE_BAD_CHECKSUM)
- {
- Status = AcpiUtCheckTextModeCorruption ((UINT8 *) *Table,
- FileSize, (*Table)->Length);
- return (Status);
- }
- }
- return (AE_OK);
- }
-
- if (Actual > 0)
- {
- AcpiOsPrintf ("Warning - reading table, asked for %X got %X\n",
- FileSize, Actual);
- return (AE_OK);
- }
-
- AcpiOsPrintf ("Error - could not read the table file\n");
- AcpiOsFree (*Table);
- *Table = NULL;
- *TableLength = 0;
- return (AE_ERROR);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtReadTableFromFile
- *
- * PARAMETERS: Filename - File where table is located
- * Table - Where a pointer to the table is returned
- *
- * RETURN: Status
- *
- * DESCRIPTION: Get an ACPI table from a file
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiUtReadTableFromFile (
- char *Filename,
- ACPI_TABLE_HEADER **Table)
-{
- FILE *File;
- UINT32 FileSize;
- UINT32 TableLength;
- ACPI_STATUS Status = AE_ERROR;
-
-
- /* Open the file, get current size */
-
- File = fopen (Filename, "rb");
- if (!File)
- {
- perror ("Could not open input file");
-
- if (errno == ENOENT)
- {
- return (AE_NOT_EXIST);
- }
-
- return (Status);
- }
-
- FileSize = CmGetFileSize (File);
- if (FileSize == ACPI_UINT32_MAX)
- {
- goto Exit;
- }
-
- /* Get the entire file */
-
- fprintf (stderr,
- "Reading ACPI table from file %12s - Length %.8u (0x%06X)\n",
- Filename, FileSize, FileSize);
-
- Status = AcpiUtReadTable (File, Table, &TableLength);
- if (ACPI_FAILURE (Status))
- {
- AcpiOsPrintf ("Could not get table from the file\n");
- }
-
-Exit:
- fclose(File);
- return (Status);
-}
-
-#endif
diff --git a/source/components/utilities/uthex.c b/source/components/utilities/uthex.c
index abbf5f4874f14..7ec8fe059e39c 100644
--- a/source/components/utilities/uthex.c
+++ b/source/components/utilities/uthex.c
@@ -50,7 +50,7 @@
/* Hex to ASCII conversion table */
-static char AcpiGbl_HexToAscii[] =
+static const char AcpiGbl_HexToAscii[] =
{
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
};
diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c
index 1b7f1f5dad8ac..528d78c649363 100644
--- a/source/components/utilities/utids.c
+++ b/source/components/utilities/utids.c
@@ -83,7 +83,7 @@ AcpiUtExecute_HID (
Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__HID,
- ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &ObjDesc);
+ ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -102,7 +102,8 @@ AcpiUtExecute_HID (
/* Allocate a buffer for the HID */
- Hid = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
+ Hid = ACPI_ALLOCATE_ZEROED (
+ sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
if (!Hid)
{
Status = AE_NO_MEMORY;
@@ -139,77 +140,6 @@ Cleanup:
/*******************************************************************************
*
- * FUNCTION: AcpiUtExecute_SUB
- *
- * PARAMETERS: DeviceNode - Node for the device
- * ReturnId - Where the _SUB is returned
- *
- * RETURN: Status
- *
- * DESCRIPTION: Executes the _SUB control method that returns the subsystem
- * ID of the device. The _SUB value is always a string containing
- * either a valid PNP or ACPI ID.
- *
- * NOTE: Internal function, no parameter validation
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiUtExecute_SUB (
- ACPI_NAMESPACE_NODE *DeviceNode,
- ACPI_PNP_DEVICE_ID **ReturnId)
-{
- ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_PNP_DEVICE_ID *Sub;
- UINT32 Length;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (UtExecute_SUB);
-
-
- Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__SUB,
- ACPI_BTYPE_STRING, &ObjDesc);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Get the size of the String to be returned, includes null terminator */
-
- Length = ObjDesc->String.Length + 1;
-
- /* Allocate a buffer for the SUB */
-
- Sub = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
- if (!Sub)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- /* Area for the string starts after PNP_DEVICE_ID struct */
-
- Sub->String = ACPI_ADD_PTR (char, Sub, sizeof (ACPI_PNP_DEVICE_ID));
-
- /* Simply copy existing string */
-
- strcpy (Sub->String, ObjDesc->String.Pointer);
- Sub->Length = Length;
- *ReturnId = Sub;
-
-
-Cleanup:
-
- /* On exit, we must delete the return object */
-
- AcpiUtRemoveReference (ObjDesc);
- return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiUtExecute_UID
*
* PARAMETERS: DeviceNode - Node for the device
@@ -241,7 +171,7 @@ AcpiUtExecute_UID (
Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__UID,
- ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &ObjDesc);
+ ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -260,7 +190,8 @@ AcpiUtExecute_UID (
/* Allocate a buffer for the UID */
- Uid = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
+ Uid = ACPI_ALLOCATE_ZEROED (
+ sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
if (!Uid)
{
Status = AE_NO_MEMORY;
@@ -341,8 +272,8 @@ AcpiUtExecute_CID (
/* Evaluate the _CID method for this device */
Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__CID,
- ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_PACKAGE,
- &ObjDesc);
+ ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_PACKAGE,
+ &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -419,7 +350,8 @@ AcpiUtExecute_CID (
{
/* Convert the Integer (EISAID) CID to a string */
- AcpiExEisaIdToString (NextIdString, CidObjects[i]->Integer.Value);
+ AcpiExEisaIdToString (
+ NextIdString, CidObjects[i]->Integer.Value);
Length = ACPI_EISAID_STRING_SIZE;
}
else /* ACPI_TYPE_STRING */
@@ -488,7 +420,7 @@ AcpiUtExecute_CLS (
Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__CLS,
- ACPI_BTYPE_PACKAGE, &ObjDesc);
+ ACPI_BTYPE_PACKAGE, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -518,7 +450,8 @@ AcpiUtExecute_CLS (
/* Allocate a buffer for the CLS */
- Cls = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
+ Cls = ACPI_ALLOCATE_ZEROED (
+ sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
if (!Cls)
{
Status = AE_NO_MEMORY;
diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c
index 8f8eaaad92b98..9689abb435164 100644
--- a/source/components/utilities/utinit.c
+++ b/source/components/utilities/utinit.c
@@ -262,8 +262,6 @@ AcpiUtInitGlobals (
AcpiGbl_DisableMemTracking = FALSE;
#endif
- ACPI_DEBUGGER_EXEC (AcpiGbl_DbTerminateThreads = FALSE);
-
return_ACPI_STATUS (AE_OK);
}
@@ -312,6 +310,20 @@ AcpiUtSubsystemShutdown (
ACPI_FUNCTION_TRACE (UtSubsystemShutdown);
+ /* Just exit if subsystem is already shutdown */
+
+ if (AcpiGbl_Shutdown)
+ {
+ ACPI_ERROR ((AE_INFO, "ACPI Subsystem is already terminated"));
+ return_VOID;
+ }
+
+ /* Subsystem appears active, go ahead and shut it down */
+
+ AcpiGbl_Shutdown = TRUE;
+ AcpiGbl_StartupFlags = 0;
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n"));
+
#ifndef ACPI_ASL_COMPILER
/* Close the AcpiEvent Handling */
diff --git a/source/components/utilities/utmath.c b/source/components/utilities/utmath.c
index 0f920751c17c7..9d44ad5533d5f 100644
--- a/source/components/utilities/utmath.c
+++ b/source/components/utilities/utmath.c
@@ -122,9 +122,10 @@ AcpiUtShortDivide (
* and is generated by the second divide.
*/
ACPI_DIV_64_BY_32 (0, DividendOvl.Part.Hi, Divisor,
- Quotient.Part.Hi, Remainder32);
+ Quotient.Part.Hi, Remainder32);
+
ACPI_DIV_64_BY_32 (Remainder32, DividendOvl.Part.Lo, Divisor,
- Quotient.Part.Lo, Remainder32);
+ Quotient.Part.Lo, Remainder32);
/* Return only what was requested */
@@ -200,9 +201,10 @@ AcpiUtDivide (
* and is generated by the second divide.
*/
ACPI_DIV_64_BY_32 (0, Dividend.Part.Hi, Divisor.Part.Lo,
- Quotient.Part.Hi, Partial1);
+ Quotient.Part.Hi, Partial1);
+
ACPI_DIV_64_BY_32 (Partial1, Dividend.Part.Lo, Divisor.Part.Lo,
- Quotient.Part.Lo, Remainder.Part.Lo);
+ Quotient.Part.Lo, Remainder.Part.Lo);
}
else
@@ -219,25 +221,24 @@ AcpiUtDivide (
do
{
- ACPI_SHIFT_RIGHT_64 (NormalizedDivisor.Part.Hi,
- NormalizedDivisor.Part.Lo);
- ACPI_SHIFT_RIGHT_64 (NormalizedDividend.Part.Hi,
- NormalizedDividend.Part.Lo);
+ ACPI_SHIFT_RIGHT_64 (
+ NormalizedDivisor.Part.Hi, NormalizedDivisor.Part.Lo);
+ ACPI_SHIFT_RIGHT_64 (
+ NormalizedDividend.Part.Hi, NormalizedDividend.Part.Lo);
} while (NormalizedDivisor.Part.Hi != 0);
/* Partial divide */
- ACPI_DIV_64_BY_32 (NormalizedDividend.Part.Hi,
- NormalizedDividend.Part.Lo,
- NormalizedDivisor.Part.Lo,
- Quotient.Part.Lo, Partial1);
+ ACPI_DIV_64_BY_32 (
+ NormalizedDividend.Part.Hi, NormalizedDividend.Part.Lo,
+ NormalizedDivisor.Part.Lo, Quotient.Part.Lo, Partial1);
/*
- * The quotient is always 32 bits, and simply requires adjustment.
- * The 64-bit remainder must be generated.
+ * The quotient is always 32 bits, and simply requires
+ * adjustment. The 64-bit remainder must be generated.
*/
- Partial1 = Quotient.Part.Lo * Divisor.Part.Hi;
+ Partial1 = Quotient.Part.Lo * Divisor.Part.Hi;
Partial2.Full = (UINT64) Quotient.Part.Lo * Divisor.Part.Lo;
Partial3.Full = (UINT64) Partial2.Part.Hi + Partial1;
@@ -263,7 +264,7 @@ AcpiUtDivide (
}
}
- Remainder.Full = Remainder.Full - Dividend.Full;
+ Remainder.Full = Remainder.Full - Dividend.Full;
Remainder.Part.Hi = (UINT32) -((INT32) Remainder.Part.Hi);
Remainder.Part.Lo = (UINT32) -((INT32) Remainder.Part.Lo);
diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c
index 3ab7f16ade78b..b56a50cfe59a8 100644
--- a/source/components/utilities/utmisc.c
+++ b/source/components/utilities/utmisc.c
@@ -72,10 +72,10 @@ AcpiUtIsPciRootBridge (
* ACPI 3.0+: check for a PCI Express root also.
*/
if (!(strcmp (Id,
- PCI_ROOT_HID_STRING)) ||
+ PCI_ROOT_HID_STRING)) ||
!(strcmp (Id,
- PCI_EXPRESS_ROOT_HID_STRING)))
+ PCI_EXPRESS_ROOT_HID_STRING)))
{
return (TRUE);
}
@@ -185,17 +185,17 @@ AcpiUtSetIntegerWidth (
{
/* 32-bit case */
- AcpiGbl_IntegerBitWidth = 32;
+ AcpiGbl_IntegerBitWidth = 32;
AcpiGbl_IntegerNybbleWidth = 8;
- AcpiGbl_IntegerByteWidth = 4;
+ AcpiGbl_IntegerByteWidth = 4;
}
else
{
/* 64-bit case (ACPI 2.0+) */
- AcpiGbl_IntegerBitWidth = 64;
+ AcpiGbl_IntegerBitWidth = 64;
AcpiGbl_IntegerNybbleWidth = 16;
- AcpiGbl_IntegerByteWidth = 8;
+ AcpiGbl_IntegerByteWidth = 8;
}
}
@@ -286,9 +286,9 @@ AcpiUtWalkPackageTree (
{
/* Get one element of the package */
- ThisIndex = State->Pkg.Index;
+ ThisIndex = State->Pkg.Index;
ThisSourceObj = (ACPI_OPERAND_OBJECT *)
- State->Pkg.SourceObject->Package.Elements[ThisIndex];
+ State->Pkg.SourceObject->Package.Elements[ThisIndex];
/*
* Check for:
@@ -299,7 +299,8 @@ AcpiUtWalkPackageTree (
* case below.
*/
if ((!ThisSourceObj) ||
- (ACPI_GET_DESCRIPTOR_TYPE (ThisSourceObj) != ACPI_DESC_TYPE_OPERAND) ||
+ (ACPI_GET_DESCRIPTOR_TYPE (ThisSourceObj) !=
+ ACPI_DESC_TYPE_OPERAND) ||
(ThisSourceObj->Common.Type != ACPI_TYPE_PACKAGE))
{
Status = WalkCallback (ACPI_COPY_TYPE_SIMPLE, ThisSourceObj,
@@ -310,7 +311,8 @@ AcpiUtWalkPackageTree (
}
State->Pkg.Index++;
- while (State->Pkg.Index >= State->Pkg.SourceObject->Package.Count)
+ while (State->Pkg.Index >=
+ State->Pkg.SourceObject->Package.Count)
{
/*
* We've handled all of the objects at this level, This means
@@ -345,8 +347,8 @@ AcpiUtWalkPackageTree (
{
/* This is a subobject of type package */
- Status = WalkCallback (ACPI_COPY_TYPE_PACKAGE, ThisSourceObj,
- State, Context);
+ Status = WalkCallback (
+ ACPI_COPY_TYPE_PACKAGE, ThisSourceObj, State, Context);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -357,8 +359,8 @@ AcpiUtWalkPackageTree (
* The callback above returned a new target package object.
*/
AcpiUtPushGenericState (&StateList, State);
- State = AcpiUtCreatePkgState (ThisSourceObj,
- State->Pkg.ThisTargetObj, 0);
+ State = AcpiUtCreatePkgState (
+ ThisSourceObj, State->Pkg.ThisTargetObj, 0);
if (!State)
{
/* Free any stacked Update State objects */
diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c
index 60b94c11e52b9..9cbc599c417f2 100644
--- a/source/components/utilities/utmutex.c
+++ b/source/components/utilities/utmutex.c
@@ -329,11 +329,12 @@ AcpiUtAcquireMutex (
"Thread %u attempting to acquire Mutex [%s]\n",
(UINT32) ThisThreadId, AcpiUtGetMutexName (MutexId)));
- Status = AcpiOsAcquireMutex (AcpiGbl_MutexInfo[MutexId].Mutex,
- ACPI_WAIT_FOREVER);
+ Status = AcpiOsAcquireMutex (
+ AcpiGbl_MutexInfo[MutexId].Mutex, ACPI_WAIT_FOREVER);
if (ACPI_SUCCESS (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Thread %u acquired Mutex [%s]\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX,
+ "Thread %u acquired Mutex [%s]\n",
(UINT32) ThisThreadId, AcpiUtGetMutexName (MutexId)));
AcpiGbl_MutexInfo[MutexId].UseCount++;
diff --git a/source/components/utilities/utnonansi.c b/source/components/utilities/utnonansi.c
index 3c64eaa1f5f15..257450e41be6f 100644
--- a/source/components/utilities/utnonansi.c
+++ b/source/components/utilities/utnonansi.c
@@ -332,8 +332,8 @@ AcpiUtStrtoul64 (
/* Divide the digit into the correct position */
- (void) AcpiUtShortDivide ((Dividend - (UINT64) ThisDigit),
- Base, &Quotient, NULL);
+ (void) AcpiUtShortDivide (
+ (Dividend - (UINT64) ThisDigit), Base, &Quotient, NULL);
if (ReturnValue > Quotient)
{
diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c
index 62758c4f7aeb9..e8e157640ce6b 100644
--- a/source/components/utilities/utobject.c
+++ b/source/components/utilities/utobject.c
@@ -107,7 +107,8 @@ AcpiUtCreateInternalObjectDbg (
/* Allocate the raw object descriptor */
- Object = AcpiUtAllocateObjectDescDbg (ModuleName, LineNumber, ComponentId);
+ Object = AcpiUtAllocateObjectDescDbg (
+ ModuleName, LineNumber, ComponentId);
if (!Object)
{
return_PTR (NULL);
@@ -121,8 +122,8 @@ AcpiUtCreateInternalObjectDbg (
/* These types require a secondary object */
- SecondObject = AcpiUtAllocateObjectDescDbg (ModuleName,
- LineNumber, ComponentId);
+ SecondObject = AcpiUtAllocateObjectDescDbg (
+ ModuleName, LineNumber, ComponentId);
if (!SecondObject)
{
AcpiUtDeleteObjectDesc (Object);
@@ -193,7 +194,7 @@ AcpiUtCreatePackageObject (
* terminated.
*/
PackageElements = ACPI_ALLOCATE_ZEROED (
- ((ACPI_SIZE) Count + 1) * sizeof (void *));
+ ((ACPI_SIZE) Count + 1) * sizeof (void *));
if (!PackageElements)
{
ACPI_FREE (PackageDesc);
@@ -283,6 +284,7 @@ AcpiUtCreateBufferObject (
{
ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
(UINT32) BufferSize));
+
AcpiUtRemoveReference (BufferDesc);
return_PTR (NULL);
}
@@ -342,6 +344,7 @@ AcpiUtCreateStringObject (
{
ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
(UINT32) StringSize));
+
AcpiUtRemoveReference (StringDesc);
return_PTR (NULL);
}
@@ -398,8 +401,8 @@ AcpiUtValidInternalObject (
default:
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "%p is not an ACPI operand obj [%s]\n",
- Object, AcpiUtGetDescriptorName (Object)));
+ "%p is not an ACPI operand obj [%s]\n",
+ Object, AcpiUtGetDescriptorName (Object)));
break;
}
@@ -448,7 +451,7 @@ AcpiUtAllocateObjectDescDbg (
ACPI_SET_DESCRIPTOR_TYPE (Object, ACPI_DESC_TYPE_OPERAND);
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p Size %X\n",
- Object, (UINT32) sizeof (ACPI_OPERAND_OBJECT)));
+ Object, (UINT32) sizeof (ACPI_OPERAND_OBJECT)));
return_PTR (Object);
}
@@ -711,12 +714,12 @@ AcpiUtGetPackageObjectSize (
ACPI_FUNCTION_TRACE_PTR (UtGetPackageObjectSize, InternalObject);
- Info.Length = 0;
+ Info.Length = 0;
Info.ObjectSpace = 0;
Info.NumPackages = 1;
- Status = AcpiUtWalkPackageTree (InternalObject, NULL,
- AcpiUtGetElementLength, &Info);
+ Status = AcpiUtWalkPackageTree (
+ InternalObject, NULL, AcpiUtGetElementLength, &Info);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -727,8 +730,8 @@ AcpiUtGetPackageObjectSize (
* just add the length of the package objects themselves.
* Round up to the next machine word.
*/
- Info.Length += ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT)) *
- (ACPI_SIZE) Info.NumPackages;
+ Info.Length += ACPI_ROUND_UP_TO_NATIVE_WORD (
+ sizeof (ACPI_OBJECT)) * (ACPI_SIZE) Info.NumPackages;
/* Return the total package length */
@@ -762,7 +765,8 @@ AcpiUtGetObjectSize (
ACPI_FUNCTION_ENTRY ();
- if ((ACPI_GET_DESCRIPTOR_TYPE (InternalObject) == ACPI_DESC_TYPE_OPERAND) &&
+ if ((ACPI_GET_DESCRIPTOR_TYPE (InternalObject) ==
+ ACPI_DESC_TYPE_OPERAND) &&
(InternalObject->Common.Type == ACPI_TYPE_PACKAGE))
{
Status = AcpiUtGetPackageObjectSize (InternalObject, ObjLength);
diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c
index 30cba54223892..64a08493b484c 100644
--- a/source/components/utilities/utosi.c
+++ b/source/components/utilities/utosi.c
@@ -156,7 +156,9 @@ AcpiUtInitializeInterfaces (
/* Link the static list of supported interfaces */
- for (i = 0; i < (ACPI_ARRAY_LENGTH (AcpiDefaultSupportedInterfaces) - 1); i++)
+ for (i = 0;
+ i < (ACPI_ARRAY_LENGTH (AcpiDefaultSupportedInterfaces) - 1);
+ i++)
{
AcpiDefaultSupportedInterfaces[i].Next =
&AcpiDefaultSupportedInterfaces[(ACPI_SIZE) i + 1];
@@ -300,8 +302,10 @@ AcpiUtRemoveInterface (
{
if (!strcmp (InterfaceName, NextInterface->Name))
{
- /* Found: name is in either the static list or was added at runtime */
-
+ /*
+ * Found: name is in either the static list
+ * or was added at runtime
+ */
if (NextInterface->Flags & ACPI_OSI_DYNAMIC)
{
/* Interface was added dynamically, remove and free it */
@@ -321,8 +325,8 @@ AcpiUtRemoveInterface (
else
{
/*
- * Interface is in static list. If marked invalid, then it
- * does not actually exist. Else, mark it invalid.
+ * Interface is in static list. If marked invalid, then
+ * it does not actually exist. Else, mark it invalid.
*/
if (NextInterface->Flags & ACPI_OSI_INVALID)
{
diff --git a/source/components/utilities/utownerid.c b/source/components/utilities/utownerid.c
index a130fb704ed51..dc3922a1c1baa 100644
--- a/source/components/utilities/utownerid.c
+++ b/source/components/utilities/utownerid.c
@@ -81,7 +81,8 @@ AcpiUtAllocateOwnerId (
if (*OwnerId)
{
- ACPI_ERROR ((AE_INFO, "Owner ID [0x%2.2X] already exists", *OwnerId));
+ ACPI_ERROR ((AE_INFO,
+ "Owner ID [0x%2.2X] already exists", *OwnerId));
return_ACPI_STATUS (AE_ALREADY_EXISTS);
}
@@ -95,8 +96,8 @@ AcpiUtAllocateOwnerId (
/*
* Find a free owner ID, cycle through all possible IDs on repeated
- * allocations. (ACPI_NUM_OWNERID_MASKS + 1) because first index may have
- * to be scanned twice.
+ * allocations. (ACPI_NUM_OWNERID_MASKS + 1) because first index
+ * may have to be scanned twice.
*/
for (i = 0, j = AcpiGbl_LastOwnerIdIndex;
i < (ACPI_NUM_OWNERID_MASKS + 1);
@@ -152,8 +153,8 @@ AcpiUtAllocateOwnerId (
* they are released when a table is unloaded or a method completes
* execution.
*
- * If this error happens, there may be very deep nesting of invoked control
- * methods, or there may be a bug where the IDs are not released.
+ * If this error happens, there may be very deep nesting of invoked
+ * control methods, or there may be a bug where the IDs are not released.
*/
Status = AE_OWNER_ID_LIMIT;
ACPI_ERROR ((AE_INFO,
diff --git a/source/components/utilities/utpredef.c b/source/components/utilities/utpredef.c
index 1b7ef34181cb4..f5d8353273299 100644
--- a/source/components/utilities/utpredef.c
+++ b/source/components/utilities/utpredef.c
@@ -254,8 +254,10 @@ AcpiUtMatchResourceName (
const ACPI_PREDEFINED_INFO *ThisName;
- /* Quick check for a predefined name, first character must be underscore */
-
+ /*
+ * Quick check for a predefined name, first character must
+ * be underscore
+ */
if (Name[0] != '_')
{
return (NULL);
diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c
index 6d7b87cd3e8a5..1b0e12b32f132 100644
--- a/source/components/utilities/utprint.c
+++ b/source/components/utilities/utprint.c
@@ -390,8 +390,8 @@ AcpiUtFormatNumber (
String = AcpiUtBoundStringOutput (String, End, '0');
if (Base == 16)
{
- String = AcpiUtBoundStringOutput (String, End,
- Upper ? 'X' : 'x');
+ String = AcpiUtBoundStringOutput (
+ String, End, Upper ? 'X' : 'x');
}
}
if (!(Type & ACPI_FORMAT_LEFT))
@@ -500,6 +500,7 @@ AcpiUtVsnprintf (
{
break;
}
+
} while (1);
/* Process width */
@@ -537,6 +538,7 @@ AcpiUtVsnprintf (
++Format;
Precision = va_arg (Args, int);
}
+
if (Precision < 0)
{
Precision = 0;
@@ -599,11 +601,13 @@ AcpiUtVsnprintf (
Pos = AcpiUtBoundStringOutput (Pos, End, ' ');
}
}
+
for (i = 0; i < Length; ++i)
{
Pos = AcpiUtBoundStringOutput (Pos, End, *s);
++s;
}
+
while (Length < Width--)
{
Pos = AcpiUtBoundStringOutput (Pos, End, ' ');
@@ -642,8 +646,8 @@ AcpiUtVsnprintf (
}
p = va_arg (Args, void *);
- Pos = AcpiUtFormatNumber (Pos, End,
- ACPI_TO_INTEGER (p), 16, Width, Precision, Type);
+ Pos = AcpiUtFormatNumber (
+ Pos, End, ACPI_TO_INTEGER (p), 16, Width, Precision, Type);
continue;
default:
@@ -694,7 +698,7 @@ AcpiUtVsnprintf (
}
Pos = AcpiUtFormatNumber (Pos, End, Number, Base,
- Width, Precision, Type);
+ Width, Precision, Type);
}
if (Size > 0)
@@ -773,7 +777,7 @@ AcpiUtFileVprintf (
Flags = AcpiOsAcquireLock (AcpiGbl_PrintLock);
Length = AcpiUtVsnprintf (AcpiGbl_PrintBuffer,
- sizeof (AcpiGbl_PrintBuffer), Format, Args);
+ sizeof (AcpiGbl_PrintBuffer), Format, Args);
(void) AcpiOsWriteFile (File, AcpiGbl_PrintBuffer, Length, 1);
AcpiOsReleaseLock (AcpiGbl_PrintLock, Flags);
diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c
index df3c73ee4eb44..41db3968c1a09 100644
--- a/source/components/utilities/utresrc.c
+++ b/source/components/utilities/utresrc.c
@@ -489,8 +489,8 @@ AcpiUtWalkAmlResources (
if (ACPI_FAILURE (Status))
{
/*
- * Exit on failure. Cannot continue because the descriptor length
- * may be bogus also.
+ * Exit on failure. Cannot continue because the descriptor
+ * length may be bogus also.
*/
return_ACPI_STATUS (Status);
}
@@ -503,7 +503,8 @@ AcpiUtWalkAmlResources (
if (UserFunction)
{
- Status = UserFunction (Aml, Length, Offset, ResourceIndex, Context);
+ Status = UserFunction (
+ Aml, Length, Offset, ResourceIndex, Context);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -625,8 +626,8 @@ AcpiUtValidateResource (
}
/*
- * Check validity of the resource type, via AcpiGbl_ResourceTypes. Zero
- * indicates an invalid resource.
+ * Check validity of the resource type, via AcpiGbl_ResourceTypes.
+ * Zero indicates an invalid resource.
*/
if (!AcpiGbl_ResourceTypes[ResourceIndex])
{
@@ -813,7 +814,7 @@ AcpiUtGetResourceLength (
/* Small Resource type -- bits 2:0 of byte 0 contain the length */
ResourceLength = (UINT16) (ACPI_GET8 (Aml) &
- ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK);
+ ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK);
}
return (ResourceLength);
@@ -878,7 +879,7 @@ AcpiUtGetDescriptorLength (
* the header length (depends on if this is a small or large resource)
*/
return (AcpiUtGetResourceLength (Aml) +
- AcpiUtGetResourceHeaderLength (Aml));
+ AcpiUtGetResourceHeaderLength (Aml));
}
@@ -918,7 +919,7 @@ AcpiUtGetResourceEndTag (
/* Validate the template and get a pointer to the EndTag */
Status = AcpiUtWalkAmlResources (NULL, ObjDesc->Buffer.Pointer,
- ObjDesc->Buffer.Length, NULL, (void **) EndTag);
+ ObjDesc->Buffer.Length, NULL, (void **) EndTag);
return_ACPI_STATUS (Status);
}
diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c
index 49fc8e9b8df16..ad07a4a74ac8a 100644
--- a/source/components/utilities/utstate.c
+++ b/source/components/utilities/utstate.c
@@ -278,6 +278,7 @@ AcpiUtCreatePkgState (
State->Pkg.DestObject = ExternalObject;
State->Pkg.Index= Index;
State->Pkg.NumPackages = 1;
+
return (State);
}
@@ -317,6 +318,7 @@ AcpiUtCreateControlState (
State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_CONTROL;
State->Common.State = ACPI_CONTROL_CONDITIONAL_EXECUTING;
+
return (State);
}
@@ -347,5 +349,6 @@ AcpiUtDeleteGenericState (
{
(void) AcpiOsReleaseObject (AcpiGbl_StateCache, State);
}
+
return;
}
diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c
index af7b4af761da4..c8b41f10ad78f 100644
--- a/source/components/utilities/utstring.c
+++ b/source/components/utilities/utstring.c
@@ -147,6 +147,7 @@ AcpiUtPrintString (
break;
}
}
+
AcpiOsPrintf ("\"");
if (i == MaxLength && String[i])
diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c
index 7a594be88fc2a..234fe50f63c55 100644
--- a/source/components/utilities/uttrack.c
+++ b/source/components/utilities/uttrack.c
@@ -115,7 +115,7 @@ AcpiUtCreateList (
memset (Cache, 0, sizeof (ACPI_MEMORY_LIST));
- Cache->ListName = ListName;
+ Cache->ListName = ListName;
Cache->ObjectSize = ObjectSize;
*ReturnCache = Cache;
@@ -169,8 +169,8 @@ AcpiUtAllocateAndTrack (
return (NULL);
}
- Status = AcpiUtTrackAllocation (Allocation, Size,
- ACPI_MEM_MALLOC, Component, Module, Line);
+ Status = AcpiUtTrackAllocation (
+ Allocation, Size, ACPI_MEM_MALLOC, Component, Module, Line);
if (ACPI_FAILURE (Status))
{
AcpiOsFree (Allocation);
@@ -180,9 +180,12 @@ AcpiUtAllocateAndTrack (
AcpiGbl_GlobalList->TotalAllocated++;
AcpiGbl_GlobalList->TotalSize += (UINT32) Size;
AcpiGbl_GlobalList->CurrentTotalSize += (UINT32) Size;
- if (AcpiGbl_GlobalList->CurrentTotalSize > AcpiGbl_GlobalList->MaxOccupied)
+
+ if (AcpiGbl_GlobalList->CurrentTotalSize >
+ AcpiGbl_GlobalList->MaxOccupied)
{
- AcpiGbl_GlobalList->MaxOccupied = AcpiGbl_GlobalList->CurrentTotalSize;
+ AcpiGbl_GlobalList->MaxOccupied =
+ AcpiGbl_GlobalList->CurrentTotalSize;
}
return ((void *) &Allocation->UserSpace);
@@ -224,7 +227,8 @@ AcpiUtAllocateZeroedAndTrack (
Size = 1;
}
- Allocation = AcpiOsAllocateZeroed (Size + sizeof (ACPI_DEBUG_MEM_HEADER));
+ Allocation = AcpiOsAllocateZeroed (
+ Size + sizeof (ACPI_DEBUG_MEM_HEADER));
if (!Allocation)
{
/* Report allocation error */
@@ -235,7 +239,7 @@ AcpiUtAllocateZeroedAndTrack (
}
Status = AcpiUtTrackAllocation (Allocation, Size,
- ACPI_MEM_CALLOC, Component, Module, Line);
+ ACPI_MEM_CALLOC, Component, Module, Line);
if (ACPI_FAILURE (Status))
{
AcpiOsFree (Allocation);
@@ -245,9 +249,12 @@ AcpiUtAllocateZeroedAndTrack (
AcpiGbl_GlobalList->TotalAllocated++;
AcpiGbl_GlobalList->TotalSize += (UINT32) Size;
AcpiGbl_GlobalList->CurrentTotalSize += (UINT32) Size;
- if (AcpiGbl_GlobalList->CurrentTotalSize > AcpiGbl_GlobalList->MaxOccupied)
+
+ if (AcpiGbl_GlobalList->CurrentTotalSize >
+ AcpiGbl_GlobalList->MaxOccupied)
{
- AcpiGbl_GlobalList->MaxOccupied = AcpiGbl_GlobalList->CurrentTotalSize;
+ AcpiGbl_GlobalList->MaxOccupied =
+ AcpiGbl_GlobalList->CurrentTotalSize;
}
return ((void *) &Allocation->UserSpace);
@@ -292,13 +299,12 @@ AcpiUtFreeAndTrack (
}
DebugBlock = ACPI_CAST_PTR (ACPI_DEBUG_MEM_BLOCK,
- (((char *) Allocation) - sizeof (ACPI_DEBUG_MEM_HEADER)));
+ (((char *) Allocation) - sizeof (ACPI_DEBUG_MEM_HEADER)));
AcpiGbl_GlobalList->TotalFreed++;
AcpiGbl_GlobalList->CurrentTotalSize -= DebugBlock->Size;
- Status = AcpiUtRemoveAllocation (DebugBlock,
- Component, Module, Line);
+ Status = AcpiUtRemoveAllocation (DebugBlock, Component, Module, Line);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status, "Could not free memory"));
@@ -440,10 +446,10 @@ AcpiUtTrackAllocation (
/* Fill in the instance data */
- Allocation->Size = (UINT32) Size;
+ Allocation->Size = (UINT32) Size;
Allocation->AllocType = AllocType;
Allocation->Component = Component;
- Allocation->Line = Line;
+ Allocation->Line = Line;
strncpy (Allocation->Module, Module, ACPI_MAX_MODULE_NAME);
Allocation->Module[ACPI_MAX_MODULE_NAME-1] = 0;
@@ -454,7 +460,8 @@ AcpiUtTrackAllocation (
if (MemList->ListHead)
{
- ((ACPI_DEBUG_MEM_BLOCK *)(MemList->ListHead))->Previous = Allocation;
+ ((ACPI_DEBUG_MEM_BLOCK *)(MemList->ListHead))->Previous =
+ Allocation;
}
Allocation->Next = MemList->ListHead;
@@ -587,37 +594,37 @@ AcpiUtDumpAllocationInfo (
/*
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("%30s: %4d (%3d Kb)\n", "Current allocations",
- MemList->CurrentCount,
- ROUND_UP_TO_1K (MemList->CurrentSize)));
+ ("%30s: %4d (%3d Kb)\n", "Current allocations",
+ MemList->CurrentCount,
+ ROUND_UP_TO_1K (MemList->CurrentSize)));
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("%30s: %4d (%3d Kb)\n", "Max concurrent allocations",
- MemList->MaxConcurrentCount,
- ROUND_UP_TO_1K (MemList->MaxConcurrentSize)));
+ ("%30s: %4d (%3d Kb)\n", "Max concurrent allocations",
+ MemList->MaxConcurrentCount,
+ ROUND_UP_TO_1K (MemList->MaxConcurrentSize)));
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("%30s: %4d (%3d Kb)\n", "Total (all) internal objects",
- RunningObjectCount,
- ROUND_UP_TO_1K (RunningObjectSize)));
+ ("%30s: %4d (%3d Kb)\n", "Total (all) internal objects",
+ RunningObjectCount,
+ ROUND_UP_TO_1K (RunningObjectSize)));
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("%30s: %4d (%3d Kb)\n", "Total (all) allocations",
- RunningAllocCount,
- ROUND_UP_TO_1K (RunningAllocSize)));
+ ("%30s: %4d (%3d Kb)\n", "Total (all) allocations",
+ RunningAllocCount,
+ ROUND_UP_TO_1K (RunningAllocSize)));
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("%30s: %4d (%3d Kb)\n", "Current Nodes",
- AcpiGbl_CurrentNodeCount,
- ROUND_UP_TO_1K (AcpiGbl_CurrentNodeSize)));
+ ("%30s: %4d (%3d Kb)\n", "Current Nodes",
+ AcpiGbl_CurrentNodeCount,
+ ROUND_UP_TO_1K (AcpiGbl_CurrentNodeSize)));
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("%30s: %4d (%3d Kb)\n", "Max Nodes",
- AcpiGbl_MaxConcurrentNodeCount,
- ROUND_UP_TO_1K ((AcpiGbl_MaxConcurrentNodeCount *
- sizeof (ACPI_NAMESPACE_NODE)))));
+ ("%30s: %4d (%3d Kb)\n", "Max Nodes",
+ AcpiGbl_MaxConcurrentNodeCount,
+ ROUND_UP_TO_1K ((AcpiGbl_MaxConcurrentNodeCount *
+ sizeof (ACPI_NAMESPACE_NODE)))));
*/
return_VOID;
}
@@ -669,7 +676,8 @@ AcpiUtDumpAllocations (
if ((Element->Component & Component) &&
((Module == NULL) || (0 == strcmp (Module, Element->Module))))
{
- Descriptor = ACPI_CAST_PTR (ACPI_DESCRIPTOR, &Element->UserSpace);
+ Descriptor = ACPI_CAST_PTR (
+ ACPI_DESCRIPTOR, &Element->UserSpace);
if (Element->Size < sizeof (ACPI_COMMON_DESCRIPTOR))
{
@@ -682,7 +690,8 @@ AcpiUtDumpAllocations (
{
/* Ignore allocated objects that are in a cache */
- if (ACPI_GET_DESCRIPTOR_TYPE (Descriptor) != ACPI_DESC_TYPE_CACHED)
+ if (ACPI_GET_DESCRIPTOR_TYPE (Descriptor) !=
+ ACPI_DESC_TYPE_CACHED)
{
AcpiOsPrintf ("%p Length 0x%04X %9.9s-%u [%s] ",
Descriptor, Element->Size, Element->Module,
diff --git a/source/components/utilities/utuuid.c b/source/components/utilities/utuuid.c
index 7ad4b27ef7564..0cb7e71925f0a 100644
--- a/source/components/utilities/utuuid.c
+++ b/source/components/utilities/utuuid.c
@@ -93,11 +93,11 @@ AcpiUtConvertStringToUuid (
for (i = 0; i < UUID_BUFFER_LENGTH; i++)
{
- UuidBuffer[i] =
- (AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i]]) << 4);
+ UuidBuffer[i] = (AcpiUtAsciiCharToHex (
+ InString[AcpiGbl_MapToUuidOffset[i]]) << 4);
- UuidBuffer[i] |=
- AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i] + 1]);
+ UuidBuffer[i] |= AcpiUtAsciiCharToHex (
+ InString[AcpiGbl_MapToUuidOffset[i] + 1]);
}
}
#endif
diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c
index d41c93a18f860..57c2f458bcc80 100644
--- a/source/components/utilities/utxface.c
+++ b/source/components/utilities/utxface.c
@@ -73,24 +73,6 @@ AcpiTerminate (
ACPI_FUNCTION_TRACE (AcpiTerminate);
- /* Just exit if subsystem is already shutdown */
-
- if (AcpiGbl_Shutdown)
- {
- ACPI_ERROR ((AE_INFO, "ACPI Subsystem is already terminated"));
- return_ACPI_STATUS (AE_OK);
- }
-
- /* Subsystem appears active, go ahead and shut it down */
-
- AcpiGbl_Shutdown = TRUE;
- AcpiGbl_StartupFlags = 0;
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n"));
-
- /* Terminate the AML Debugger if present */
-
- ACPI_DEBUGGER_EXEC (AcpiGbl_DbTerminateThreads = TRUE);
-
/* Shutdown and free all resources */
AcpiUtSubsystemShutdown ();
@@ -190,7 +172,6 @@ AcpiGetSystemInfo (
* Populate the return buffer
*/
InfoPtr = (ACPI_SYSTEM_INFO *) OutBuffer->Pointer;
-
InfoPtr->AcpiCaVersion = ACPI_CA_VERSION;
/* System flags (ACPI capabilities) */
@@ -258,11 +239,9 @@ AcpiGetStatistics (
memcpy (Stats->FixedEventCount, AcpiFixedEventCount,
sizeof (AcpiFixedEventCount));
-
/* Other counters */
Stats->MethodCount = AcpiMethodCount;
-
return_ACPI_STATUS (AE_OK);
}
diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c
index a6a6818b6888c..8cbb2632c4d49 100644
--- a/source/components/utilities/utxferror.c
+++ b/source/components/utilities/utxferror.c
@@ -133,8 +133,10 @@ AcpiException (
}
else
{
- AcpiOsPrintf (ACPI_MSG_EXCEPTION "%s, ", AcpiFormatException (Status));
+ AcpiOsPrintf (ACPI_MSG_EXCEPTION "%s, ",
+ AcpiFormatException (Status));
}
+
va_start (ArgList, Format);
AcpiOsVprintf (Format, ArgList);
ACPI_MSG_SUFFIX;
diff --git a/source/components/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c
index cf27a02df5668..3e8d6d858d29b 100644
--- a/source/components/utilities/utxfmutex.c
+++ b/source/components/utilities/utxfmutex.c
@@ -98,8 +98,8 @@ AcpiUtGetMutexObject (
MutexNode = Handle;
if (Pathname != NULL)
{
- Status = AcpiGetHandle (Handle, Pathname,
- ACPI_CAST_PTR (ACPI_HANDLE, &MutexNode));
+ Status = AcpiGetHandle (
+ Handle, Pathname, ACPI_CAST_PTR (ACPI_HANDLE, &MutexNode));
if (ACPI_FAILURE (Status))
{
return (Status);