summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Stermole <stermole@us.ibm.com>2019-05-30 14:35:30 -0400
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-06-11 12:38:52 -0500
commit245047c0ff4265a74c9f5f6129a71a0e9ad56c72 (patch)
tree848d6555970e3064f94b1564b66afe67874a3a2f
parent11066067e94b1924b331d6b918b64129dfde5bd2 (diff)
downloadtalos-hostboot-245047c0ff4265a74c9f5f6129a71a0e9ad56c72.tar.gz
talos-hostboot-245047c0ff4265a74c9f5f6129a71a0e9ad56c72.zip
Add check for BOOT_STAGE == runtime fw in exp_check_for_ready
Change-Id: I097a0545d1677da6640c605e67c66a8faf6f017f Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78082 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78103 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>
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H30
-rw-r--r--src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml21
2 files changed, 50 insertions, 1 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
index fb6234be4..b99c6fecf 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
@@ -96,6 +96,33 @@ fapi_try_exit:
return fapi2::current_err;
}
+///
+/// @brief Checks the I2c explorer boot stage for FUNTIME_FW
+/// @param[in] i_target the OCMB target
+/// @param[in] i_data data to check from EXP_FW_STATUS
+///
+inline fapi2::ReturnCode runtime_boot_stage( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target,
+ const std::vector<uint8_t>& i_data )
+{
+ constexpr uint8_t EXPECTED_BOOT_STAGE = boot_stages::RUNTIME_FW;
+ uint8_t l_boot_stage = 0;
+ FAPI_TRY( status::get_boot_stage(i_target, i_data, l_boot_stage) );
+
+ // Check that Explorer is in the RUNTIME_FW boot stage
+ FAPI_ASSERT( (l_boot_stage == EXPECTED_BOOT_STAGE),
+ fapi2::MSS_EXP_I2C_WRONG_BOOT_STAGE().
+ set_TARGET(i_target).
+ set_BOOT_STAGE(l_boot_stage).
+ set_EXPECTED_BOOT_STAGE(EXPECTED_BOOT_STAGE),
+ "FW_STATUS command returned wrong boot stage (0x%01x, expected 0x%01x) for %s",
+ l_boot_stage, EXPECTED_BOOT_STAGE, mss::c_str(i_target) );
+
+ return fapi2::FAPI2_RC_SUCCESS;
+
+fapi_try_exit:
+ return fapi2::current_err;
+}
+
}// check
///
@@ -151,8 +178,9 @@ inline fapi2::ReturnCode fw_status(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_C
for(; l_loop < NUM_LOOPS && l_busy; ++l_loop)
{
std::vector<uint8_t> l_data;
- FAPI_TRY(get_fw_status(i_target, l_data));
+ FAPI_TRY( get_fw_status(i_target, l_data) );
FAPI_TRY( check::status_code(i_target, FW_STATUS, l_data, l_busy) );
+ FAPI_TRY( check::runtime_boot_stage(i_target, l_data) );
if (l_busy)
{
diff --git a/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml b/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
index d3d231226..9a4d6844f 100644
--- a/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
+++ b/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
@@ -392,6 +392,27 @@
</hwpError>
<hwpError>
+ <rc>RC_MSS_EXP_I2C_WRONG_BOOT_STAGE</rc>
+ <description>
+ Received incorrect boot stage from
+ command ID EXP_FW_STATUS
+ </description>
+ <ffdc>BOOT_STAGE</ffdc>
+ <ffdc>EXPECTED_BOOT_STAGE</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>MEDIUM</priority>
+ </callout>
+ <callout>
+ <target>TARGET</target>
+ <priority>HIGH</priority>
+ </callout>
+ <deconfigure>
+ <target>TARGET</target>
+ </deconfigure>
+ </hwpError>
+
+ <hwpError>
<rc>RC_MSS_EXP_I2C_POLLING_TIMEOUT</rc>
<description>
Polling the explorer I2C slave interface for an ACK
OpenPOWER on IntegriCloud