summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/fapi
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2013-02-10 07:50:44 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-03-01 14:37:04 -0600
commit4e6456f1561ba036bc7b3681ececb8576937628c (patch)
treee635522bbb7392e602cb9db1b7a4e093040acc2d /src/include/usr/hwpf/fapi
parentb3d259d970c91fb8ac3b931e5409dd8cecca699f (diff)
downloadtalos-hostboot-4e6456f1561ba036bc7b3681ececb8576937628c.tar.gz
talos-hostboot-4e6456f1561ba036bc7b3681ececb8576937628c.zip
FAPI functions to get/set Centaur FRU VPD
Add Fapi functions to call cvpd device driver for get and set. Change-Id: I8cb2aba3c951fbe1a17278396517b355138ad364 RTC: 61991 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3141 Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Bilicon Patil <bilpatil@in.ibm.com> Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf/fapi')
-rw-r--r--src/include/usr/hwpf/fapi/fapi.H3
-rw-r--r--src/include/usr/hwpf/fapi/fapiMBvpdAccess.H113
-rw-r--r--src/include/usr/hwpf/fapi/fapiMvpdAccess.H36
3 files changed, 137 insertions, 15 deletions
diff --git a/src/include/usr/hwpf/fapi/fapi.H b/src/include/usr/hwpf/fapi/fapi.H
index 46e6d4c13..b7d2ea3c4 100644
--- a/src/include/usr/hwpf/fapi/fapi.H
+++ b/src/include/usr/hwpf/fapi/fapi.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -57,5 +57,6 @@
#include <fapiSetSbeError.H> // Generated file
#include <ecmdDataBufferBase.H>
#include <fapiMvpdAccess.H>
+#include <fapiMBvpdAccess.H>
#endif // FAPI_H_
diff --git a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
new file mode 100644
index 000000000..f53c89a8e
--- /dev/null
+++ b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
@@ -0,0 +1,113 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/fapi/fapiMBvpdAccess.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,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 */
+// $Id: fapiMBvpdAccess.H,v 1.2 2012/10/09 21:32:55 mjjones Exp $
+/**
+ * @file fapiMBvpdAccess.H
+ *
+ * @brief Defines the Memory Bus (Centaur) VPD functions that platform
+ * must implement
+ *
+ */
+
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * whs 01/24/2013 Added fapiGetMBvpdField
+ */
+
+#ifndef _FAPI_FAPIMBVPDACCESS_H_
+#define _FAPI_FAPIMBVPDACCESS_H_
+
+#include <stdint.h>
+#include <stddef.h>
+#include <fapiReturnCode.H>
+#include <fapiTarget.H>
+
+namespace fapi
+{
+ enum MBvpdRecord
+ {
+ MBVPD_RECORD_VEIR = 0x00,
+ MBVPD_RECORD_VER0 = 0x01,
+ MBVPD_RECORD_MER0 = 0x02,
+ };
+
+ enum MBvpdKeyword
+ {
+ MBVPD_KEYWORD_PDI = 0x00,
+ };
+}
+
+extern "C"
+{
+
+/**
+ * @brief Get Memory Buffer (Centaur) VPD field.
+ *
+ * A Memory Buffer VPD field is specified using a record and keyword enumerator
+ *
+ * Suggested way to call this routine is to call it once with a NULL buffer
+ * pointer to to retrieve the size of the record, then allocate the proper
+ * size of the buffer and call again.
+ *
+ * @param[in] i_record Record enumerator
+ * @param[in] i_keyword Keyword enumerator
+ * @param[in] i_memBufTarget Reference to memory buffer chip target for
+ * the record
+ * @param[in] i_pBuffer Pointer to buffer where record will be stored. If
+ * NULL then the size of record will be stored in
+ * io_fieldSize
+ * @param[io] io_fieldSize Size of i_pBuffer in bytes
+ *
+ * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value.
+ */
+fapi::ReturnCode fapiGetMBvpdField(const fapi::MBvpdRecord i_record,
+ const fapi::MBvpdKeyword i_keyword,
+ const fapi::Target &i_memBufTarget,
+ uint8_t * const i_pBuffer,
+ uint32_t &io_fieldSize);
+
+/**
+ * @brief Set Memory Buffer (Centaur) VPD field.
+ *
+ * A Memory Buffer VPD field is specified using a record and keyword enumerator
+ *
+ * @param[in] i_record Record enumerator
+ * @param[in] i_keyword Keyword enumerator
+ * @param[in] i_memBufTarget Reference to memory buffer chip target for
+ * the record
+ * @param[in] i_pBuffer Pointer to buffer where data to set is stored
+ * @param[io] i_fieldSize Size of i_pBuffer in bytes
+ *
+ * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value.
+ */
+fapi::ReturnCode fapiSetMBvpdField(const fapi::MBvpdRecord i_record,
+ const fapi::MBvpdKeyword i_keyword,
+ const fapi::Target &i_memBufTarget,
+ const uint8_t * const i_pBuffer,
+ const uint32_t i_fieldSize);
+}
+
+#endif
diff --git a/src/include/usr/hwpf/fapi/fapiMvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMvpdAccess.H
index 7b3cbe901..d90fc2894 100644
--- a/src/include/usr/hwpf/fapi/fapiMvpdAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiMvpdAccess.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -62,19 +62,26 @@ namespace fapi
MVPD_RECORD_LRP9 = 0x0c,
MVPD_RECORD_LRPA = 0x0d,
MVPD_RECORD_LRPB = 0x0e,
- MVPD_RECORD_LWP0 = 0x0f,
- MVPD_RECORD_LWP1 = 0x10,
- MVPD_RECORD_LWP2 = 0x11,
- MVPD_RECORD_LWP3 = 0x12,
- MVPD_RECORD_LWP4 = 0x13,
- MVPD_RECORD_LWP5 = 0x14,
- MVPD_RECORD_LWP6 = 0x15,
- MVPD_RECORD_LWP7 = 0x16,
- MVPD_RECORD_LWP8 = 0x17,
- MVPD_RECORD_LWP9 = 0x18,
- MVPD_RECORD_LWPA = 0x19,
- MVPD_RECORD_LWPB = 0x1a,
- MVPD_RECORD_VWML = 0x1b,
+ MVPD_RECORD_LRPC = 0x0f,
+ MVPD_RECORD_LRPD = 0x10,
+ MVPD_RECORD_LRPE = 0x11,
+ MVPD_RECORD_LWP0 = 0x12,
+ MVPD_RECORD_LWP1 = 0x13,
+ MVPD_RECORD_LWP2 = 0x14,
+ MVPD_RECORD_LWP3 = 0x15,
+ MVPD_RECORD_LWP4 = 0x16,
+ MVPD_RECORD_LWP5 = 0x17,
+ MVPD_RECORD_LWP6 = 0x18,
+ MVPD_RECORD_LWP7 = 0x19,
+ MVPD_RECORD_LWP8 = 0x1a,
+ MVPD_RECORD_LWP9 = 0x1b,
+ MVPD_RECORD_LWPA = 0x1c,
+ MVPD_RECORD_LWPB = 0x1d,
+ MPVD_RECORD_LWPC = 0x1e,
+ MPVD_RECORD_LWPD = 0x1f,
+ MPVD_RECORD_LWPE = 0x20,
+ MVPD_RECORD_VWML = 0x21,
+ MVPD_RECORD_MER0 = 0x22,
};
enum MvpdKeyword
@@ -113,6 +120,7 @@ namespace fapi
MVPD_KEYWORD_PDG = 0x1f,
MVPD_KEYWORD_MK = 0x20,
MVPD_KEYWORD_PB = 0x21,
+ MVPD_KEYWORD_CH = 0x22,
};
}
OpenPOWER on IntegriCloud