diff options
author | Stephen Cprek <smcprek@us.ibm.com> | 2015-02-23 11:18:24 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-03-10 22:50:47 -0500 |
commit | 788ec2a6d01df562f38352443bacd68c9cb0c633 (patch) | |
tree | dfff993e6fe30c9d1605bffe442508bceaed71ee /src/usr/sbe/sbe_update.H | |
parent | 2a1d6e44f9dee4b665978be5e0eb0ef47a9e0be0 (diff) | |
download | talos-hostboot-788ec2a6d01df562f38352443bacd68c9cb0c633.tar.gz talos-hostboot-788ec2a6d01df562f38352443bacd68c9cb0c633.zip |
Remove pnorsbe.C and move seeprom code back to SBE namespace
PNOR code no longer uses getSbeBootSeeprom() and it makes
more sense to keep this function in the sbe component
Change-Id: Ic984f1af35fcc7346242bee03c69d16796ef7c09
RTC: 123369
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15912
Tested-by: Jenkins Server
Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/sbe/sbe_update.H')
-rw-r--r-- | src/usr/sbe/sbe_update.H | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/usr/sbe/sbe_update.H b/src/usr/sbe/sbe_update.H index e49c58289..e3f052fe9 100644 --- a/src/usr/sbe/sbe_update.H +++ b/src/usr/sbe/sbe_update.H @@ -55,6 +55,10 @@ namespace SBE const uint64_t SBE_IMAGE_SEEPROM_ADDRESS = 0x400; // 1KB const uint64_t SBE_VERSION_SEEPROM_ADDRESS = 0x300; // 1KB - 256B + //Used to read SBE Boot Side from processor + const uint64_t SBE_VITAL_REG_0x0005001C = 0x005001C; + const uint64_t SBE_BOOT_SELECT_MASK = 0x0080000000000000; + // PNOR SBE and SBEC Partition constants const uint32_t MAX_SBE_ENTRIES = 9; const uint32_t SBETOC_EYECATCH = 0x53424500; //'SBE\0' @@ -104,6 +108,14 @@ namespace SBE MVPDOP_WRITE, // Write version data to MVPD }; + // Used to keep track of perm/temp, and cur/alt + enum sbeSeepromSide_t + { + SBE_SEEPROM0 = 0x00, // corresponds to EEPROM::SBE_PRIMARY + SBE_SEEPROM1 = 0x01, // corresponts to EEPROM::SBE_BACKUP + SBE_SEEPROM_INVALID = 0xFF, + }; + // Actions can be combined enum sbeUpdateActions_t { @@ -196,9 +208,9 @@ namespace SBE bool seeprom_0_ver_ECC_fail; bool seeprom_1_ver_ECC_fail; - PNOR::sbeSeepromSide_t cur_seeprom_side; // aka 'booted' side - PNOR::sbeSeepromSide_t alt_seeprom_side; - PNOR::sbeSeepromSide_t permanent_seeprom_side; + sbeSeepromSide_t cur_seeprom_side; // aka 'booted' side + sbeSeepromSide_t alt_seeprom_side; + sbeSeepromSide_t permanent_seeprom_side; // Customized Image Information for this Target size_t customizedImage_size; @@ -319,6 +331,18 @@ namespace SBE size_t& o_actImgSize); /** + * @brief Determines which Seeprom was used to boot the SBE + * + * @param[in] i_target Target processor to customize + * + * @param[out] o_bootSide The Seeprom the SBE booted from + * + * @return errlHndl_t Error log handle on failure. + */ + errlHndl_t getSbeBootSeeprom(TARGETING::Target* i_target, + sbeSeepromSide_t& o_bootSide); + + /** * @brief Collects Version information from a specific SEEPROM * * @param[in] i_target Target processor to customize |