summaryrefslogtreecommitdiff
path: root/source/components/executer/exutils.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-06-16 19:48:16 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-06-16 19:48:16 +0000
commit8811b910b092027f905013bced1da3e87c6b07b9 (patch)
treeb0c56a23f2d8877b9431deb3cab73df3c1913fb7 /source/components/executer/exutils.c
parent0c85196b0c51b4e5eba8fcace026f947f9112c9e (diff)
Notes
Diffstat (limited to 'source/components/executer/exutils.c')
-rw-r--r--source/components/executer/exutils.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c
index 25676a17472b..a4cc73af0404 100644
--- a/source/components/executer/exutils.c
+++ b/source/components/executer/exutils.c
@@ -433,6 +433,43 @@ AcpiExIntegerToString (
/*******************************************************************************
*
+ * FUNCTION: AcpiExPciClsToString
+ *
+ * PARAMETERS: OutString - Where to put the converted string (7 bytes)
+ * PARAMETERS: ClassCode - PCI class code to be converted (3 bytes)
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Convert 3-bytes PCI class code to string representation.
+ * Return buffer must be large enough to hold the string. The
+ * string returned is always exactly of length
+ * ACPI_PCICLS_STRING_SIZE (includes null terminator).
+ *
+ ******************************************************************************/
+
+void
+AcpiExPciClsToString (
+ char *OutString,
+ UINT8 ClassCode[3])
+{
+
+ ACPI_FUNCTION_ENTRY ();
+
+
+ /* All 3 bytes are hexadecimal */
+
+ OutString[0] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[0], 4);
+ OutString[1] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[0], 0);
+ OutString[2] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[1], 4);
+ OutString[3] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[1], 0);
+ OutString[4] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[2], 4);
+ OutString[5] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[2], 0);
+ OutString[6] = 0;
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiIsValidSpaceId
*
* PARAMETERS: SpaceId - ID to be validated