diff options
Diffstat (limited to 'src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_init.C')
-rw-r--r--[-rwxr-xr-x] | src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_init.C | 524 |
1 files changed, 287 insertions, 237 deletions
diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_init.C b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_init.C index 0964a1698..14576257d 100755..100644 --- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_init.C +++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_init.C @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: p8_pm_init.C,v 1.20 2013/08/02 19:07:22 stillgs Exp $ +// $Id: p8_pm_init.C,v 1.22 2013/10/30 17:13:08 stillgs Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_pm_init.C,v $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 @@ -28,6 +28,7 @@ // *! *** IBM Confidential *** //------------------------------------------------------------------------------ // *! OWNER NAME: Ralf Maier Email: ralf.maier@de.ibm.com +// *! BACKUP NAME: Greg Still Email: stillgs@us.ibm.com // *! /// \file p8_pm_init.C /// \brief Calls each PM unit initialization procedures with the control @@ -54,6 +55,10 @@ /// High-level procedure flow: /// /// \verbatim +/// - call p8_pm_prep_for_reset to prepare and perform getting the PM function +/// able to be be (re)initialized +/// +/// - call pm_list() to process the individual units in turn /// - call p8_pcbs_init.C *chiptarget, mode (PM_CONFIG, PM_INIT, PM_RESET) /// - evaluate RC /// @@ -89,6 +94,7 @@ #include "p8_pm.H" #include "p8_pm_init.H" +#include "p8_pm_prep_for_reset.H" extern "C" { @@ -98,22 +104,23 @@ using namespace fapi; // Constant definitions // ---------------------------------------------------------------------- - // ---------------------------------------------------------------------- // Global variables // ---------------------------------------------------------------------- - // ---------------------------------------------------------------------- // Function prototypes // ---------------------------------------------------------------------- - // ---------------------------------------------------------------------- // Function definitions // ---------------------------------------------------------------------- - fapi::ReturnCode p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode); +fapi::ReturnCode +pm_list(const Target& i_target, const Target& i_target2, uint32_t i_mode); +fapi::ReturnCode +clear_occ_special_wakeups (const fapi::Target &i_target); + // ---------------------------------------------------------------------- // p8_pm_init // ---------------------------------------------------------------------- @@ -122,71 +129,147 @@ fapi::ReturnCode p8_pm_init(const fapi::Target &i_target1 ,const fapi::Target &i_target2 , uint32_t mode) { - fapi::ReturnCode l_fapi_rc; + fapi::ReturnCode rc; + uint32_t int_mode; do { + int_mode = PM_RESET; + FAPI_EXEC_HWP(rc, p8_pm_prep_for_reset, i_target1, i_target2, int_mode); + if (rc) + { + FAPI_ERR("ERROR: p8_pm_init detected failed p8_pm_prep_for_reset result"); + break; + } + + int_mode = PM_CONFIG; + rc = pm_list(i_target1, i_target2, mode); + if (rc) + { + FAPI_ERR("ERROR: p8_pm_list detected failed "); + break; + } + + int_mode = PM_INIT; + rc = pm_list(i_target1, i_target2, mode); + if (rc) + { + FAPI_ERR("ERROR: p8_pm_list detected failed "); + break; + } + + } while(0); + + return rc; +} + +// ---------------------------------------------------------------------- +// ocb_channel_reset - Reset each of the OCB channels on the passed target +// ---------------------------------------------------------------------- - if (mode == PM_INIT) +fapi::ReturnCode +ocb_channel_reset(const Target& i_target, uint32_t i_mode) +{ + fapi::ReturnCode rc; + + do + { + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, i_mode, OCB_CHAN0,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); + if (rc) { - FAPI_INF("Executing p8_pm_init in mode = PM_INIT ....\n") ; + FAPI_ERR("ERROR: p8_p8_pm_init detected failed OCB result on channel 0"); + break; } - if (mode == PM_CONFIG) + + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, i_mode, OCB_CHAN1,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); + if (rc) { - FAPI_INF("Executing p8_pm_init in mode = PM_CONFIG ....\n") ; + FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 1"); + break; } - /// ------------------------------- - /// Configuration/Initialation - if (mode == PM_CONFIG || - mode == PM_INIT || - mode == PM_RESET || - mode == PM_RESET_SOFT) + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, i_mode, OCB_CHAN2,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); + if (rc) { - l_fapi_rc = p8_pm_list(i_target1, i_target2, mode); - if (l_fapi_rc) - { - FAPI_ERR("ERROR: p8_pm_list detected failed "); - break; - } + FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 2"); + break; } - /// ------------------------------- - /// Unsupported Mode - else + + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, i_mode,OCB_CHAN3,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); + if (rc) { - FAPI_ERR("Unknown mode passed to p8_pm_init. Mode %x ....\n", mode); - uint32_t & MODE = mode; - FAPI_SET_HWP_ERROR(l_fapi_rc, RC_PROCPM_PMC_CODE_BAD_MODE); // proc_pmc_errors.xml + FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 3"); break; } } while(0); - - return l_fapi_rc; + return rc; } +// ---------------------------------------------------------------------- +// ocb_channel_init - Initialize the OCB channels as TGMT expects them --- +// ---------------------------------------------------------------------- + +fapi::ReturnCode +ocb_channel_init(const Target& i_target) +{ + fapi::ReturnCode rc; + + do + { + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, PM_SETUP_PIB, OCB_CHAN0, OCB_TYPE_LINSTR, 0, 0, OCB_Q_OUFLOW_EN, OCB_Q_ITPTYPE_NULL ); + if (rc) + { + FAPI_ERR("ERROR: ocb_channel_init detected a failed p8_ocb_init on channel 0"); + break; + } + + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, PM_SETUP_PIB, OCB_CHAN1, OCB_TYPE_PUSHQ, 0, 0, OCB_Q_OUFLOW_EN, OCB_Q_ITPTYPE_NULL ); + if (rc) + { + FAPI_ERR("ERROR: ocb_channel_init detected a failed p8_ocb_init on channel 1"); + break; + } + + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, PM_SETUP_PIB, OCB_CHAN2, OCB_TYPE_LIN, 0, 0, OCB_Q_OUFLOW_NULL, OCB_Q_ITPTYPE_NULL ); + if (rc) + { + FAPI_ERR("ERROR: ocb_channel_init detected a failed p8_ocb_init on channel 2"); + break; + } + + FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, PM_SETUP_PIB, OCB_CHAN3, OCB_TYPE_LINSTR, 0, 0, OCB_Q_OUFLOW_EN, OCB_Q_ITPTYPE_NULL ); + if (rc) + { + FAPI_ERR("ERROR: ocb_channel_init detected a failed p8_ocb_init on channel 3"); + break; + } + } while(0); + return rc; + +} // ---------------------------------------------------------------------- -// p8_pm_list - process the underlying routines in the prescribed order +// pm_list - process the underlying routines in the prescribed order // ---------------------------------------------------------------------- fapi::ReturnCode -p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) +pm_list(const Target& i_target, const Target& i_target2, uint32_t i_mode) { fapi::ReturnCode rc; - uint64_t SP_WKUP_REG_ADDRS; - uint8_t l_ex_number = 0; ecmdDataBufferBase data(64); uint32_t effective_mode = 0; + const char * PM_MODE_NAME_VAR; // Defines storage for PM_MODE_NAME std::vector<fapi::Target> l_exChiplets; - FAPI_INF("Executing p8_pm_list in mode %x start", mode); + FAPI_INF("p8_pm_list start in mode %s", PM_MODE_NAME(i_mode)); + do { - if (mode == PM_RESET_SOFT || mode == PM_RESET) + if (i_mode == PM_RESET_SOFT || i_mode == PM_RESET) { effective_mode = PM_RESET; FAPI_DBG("A Reset mode is detected. Setting effective reset for non-PMC procedures to PM_RESET (mode %x)", @@ -194,7 +277,7 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) } else { - effective_mode = mode; + effective_mode = i_mode; } @@ -202,7 +285,7 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // PCBS_PM // ****************************************************************** - FAPI_INF("Executing: p8_pcbs_init.C in mode %x", mode); + FAPI_INF("Executing: p8_pcbs_init.C in mode %s", PM_MODE_NAME(effective_mode)); if ( i_target.getType() != TARGET_TYPE_NONE ) { @@ -228,9 +311,9 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // PMC // ****************************************************************** - FAPI_INF("Executing: p8_pmc_init in mode %x", mode); + FAPI_INF("Executing: p8_pmc_init in mode %s", PM_MODE_NAME(i_mode)); - FAPI_EXEC_HWP(rc, p8_pmc_init, i_target, i_target2, mode); + FAPI_EXEC_HWP(rc, p8_pmc_init, i_target, i_target2, i_mode); if (rc) { FAPI_ERR("ERROR: p8_pm_init detected failed PMC result"); @@ -243,33 +326,33 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // Run SLW for hard reset and hard init and any config. So as to not // touch the hardware, skip for soft reset and soft init. - if (!(mode == PM_INIT_SOFT || mode == PM_RESET_SOFT )) - { - FAPI_INF("Executing: p8_poreslw_init in mode %x", mode); - if ( i_target.getType() != TARGET_TYPE_NONE ) - { - FAPI_EXEC_HWP(rc, p8_poreslw_init, i_target, mode); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed PORE SLW result"); - break; - } - } - - if ( i_target2.getType() != TARGET_TYPE_NONE ) - { - FAPI_EXEC_HWP(rc, p8_poreslw_init, i_target2, mode); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed PORE SLW result"); - break; - } - } - } - else - { - FAPI_INF("Skipping p8_poreslw_init for mode %x - either soft init or soft reset", mode); - } + // if (!(mode == PM_INIT_SOFT || mode == PM_RESET_SOFT )) +// { +// FAPI_INF("Executing: p8_poreslw_init in mode %x", mode); +// if ( i_target.getType() != TARGET_TYPE_NONE ) +// { +// FAPI_EXEC_HWP(rc, p8_poreslw_init, i_target, mode); +// if (rc) +// { +// FAPI_ERR("ERROR: p8_pm_init detected failed PORE SLW result"); +// break; +// } +// } +// +// if ( i_target2.getType() != TARGET_TYPE_NONE ) +// { +// FAPI_EXEC_HWP(rc, p8_poreslw_init, i_target2, mode); +// if (rc) +// { +// FAPI_ERR("ERROR: p8_pm_init detected failed PORE SLW result"); +// break; +// } +// } +// } +// else +// { +// FAPI_INF("Skipping p8_poreslw_init for mode %x - either soft init or soft reset", mode); +// } // ****************************************************************** // PORE General Purpose Engines // ****************************************************************** @@ -299,34 +382,34 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // OHA // ****************************************************************** - FAPI_INF("Executing: p8_oha_init in mode %x", effective_mode); - - if ( i_target.getType() != TARGET_TYPE_NONE ) - { - FAPI_EXEC_HWP(rc, p8_oha_init, i_target, effective_mode); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed OHA result"); - break; - } - } - - if ( i_target2.getType() != TARGET_TYPE_NONE ) - { - FAPI_EXEC_HWP(rc, p8_oha_init, i_target2, effective_mode); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed OHA result"); - break; - } - } + // FAPI_INF("Executing: p8_oha_init in mode %s", PM_MODE_NAME(effective_mode)); + // + // if ( i_target.getType() != TARGET_TYPE_NONE ) + // { + // FAPI_EXEC_HWP(rc, p8_oha_init, i_target, effective_mode); + // if (rc) + // { + // FAPI_ERR("ERROR: p8_pm_init detected failed OHA result"); + // break; + // } + // } + // + // if ( i_target2.getType() != TARGET_TYPE_NONE ) + // { + // FAPI_EXEC_HWP(rc, p8_oha_init, i_target2, effective_mode); + // if (rc) + // { + // FAPI_ERR("ERROR: p8_pm_init detected failed OHA result"); + // break; + // } + // } // ****************************************************************** // OCC-SRAM // ****************************************************************** - FAPI_INF("Executing: p8_occ_sram_init in mode %x", effective_mode); + FAPI_INF("Executing: p8_occ_sram_init in mode %s", PM_MODE_NAME(effective_mode)); if ( i_target.getType() != TARGET_TYPE_NONE ) { @@ -352,70 +435,48 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // OCB // ****************************************************************** - FAPI_INF("Executing: p8_ocb_init in mode %x", effective_mode); + FAPI_INF("Executing: p8_ocb_init in mode %s", PM_MODE_NAME(effective_mode)); if ( i_target.getType() != TARGET_TYPE_NONE ) { - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, effective_mode,OCB_CHAN0,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 0"); - break; - } - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, effective_mode,OCB_CHAN1,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 1"); - break; - } - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, effective_mode,OCB_CHAN2,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) + if (effective_mode == PM_RESET) { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 2"); - break; + rc = ocb_channel_reset(i_target, effective_mode); + if (rc) + { + FAPI_ERR("ERROR: p8_pm_init detected ocb_channel_reset error"); + break; + } } - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target, effective_mode,OCB_CHAN3,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) + else if (effective_mode == PM_INIT) { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 0"); - break; + rc = ocb_channel_init(i_target); + if (rc) + { + FAPI_ERR("ERROR: p8_pm_init detected ocb_channel_init error"); + break; + } } - } if ( i_target2.getType() != TARGET_TYPE_NONE ) { - - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target2, effective_mode,OCB_CHAN0,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 0"); - break; - } - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target2, effective_mode,OCB_CHAN1,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) + if (effective_mode == PM_RESET) { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 1"); - break; - } - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target2, effective_mode,OCB_CHAN2,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) - { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 2"); - break; + rc = ocb_channel_reset(i_target, effective_mode); + if (rc) + { + FAPI_ERR("ERROR: p8_pm_init detected ocb_channel_reset error"); + break; + } } - - FAPI_EXEC_HWP(rc, p8_ocb_init, i_target2, effective_mode,OCB_CHAN3,OCB_TYPE_NULL, 0x10000000, 1 , OCB_Q_OUFLOW_EN , OCB_Q_ITPTYPE_NOTFULL ); - if (rc) + else if (effective_mode == PM_INIT) { - FAPI_ERR("ERROR: p8_pm_init detected failed OCB result on channel 0"); - break; + rc = ocb_channel_init(i_target); + if (rc) + { + FAPI_ERR("ERROR: p8_pm_init detected ocb_channel_init error"); + break; + } } } @@ -424,7 +485,7 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // PSS // ****************************************************************** - FAPI_INF("Executing:p8_pss_init in effective_mode %x", effective_mode); + FAPI_INF("Executing:p8_pss_init in effective_mode %s", PM_MODE_NAME(effective_mode)); if ( i_target.getType() != TARGET_TYPE_NONE ) { @@ -451,7 +512,7 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // PBA // ****************************************************************** - FAPI_INF("Executing: p8_pba_init in effective_mode %x", effective_mode); + FAPI_INF("Executing: p8_pba_init in effective_mode %s", PM_MODE_NAME(effective_mode)); if ( i_target.getType() != TARGET_TYPE_NONE ) { FAPI_EXEC_HWP(rc, p8_pba_init, i_target, effective_mode ); @@ -479,12 +540,12 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) // ****************************************************************** - FAPI_INF("Executing:p8_pm_firinit in effective_mode %x", mode); + FAPI_INF("Executing:p8_pm_firinit in effective_mode %s", PM_MODE_NAME(i_mode)); if ( i_target.getType() != TARGET_TYPE_NONE ) { - FAPI_EXEC_HWP(rc, p8_pm_firinit, i_target , mode ); + FAPI_EXEC_HWP(rc, p8_pm_firinit, i_target , i_mode ); if (rc) { FAPI_ERR("ERROR: p8_pm_firinit detected failed result"); @@ -495,13 +556,13 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) if ( i_target2.getType() != TARGET_TYPE_NONE ) { - FAPI_EXEC_HWP(rc, p8_pm_firinit, i_target2 , mode ); + FAPI_EXEC_HWP(rc, p8_pm_firinit, i_target2 , i_mode ); if (rc) { FAPI_ERR("ERROR: p8_pm_firinit detected failed result"); break; } - } + } // ****************************************************************** // CPU_SPECIAL_WAKEUP switch off @@ -509,116 +570,105 @@ p8_pm_list(const Target& i_target, const Target& i_target2, uint32_t mode) if ( i_target.getType() != TARGET_TYPE_NONE ) { - rc = fapiGetChildChiplets ( i_target, - TARGET_TYPE_EX_CHIPLET, - l_exChiplets, - TARGET_STATE_FUNCTIONAL); - if (rc) + rc = clear_occ_special_wakeups (i_target); + if (!rc.ok()) { - FAPI_ERR("Error from fapiGetChildChiplets!"); break; } + } - FAPI_DBG("\tChiplet vector size => %u ", l_exChiplets.size()); - - // Iterate through the returned chiplets - for (uint8_t j=0; j < l_exChiplets.size(); j++) - { - - // Build the SCOM address - rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &l_exChiplets[j], l_ex_number); - FAPI_DBG("Running special wakeup on ex chiplet %d ", l_ex_number); - - // Set special wakeup for EX - // Commented due to attribute errors - SP_WKUP_REG_ADDRS = PM_SPECIAL_WKUP_OCC_0x100F010C + (l_ex_number * 0x01000000) ; - rc=fapiGetScom(i_target, SP_WKUP_REG_ADDRS , data); - if(rc) - { - break; - } - FAPI_DBG(" Before clear of SPWKUP_REG PM_SPECIAL_WKUP_OCC_(0x%08llx) => =>0x%16llx", SP_WKUP_REG_ADDRS, data.getDoubleWord(0)); - - if (data.isBitSet(0)) - { - rc = fapiSpecialWakeup(l_exChiplets[j], false); - if (rc) - { - FAPI_ERR("p8_cpu_special_wakeup: Failed to put CORE into special wakeup. With rc = 0x%x", (uint32_t)rc); - break; - } - } - } // chiplet loop + if ( i_target2.getType() != TARGET_TYPE_NONE ) + { + rc = clear_occ_special_wakeups (i_target2); if (!rc.ok()) { break; - } - } // Master target + } + } + } // PM_INIT special stuff + } while(0); - ///////////////////////////////////////////// SLAVE TARGET ///////////////////////////////////////////////// + FAPI_INF("p8_pm_list end in mode %s", PM_MODE_NAME(i_mode)); + return rc; +} - if ( i_target2.getType() != TARGET_TYPE_NONE ) - { - rc = fapiGetChildChiplets ( i_target2, - TARGET_TYPE_EX_CHIPLET, - l_exChiplets, - TARGET_STATE_FUNCTIONAL); - if (rc) - { - FAPI_ERR("Error from fapiGetChildChiplets!"); - break; - } +/** + * clear_occ_special_wakeups - clears OCC special wake-up on all configured EXs + * + * @param[in] i_target Chip target w + * + * @retval ECMD_SUCCESS + * @retval ERROR defined in xml + */ +fapi::ReturnCode +clear_occ_special_wakeups (const fapi::Target &i_target) +{ + fapi::ReturnCode rc; + uint64_t SP_WKUP_REG_ADDRS; + ecmdDataBufferBase data(64); + std::vector<fapi::Target> l_exChiplets; + uint8_t l_ex_number = 0; + + do + { + + rc = fapiGetChildChiplets ( i_target, + TARGET_TYPE_EX_CHIPLET, + l_exChiplets, + TARGET_STATE_FUNCTIONAL); + if (rc) + { + FAPI_ERR("Error from fapiGetChildChiplets!"); + break; + } - FAPI_DBG("\tChiplet vector size => %u ", l_exChiplets.size()); + FAPI_DBG("\tChiplet vector size => %u ", l_exChiplets.size()); - // Iterate through the returned chiplets - for (uint8_t j=0; j < l_exChiplets.size(); j++) - { + // Iterate through the returned chiplets + for (uint8_t j=0; j < l_exChiplets.size(); j++) + { - // Build the SCOM address - rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &l_exChiplets[j], l_ex_number); - if (rc) - { - FAPI_ERR("Error from ATTR_GET for chip position!"); - break; - } - FAPI_DBG("Running special wakeup on ex chiplet %d ", l_ex_number); - - // Set special wakeup for EX - // Commented due to attribute errors - SP_WKUP_REG_ADDRS = PM_SPECIAL_WKUP_OCC_0x100F010C + (l_ex_number * 0x01000000) ; - rc=fapiGetScom(i_target2, SP_WKUP_REG_ADDRS , data); - if(rc) - { - FAPI_ERR("Error from GetScom of OCC SPWKUP"); - break; - } - FAPI_DBG(" Before clear of SPWKUP_REG PM_SPECIAL_WKUP_OCC_(0x%08llx) => =>0x%16llx", SP_WKUP_REG_ADDRS, data.getDoubleWord(0)); - - if (data.isBitSet(0)) - { - rc = fapiSpecialWakeup(l_exChiplets[j], false); - if (rc) - { - FAPI_ERR("p8_cpu_special_wakeup: Failed to put CORE into special wakeup. With rc = 0x%x", (uint32_t)rc); - break; - } - } - } // chiplet loop - if (!rc.ok()) + // Build the SCOM address + rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &l_exChiplets[j], l_ex_number); + if (rc) + { + FAPI_ERR("Error from ATTR_GET for chip position!"); + break; + } + FAPI_DBG("Running special wakeup on ex chiplet %d ", l_ex_number); + + // Set special wakeup for EX + // Commented due to attribute errors + SP_WKUP_REG_ADDRS = PM_SPECIAL_WKUP_OCC_0x100F010C + (l_ex_number * 0x01000000) ; + rc=fapiGetScom(i_target, SP_WKUP_REG_ADDRS , data); + if(rc) + { + FAPI_ERR("Error from GetScom of OCC SPWKUP"); + break; + } + FAPI_DBG(" Before clear of SPWKUP_REG PM_SPECIAL_WKUP_OCC_(0x%08llx) => =>0x%16llx", + SP_WKUP_REG_ADDRS, + data.getDoubleWord(0)); + + if (data.isBitSet(0)) + { + rc = fapiSpecialWakeup(l_exChiplets[j], false); + if (rc) { + FAPI_ERR("p8_cpu_special_wakeup: Failed to put CORE into special wakeup. With rc = 0x%x", (uint32_t)rc); break; } - } // Slave target - } // PM_INIT special stuff + } + } // chiplet loop + if (!rc.ok()) + { + break; + } } while(0); - - FAPI_INF("Executing p8_pm_list in mode %x end", mode); - return rc; - } + } //end extern C |