summaryrefslogtreecommitdiff
path: root/source/components
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2019-10-18 18:00:41 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2019-10-18 18:00:41 +0000
commit858f47305dae045d81f39451ade697ba99b3266f (patch)
tree67a913169f2c94028780a7a2a0c84fc9f84e8c60 /source/components
parente63852a7532181a14cec2928b31af2209e98414a (diff)
Notes
Diffstat (limited to 'source/components')
-rw-r--r--source/components/debugger/dbconvert.c4
-rw-r--r--source/components/debugger/dbdisply.c2
-rw-r--r--source/components/debugger/dbfileio.c2
-rw-r--r--source/components/debugger/dbinput.c36
-rw-r--r--source/components/debugger/dbmethod.c5
-rw-r--r--source/components/debugger/dbnames.c122
-rw-r--r--source/components/debugger/dbobject.c1
-rw-r--r--source/components/disassembler/dmdeferred.c4
-rw-r--r--source/components/disassembler/dmresrc.c1
-rw-r--r--source/components/disassembler/dmwalk.c1
-rw-r--r--source/components/dispatcher/dscontrol.c2
-rw-r--r--source/components/dispatcher/dsfield.c9
-rw-r--r--source/components/events/evgpeblk.c6
-rw-r--r--source/components/events/evgpeinit.c3
-rw-r--r--source/components/events/evmisc.c17
-rw-r--r--source/components/events/evregion.c4
-rw-r--r--source/components/events/evrgnini.c1
-rw-r--r--source/components/hardware/hwxfsleep.c4
-rw-r--r--source/components/namespace/nsconvert.c2
-rw-r--r--source/components/namespace/nsdump.c6
-rw-r--r--source/components/namespace/nsxfname.c2
-rw-r--r--source/components/parser/psobject.c6
-rw-r--r--source/components/resources/rscreate.c4
-rw-r--r--source/components/tables/tbdata.c4
-rw-r--r--source/components/tables/tbxfload.c49
-rw-r--r--source/components/utilities/utbuffer.c62
-rw-r--r--source/components/utilities/utids.c3
-rw-r--r--source/components/utilities/uttrack.c2
28 files changed, 299 insertions, 65 deletions
diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c
index 631e7e8ff98f..6b58bf5faf62 100644
--- a/source/components/debugger/dbconvert.c
+++ b/source/components/debugger/dbconvert.c
@@ -274,6 +274,10 @@ AcpiDbConvertToBuffer (
ACPI_STATUS Status;
+ /* Skip all preceding white space*/
+
+ AcpiUtRemoveWhitespace (&String);
+
/* Generate the final buffer length */
for (i = 0, Length = 0; String[i];)
diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c
index 539ff5af117d..72bf1c6be28e 100644
--- a/source/components/debugger/dbdisply.c
+++ b/source/components/debugger/dbdisply.c
@@ -713,7 +713,6 @@ AcpiDbDisplayResults (
return;
}
- ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
if (WalkState->Results)
@@ -773,7 +772,6 @@ AcpiDbDisplayCallingTree (
return;
}
- Node = WalkState->MethodNode;
AcpiOsPrintf ("Current Control Method Call Tree\n");
while (WalkState)
diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c
index e937c3e4a631..7567fa75447a 100644
--- a/source/components/debugger/dbfileio.c
+++ b/source/components/debugger/dbfileio.c
@@ -253,7 +253,7 @@ AcpiDbLoadTables (
{
Table = TableListHead->Table;
- Status = AcpiLoadTable (Table);
+ Status = AcpiLoadTable (Table, NULL);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index d091d351b02c..c854cb37a7fe 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -208,6 +208,7 @@ enum AcpiExDebuggerCommands
CMD_EVALUATE,
CMD_EXECUTE,
CMD_EXIT,
+ CMD_FIELDS,
CMD_FIND,
CMD_GO,
CMD_HANDLERS,
@@ -287,6 +288,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
{"EVALUATE", 1},
{"EXECUTE", 1},
{"EXIT", 0},
+ {"FIELDS", 1},
{"FIND", 1},
{"GO", 0},
{"HANDLERS", 0},
@@ -360,6 +362,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Find <AcpiName> (? is wildcard)", "Find ACPI name(s) with wildcards\n"},
{1, " Integrity", "Validate namespace integrity\n"},
{1, " Methods", "Display list of loaded control methods\n"},
+ {1, " Fields <AddressSpaceId>", "Display list of loaded field units by space ID\n"},
{1, " Namespace [Object] [Depth]", "Display loaded namespace tree/subtree\n"},
{1, " Notify <Object> <Value>", "Send a notification on Object\n"},
{1, " Objects [ObjectType]", "Display summary of all objects or just given type\n"},
@@ -683,6 +686,22 @@ AcpiDbGetNextToken (
}
break;
+ case '{':
+
+ /* This is the start of a field unit, scan until closing brace */
+
+ String++;
+ Start = String;
+ Type = ACPI_TYPE_FIELD_UNIT;
+
+ /* Find end of buffer */
+
+ while (*String && (*String != '}'))
+ {
+ String++;
+ }
+ break;
+
case '[':
/* This is the start of a package, scan until closing bracket */
@@ -877,6 +896,7 @@ AcpiDbCommandDispatch (
ACPI_PARSE_OBJECT *Op)
{
UINT32 Temp;
+ UINT64 Temp64;
UINT32 CommandIndex;
UINT32 ParamCount;
char *CommandLine;
@@ -894,7 +914,6 @@ AcpiDbCommandDispatch (
ParamCount = AcpiDbGetLine (InputBuffer);
CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
- Temp = 0;
/*
* We don't want to add the !! command to the history buffer. It
@@ -993,6 +1012,21 @@ AcpiDbCommandDispatch (
Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
break;
+ case CMD_FIELDS:
+
+ Status = AcpiUtStrtoul64 (AcpiGbl_DbArgs[1], &Temp64);
+
+ if (ACPI_FAILURE (Status) || Temp64 >= ACPI_NUM_PREDEFINED_REGIONS)
+ {
+ AcpiOsPrintf (
+ "Invalid adress space ID: must be between 0 and %u inclusive\n",
+ ACPI_NUM_PREDEFINED_REGIONS - 1);
+ return (AE_OK);
+ }
+
+ Status = AcpiDbDisplayFields ((UINT32) Temp64);
+ break;
+
case CMD_GO:
AcpiGbl_CmSingleStep = FALSE;
diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c
index 6893c5502aba..24c014f9d7cb 100644
--- a/source/components/debugger/dbmethod.c
+++ b/source/components/debugger/dbmethod.c
@@ -515,6 +515,11 @@ AcpiDbDisassembleMethod (
WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
Status = AcpiPsParseAml (WalkState);
+ if (ACPI_FAILURE(Status))
+ {
+ return (Status);
+ }
+
(void) AcpiDmParseDeferredOps (Op);
/* Now we can disassemble the method */
diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c
index 2c9af4be741d..ac366ab04ca2 100644
--- a/source/components/debugger/dbnames.c
+++ b/source/components/debugger/dbnames.c
@@ -154,6 +154,7 @@
#include "acnamesp.h"
#include "acdebug.h"
#include "acpredef.h"
+#include "acinterp.h"
#define _COMPONENT ACPI_CA_DEBUGGER
@@ -724,6 +725,91 @@ AcpiDbWalkForObjectCounts (
/*******************************************************************************
*
+ * FUNCTION: AcpiDbWalkForFields
+ *
+ * PARAMETERS: Callback from WalkNamespace
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Display short info about objects in the namespace
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbWalkForFields (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue)
+{
+ ACPI_OBJECT *RetValue;
+ ACPI_REGION_WALK_INFO *Info = (ACPI_REGION_WALK_INFO *) Context;
+ ACPI_BUFFER Buffer;
+ ACPI_STATUS Status;
+ ACPI_NAMESPACE_NODE *Node = AcpiNsValidateHandle (ObjHandle);
+
+
+ if (!Node)
+ {
+ return (AE_OK);
+ }
+ if (Node->Object->Field.RegionObj->Region.SpaceId != Info->AddressSpaceId)
+ {
+ return (AE_OK);
+ }
+
+ Info->Count++;
+
+ /* Get and display the full pathname to this object */
+
+ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+ Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
+ return (AE_OK);
+ }
+
+ AcpiOsPrintf ("%s ", (char *) Buffer.Pointer);
+ ACPI_FREE (Buffer.Pointer);
+
+ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+ AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer);
+
+ /*
+ * Since this is a field unit, surround the output in braces
+ */
+ AcpiOsPrintf ("{");
+
+ RetValue = (ACPI_OBJECT *) Buffer.Pointer;
+ switch (RetValue->Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (RetValue->Integer.Value));
+ break;
+
+ case ACPI_TYPE_BUFFER:
+
+ AcpiUtDumpBuffer (RetValue->Buffer.Pointer,
+ RetValue->Buffer.Length, DB_DISPLAY_DATA_ONLY | DB_BYTE_DISPLAY, 0);
+ break;
+
+ default:
+
+ break;
+ }
+
+ AcpiOsPrintf ("}\n");
+
+ ACPI_FREE (Buffer.Pointer);
+ return (AE_OK);
+}
+
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDbWalkForSpecificObjects
*
* PARAMETERS: Callback from WalkNamespace
@@ -859,6 +945,42 @@ AcpiDbDisplayObjects (
/*******************************************************************************
*
+ * FUNCTION: AcpiDbDisplayFields
+ *
+ * PARAMETERS: ObjTypeArg - Type of object to display
+ * DisplayCountArg - Max depth to display
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Display objects in the namespace of the requested type
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDbDisplayFields (
+ UINT32 AddressSpaceId)
+{
+ ACPI_REGION_WALK_INFO Info;
+
+
+ Info.Count = 0;
+ Info.OwnerId = ACPI_OWNER_ID_MAX;
+ Info.DebugLevel = ACPI_UINT32_MAX;
+ Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;
+ Info.AddressSpaceId = AddressSpaceId;
+
+ /* Walk the namespace from the root */
+
+ (void) AcpiWalkNamespace (ACPI_TYPE_LOCAL_REGION_FIELD, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbWalkForFields, NULL,
+ (void *) &Info, NULL);
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDbIntegrityWalk
*
* PARAMETERS: Callback from WalkNamespace
diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c
index cebf4420528b..cffa0a533726 100644
--- a/source/components/debugger/dbobject.c
+++ b/source/components/debugger/dbobject.c
@@ -649,7 +649,6 @@ AcpiDbDecodeArguments (
Node = WalkState->MethodNode;
- ObjDesc = WalkState->MethodDesc;
/* There are no arguments for the module-level code case */
diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c
index d0753bb0463c..d0a589c9c7ba 100644
--- a/source/components/disassembler/dmdeferred.c
+++ b/source/components/disassembler/dmdeferred.c
@@ -309,6 +309,10 @@ AcpiDmDeferredParse (
WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
Status = AcpiPsParseAml (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS(Status);
+ }
StartOp = (Op->Common.Value.Arg)->Common.Next;
SearchOp = StartOp;
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index bb36b7349581..c2e85b8a2e31 100644
--- a/source/components/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
@@ -441,7 +441,6 @@ AcpiDmResourceTemplate (
* missing EndDependentDescriptor.
*/
Level--;
- DependentFns = FALSE;
/* Go ahead and insert EndDependentFn() */
diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c
index 8ec8728e2225..97b330397190 100644
--- a/source/components/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
@@ -957,7 +957,6 @@ AcpiDmDescendingOp (
* the buffer size Op. Open up a new block
*/
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
- NextOp = NextOp->Common.Next;
ASL_CV_CLOSE_PAREN (Op, Level);
/* Emit description comment for Name() with a predefined ACPI name */
diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c
index 238c77bbff6b..85b4679eb268 100644
--- a/source/components/dispatcher/dscontrol.c
+++ b/source/components/dispatcher/dscontrol.c
@@ -235,7 +235,7 @@ AcpiDsExecBeginControlOp (
ControlState->Control.Opcode =
Op->Common.AmlOpcode;
ControlState->Control.LoopTimeout = AcpiOsGetTimer () +
- (UINT64) (AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
+ ((UINT64) AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
/* Push the control state on this walk's control stack */
diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c
index 3aff4db10262..5477686f1b5c 100644
--- a/source/components/dispatcher/dsfield.c
+++ b/source/components/dispatcher/dsfield.c
@@ -309,7 +309,6 @@ AcpiDsCreateBufferField (
if (WalkState->DeferredNode)
{
Node = WalkState->DeferredNode;
- Status = AE_OK;
}
else
{
@@ -435,7 +434,6 @@ AcpiDsGetFieldNames (
ACPI_PARSE_OBJECT *Child;
#ifdef ACPI_EXEC_APP
- UINT64 Value = 0;
ACPI_OPERAND_OBJECT *ResultDesc;
ACPI_OPERAND_OBJECT *ObjDesc;
char *NamePath;
@@ -577,14 +575,13 @@ AcpiDsGetFieldNames (
}
#ifdef ACPI_EXEC_APP
NamePath = AcpiNsGetExternalPathname (Info->FieldNode);
- ObjDesc = AcpiUtCreateIntegerObject (Value);
- if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &Value)))
+ if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &ObjDesc)))
{
AcpiExWriteDataToField (ObjDesc,
AcpiNsGetAttachedObject (Info->FieldNode),
&ResultDesc);
+ AcpiUtRemoveReference (ObjDesc);
}
- AcpiUtRemoveReference (ObjDesc);
ACPI_FREE (NamePath);
#endif
}
@@ -813,8 +810,6 @@ AcpiDsInitFieldObjects (
}
/* Name already exists, just ignore this error */
-
- Status = AE_OK;
}
Arg->Common.Node = Node;
diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c
index 80157dcd362f..e0e2780f34fc 100644
--- a/source/components/events/evgpeblk.c
+++ b/source/components/events/evgpeblk.c
@@ -272,6 +272,10 @@ AcpiEvDeleteGpeBlock (
/* Disable all GPEs in this block */
Status = AcpiHwDisableGpeBlock (GpeBlock->XruptBlock, GpeBlock, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
if (!GpeBlock->Previous && !GpeBlock->Next)
{
@@ -542,7 +546,7 @@ AcpiEvCreateGpeBlock (
WalkInfo.GpeDevice = GpeDevice;
WalkInfo.ExecuteByOwnerId = FALSE;
- Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
+ (void) AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
AcpiEvMatchGpeMethod, NULL, &WalkInfo, NULL);
diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c
index b7e02a060bcf..7e3c766c69d9 100644
--- a/source/components/events/evgpeinit.c
+++ b/source/components/events/evgpeinit.c
@@ -302,8 +302,6 @@ AcpiEvGpeInitialize (
* GPE0 and GPE1 do not have to be contiguous in the GPE number
* space. However, GPE0 always starts at GPE number zero.
*/
- GpeNumberMax = AcpiGbl_FADT.Gpe1Base +
- ((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
}
}
@@ -315,7 +313,6 @@ AcpiEvGpeInitialize (
ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
"There are no GPE blocks defined in the FADT\n"));
- Status = AE_OK;
goto Cleanup;
}
diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c
index f73cc2f3c8ac..68f1dc8a361a 100644
--- a/source/components/events/evmisc.c
+++ b/source/components/events/evmisc.c
@@ -400,11 +400,16 @@ AcpiEvTerminate (
/* Disable all GPEs in all GPE blocks */
Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Could not disable GPEs in GPE block"));
+ }
Status = AcpiEvRemoveGlobalLockHandler ();
- if (ACPI_FAILURE(Status))
+ if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO,
+ ACPI_EXCEPTION ((AE_INFO, Status,
"Could not remove Global Lock handler"));
}
@@ -414,7 +419,7 @@ AcpiEvTerminate (
/* Remove SCI handlers */
Status = AcpiEvRemoveAllSciHandlers ();
- if (ACPI_FAILURE(Status))
+ if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,
"Could not remove SCI handler"));
@@ -423,6 +428,12 @@ AcpiEvTerminate (
/* Deallocate all handler objects installed within GPE info structs */
Status = AcpiEvWalkGpeList (AcpiEvDeleteGpeHandlers, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Could not delete GPE handlers"));
+ }
+
/* Return to original mode if necessary */
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c
index 6f6d7ccc8b50..13a20918c886 100644
--- a/source/components/events/evregion.c
+++ b/source/components/events/evregion.c
@@ -1037,11 +1037,11 @@ AcpiEvOrphanEcRegMethod (
Objects[1].Type = ACPI_TYPE_INTEGER;
Objects[1].Integer.Value = ACPI_REG_CONNECT;
- Status = AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
+ (void) AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
Exit:
/* We ignore all errors from above, don't care */
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ (void) AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
return_VOID;
}
diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c
index 718e2e87d933..3c865c59f267 100644
--- a/source/components/events/evrgnini.c
+++ b/source/components/events/evrgnini.c
@@ -363,7 +363,6 @@ AcpiEvPciConfigRegionSetup (
* root bridge. Still need to return a context object
* for the new PCI_Config operation region, however.
*/
- Status = AE_OK;
}
else
{
diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c
index 3df8f5a545f3..78dc19020334 100644
--- a/source/components/hardware/hwxfsleep.c
+++ b/source/components/hardware/hwxfsleep.c
@@ -357,6 +357,10 @@ AcpiEnterSleepStateS4bios (
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
(UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
do {
AcpiOsStall (ACPI_USEC_PER_MSEC);
diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c
index d2b32d25d2bf..ae590490783a 100644
--- a/source/components/namespace/nsconvert.c
+++ b/source/components/namespace/nsconvert.c
@@ -670,5 +670,5 @@ AcpiNsConvertToReference (
ErrorExit:
ACPI_FREE (Name);
*ReturnObject = NewObject;
- return (AE_OK);
+ return (Status);
}
diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c
index 8a2a7e92da1b..0ed4d72cb123 100644
--- a/source/components/namespace/nsdump.c
+++ b/source/components/namespace/nsdump.c
@@ -478,7 +478,7 @@ AcpiNsDumpOneObject (
AcpiOsPrintf (" =");
for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++)
{
- AcpiOsPrintf (" %.2hX", ObjDesc->Buffer.Pointer[i]);
+ AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
}
}
AcpiOsPrintf ("\n");
@@ -575,7 +575,7 @@ AcpiNsDumpOneObject (
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
- AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2hd\n",
+ AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2X\n",
(ObjDesc->CommonField.BaseByteOffset * 8)
+ ObjDesc->CommonField.StartFieldBitOffset,
ObjDesc->CommonField.BitLength,
@@ -760,8 +760,6 @@ AcpiNsDumpOneObject (
goto Cleanup;
}
-
- ObjType = ACPI_TYPE_INVALID; /* Terminate loop after next pass */
}
Cleanup:
diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c
index 7332a92f3e87..85be591f46ae 100644
--- a/source/components/namespace/nsxfname.c
+++ b/source/components/namespace/nsxfname.c
@@ -611,7 +611,7 @@ AcpiGetObjectInfo (
if (Cls)
{
- NextIdString = AcpiNsCopyDeviceId (&Info->ClassCode,
+ (void) AcpiNsCopyDeviceId (&Info->ClassCode,
Cls, NextIdString);
}
diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c
index 61c3a868ac6e..6ceb7d91c36d 100644
--- a/source/components/parser/psobject.c
+++ b/source/components/parser/psobject.c
@@ -652,7 +652,7 @@ AcpiPsCompleteOp (
WalkState->Opcode = (*Op)->Common.AmlOpcode;
Status = WalkState->AscendingCallback (WalkState);
- Status = AcpiPsNextParseState (WalkState, *Op, Status);
+ (void) AcpiPsNextParseState (WalkState, *Op, Status);
Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
if (ACPI_FAILURE (Status2))
@@ -661,7 +661,6 @@ AcpiPsCompleteOp (
}
}
- Status = AE_OK;
break;
case AE_CTRL_BREAK:
@@ -682,7 +681,7 @@ AcpiPsCompleteOp (
WalkState->Opcode = (*Op)->Common.AmlOpcode;
Status = WalkState->AscendingCallback (WalkState);
- Status = AcpiPsNextParseState (WalkState, *Op, Status);
+ (void) AcpiPsNextParseState (WalkState, *Op, Status);
Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
if (ACPI_FAILURE (Status2))
@@ -690,7 +689,6 @@ AcpiPsCompleteOp (
return_ACPI_STATUS (Status2);
}
- Status = AE_OK;
break;
case AE_CTRL_TERMINATE:
diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c
index 26640c209e94..172bc55fb11e 100644
--- a/source/components/resources/rscreate.c
+++ b/source/components/resources/rscreate.c
@@ -481,6 +481,10 @@ AcpiRsCreatePciRoutingTable (
Status = AcpiNsHandleToPathname (
(ACPI_HANDLE) Node, &PathBuffer, FALSE);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
/* +1 to include null terminator */
diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c
index 84dd25bdf26c..6eb1f24a9495 100644
--- a/source/components/tables/tbdata.c
+++ b/source/components/tables/tbdata.c
@@ -1190,6 +1190,10 @@ AcpiTbLoadTable (
}
Status = AcpiNsLoadTable (TableIndex, ParentNode);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
/*
* Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c
index 1e17db6c8c93..24daafcffbef 100644
--- a/source/components/tables/tbxfload.c
+++ b/source/components/tables/tbxfload.c
@@ -445,6 +445,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
*
* PARAMETERS: Table - Pointer to a buffer containing the ACPI
* table to be loaded.
+ * TableIdx - Pointer to a UINT32 for storing the table
+ * index, might be NULL
*
* RETURN: Status
*
@@ -458,7 +460,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
ACPI_STATUS
AcpiLoadTable (
- ACPI_TABLE_HEADER *Table)
+ ACPI_TABLE_HEADER *Table,
+ UINT32 *TableIdx)
{
ACPI_STATUS Status;
UINT32 TableIndex;
@@ -479,6 +482,11 @@ AcpiLoadTable (
ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
+ if (TableIdx)
+ {
+ *TableIdx = TableIndex;
+ }
+
if (ACPI_SUCCESS (Status))
{
/* Complete the initialization/resolution of new objects */
@@ -582,3 +590,42 @@ AcpiUnloadParentTable (
}
ACPI_EXPORT_SYMBOL (AcpiUnloadParentTable)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUnloadTable
+ *
+ * PARAMETERS: TableIndex - Index as returned by AcpiLoadTable
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Via the TableIndex representing an SSDT or OEMx table, unloads
+ * the table and deletes all namespace objects associated with
+ * that table. Unloading of the DSDT is not allowed.
+ * Note: Mainly intended to support hotplug removal of SSDTs.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUnloadTable (
+ UINT32 TableIndex)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiUnloadTable);
+
+
+ if (TableIndex == 1)
+ {
+ /* TableIndex==1 means DSDT is the owner. DSDT cannot be unloaded */
+
+ return_ACPI_STATUS (AE_TYPE);
+ }
+
+ Status = AcpiTbUnloadTable (TableIndex);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiUnloadTable)
diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c
index 44fd30a6a16a..015c16f93939 100644
--- a/source/components/utilities/utbuffer.c
+++ b/source/components/utilities/utbuffer.c
@@ -186,8 +186,10 @@ AcpiUtDumpBuffer (
UINT32 j;
UINT32 Temp32;
UINT8 BufChar;
+ UINT32 DisplayDataOnly = Display & DB_DISPLAY_DATA_ONLY;
+ Display &= ~DB_DISPLAY_DATA_ONLY;
if (!Buffer)
{
AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
@@ -205,7 +207,10 @@ AcpiUtDumpBuffer (
{
/* Print current offset */
- AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
+ if (!DisplayDataOnly)
+ {
+ AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
+ }
/* Print 16 hex chars */
@@ -257,38 +262,41 @@ AcpiUtDumpBuffer (
* Print the ASCII equivalent characters but watch out for the bad
* unprintable ones (printable chars are 0x20 through 0x7E)
*/
- AcpiOsPrintf (" ");
- for (j = 0; j < 16; j++)
+ if (!DisplayDataOnly)
{
- if (i + j >= Count)
+ AcpiOsPrintf (" ");
+ for (j = 0; j < 16; j++)
{
- AcpiOsPrintf ("\n");
- return;
+ if (i + j >= Count)
+ {
+ AcpiOsPrintf ("\n");
+ return;
+ }
+
+ /*
+ * Add comment characters so rest of line is ignored when
+ * compiled
+ */
+ if (j == 0)
+ {
+ AcpiOsPrintf ("// ");
+ }
+
+ BufChar = Buffer[(ACPI_SIZE) i + j];
+ if (isprint (BufChar))
+ {
+ AcpiOsPrintf ("%c", BufChar);
+ }
+ else
+ {
+ AcpiOsPrintf (".");
+ }
}
- /*
- * Add comment characters so rest of line is ignored when
- * compiled
- */
- if (j == 0)
- {
- AcpiOsPrintf ("// ");
- }
+ /* Done with that line. */
- BufChar = Buffer[(ACPI_SIZE) i + j];
- if (isprint (BufChar))
- {
- AcpiOsPrintf ("%c", BufChar);
- }
- else
- {
- AcpiOsPrintf (".");
- }
+ AcpiOsPrintf ("\n");
}
-
- /* Done with that line. */
-
- AcpiOsPrintf ("\n");
i += 16;
}
diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c
index 5fcfbf66809e..513548c24a9e 100644
--- a/source/components/utilities/utids.c
+++ b/source/components/utilities/utids.c
@@ -466,7 +466,8 @@ AcpiUtExecute_CID (
{
/* Copy the String CID from the returned object */
- strcpy (NextIdString, CidObjects[i]->String.Pointer);
+ AcpiUtSafeStrcpy (NextIdString, CidObjects[i]->String.Length + 1,
+ CidObjects[i]->String.Pointer);
Length = CidObjects[i]->String.Length + 1;
}
diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c
index c6e6b45bd6de..76e439fee354 100644
--- a/source/components/utilities/uttrack.c
+++ b/source/components/utilities/uttrack.c
@@ -864,7 +864,7 @@ AcpiUtDumpAllocations (
case ACPI_DESC_TYPE_PARSER:
- AcpiOsPrintf ("AmlOpcode 0x%04hX\n",
+ AcpiOsPrintf ("AmlOpcode 0x%04X\n",
Descriptor->Op.Asl.AmlOpcode);
break;