Skip to content

Commit

Permalink
Always allow SPW deassert, even if SGPE is inactive
Browse files Browse the repository at this point in the history
Change-Id: Ib15f67242df709de2efa5b86e357668fd82bc767
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41652
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Brian T. Vanderpool <vanderp@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41653
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
sannerd authored and dcrowell77 committed Jun 12, 2017
1 parent 9401084 commit 40ac376
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -542,7 +542,7 @@ fapi2::ReturnCode _spwkup_deassert( const fapi2::Target<K>& i_chipletTarget,
FAPI_TRY(fapi2::putScom(l_parentTarget, i_address, l_data64),
"PutScom of Special Wake-up register failed");
FAPI_DBG(" %s: After clear putscom of SPWKUP_REG (0x%08llx) => 0x%016llx",
*(p9specialWakeup::SPWK_MSG_LIST[i_msgId]),
(p9specialWakeup::SPWK_MSG_LIST[i_msgId]),
i_address,
l_data64);
}
Expand All @@ -551,7 +551,7 @@ fapi2::ReturnCode _spwkup_deassert( const fapi2::Target<K>& i_chipletTarget,
FAPI_TRY(fapi2::getScom(l_parentTarget, i_address, l_data64),
"GetScom of Special Wake-up failed");
FAPI_DBG(" %s: After read (delay) of SPWKUP_REG (0x%08llx) 0x%016llx",
*(p9specialWakeup::SPWK_MSG_LIST[i_msgId]),
(p9specialWakeup::SPWK_MSG_LIST[i_msgId]),
i_address,
l_data64);

Expand Down Expand Up @@ -620,22 +620,24 @@ fapi2::ReturnCode _special_wakeup(const fapi2::Target<K>& i_chipletTarget,

do
{
// Read system checkstop indicator
FAPI_TRY(fapi2::getScom(l_parentTarget,
PU_OCB_OCI_OCCFLG_SCOM,
occFlagReg),
"GetScom of OCC Flag Register Failed");

if( !occFlagReg.getBit<SGPE_ACTIVE_BIT>() )
{
FAPI_INF("SGPE not active. STOP Sub-System not ready for special wakeup" );
break;
}

switch (i_operation)
{

case p9specialWakeup::SPCWKUP_ENABLE:
// Check if PM subsystem is ready for SPW
// Moved under wakeup enable, because always want to let
// SPW to be cleared
FAPI_TRY(fapi2::getScom(l_parentTarget,
PU_OCB_OCI_OCCFLG_SCOM,
occFlagReg),
"GetScom of OCC Flag Register Failed");

if( !occFlagReg.getBit<SGPE_ACTIVE_BIT>() )
{
FAPI_INF("SGPE not active. STOP Sub-System not ready for special wakeup" );
break;
}

// Select the addresses to use based on the entity
FAPI_TRY(spwkup_setup_entity(i_chipletTarget, i_entity, processing_info),
"Error: spwkup_setup_entity failed");
Expand Down

0 comments on commit 40ac376

Please sign in to comment.