summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/executer/exutils.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-06-20 19:34:50 +0000
committerdim <dim@FreeBSD.org>2015-06-20 19:34:50 +0000
commite109f99dcb6c95c84bbec22229de29a25491f7c2 (patch)
treed142d742b698973a366ae768a3f4033924e314c8 /sys/contrib/dev/acpica/components/executer/exutils.c
parent238df27d058d0d8912acf0a186d3f43289a0a2b6 (diff)
parentcb167b45a82327b0d6d88e85e3d6e2e326291ee4 (diff)
downloadFreeBSD-src-e109f99dcb6c95c84bbec22229de29a25491f7c2.zip
FreeBSD-src-e109f99dcb6c95c84bbec22229de29a25491f7c2.tar.gz
Merge ^/head r284188 through r284643.
Diffstat (limited to 'sys/contrib/dev/acpica/components/executer/exutils.c')
-rw-r--r--sys/contrib/dev/acpica/components/executer/exutils.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/sys/contrib/dev/acpica/components/executer/exutils.c b/sys/contrib/dev/acpica/components/executer/exutils.c
index a55b171..1cd60fa 100644
--- a/sys/contrib/dev/acpica/components/executer/exutils.c
+++ b/sys/contrib/dev/acpica/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
OpenPOWER on IntegriCloud