summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/plat
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2013-01-30 13:41:54 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-02-04 13:47:48 -0600
commit11d14529a299e97b526afcd1ff83ef4de7cedaf8 (patch)
treef88783310ccb421464f94f3c12ccfa71784dacb4 /src/include/usr/hwpf/plat
parent0782c6e3bb7ccd9b7e4e963a1aa6b2521e6b275d (diff)
downloadtalos-hostboot-11d14529a299e97b526afcd1ff83ef4de7cedaf8.tar.gz
talos-hostboot-11d14529a299e97b526afcd1ff83ef4de7cedaf8.zip
HWP: Bad DQ Access. Cope with different platform endianness
Change-Id: I3125961e1589ca78e206496137b01f675e858505 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3060 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: Van H. Lee <vanlee@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf/plat')
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatUtil.H60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatUtil.H b/src/include/usr/hwpf/plat/fapiPlatUtil.H
new file mode 100644
index 000000000..41c2fd124
--- /dev/null
+++ b/src/include/usr/hwpf/plat/fapiPlatUtil.H
@@ -0,0 +1,60 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/plat/fapiPlatUtil.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+/**
+ * @file fapiPlatUtil.H
+ *
+ * @brief Defines miscellanous utility functions for the platform layer.
+ * Hardware procedure writers will not call these functions.
+ *
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * whs 11/14/2012 new
+ */
+
+#ifndef FAPIPLATUTIL_H_
+#define FAPIPLATUTIL_H_
+
+#include <endian.h>
+
+// defines for endian conversion
+#define FAPI_PLAT_BE16TOH(x) be16toh(x)
+#define FAPI_PLAT_LE16TOH(x) le16toh(x)
+#define FAPI_PLAT_HTOBE16(x) htobe16(x)
+#define FAPI_PLAT_HTOLE16(x) htole16(x)
+
+#define FAPI_PLAT_BE32TOH(x) be32toh(x)
+#define FAPI_PLAT_LE32TOH(x) le32toh(x)
+#define FAPI_PLAT_HTOBE32(x) htobe32(x)
+#define FAPI_PLAT_HTOLE32(x) htole32(x)
+
+#define FAPI_PLAT_BE64TOH(x) be64toh(x)
+#define FAPI_PLAT_LE64TOH(x) le64toh(x)
+#define FAPI_PLAT_HTOBE64(x) htobe64(x)
+#define FAPI_PLAT_HTOLE64(x) htole64(x)
+
+
+#endif // FAPIPLATUTIL_H_
OpenPOWER on IntegriCloud