Skip to content

Commit

Permalink
Clear boot status in SB_MSG reg before doing HRESET
Browse files Browse the repository at this point in the history
Change-Id: I4bc5cdd5e9c46ac963a2f46344daa47cf2ebd67c
STGD: 608723
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/c/hw/ekb/+/169960
Reviewed-by: Akhilesh S <[email protected]>
Reviewed-by: Joseph J McGill <[email protected]>
Tested-by: Jenkins Server <[email protected]>
Tested-by: FSP CI Jenkins <[email protected]>
Reviewed-by: Sandeep Korrapati <[email protected]>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/c/hostboot/+/169966
Reviewed-by: Jenkins Server <[email protected]>
Reviewed-by: Daniel M Crowell <[email protected]>
Tested-by: Daniel M Crowell <[email protected]>
  • Loading branch information
Sreekanth Reddy Kadapala authored and dcrowell77 committed May 21, 2024
1 parent 2d4f750 commit 1e3984c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

using namespace scomt::poz;


SCOMT_PERV_USE_FSXCOMP_FSXLOG_SB_CS;
SCOMT_PERV_USE_FSXCOMP_FSXLOG_SB_MSG;

Expand Down Expand Up @@ -82,6 +81,10 @@ ReturnCode poz_sbe_hreset(
FAPI_INF("SBE is in NOT Runtime State");
}

FAPI_INF("Clearing boot status in SB_MSG register before doing HRESET");
SB_MSG.clearBit<0>();
FAPI_TRY(SB_MSG.putCfam(i_target));

FAPI_INF("Resetting restart vector0 and vector1 ...");
FAPI_TRY(SB_CS.getCfam(i_target));
SB_CS.set_START_RESTART_VECTOR0(0);
Expand Down Expand Up @@ -110,13 +113,24 @@ ReturnCode poz_sbe_hreset(
// bump count
l_poll++;

if (!(l_poll <= i_boot_parms.max_polls))
{
FAPI_TRY(SB_CS.getCfam(i_target));

if (SB_CS.get_SECURE_DEBUG_MODE())
{
FAPI_ERR("SBE Boot failed since SDB is set");
}
}

// test for timeout
FAPI_ASSERT((l_poll <= i_boot_parms.max_polls),
fapi2::SBE_BOOT_CHECK_ERR_CFAM_PATH()
.set_TARGET(i_target)
.set_POLL_COUNT(i_boot_parms.max_polls)
.set_POLL_DELAY(i_boot_parms.poll_delay_ns)
.set_SB_CS(SB_CS)
.set_SDB(SB_CS.get_SECURE_DEBUG_MODE())
.set_SB_MSG(SB_MSG),
//.set_BOOT_TYPE(l_check_for_runtime),
"SBE did not Boot up prior to timeout!");
Expand Down Expand Up @@ -149,6 +163,10 @@ ReturnCode poz_sbe_hreset(
FAPI_INF("SBE is in NOT Runtime State");
}

FAPI_INF("Clearing boot status in SB_MSG register before doing HRESET");
SB_MSG.clearBit<0>();
FAPI_TRY(SB_MSG.putScom(i_target));

FAPI_INF("Resetting restart vector1 ...");
FAPI_TRY(SB_CS.getScom(i_target));
SB_CS.set_START_RESTART_VECTOR1(0);
Expand Down Expand Up @@ -176,13 +194,24 @@ ReturnCode poz_sbe_hreset(
// bump count
l_poll++;

if (!(l_poll <= i_boot_parms.max_polls))
{
FAPI_TRY(SB_CS.getScom(i_target));

if (SB_CS.get_SECURE_DEBUG_MODE())
{
FAPI_ERR("SBE Boot failed since SDB is set");
}
}

// test for timeout
FAPI_ASSERT((l_poll <= i_boot_parms.max_polls),
fapi2::SBE_BOOT_CHECK_ERR_SCOM_PATH()
.set_TARGET(i_target)
.set_POLL_COUNT(i_boot_parms.max_polls)
.set_POLL_DELAY(i_boot_parms.poll_delay_ns)
.set_SB_CS(SB_CS)
.set_SDB(SB_CS.get_SECURE_DEBUG_MODE())
.set_SB_MSG(SB_MSG),
//.set_BOOT_TYPE(l_check_for_runtime),
"SBE did not Boot up prior to timeout!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<ffdc>POLL_COUNT</ffdc>
<ffdc>POLL_DELAY</ffdc>
<ffdc>SB_CS</ffdc>
<ffdc>SDB</ffdc>
<ffdc>SB_MSG</ffdc>
<callout>
<target>TARGET</target>
Expand All @@ -54,6 +55,7 @@
<ffdc>POLL_COUNT</ffdc>
<ffdc>POLL_DELAY</ffdc>
<ffdc>SB_CS</ffdc>
<ffdc>SDB</ffdc>
<ffdc>SB_MSG</ffdc>
<callout>
<target>TARGET</target>
Expand Down

0 comments on commit 1e3984c

Please sign in to comment.