summaryrefslogtreecommitdiff
path: root/source/components
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2020-03-26 21:13:14 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2020-03-26 21:13:14 +0000
commita117a0a6c82c5a5030040bd2b75704a1366741d6 (patch)
tree29eb5a43c2eeafbdaada31b2f23a7b96f623b260 /source/components
parentaa36cd6999384cddbfa0d030bcdd44e8bf9c7779 (diff)
Notes
Diffstat (limited to 'source/components')
-rw-r--r--source/components/debugger/dbinput.c19
-rw-r--r--source/components/debugger/dbxface.c1
-rw-r--r--source/components/dispatcher/dswexec.c32
-rw-r--r--source/components/dispatcher/dswload.c2
-rw-r--r--source/components/dispatcher/dswload2.c37
-rw-r--r--source/components/hardware/hwsleep.c4
-rw-r--r--source/components/namespace/nsnames.c8
-rw-r--r--source/components/utilities/utdecode.c2
-rw-r--r--source/components/utilities/utdelete.c9
-rw-r--r--source/components/utilities/utprint.c8
10 files changed, 92 insertions, 30 deletions
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index 0bfe994745b4..378e3db1a165 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -637,19 +637,16 @@ AcpiDbGetNextToken (
return (NULL);
}
- /* Remove any spaces at the beginning */
+ /* Remove any spaces at the beginning, ignore blank lines */
- if (*String == ' ')
+ while (*String && isspace (*String))
{
- while (*String && (*String == ' '))
- {
- String++;
- }
+ String++;
+ }
- if (!(*String))
- {
- return (NULL);
- }
+ if (!(*String))
+ {
+ return (NULL);
}
switch (*String)
@@ -754,7 +751,7 @@ AcpiDbGetNextToken (
/* Find end of token */
- while (*String && (*String != ' '))
+ while (*String && !isspace (*String))
{
String++;
}
diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c
index e7d354d8d966..f84db8c9e9a9 100644
--- a/source/components/debugger/dbxface.c
+++ b/source/components/debugger/dbxface.c
@@ -594,6 +594,7 @@ AcpiInitializeDebugger (
AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT;
AcpiGbl_DbOpt_NoIniMethods = FALSE;
+ AcpiGbl_DbOpt_NoRegionSupport = FALSE;
AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
if (!AcpiGbl_DbBuffer)
diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c
index f2925ecff00d..3fa7b95bba8e 100644
--- a/source/components/dispatcher/dswexec.c
+++ b/source/components/dispatcher/dswexec.c
@@ -158,7 +158,9 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acdebug.h"
-
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dswexec")
@@ -504,7 +506,10 @@ AcpiDsExecEndOp (
UINT32 OpClass;
ACPI_PARSE_OBJECT *NextOp;
ACPI_PARSE_OBJECT *FirstArg;
-
+#ifdef ACPI_EXEC_APP
+ char *Namepath;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+#endif
ACPI_FUNCTION_TRACE_PTR (DsExecEndOp, WalkState);
@@ -717,6 +722,29 @@ AcpiDsExecEndOp (
}
Status = AcpiDsEvalBufferFieldOperands (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
+
+#ifdef ACPI_EXEC_APP
+ /*
+ * AcpiExec support for namespace initialization file (initialize
+ * BufferFields in this code.)
+ */
+ Namepath = AcpiNsGetExternalPathname (Op->Common.Node);
+ Status = AeLookupInitFileEntry (Namepath, &ObjDesc);
+ if (ACPI_SUCCESS (Status))
+ {
+ Status = AcpiExWriteDataToField (ObjDesc, Op->Common.Node->Object, NULL);
+ if ACPI_FAILURE (Status)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "While writing to buffer field"));
+ }
+ }
+ ACPI_FREE (Namepath);
+ Status = AE_OK;
+#endif
break;
diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c
index d37bd5d4cc7f..62a4fdca417b 100644
--- a/source/components/dispatcher/dswload.c
+++ b/source/components/dispatcher/dswload.c
@@ -156,7 +156,6 @@
#include "acdispat.h"
#include "acinterp.h"
#include "acnamesp.h"
-
#ifdef ACPI_ASL_COMPILER
#include "acdisasm.h"
#endif
@@ -555,7 +554,6 @@ AcpiDsLoad1EndOp (
ACPI_PARSE_OBJECT *Op;
ACPI_OBJECT_TYPE ObjectType;
ACPI_STATUS Status = AE_OK;
-
#ifdef ACPI_ASL_COMPILER
UINT8 ParamCount;
#endif
diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c
index ff2135ce62c4..0ab715cd139b 100644
--- a/source/components/dispatcher/dswload2.c
+++ b/source/components/dispatcher/dswload2.c
@@ -157,6 +157,9 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acevents.h"
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dswload2")
@@ -531,6 +534,10 @@ AcpiDsLoad2EndOp (
ACPI_NAMESPACE_NODE *NewNode;
UINT32 i;
UINT8 RegionSpace;
+#ifdef ACPI_EXEC_APP
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ char *Namepath;
+#endif
ACPI_FUNCTION_TRACE (DsLoad2EndOp);
@@ -627,6 +634,11 @@ AcpiDsLoad2EndOp (
* be evaluated later during the execution phase
*/
Status = AcpiDsCreateBufferField (Op, WalkState);
+ if ACPI_FAILURE (Status)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "CreateBufferField failure"));
+ goto Cleanup;
+ }
break;
case AML_TYPE_NAMED_FIELD:
@@ -766,6 +778,31 @@ AcpiDsLoad2EndOp (
case AML_NAME_OP:
Status = AcpiDsCreateNode (WalkState, Node, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+#ifdef ACPI_EXEC_APP
+ /*
+ * AcpiExec support for namespace initialization file (initialize
+ * Name opcodes in this code.)
+ */
+ Namepath = AcpiNsGetExternalPathname (Node);
+ Status = AeLookupInitFileEntry (Namepath, &ObjDesc);
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Detach any existing object, attach new object */
+
+ if (Node->Object)
+ {
+ AcpiNsDetachObject (Node);
+ }
+ AcpiNsAttachObject (Node, ObjDesc, ObjDesc->Common.Type);
+ }
+ ACPI_FREE (Namepath);
+ Status = AE_OK;
+#endif
break;
case AML_METHOD_OP:
diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c
index 016f62be3aa0..d503f1cf923b 100644
--- a/source/components/hardware/hwsleep.c
+++ b/source/components/hardware/hwsleep.c
@@ -466,11 +466,11 @@ AcpiHwLegacyWake (
/* Enable sleep button */
- (void) AcpiWriteBitRegister (
+ (void) AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].EnableRegisterId,
ACPI_ENABLE_EVENT);
- (void) AcpiWriteBitRegister (
+ (void) AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].StatusRegisterId,
ACPI_CLEAR_STATUS);
diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c
index a9509195c89a..a27a87f02b07 100644
--- a/source/components/namespace/nsnames.c
+++ b/source/components/namespace/nsnames.c
@@ -158,12 +158,6 @@
#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME ("nsnames")
-/* Local Prototypes */
-
-static void
-AcpiNsNormalizePathname (
- char *OriginalPath);
-
/*******************************************************************************
*
@@ -616,7 +610,7 @@ Cleanup:
*
******************************************************************************/
-static void
+void
AcpiNsNormalizePathname (
char *OriginalPath)
{
diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c
index aec3296904a3..01b1823e2d50 100644
--- a/source/components/utilities/utdecode.c
+++ b/source/components/utilities/utdecode.c
@@ -224,7 +224,7 @@ const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
"IPMI", /* 0x07 */
"GeneralPurposeIo", /* 0x08 */
"GenericSerialBus", /* 0x09 */
- "PlatformCommChannel"/* 0x0A */
+ "PCC" /* 0x0A */
};
diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c
index 2f60917bdf99..502ff4132116 100644
--- a/source/components/utilities/utdelete.c
+++ b/source/components/utilities/utdelete.c
@@ -626,13 +626,13 @@ AcpiUtUpdateRefCount (
*
* FUNCTION: AcpiUtUpdateObjectReference
*
- * PARAMETERS: Object - Increment ref count for this object
- * and all sub-objects
+ * PARAMETERS: Object - Increment or decrement the ref count for
+ * this object and all sub-objects
* Action - Either REF_INCREMENT or REF_DECREMENT
*
* RETURN: Status
*
- * DESCRIPTION: Increment the object reference count
+ * DESCRIPTION: Increment or decrement the object reference count
*
* Object references are incremented when:
* 1) An object is attached to a Node (namespace object)
@@ -671,7 +671,7 @@ AcpiUtUpdateObjectReference (
}
/*
- * All sub-objects must have their reference count incremented
+ * All sub-objects must have their reference count updated
* also. Different object types have different subobjects.
*/
switch (Object->Common.Type)
@@ -740,6 +740,7 @@ AcpiUtUpdateObjectReference (
break;
}
}
+
NextObject = NULL;
break;
diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c
index f97a04d80da7..187fd58a556c 100644
--- a/source/components/utilities/utprint.c
+++ b/source/components/utilities/utprint.c
@@ -560,7 +560,13 @@ vsnprintf (
Pos = String;
- End = String + Size;
+
+
+ if (Size != ACPI_UINT32_MAX) {
+ End = String + Size;
+ } else {
+ End = ACPI_CAST_PTR(char, ACPI_UINT32_MAX);
+ }
for (; *Format; ++Format)
{