summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2/include
diff options
context:
space:
mode:
authorMatt K. Light <mklight@us.ibm.com>2017-07-14 11:21:17 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-10 16:05:49 -0400
commiteb8df8822f732c47e0ea3326da1691596206f90d (patch)
tree0ffdeba9c34b1e7bd91724af7095275e5e738a75 /src/import/hwpf/fapi2/include
parentd69bcf157f23e109f4378e5d9a3cfdbfe7dfb98a (diff)
downloadtalos-hostboot-eb8df8822f732c47e0ea3326da1691596206f90d.tar.gz
talos-hostboot-eb8df8822f732c47e0ea3326da1691596206f90d.zip
add fapi2 apis for memory buffer vpd
Change-Id: If1973e67be2c49cc414420e38a06c7f08dc3126b Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43153 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44378 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2/include')
-rw-r--r--src/import/hwpf/fapi2/include/fapi2_mbvpd_access.H88
-rw-r--r--src/import/hwpf/fapi2/include/fapi2_mbvpd_access_defs.H125
2 files changed, 213 insertions, 0 deletions
diff --git a/src/import/hwpf/fapi2/include/fapi2_mbvpd_access.H b/src/import/hwpf/fapi2/include/fapi2_mbvpd_access.H
new file mode 100644
index 000000000..224086ee1
--- /dev/null
+++ b/src/import/hwpf/fapi2/include/fapi2_mbvpd_access.H
@@ -0,0 +1,88 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/hwpf/fapi2/include/fapi2_mbvpd_access.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2017 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+///
+/// @file fapi2_mbvpd_access.H
+///
+/// @brief Defines the Memory Buffer VPD functions that platform must implement
+///
+
+#ifndef _FAPI2_MBVPDACCESS_H_
+#define _FAPI2_MBVPDACCESS_H_
+
+#include <stdint.h>
+#include <return_code.H>
+#include <target.H>
+#include <fapi2_mbvpd_access_defs.H>
+#include <plat_mbvpd_access.H>
+
+namespace fapi2
+{
+///
+/// @brief Get Memory Buffer 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_target Reference to processor 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[in,out] io_fieldSize Size of i_pBuffer in bytes
+///
+/// @return fapi2::ReturnCode. FAPI_RC_SUCCESS, or failure value.
+///
+fapi2::ReturnCode getMBvpdField(const fapi2::MBvpdRecord i_record,
+ const fapi2::MBvpdKeyword i_keyword,
+ const fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP>& i_target,
+ uint8_t* const i_pBuffer,
+ size_t& io_fieldSize);
+
+///
+/// @brief Set Memory Buffer 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_target Reference to processor chip target for the record
+/// @param[in] i_pBuffer Pointer to buffer where data to set is stored
+/// @param[in] i_fieldSize Size of i_pBuffer in bytes
+///
+/// @return fapi2::ReturnCode. FAPI_RC_SUCCESS, or failure value.
+///
+fapi2::ReturnCode setMBvpdField(const fapi2::MBvpdRecord i_record,
+ const fapi2::MBvpdKeyword i_keyword,
+ const fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP>& i_target,
+ const uint8_t* const i_pBuffer,
+ const size_t i_fieldSize);
+}
+
+#endif
diff --git a/src/import/hwpf/fapi2/include/fapi2_mbvpd_access_defs.H b/src/import/hwpf/fapi2/include/fapi2_mbvpd_access_defs.H
new file mode 100644
index 000000000..54cfe954d
--- /dev/null
+++ b/src/import/hwpf/fapi2/include/fapi2_mbvpd_access_defs.H
@@ -0,0 +1,125 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/hwpf/fapi2/include/fapi2_mbvpd_access_defs.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2017 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+///
+/// @file fapi2_mbvpd_access_defs.H
+///
+/// @brief Defines the Memory Buffer VPD Records and Keywords
+///
+
+#ifndef _FAPI2_MBVPDACCESS_DEFS_H_
+#define _FAPI2_MBVPDACCESS_DEFS_H_
+
+namespace fapi2
+{
+enum MBvpdRecord
+{
+ MBVPD_RECORD_VEIR = 0x00,
+ MBVPD_RECORD_VER0 = 0x01,
+ MBVPD_RECORD_MER0 = 0x02,
+ MBVPD_RECORD_VSPD = 0x03,
+ MBVPD_RECORD_VINI = 0x04,
+ MBVPD_RECORD_OPFR = 0x05,
+ MBVPD_RECORD_VNDR = 0x06,
+ MBVPD_RECORD_SPDX = 0x07,
+};
+
+enum MBvpdKeyword
+{
+ MBVPD_KEYWORD_PDI = 0x00,
+ MBVPD_KEYWORD_PF = 0x01,
+ MBVPD_KEYWORD_MT = 0x02,
+ MBVPD_KEYWORD_MR = 0x03,
+ MBVPD_KEYWORD_PDA = 0x04,
+ MBVPD_KEYWORD_EL = 0x05,
+ MBVPD_KEYWORD_LM = 0x06,
+ MBVPD_KEYWORD_MW = 0x07,
+ MBVPD_KEYWORD_MV = 0x08,
+ MBVPD_KEYWORD_AM = 0x09,
+ MBVPD_KEYWORD_VZ = 0x0a,
+ MBVPD_KEYWORD_PDD = 0x0b,
+ MBVPD_KEYWORD_MX = 0x0c,
+ MBVPD_KEYWORD_DW = 0x0d,
+ MBVPD_KEYWORD_PN = 0x0e,
+ MBVPD_KEYWORD_SN = 0x0f,
+ MBVPD_KEYWORD_DR = 0x10,
+ MBVPD_KEYWORD_CE = 0x11,
+ MBVPD_KEYWORD_FN = 0x12,
+ MBVPD_KEYWORD_CC = 0x13,
+ MBVPD_KEYWORD_HE = 0x14,
+ MBVPD_KEYWORD_CT = 0x15,
+ MBVPD_KEYWORD_HW = 0x16,
+ MBVPD_KEYWORD_VD = 0x17,
+ MBVPD_KEYWORD_VN = 0x18,
+ MBVPD_KEYWORD_VP = 0x19,
+ MBVPD_KEYWORD_SV = 0x1a,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