summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2/include/fapi2_vpd_access.H
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2016-01-20 17:36:57 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-03-24 18:20:37 -0400
commit690eec0e3d0c851013e1136fde169905244f5918 (patch)
treecb043eba7465a892468cc7ae90fe7136edcfc7dd /src/import/hwpf/fapi2/include/fapi2_vpd_access.H
parentb19c61f81dacb5088180946c5f415909965dd1fa (diff)
downloadtalos-hostboot-690eec0e3d0c851013e1136fde169905244f5918.tar.gz
talos-hostboot-690eec0e3d0c851013e1136fde169905244f5918.zip
VPD Accessor Changes for P9
Change-Id: I9fd6196abd17ca5fead11b57050b16a3d387df71 Original-Change-Id: I5342d99c753f6eb6a388dab0771341fe11d17c07 RTC:144543 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/10623 Tested-by: Jenkins Server Tested-by: Auto Mirror Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22445 Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/import/hwpf/fapi2/include/fapi2_vpd_access.H')
-rw-r--r--src/import/hwpf/fapi2/include/fapi2_vpd_access.H60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/import/hwpf/fapi2/include/fapi2_vpd_access.H b/src/import/hwpf/fapi2/include/fapi2_vpd_access.H
new file mode 100644
index 000000000..a44afc4fa
--- /dev/null
+++ b/src/import/hwpf/fapi2/include/fapi2_vpd_access.H
@@ -0,0 +1,60 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: hwpf/fapi2/include/fapi2_vpd_access.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* 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. */
+/* */
+/* IBM_PROLOG_END_TAG */
+/// @file fapi2_vpd_access.H
+/// @brief Common file that defines the vpd access functions that
+/// platform code must implement.
+///
+//
+
+#ifndef _FAPI2_VPDACCESS_H_
+#define _FAPI2_VPDACCESS_H_
+
+#include <return_code.H>
+#include <target_types.H>
+#include <vpd_access_defs.H>
+#include <plat_vpd_access.H>
+
+namespace fapi2
+{
+
+/// @brief Return a blob of memory VPD data associated with the input target
+/// @param[in] i_target, a valid fapi2 target
+/// @param[in] io_vpd_info, fapi2::VPDInfo class that specifies which piece of data to return
+/// @param[out] o_blob, the blob of raw data from the vpd
+/// @return FAPI2_RC_SUCCESS if there's no problem
+/// @note passing nullptr for o_blob will return the size of the keyword
+///
+/// Example:
+/// fapi2::VPDInfo<fapi2::TARGET_TYPE_MCS> vpdInfo(MR_keyword);
+/// vpdInfo.iv_speed_bin = 2400_SPEED_BIN;
+///
+/// uint8_t * blob = NULL;
+///
+/// FAPI_TRY(getVPD( mcs, vpdInfo, blob ));
+/// blob = static_cast<uint8_t *>(malloc(vpdInfo.iv_size));
+/// FAPI_TRY(getVPD( mcs, vpdInfo, blob ));
+/// blob now contains the VPD data for the MCS.
+///
+template<TargetType T>
+ReturnCode getVPD(const Target<T>& i_target,
+ VPDInfo<T>& io_vpd_info,
+ uint8_t* o_blob);
+
+};
+#endif
OpenPOWER on IntegriCloud