diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2019-03-13 15:22:30 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-03-20 09:44:13 -0500 |
commit | 810394f870786da606ef3179315e6cbdaa35627b (patch) | |
tree | f3727c8ea6bcbe91033e9f759dc44ce585a91ec1 /src/include | |
parent | af6712fe5c035e7e61ea67a6f86f585b8ee1d51b (diff) | |
download | talos-hostboot-810394f870786da606ef3179315e6cbdaa35627b.tar.gz talos-hostboot-810394f870786da606ef3179315e6cbdaa35627b.zip |
UCD flash update invoker
Implements the main algorithm for finding applicable UCDs to perform flash
update on and walking the UCD flash image table of contents to find the
image associated with a UCD. Also adds a check to skip the update if
simics is running.
RTC: 201991
Change-Id: Ib35abec2f0a2ed22ae8d41a2acecd146f699bc43
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73484
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Matthew Raybuck <matthew.raybuck@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/isteps/istep_reasoncodes.H | 2 | ||||
-rw-r--r-- | src/include/usr/isteps/ucd/updateUcdFlash.H | 24 | ||||
-rw-r--r-- | src/include/usr/ucd/ucd_reasoncodes.H | 8 | ||||
-rw-r--r-- | src/include/usr/util/utillidmgr.H | 1 |
4 files changed, 34 insertions, 1 deletions
diff --git a/src/include/usr/isteps/istep_reasoncodes.H b/src/include/usr/isteps/istep_reasoncodes.H index 09b12abdc..7aa3abc5e 100644 --- a/src/include/usr/isteps/istep_reasoncodes.H +++ b/src/include/usr/isteps/istep_reasoncodes.H @@ -66,6 +66,7 @@ namespace ISTEP MOD_APPLY_HCODE_GEN_CPU_REGS = 0x23, MOD_GET_LANEMASK_FROM_HX_KEYWORD = 0x24, MOD_MSS_SCRUB = 0x25, + MOD_CALL_UPDATE_UCD_FLASH = 0x26, }; /** @@ -138,6 +139,7 @@ namespace ISTEP RC_INVALID_HX_KEYWORD_DATA = ISTEP_COMP_ID | 0x4C, RC_PNOR_IPMI_NOT_ENABLED = ISTEP_COMP_ID | 0x4D, RC_SLAVE_CORE_WAKEUP_ERROR = ISTEP_COMP_ID | 0x4E, + RC_UCD_IMG_NOT_IN_CONTAINER = ISTEP_COMP_ID | 0x4F, }; }; diff --git a/src/include/usr/isteps/ucd/updateUcdFlash.H b/src/include/usr/isteps/ucd/updateUcdFlash.H index a1487e78d..2cc7e8e84 100644 --- a/src/include/usr/isteps/ucd/updateUcdFlash.H +++ b/src/include/usr/isteps/ucd/updateUcdFlash.H @@ -27,6 +27,7 @@ #define __UPDATE_UCD_FLASH_H #include <targeting/common/target.H> +#include <util/utilmem.H> #include <errl/errlentry.H> namespace POWER_SEQUENCER @@ -39,6 +40,29 @@ namespace UCD // UCD series { /** + * @brief Applies UCD data flash image updates (if needed) to the requested + * UCDs + * + * @param[in] i_powerSequencers Fixed vector of PowerSequencer targets to + * update flash image on + * @param[in] i_image Reference to UtilMem buffer holding the UCD flash image + * contents (including header, TOC entries, and flash images). Note: the + * implementation will not alter the buffer content, and will seek back + * to the beginning before handing control back. + * + * @return errlHndl_t Error log handle + * @retval nullptr Successfully took action against all requested UCDs. It's + * possible an individual UCD update failed, in which case the error is + * committed. + * @retval !nullptr Failed to take action against one or more requested UCDs. + * Typically this is due to a firmware problem. Handle points to valid + * error log + */ +errlHndl_t updateAllUcdFlashImages( + const TARGETING::TargetHandleList& i_powerSequencers, + UtilMem& i_image); + +/** * @brief Updates a UCD target's flash image * * @param[in] i_pUcd UCD's target; must not be nullptr diff --git a/src/include/usr/ucd/ucd_reasoncodes.H b/src/include/usr/ucd/ucd_reasoncodes.H index bfa18397f..4e7cc9841 100644 --- a/src/include/usr/ucd/ucd_reasoncodes.H +++ b/src/include/usr/ucd/ucd_reasoncodes.H @@ -32,13 +32,19 @@ namespace UCD_RC enum UcdModuleId { - MOD_UCD_INIT = 0x01, + MOD_UCD_INIT = 0x01, + MOD_UPDATE_ALL_UCD_FLASH_IMAGES = 0x02, }; enum UcdReasonCode { RC_DEVICE_READ_UNEXPECTED_SIZE_DEVICE_ID = UCD_COMP_ID | 0x01, RC_DEVICE_READ_UNEXPECTED_SIZE_MFR_REVISION = UCD_COMP_ID | 0x02, + UCD_INVALID_EYECATCHER = UCD_COMP_ID | 0x03, + UCD_INVALID_MAJOR_VER = UCD_COMP_ID | 0x04, + UCD_TOC_ENTRY_TOO_SMALL = UCD_COMP_ID | 0x05, + UCD_UNSUPPORTED_DEVICE_ID = UCD_COMP_ID | 0x06, + UCD_EOF = UCD_COMP_ID | 0x07, }; }; // namespace UCD diff --git a/src/include/usr/util/utillidmgr.H b/src/include/usr/util/utillidmgr.H index 64e77cfd3..e78eba133 100644 --- a/src/include/usr/util/utillidmgr.H +++ b/src/include/usr/util/utillidmgr.H @@ -63,6 +63,7 @@ enum LidId TARGETING_BINARY_LIDID = 0x81e00630, NVDIMM_16GB_LIDID = 0x81e00640, NVDIMM_32GB_LIDID = 0x81e00641, + UCD_LIDID = 0x81e00650, INVALID_LIDID = 0xFFFFFFFF }; |