diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2017-07-23 18:25:00 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-08-22 10:37:01 -0400 |
commit | f01850d033176cb33c2396ed26377a3fc965787a (patch) | |
tree | 91618ccaf0a7baf690295a86271d2b7483d925ee /src/include/usr/fapi2 | |
parent | b74c51e043b4466f675cda22591b32aa50cef497 (diff) | |
download | talos-hostboot-f01850d033176cb33c2396ed26377a3fc965787a.tar.gz talos-hostboot-f01850d033176cb33c2396ed26377a3fc965787a.zip |
Adding in MEMD functionality with multiple copies
This commit adds support for a separate version of the MEMD
VPD. In the PNOR, we will have a new optional section that
will contain multiple versions of the MEMD VPD. This code
adds the functionality to loop through the different versions
and check the VM keyword to find a matching one.
Change-Id: I3f8e6e589c31b3b480d915a1b29b4614fa809162
RTC:175158
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43508
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/fapi2')
-rw-r--r-- | src/include/usr/fapi2/plat_vpd_access.H | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/include/usr/fapi2/plat_vpd_access.H b/src/include/usr/fapi2/plat_vpd_access.H index 715ddc875..f28317df9 100644 --- a/src/include/usr/fapi2/plat_vpd_access.H +++ b/src/include/usr/fapi2/plat_vpd_access.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,6 +31,7 @@ #define _FAPI2_PLAT_VPDACCESS_H_ #include <fapi2_vpd_access.H> +#include <vpd/memd_vpdenums.H> namespace fapi2 { @@ -51,5 +52,19 @@ fapi2::ReturnCode platGetVPD( VPDInfo<fapi2::TARGET_TYPE_MCS>& io_vpd_info, uint8_t* o_blob); +/** + * @brief Search through the PNOR::MEMD section to find the copy with + * a matching VM keyword compared to the EEPROM's VM. + * + * @param[in] i_eepromVM - The EEPROM's copy of the VM keyword + * @param[in] i_header - The header from PNOR::MEMD + * @param[in] i_target - A valid fapi2 MCS target + * @param[in] i_vm_size - Size of the VM keyword + * + * @return boolean - true if a matching MEMD was found, false if not + */ +bool find_memd_in_pnor(uint8_t* i_eepromVM, MemdHeader_t i_header, + TARGETING::Target * i_target, size_t i_vm_size); + }; #endif // _FAPI2_PLAT_VPDACCESS_H_ |