diff options
author | Thi Tran <thi@us.ibm.com> | 2013-12-19 10:48:04 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-09 14:58:50 -0600 |
commit | b3ce8f0e15d367d5d88dc1145e359a91622fff1c (patch) | |
tree | e93a3aa304b0110956e4366704ffdb091383c4e3 | |
parent | 7d92789eb1a9729e36d9106fa6c04b6398bdae70 (diff) | |
download | talos-hostboot-b3ce8f0e15d367d5d88dc1145e359a91622fff1c.tar.gz talos-hostboot-b3ce8f0e15d367d5d88dc1145e359a91622fff1c.zip |
INITPROC: Hostboot - SW238947 - Special wakeup update
Change-Id: I773ce7e6ce295f41179525c1b5f9f5f8b0c1a7c2
CQ:SW238947
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7824
Tested-by: Jenkins Server
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.C | 234 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.H | 6 |
2 files changed, 127 insertions, 113 deletions
diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.C b/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.C index c049b8b5d..fb3086c1f 100644 --- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.C +++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.C @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: p8_cpu_special_wakeup.C,v 1.13 2013/08/02 18:59:13 stillgs Exp $ +// $Id: p8_cpu_special_wakeup.C,v 1.14 2013/12/11 20:38:54 stillgs Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_cpu_special_wakeup.C,v $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 @@ -86,14 +86,14 @@ extern "C" { using namespace fapi; -/// \param[in] i_target EX Target +/// \param[in] i_ex_target EX Target /// \param[in] i_operation ENABLE, DISABLE, INIT /// \param[in] entity Entity bit to use (OCC, PHYP, FSP) /// \retval PM_SUCCESS if something good happens, /// \retval PM_PROCPM_SPCWKUP* otherwise fapi::ReturnCode -p8_cpu_special_wakeup( const fapi::Target& i_target, +p8_cpu_special_wakeup( const fapi::Target& i_ex_target, PROC_SPCWKUP_OPS i_operation , PROC_SPCWKUP_ENTITY i_entity ) @@ -158,6 +158,9 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, uint32_t occ_spwkup_count = 0; uint64_t spwkup_address = 0; + + // detect AISS capaiblity + uint8_t chipHasAISSSWUP = 0; do { @@ -169,9 +172,9 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // Initialize the attributes to 0. if (i_operation == SPCWKUP_INIT) { - FAPI_INF("Processing target %s", i_target.toEcmdString()); + FAPI_INF("Processing target %s", i_ex_target.toEcmdString()); FAPI_INF("Initializing ATTR_PM_SPWUP_FSP"); - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_FSP, &i_target, fsp_spwkup_count); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_FSP, &i_ex_target, fsp_spwkup_count); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_FSP with rc = 0x%x", (uint32_t)rc); @@ -179,7 +182,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, } FAPI_INF("Initializing ATTR_PM_SPWUP_OCC"); - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OCC, &i_target, occ_spwkup_count); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OCC, &i_ex_target, occ_spwkup_count); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_OCC with rc = 0x%x", (uint32_t)rc); @@ -187,7 +190,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, } FAPI_INF("Initializing ATTR_PM_SPWUP_PHYP"); - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_PHYP, &i_target, phyp_spwkup_count); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_PHYP, &i_ex_target, phyp_spwkup_count); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_PHYP with rc = 0x%x", (uint32_t)rc); @@ -195,7 +198,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, } FAPI_INF("Initializing ATTR_PM_SPWUP_OHA_FLAG"); - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_target, oha_spwkup_flag); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_ex_target, oha_spwkup_flag); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)rc); @@ -203,7 +206,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, } FAPI_INF("Initializing ATTR_PM_SPWUP_IGNORE_XSTOP_FLAG"); - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_IGNORE_XSTOP_FLAG, &i_target, ignore_xstop_flag); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_IGNORE_XSTOP_FLAG, &i_ex_target, ignore_xstop_flag); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_IGNORE_XSTOP_FLAG with rc = 0x%x", (uint32_t)rc); @@ -219,14 +222,14 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, //-------------------------------------------------------------------------- // Get the parent chip to target the registers - rc = fapiGetParentChip(i_target, l_parentTarget); + rc = fapiGetParentChip(i_ex_target, l_parentTarget); if (rc) { break; // throw error } // Get the core number - rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &i_target, attr_chip_unit_pos); + rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &i_ex_target, attr_chip_unit_pos); if (rc) { FAPI_ERR("fapiGetAttribute of ATTR_CHIP_UNIT_POS with rc = 0x%x", (uint32_t)rc); @@ -237,21 +240,21 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // Read the Attributes to know the Special_wake counts from each entity // This should be different for different EX chiplets. - rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_FSP, &i_target, fsp_spwkup_count); + rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_FSP, &i_ex_target, fsp_spwkup_count); if (rc) { FAPI_ERR("fapiGetAttribute of ATTR_PM_SPWUP_FSP with rc = 0x%x", (uint32_t)rc); break; } - rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_OCC, &i_target, occ_spwkup_count ); + rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_OCC, &i_ex_target, occ_spwkup_count ); if (rc) { FAPI_ERR("fapiGetAttribute of ATTR_PM_SPWUP_OCC with rc = 0x%x", (uint32_t)rc); break; } - rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_PHYP,&i_target , phyp_spwkup_count ); + rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_PHYP,&i_ex_target , phyp_spwkup_count ); if (rc) { FAPI_ERR("fapiGetAttribute of ATTR_PM_SPWUP_PHYP with rc = 0x%x", (uint32_t)rc); @@ -261,30 +264,24 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, /// Calculate the maximum number of polls until a timeout is thrown special_wakeup_max_polls = special_wakeup_timeout / special_wakeup_poll_interval; - uint64_t EX_PMGP0_0x1X0F0100 = EX_PMGP0_0x100F0100 + - (attr_chip_unit_pos * 0x01000000); - // Process counts based on the calling entity if (i_entity == OCC) { count = occ_spwkup_count ; FAPI_INF("OCC count before = %d" , count); - spwkup_address = PM_SPECIAL_WKUP_OCC_0x100F010C + - (attr_chip_unit_pos * 0x01000000) ; + spwkup_address = PM_SPECIAL_WKUP_OCC_0x100F010C; } else if (i_entity == FSP) { count = fsp_spwkup_count ; FAPI_INF("FSP count before = %d" , count); - spwkup_address = PM_SPECIAL_WKUP_FSP_0x100F010B + - (attr_chip_unit_pos * 0x01000000); + spwkup_address = PM_SPECIAL_WKUP_FSP_0x100F010B; } else if (i_entity == PHYP) { count = phyp_spwkup_count ; FAPI_INF("PHYP count before = %d" , count); - spwkup_address = PM_SPECIAL_WKUP_PHYP_0x100F010D + - (attr_chip_unit_pos * 0x01000000); + spwkup_address = PM_SPECIAL_WKUP_PHYP_0x100F010D; } else { @@ -299,7 +296,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // Checking the type of OPERATION and process the request ///////////////////////////////////////////////////////////////////////////// - rc=fapiGetScom(l_parentTarget, EX_PMGP0_0x1X0F0100, data); + rc=fapiGetScom(i_ex_target, EX_PMGP0_0x100F0100, data); if(rc) { break; @@ -314,7 +311,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // special wake-up, does a SCOM, and then clears special // wake-up. rc = FAPI_ATTR_GET( ATTR_PM_SPWUP_OHA_FLAG, - &i_target, + &i_ex_target, oha_spwkup_flag); if (rc) { @@ -337,7 +334,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // needs the xstop check to not keep the special wake-up operation // from happening. rc = FAPI_ATTR_GET( ATTR_PM_SPWUP_IGNORE_XSTOP_FLAG, - &i_target, + &i_ex_target, ignore_xstop_flag); if (rc) { @@ -371,13 +368,13 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, if (count == 0) { - GETSCOM(rc, i_target, spwkup_address, data); + GETSCOM(rc, i_ex_target, spwkup_address, data); e_rc = data.flushTo0(); e_rc |= data.setBit(0); E_RC_CHECK(e_rc, rc); - PUTSCOM(rc, i_target, spwkup_address, data); + PUTSCOM(rc, i_ex_target, spwkup_address, data); // poll for the set completion pollcount = 0; @@ -386,7 +383,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, while (data.isBitClear(31) && pollcount < special_wakeup_max_polls) { - GETSCOM(rc, l_parentTarget, EX_PMGP0_0x1X0F0100, data); + GETSCOM(rc, i_ex_target, EX_PMGP0_0x100F0100, data); FAPI_DBG(" Loop get for PMGP0(31) to goto 1 => 0x%016llx", data.getDoubleWord(0)); rc = fapiDelay(special_wakeup_poll_interval*1000, 1000000); @@ -401,94 +398,111 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, break; } - // Workaround for HW255321 start here - // at timeout time: - // - check for existing external interrupts or malf alerts pending : PMGP0 bit52 - // AND if OHA is in the AISS-FSM-state P7_SEQ_WAIT_INT_PENDING EX_OHA_RO_STATUS_REG_0x1002000B - // If yes - then OHA hangs - // To leave this FSM state: - // - Set Bit 9 of OHA_ARCH_IDLE_STATE_REG( RESET_IDLE_STATE_SEQUENCER). EX_OHA_ARCH_IDLE_STATE_REG_RWx10020011 - // This resets the idle sequencer and force OHA into the DO_NOTHING_STATE ...should be completed in the next cycle - // - // Continue further down and check special_wakeup completion by checking bit31 of EX_PMGP0_0x1X0F0100 - // If set then is OHA awake else error - - - GETSCOM(rc, l_parentTarget, EX_PMGP0_0x1X0F0100, data); - if (data.isBitClear(31) && data.isBitSet(52) ) + rc = FAPI_ATTR_GET(ATTR_CHIP_EC_FEATURE_AISS_SPECIAL_WAKEUP, + &i_ex_target, + chipHasAISSSWUP); + if(rc) { - FAPI_DBG("Timed out setting Special wakeup with regular wake-up available, the logical OR of external interrupt and malfunction alert ... "); - FAPI_DBG("Checking for Hang-Situation in AISS-FSM-State P7_SEQ_WAIT_INT_PENDING ... "); - FAPI_DBG("Special Wake-up Done NOT asserted (PMGP0(31,52)!! =>0x%016llx", data.getDoubleWord(0)); - - oha_spwkup_flag = 1; - - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_target, oha_spwkup_flag); - if (rc) - { - FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)rc); - break; - } - FAPI_INF("Set OHA special wakeup flag"); + FAPI_ERR("Error querying Chip EC feature: " + "ATTR_CHIP_EC_FEATURE_PCBS_ERR_RESET"); + break; + } - // Check now if OHA is in the AISS-FSM-state P7_SEQ_WAIT_INT_PENDING EX_OHA_RO_STATUS_REG_0x1002000B (bit 13-19) 0b0011100 - GETSCOM(rc, i_target, EX_OHA_RO_STATUS_REG_0x1002000B, data); + FAPI_INF("AISS Special Wake-up fix is %s being performed", + (chipHasAISSSWUP ? "" : "NOT")); - FAPI_DBG("\tCURRENT_AISS_FSM_STATE_VECTOR (OHA_RO_STATUS(13:19) => 0x%016llx", data.getDoubleWord(0)); - if (data.isBitClear(13) && // 0 - data.isBitClear(14) && // 0 - data.isBitSet(15) && // 1 - data.isBitSet(16) && // 1 - data.isBitSet(17) && // 1 - data.isBitClear(18) && // 0 - data.isBitClear(19) ) // 0 + if (!chipHasAISSSWUP) + { + // Workaround for HW255321 start here + // at timeout time: + // - check for existing external interrupts or malf alerts pending : PMGP0 bit52 + // AND if OHA is in the AISS-FSM-state P7_SEQ_WAIT_INT_PENDING EX_OHA_RO_STATUS_REG_0x1002000B + // If yes - then OHA hangs + // To leave this FSM state: + // - Set Bit 9 of OHA_ARCH_IDLE_STATE_REG( RESET_IDLE_STATE_SEQUENCER). EX_OHA_ARCH_IDLE_STATE_REG_RWx10020011 + // This resets the idle sequencer and force OHA into the DO_NOTHING_STATE ...should be completed in the next cycle + // + // Continue further down and check special_wakeup completion by checking bit31 of EX_PMGP0_0x100F0100 + // If set then is OHA awake else error + + + GETSCOM(rc, i_ex_target, EX_PMGP0_0x100F0100, data); + + if (data.isBitClear(31) && data.isBitSet(52) ) { - FAPI_DBG("OHA hanging in AISS-FSM-state P7_SEQ_WAIT_INT_PENDING (0b11100) (OHA_RO_STATUS_REG(13:19) => 0x%016llx", data.getDoubleWord(0)); - FAPI_DBG("Start reset of IDLE STATE SEQUENCER: Set OHA_ARCH_IDLE_STATE_REG(9)"); + FAPI_DBG("Timed out setting Special wakeup with regular wake-up available, the logical OR of external interrupt and malfunction alert ... "); + FAPI_DBG("Checking for Hang-Situation in AISS-FSM-State P7_SEQ_WAIT_INT_PENDING ... "); + FAPI_DBG("Special Wake-up Done NOT asserted (PMGP0(31,52)!! =>0x%016llx", data.getDoubleWord(0)); - GETSCOM(rc, i_target, EX_OHA_ARCH_IDLE_STATE_REG_RWx10020011, data); - FAPI_DBG("\tEX_OHA_ARCH_IDLE_STATE_REG_RWx10020011 : 0x%016llx", data.getDoubleWord(0)); + oha_spwkup_flag = 1; - //Set RESET_IDLE_STATE_SEQUENCER ... Bit 9 of OHA_ARCH_IDLE_STATE_REG - e_rc=data.setBit(9); - E_RC_CHECK(e_rc, rc); - - PUTSCOM(rc, i_target, EX_OHA_ARCH_IDLE_STATE_REG_RWx10020011, data); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_ex_target, oha_spwkup_flag); + if (rc) + { + FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)rc); + break; + } + FAPI_INF("Set OHA special wakeup flag"); - // This resets the idle sequencer and force OHA into the - // DO_NOTHING_STATE ... should be completed in the next - // cycle since special wakeup is still asserted, OHA should - // not leave the DO_NOTHING_STATE + // Check now if OHA is in the AISS-FSM-state P7_SEQ_WAIT_INT_PENDING EX_OHA_RO_STATUS_REG_0x1002000B (bit 13-19) 0b0011100 + GETSCOM(rc, i_ex_target, EX_OHA_RO_STATUS_REG_0x1002000B, data); - // Check again for AISS-FSM-state P7_SEQ_WAIT_INT_PENDING EX_OHA_RO_STATUS_REG_0x1002000B (bit 13-19) 0b11100 - GETSCOM(rc, i_target, EX_OHA_RO_STATUS_REG_0x1002000B, data); FAPI_DBG("\tCURRENT_AISS_FSM_STATE_VECTOR (OHA_RO_STATUS(13:19) => 0x%016llx", data.getDoubleWord(0)); - // We're done accessing the OHA so clear the flag - oha_spwkup_flag = 0; - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_target, oha_spwkup_flag); - if (rc) + if (data.isBitClear(13) && // 0 + data.isBitClear(14) && // 0 + data.isBitSet(15) && // 1 + data.isBitSet(16) && // 1 + data.isBitSet(17) && // 1 + data.isBitClear(18) && // 0 + data.isBitClear(19) ) // 0 { - FAPI_ERR("fapiSetAttribute to clear ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)rc); - // This is a purposeful mid-procedure return - return rc; + FAPI_DBG("OHA hanging in AISS-FSM-state P7_SEQ_WAIT_INT_PENDING (0b11100) (OHA_RO_STATUS_REG(13:19) => 0x%016llx", data.getDoubleWord(0)); + FAPI_DBG("Start reset of IDLE STATE SEQUENCER: Set OHA_ARCH_IDLE_STATE_REG(9)"); + + GETSCOM(rc, i_ex_target, EX_OHA_ARCH_IDLE_STATE_REG_RWx10020011, data); + FAPI_DBG("\tEX_OHA_ARCH_IDLE_STATE_REG_RWx10020011 : 0x%016llx", data.getDoubleWord(0)); + + //Set RESET_IDLE_STATE_SEQUENCER ... Bit 9 of OHA_ARCH_IDLE_STATE_REG + e_rc=data.setBit(9); + E_RC_CHECK(e_rc, rc); + + PUTSCOM(rc, i_ex_target, EX_OHA_ARCH_IDLE_STATE_REG_RWx10020011, data); + + // This resets the idle sequencer and force OHA into the + // DO_NOTHING_STATE ... should be completed in the next + // cycle since special wakeup is still asserted, OHA should + // not leave the DO_NOTHING_STATE + + // Check again for AISS-FSM-state P7_SEQ_WAIT_INT_PENDING EX_OHA_RO_STATUS_REG_0x1002000B (bit 13-19) 0b11100 + GETSCOM(rc, i_ex_target, EX_OHA_RO_STATUS_REG_0x1002000B, data); + FAPI_DBG("\tCURRENT_AISS_FSM_STATE_VECTOR (OHA_RO_STATUS(13:19) => 0x%016llx", data.getDoubleWord(0)); + + // We're done accessing the OHA so clear the flag + oha_spwkup_flag = 0; + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_ex_target, oha_spwkup_flag); + if (rc) + { + FAPI_ERR("fapiSetAttribute to clear ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)rc); + // This is a purposeful mid-procedure return + return rc; + } + FAPI_INF("Cleared OHA special wakeup flag"); } - FAPI_INF("Cleared OHA special wakeup flag"); } - } - // Check again if special_wakeup completed - GETSCOM(rc, l_parentTarget, EX_PMGP0_0x1X0F0100, data); + // Check again if special_wakeup completed + GETSCOM(rc, i_ex_target, EX_PMGP0_0x100F0100, data); - // Workaround for HW255321 ends here + } // Workaround for HW255321 ends here if (data.isBitClear(31)) { FAPI_ERR("Timed out in setting the CPU in Special wakeup ... "); - GETSCOM(rc, l_parentTarget, EX_PMGP0_0x1X0F0100, data); + GETSCOM(rc, i_ex_target, EX_PMGP0_0x100F0100, data); FAPI_DBG("Special Wake-up Done asserted (PMGP0(31)!! =>0x%016llx", data.getDoubleWord(0)); const uint64_t& PMGP0 = data.getDoubleWord(0); @@ -497,11 +511,11 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // clear why that is so we'll address its reinstatement as // part of the RAS review process. - // GETSCOM(rc, i_target, EX_OHA_RO_STATUS_REG_0x1002000B, data); + // GETSCOM(rc, i_ex_target, EX_OHA_RO_STATUS_REG_0x1002000B, data); // FAPI_DBG(" Special Wake-up complete (OHA_RO_STATUS(1)!! => 0x%016llx", data.getDoubleWord(0)); // const uint64_t& OHA_RO_STATUS = data.getDoubleWord(0); - GETSCOM(rc, l_parentTarget, spwkup_address , data); + GETSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" After set of SPWKUP_REG (0x%08llx) => 0x%016llx", spwkup_address, data.getDoubleWord(0)); const uint64_t& SP_WKUP_REG_ADDRESS = spwkup_address; const uint64_t& SP_WKUP_REG_VALUE = data.getDoubleWord(0); @@ -533,7 +547,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // special wake-up, does a SCOM, and then clears special // wake-up. - rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_OHA_FLAG, &i_target, oha_spwkup_flag); + rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_OHA_FLAG, &i_ex_target, oha_spwkup_flag); if (rc) { FAPI_ERR("fapiGetAttribute of ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)rc); @@ -550,17 +564,17 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, if ( count == 1 ) { - GETSCOM(rc, l_parentTarget, spwkup_address , data); + GETSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" Before clear of SPWKUP_REG (0x%08llx) => =>0x%016llx", spwkup_address, data.getDoubleWord(0)); e_rc=data.flushTo0(); E_RC_CHECK(e_rc, rc); - PUTSCOM(rc, l_parentTarget, spwkup_address , data); + PUTSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" After clear putscom of SPWKUP_REG (0x%08llx) => 0x%016llx", spwkup_address, data.getDoubleWord(0)); // This puts an inherent delay in the propagation of the reset transition. - GETSCOM(rc, l_parentTarget, spwkup_address , data); + GETSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" After read (delay) of SPWKUP_REG (0x%08llx) 0x%016llx", spwkup_address, data.getDoubleWord(0)); count -- ; @@ -579,24 +593,24 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, break; } - GETSCOM(rc, l_parentTarget, spwkup_address , data); + GETSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" After configuring SPWKUP_REG value =>0x%016llx", data.getDoubleWord(0)); } else if (i_operation == SPCWKUP_FORCE_DEASSERT) { - GETSCOM(rc, l_parentTarget, spwkup_address , data); + GETSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" Before clear of SPWKUP_REG (0x%08llx) => =>0x%016llx", spwkup_address, data.getDoubleWord(0)); e_rc=data.flushTo0(); E_RC_CHECK(e_rc, rc); - PUTSCOM(rc, l_parentTarget, spwkup_address , data); + PUTSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" After clear putscom of SPWKUP_REG (0x%08llx) => 0x%016llx", spwkup_address, data.getDoubleWord(0)); // This puts an inherent delay in the propagation of the reset transition. - GETSCOM(rc, l_parentTarget, spwkup_address , data); + GETSCOM(rc, i_ex_target, spwkup_address , data); FAPI_DBG(" After read (delay) of SPWKUP_REG (0x%08llx) 0x%016llx", spwkup_address, data.getDoubleWord(0)); count = 0; @@ -616,7 +630,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, if ( i_entity == OCC ) { occ_spwkup_count = count ; - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OCC, &i_target, occ_spwkup_count ); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OCC, &i_ex_target, occ_spwkup_count ); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_OCC with rc = 0x%x", (uint32_t)rc); @@ -626,7 +640,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, else if (i_entity == FSP) { fsp_spwkup_count = count ; - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_FSP, &i_target, fsp_spwkup_count ); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_FSP, &i_ex_target, fsp_spwkup_count ); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_FSP with rc = 0x%x", (uint32_t)rc); @@ -636,7 +650,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, else if (i_entity == PHYP) { phyp_spwkup_count = count; - rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_PHYP, &i_target, phyp_spwkup_count ); + rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_PHYP, &i_ex_target, phyp_spwkup_count ); if (rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_PHYP with rc = 0x%x", (uint32_t)rc); @@ -649,7 +663,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, // Clean up the OHA flag as it should not be set out of this exit (normal // and error) path. Note: there is ia mid-procedure return above. - oha_rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_OHA_FLAG, &i_target, oha_spwkup_flag); + oha_rc = FAPI_ATTR_GET(ATTR_PM_SPWUP_OHA_FLAG, &i_ex_target, oha_spwkup_flag); if (oha_rc) { FAPI_ERR("fapiGetAttribute of ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)oha_rc); @@ -660,7 +674,7 @@ p8_cpu_special_wakeup( const fapi::Target& i_target, { oha_spwkup_flag = 0; - oha_rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_target, oha_spwkup_flag); + oha_rc = FAPI_ATTR_SET(ATTR_PM_SPWUP_OHA_FLAG, &i_ex_target, oha_spwkup_flag); if (oha_rc) { FAPI_ERR("fapiSetAttribute of ATTR_PM_SPWUP_OHA_FLAG with rc = 0x%x", (uint32_t)oha_rc); diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.H b/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.H index 616ccd119..b87414ddf 100644 --- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.H +++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_cpu_special_wakeup.H @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: p8_cpu_special_wakeup.H,v 1.6 2013/08/02 18:59:22 stillgs Exp $ +// $Id: p8_cpu_special_wakeup.H,v 1.7 2013/12/11 20:39:04 stillgs Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_cpu_special_wakeup.H,v $ //------------------------------------------------------------------------------ // *| @@ -96,7 +96,7 @@ extern "C" { //------------------------------------------------------------------------------ // Function prototype //------------------------------------------------------------------------------ -/// \param[in] i_target EX target +/// \param[in] i_ex_target EX target /// \param[in] i_entity Entity bit to use (OCC, PHYP, FSP) /// \param[in] i_operation operation to use (SPCWKUP_ENABLE, SPCWKUP_DISABLE) @@ -104,7 +104,7 @@ extern "C" { /// \retval ECMD_SUCCESS if something good happens, /// \retval BAD_RETURN_CODE otherwise fapi::ReturnCode -p8_cpu_special_wakeup( const fapi::Target& i_target, +p8_cpu_special_wakeup( const fapi::Target& i_ex_target, PROC_SPCWKUP_OPS i_operation , PROC_SPCWKUP_ENTITY i_entity ); |