summaryrefslogtreecommitdiff
path: root/source/components/utilities
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-04-09 23:08:47 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-04-09 23:08:47 +0000
commitd29c30140bd8ea81e0530ad3975c977891ab9275 (patch)
tree7a91c0da98a89b4b10beda84d027d2c779673064 /source/components/utilities
parent2872953d4a9c9c4e0fc0b9ab37d0e962909625a0 (diff)
Notes
Diffstat (limited to 'source/components/utilities')
-rw-r--r--source/components/utilities/utaddress.c22
-rw-r--r--source/components/utilities/utbuffer.c9
-rw-r--r--source/components/utilities/utclib.c21
-rw-r--r--source/components/utilities/utglobal.c13
-rw-r--r--source/components/utilities/utmisc.c2
-rw-r--r--source/components/utilities/utosi.c1
-rw-r--r--source/components/utilities/utprint.c13
-rw-r--r--source/components/utilities/utstate.c38
-rw-r--r--source/components/utilities/utuuid.c2
9 files changed, 52 insertions, 69 deletions
diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c
index 0a7bafba098a..2ebdea47e830 100644
--- a/source/components/utilities/utaddress.c
+++ b/source/components/utilities/utaddress.c
@@ -117,10 +117,10 @@ AcpiUtAddAddressRange (
AcpiGbl_AddressRangeList[SpaceId] = RangeInfo;
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
- "\nAdded [%4.4s] address range: 0x%p-0x%p\n",
+ "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
AcpiUtGetNodeName (RangeInfo->RegionNode),
- ACPI_CAST_PTR (void, Address),
- ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
+ ACPI_FORMAT_UINT64 (Address),
+ ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (AE_OK);
@@ -179,10 +179,10 @@ AcpiUtRemoveAddressRange (
}
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
- "\nRemoved [%4.4s] address range: 0x%p-0x%p\n",
+ "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
AcpiUtGetNodeName (RangeInfo->RegionNode),
- ACPI_CAST_PTR (void, RangeInfo->StartAddress),
- ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
+ ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
+ ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
ACPI_FREE (RangeInfo);
return_VOID;
@@ -266,12 +266,12 @@ AcpiUtCheckAddressRange (
Pathname = AcpiNsGetExternalPathname (RangeInfo->RegionNode);
ACPI_WARNING ((AE_INFO,
- "%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)",
+ "%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)",
AcpiUtGetRegionName (SpaceId),
- ACPI_CAST_PTR (void, Address),
- ACPI_CAST_PTR (void, EndAddress),
- ACPI_CAST_PTR (void, RangeInfo->StartAddress),
- ACPI_CAST_PTR (void, RangeInfo->EndAddress),
+ ACPI_FORMAT_UINT64 (Address),
+ ACPI_FORMAT_UINT64 (EndAddress),
+ ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
+ ACPI_FORMAT_UINT64 (RangeInfo->EndAddress),
Pathname));
ACPI_FREE (Pathname);
}
diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c
index e677cf1c8fc6..cf99b769922e 100644
--- a/source/components/utilities/utbuffer.c
+++ b/source/components/utilities/utbuffer.c
@@ -158,6 +158,15 @@ AcpiUtDumpBuffer (
return;
}
+ /*
+ * Add comment characters so rest of line is ignored when
+ * compiled
+ */
+ if (j == 0)
+ {
+ AcpiOsPrintf ("// ");
+ }
+
BufChar = Buffer[(ACPI_SIZE) i + j];
if (ACPI_IS_PRINT (BufChar))
{
diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c
index 8cc04f2cc1c3..e68634b18bbb 100644
--- a/source/components/utilities/utclib.c
+++ b/source/components/utilities/utclib.c
@@ -475,28 +475,25 @@ AcpiUtStrstr (
char *String1,
char *String2)
{
- char *String;
+ UINT32 Length;
- if (AcpiUtStrlen (String2) > AcpiUtStrlen (String1))
+ Length = AcpiUtStrlen (String2);
+ if (!Length)
{
- return (NULL);
+ return (String1);
}
- /* Walk entire string, comparing the letters */
-
- for (String = String1; *String2; )
+ while (AcpiUtStrlen (String1) >= Length)
{
- if (*String2 != *String)
+ if (AcpiUtMemcmp (String1, String2, Length) == 0)
{
- return (NULL);
+ return (String1);
}
-
- String2++;
- String++;
+ String1++;
}
- return (String1);
+ return (NULL);
}
diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c
index 207faf8bbc25..fc5e3b917fee 100644
--- a/source/components/utilities/utglobal.c
+++ b/source/components/utilities/utglobal.c
@@ -111,12 +111,19 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
{"_SB_", ACPI_TYPE_DEVICE, NULL},
{"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
{"_TZ_", ACPI_TYPE_DEVICE, NULL},
- {"_REV", ACPI_TYPE_INTEGER, (char *) ACPI_CA_SUPPORT_LEVEL},
+ /*
+ * March, 2015:
+ * The _REV object is in the process of being deprecated, because
+ * other ACPI implementations permanently return 2. Thus, it
+ * has little or no value. Return 2 for compatibility with
+ * other ACPI implementations.
+ */
+ {"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR (char, 2)},
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
- {"_GL_", ACPI_TYPE_MUTEX, (char *) 1},
+ {"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR (char, 1)},
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
- {"_OSI", ACPI_TYPE_METHOD, (char *) 1},
+ {"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR (char, 1)},
#endif
/* Table terminator */
diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c
index 08b72bc098aa..d482ad58782a 100644
--- a/source/components/utilities/utmisc.c
+++ b/source/components/utilities/utmisc.c
@@ -84,6 +84,7 @@ AcpiUtIsPciRootBridge (
}
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
/*******************************************************************************
*
* FUNCTION: AcpiUtIsAmlTable
@@ -114,6 +115,7 @@ AcpiUtIsAmlTable (
return (FALSE);
}
+#endif
/*******************************************************************************
diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c
index 43a3f49cc82a..f2c1adf70c34 100644
--- a/source/components/utilities/utosi.c
+++ b/source/components/utilities/utosi.c
@@ -105,6 +105,7 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] =
{"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */
{"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */
{"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */
+ {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */
/* Feature Group Strings */
diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c
index 4a0d98aed38f..ffb5e6ad24d1 100644
--- a/source/components/utilities/utprint.c
+++ b/source/components/utilities/utprint.c
@@ -442,11 +442,11 @@ AcpiUtVsnprintf (
const char *Format,
va_list Args)
{
- UINT8 Base = 10;
- UINT8 Type = 0;
- INT32 Width = -1;
- INT32 Precision = -1;
- char Qualifier = 0;
+ UINT8 Base;
+ UINT8 Type;
+ INT32 Width;
+ INT32 Precision;
+ char Qualifier;
UINT64 Number;
char *Pos;
char *End;
@@ -468,6 +468,9 @@ AcpiUtVsnprintf (
continue;
}
+ Type = 0;
+ Base = 10;
+
/* Process sign */
do
diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c
index ed75a2110b01..49fc8e9b8df1 100644
--- a/source/components/utilities/utstate.c
+++ b/source/components/utilities/utstate.c
@@ -50,44 +50,6 @@
/*******************************************************************************
*
- * FUNCTION: AcpiUtCreatePkgStateAndPush
- *
- * PARAMETERS: Object - Object to be added to the new state
- * Action - Increment/Decrement
- * StateList - List the state will be added to
- *
- * RETURN: Status
- *
- * DESCRIPTION: Create a new state and push it
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiUtCreatePkgStateAndPush (
- void *InternalObject,
- void *ExternalObject,
- UINT16 Index,
- ACPI_GENERIC_STATE **StateList)
-{
- ACPI_GENERIC_STATE *State;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- State = AcpiUtCreatePkgState (InternalObject, ExternalObject, Index);
- if (!State)
- {
- return (AE_NO_MEMORY);
- }
-
- AcpiUtPushGenericState (StateList, State);
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiUtPushGenericState
*
* PARAMETERS: ListHead - Head of the state stack
diff --git a/source/components/utilities/utuuid.c b/source/components/utilities/utuuid.c
index 1572f5f98284..7ad4b27ef756 100644
--- a/source/components/utilities/utuuid.c
+++ b/source/components/utilities/utuuid.c
@@ -48,6 +48,7 @@
ACPI_MODULE_NAME ("utuuid")
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
/*
* UUID support functions.
*
@@ -99,3 +100,4 @@ AcpiUtConvertStringToUuid (
AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i] + 1]);
}
}
+#endif