From 40ac37664f6c02262770829af2b7ae7a29e6990a Mon Sep 17 00:00:00 2001 From: Dean Sanner Date: Sat, 10 Jun 2017 20:38:32 -0500 Subject: Always allow SPW deassert, even if SGPE is inactive Change-Id: Ib15f67242df709de2efa5b86e357668fd82bc767 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41652 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Brian T. Vanderpool Reviewed-by: Gregory S. Still Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41653 Reviewed-by: Hostboot Team Reviewed-by: Daniel M. Crowell --- .../procedures/hwp/pm/p9_cpu_special_wakeup_lib.H | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'src/import') diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H index cd4319427..08fc4b73a 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -542,7 +542,7 @@ fapi2::ReturnCode _spwkup_deassert( const fapi2::Target& 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); } @@ -551,7 +551,7 @@ fapi2::ReturnCode _spwkup_deassert( const fapi2::Target& 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); @@ -620,22 +620,24 @@ fapi2::ReturnCode _special_wakeup(const fapi2::Target& 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() ) - { - 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() ) + { + 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"); -- cgit v1.2.1