Skip to content

Commit

Permalink
Only allow key transition in istep 10.2
Browse files Browse the repository at this point in the history
In certain cases, if a key transition driver was booted and the nest frequency
had to be updated, the key transition flow would erroneously activate in istep
7.3 (call_mss_freq).  This change confines key transitioning to istep 10.2

Change-Id: I450703e21bf68644298f77fcdfca62eae5c667e4
CQ: SW451376
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68690
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.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>
  • Loading branch information
Nick Bofferding authored and dcrowell77 committed Mar 5, 2019
1 parent 236d217 commit d236030
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
17 changes: 16 additions & 1 deletion src/include/usr/sbe/sbeif.H
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ namespace SBE
{
typedef uint8_t sbe_image_version_t[SBE_IMAGE_VERSION_SIZE];

/**
* @brief Enumeration indicating whether SBE SEEPROM update should
* allow key transitioning (if applicable)
*/
enum KEY_TRANSITION_PERM : uint8_t
{
INHIBIT_KEY_TRANSITION = 0x00,
ALLOW_KEY_TRANSITION = 0x01,
};

/**
* @brief Gets a pointer to the proper SBE image in PNOR
*
Expand All @@ -61,9 +71,14 @@ namespace SBE
* @brief Iterates through all the functional processors and updates
* the SBE Image in a SEEPROM, if necessary.
*
* @param[in] i_keyTransPerm Whether key transitions should be allowed
* or inhibited (if applicable). By default, they are inhibited.
* Only istep 10.2 should allow key transitioning.
*
* @return errlHndl_t Error log handle on failure.
*/
errlHndl_t updateProcessorSbeSeeproms();
errlHndl_t updateProcessorSbeSeeproms(
KEY_TRANSITION_PERM i_keyTransPerm = INHIBIT_KEY_TRANSITION);

/**
* @brief Determines whether we are on the Golden side or not
Expand Down
3 changes: 2 additions & 1 deletion src/usr/isteps/istep10/call_host_slave_sbe_update.C
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ void* call_host_slave_sbe_update (void *io_pArgs)

// Call to check state of Processor SBE SEEPROMs and
// make any necessary updates
l_errl = SBE::updateProcessorSbeSeeproms();
l_errl = SBE::updateProcessorSbeSeeproms(
SBE::KEY_TRANSITION_PERM::ALLOW_KEY_TRANSITION);

if (l_errl)
{
Expand Down
11 changes: 8 additions & 3 deletions src/usr/sbe/sbe_update.C
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ using namespace TARGETING;

namespace SBE
{
errlHndl_t updateProcessorSbeSeeproms()
errlHndl_t updateProcessorSbeSeeproms(
const KEY_TRANSITION_PERM i_keyTransPerm)
{
errlHndl_t err = NULL;
errlHndl_t err_cleanup = NULL;
Expand Down Expand Up @@ -258,8 +259,12 @@ namespace SBE
err = NULL;
}

// Check if a key transition is needed
err = secureKeyTransition();
// Check if a key transition is allowed/needed
if(i_keyTransPerm == ALLOW_KEY_TRANSITION)
{
err = secureKeyTransition();
}

if (err)
{
TRACFCOMP( g_trac_sbe, ERR_MRK"updateProcessorSbeSeeproms() - failed secureKeyTransition");
Expand Down

0 comments on commit d236030

Please sign in to comment.