diff options
| author | Corey Swenson <cswenson@us.ibm.com> | 2014-09-08 15:56:45 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-10-17 14:12:26 -0500 |
| commit | c9cf241bc97ff6aba866d6acf167fd910a0f39c5 (patch) | |
| tree | 37f0ddf358ee5cf5aff393ceee9d3aafb4887f72 /src/include/usr/vpd | |
| parent | 1428a1fabd827dcc8b43fd0039bfc75d2712c190 (diff) | |
| download | blackbird-hostboot-c9cf241bc97ff6aba866d6acf167fd910a0f39c5.tar.gz blackbird-hostboot-c9cf241bc97ff6aba866d6acf167fd910a0f39c5.zip | |
BMC: VPD Caching in PNOR
For MVPD CVPD SPD, during presence detect VPD part number and
serial number are compared between PNOR and SEEPROM. Mismatch
triggers copy of VPD from SEEPROM to PNOR.
Change-Id: Ia0a7b3fdf80bc15aee05c1303efa406fffa318ce
RTC: 106885
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13233
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/vpd')
| -rw-r--r-- | src/include/usr/vpd/mvpdenums.H | 4 | ||||
| -rw-r--r-- | src/include/usr/vpd/spdenums.H | 4 | ||||
| -rw-r--r-- | src/include/usr/vpd/vpd_if.H | 52 | ||||
| -rw-r--r-- | src/include/usr/vpd/vpdreasoncodes.H | 7 |
4 files changed, 55 insertions, 12 deletions
diff --git a/src/include/usr/vpd/mvpdenums.H b/src/include/usr/vpd/mvpdenums.H index 5186d9e20..668dc8cc1 100644 --- a/src/include/usr/vpd/mvpdenums.H +++ b/src/include/usr/vpd/mvpdenums.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* [+] 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. */ diff --git a/src/include/usr/vpd/spdenums.H b/src/include/usr/vpd/spdenums.H index 43465e01d..fdd6ce530 100644 --- a/src/include/usr/vpd/spdenums.H +++ b/src/include/usr/vpd/spdenums.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* [+] 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. */ diff --git a/src/include/usr/vpd/vpd_if.H b/src/include/usr/vpd/vpd_if.H index 6c216edcf..af8e501d5 100644 --- a/src/include/usr/vpd/vpd_if.H +++ b/src/include/usr/vpd/vpd_if.H @@ -29,30 +29,64 @@ namespace VPD { /** - * Load the runtime VPD image into memory + * @brief typdef for vpdRecord values + */ + typedef uint32_t vpdRecord; + /** + * @brief typdef for vpdKeyword values + */ + typedef uint32_t vpdKeyword; + /** + * @brief typdef for vpdCmdTarget values + */ + enum vpdCmdTarget + { + AUTOSELECT, + PNOR, + SEEPROM, + INVALID_LOCATION = 0xFFFF, + }; + + /** + * @brief Load the runtime VPD image into memory * @param[out] The physical address of the VPD image * @return error handle if there was an error */ errlHndl_t vpd_load_rt_image(uint64_t & o_vpd_addr); /** - * @brief this function checks to see if the given mvpd target - * is present - * + * @brief This function checks to see if the given mvpd target + * is present * @param[in] i_target - Target device to search for mvpd - * * @return bool - true if mvpd is present, false if it is not. */ bool mvpdPresent ( TARGETING::Target * i_target ); /** - * @brief this function checks to see if the given cvpd target - * is present - * + * @brief This function checks to see if the given cvpd target + * is present * @param[in] i_target - Target device to search for cvpd - * * @return bool - true if cvpd is present, false if it is not. */ bool cvpdPresent ( TARGETING::Target * i_target ); + + /** + * @brief This function checks if the PNOR cache for this target is in + * sync with the SEEPROM, if not it loads the PNOR cache from SEEPROM. + * @param[in] i_target - Target device + * @return errlHndl_t - NULL if successful, otherwise a pointer to the + * error log. + */ + errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target ); + + /** + * @brief This function invalidates the VPD data in the PNOR cache. + * @param[in] i_target - Target device + * @return errlHndl_t - NULL if successful, otherwise a pointer to the + * error log. + */ + errlHndl_t invalidatePnorCache ( TARGETING::Target * i_target ); + }; //end vpd namespace + #endif diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H index 435d30ab3..4ac5361b9 100644 --- a/src/include/usr/vpd/vpdreasoncodes.H +++ b/src/include/usr/vpd/vpdreasoncodes.H @@ -46,6 +46,8 @@ enum vpdModuleId VPD_INVALID_MODULE = 0x00, // Common VPD + VPD_WRITE_PNOR = 0x10, + VPD_ENSURE_CACHE_IS_IN_SYNC = 0x11, // IPVPD VPD_IPVPD_TRANSLATE_RECORD = 0x20, @@ -72,6 +74,7 @@ enum vpdModuleId VPD_SPD_GET_KEYWORD_ENTRY = 0x6C, VPD_SPD_WRITE_DATA = 0x6D, VPD_SPD_GET_MOD_TYPE = 0x6E, + VPD_SPD_FETCH_DATA = 0x6F, // Centaur FRU VPD @@ -121,7 +124,9 @@ enum vpdReasonCode VPD_INSUFFICIENT_SPACE_FOR_IMAGE = VPD_COMP_ID | 0x1b, VPD_MBOX_NOT_SUPPORTED_RT = VPD_COMP_ID | 0x1c, VPD_RECORD_INVALID_VHDR = VPD_COMP_ID | 0x30, - VPD_READ_CONFIG_NOT_SET = VPD_COMP_ID | 0x31, + VPD_READ_SOURCE_UNRESOLVED = VPD_COMP_ID | 0x31, + VPD_REMOVE_PAGES_FAIL = VPD_COMP_ID | 0x32, + VPD_UNEXPECTED_TARGET_TYPE = VPD_COMP_ID | 0x33, }; |

