diff options
Diffstat (limited to 'import/chips/p9/procedures/hwp/perv')
-rw-r--r-- | import/chips/p9/procedures/hwp/perv/p9_sbe_chiplet_pll_initf.C | 143 | ||||
-rw-r--r-- | import/chips/p9/procedures/hwp/perv/p9_sbe_npll_initf.C | 17 |
2 files changed, 77 insertions, 83 deletions
diff --git a/import/chips/p9/procedures/hwp/perv/p9_sbe_chiplet_pll_initf.C b/import/chips/p9/procedures/hwp/perv/p9_sbe_chiplet_pll_initf.C index 2f6fb092..77188188 100644 --- a/import/chips/p9/procedures/hwp/perv/p9_sbe_chiplet_pll_initf.C +++ b/import/chips/p9/procedures/hwp/perv/p9_sbe_chiplet_pll_initf.C @@ -7,7 +7,7 @@ /* */ /* EKB Project */ /* */ -/* COPYRIGHT 2015 */ +/* COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,93 +32,84 @@ //## auto_generated #include "p9_sbe_chiplet_pll_initf.H" - -#include "p9_perv_sbe_cmn.H" - - -enum P9_SBE_CHIPLET_PLL_INITF_Private_Constants -{ - REGIONS_PLL_ONLY = 0x001, - SCAN_TYPES_GPTR = 0x200, - SCAN_TYPES_BNDY_FUNC = 0x808 -}; +#include "p9_perv_scom_addresses.H" fapi2::ReturnCode p9_sbe_chiplet_pll_initf(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip) { - uint8_t l_read_attr = 0; - auto l_perv_functional_vector = - i_target_chip.getChildren<fapi2::TARGET_TYPE_PERV> - (fapi2::TARGET_STATE_FUNCTIONAL); - FAPI_DBG("Entering ..."); + FAPI_INF("Entering ..."); - FAPI_INF("Switch MC meshs to Nest mesh"); - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_MC_SYNC_MODE, i_target_chip, l_read_attr)); - - if ( l_read_attr ) + for (auto l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_PERV> + (static_cast<fapi2::TargetFilter>(fapi2::TARGET_FILTER_XBUS | + fapi2::TARGET_FILTER_ALL_OBUS | + fapi2::TARGET_FILTER_ALL_PCI), fapi2::TARGET_STATE_FUNCTIONAL)) { - for (auto l_chplt_trgt : l_perv_functional_vector) + uint8_t l_unit_pos; + RingID l_ring_id = xb_pll_bndy; + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_chplt_trgt, l_unit_pos), + "Error from FAPI_ATTR_GET (ATTR_CHIP_UNIT_POS)"); + + switch (l_unit_pos) { - uint8_t l_attr_chip_unit_pos = 0; //actual value is read in FAPI_ATTR_GET below - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_chplt_trgt, - l_attr_chip_unit_pos)); - - if (!((l_attr_chip_unit_pos == 0x09 || l_attr_chip_unit_pos == 0x0A - || l_attr_chip_unit_pos == 0x0B - || l_attr_chip_unit_pos == 0x0C/* ObusChiplet */) || - (l_attr_chip_unit_pos == 0x0D || l_attr_chip_unit_pos == 0x0E - || l_attr_chip_unit_pos == 0x0F/* PcieChiplet */) || - (l_attr_chip_unit_pos == 0x06/* XbusChiplet */))) - { - continue; - } - - FAPI_INF("Call Scan0 Module (scan region=PLL, scan types=GPTR)"); - FAPI_TRY(p9_perv_sbe_cmn_scan0_module(l_chplt_trgt, REGIONS_PLL_ONLY, - SCAN_TYPES_GPTR)); - - FAPI_INF("Call Scan0 Module (scan region=PLL, scan types=GPTR)"); - FAPI_TRY(p9_perv_sbe_cmn_scan0_module(l_chplt_trgt, REGIONS_PLL_ONLY, - SCAN_TYPES_BNDY_FUNC)); - - //TODO:Load Ring Module : Scan initialize PLL BNDY chain + case 0x6: + FAPI_DBG("Scan XBUS chiplet ring"); + l_ring_id = xb_pll_bndy; + break; + + case 0x9: + FAPI_DBG("Scan OB0 chiplet ring"); + l_ring_id = ob0_pll_bndy; + break; + + case 0xa: + FAPI_DBG("Scan OB1 chiplet ring"); + l_ring_id = ob1_pll_bndy; + break; + + case 0xb: + FAPI_DBG("Scan OB2 chiplet ring"); + l_ring_id = ob2_pll_bndy; + break; + + case 0xc: + FAPI_DBG("Scan OB3 chiplet ring"); + l_ring_id = ob3_pll_bndy; + break; + + case 0xd: + FAPI_DBG("Scan PCI0 chiplet ring"); + l_ring_id = pci0_pll_bndy; + break; + + case 0xe: + FAPI_DBG("Scan PCI1 chiplet ring"); + l_ring_id = pci1_pll_bndy; + break; + + case 0xf: + FAPI_DBG("Scan PCI2 chiplet ring"); + l_ring_id = pci2_pll_bndy; + break; + + default: + FAPI_ASSERT(false, + fapi2::P9_SBE_CHIPLET_PLL_INITF_INVALID_CHIPLET(). + set_TARGET(l_chplt_trgt). + set_UNIT_POS(l_unit_pos), + "Unexpected chiplet!"); } + + FAPI_TRY(fapi2::putRing(i_target_chip, l_ring_id, fapi2::RING_MODE_SET_PULSE_NSL)); + } - else + + for (auto l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MCBIST>(fapi2::TARGET_STATE_FUNCTIONAL)) { - for (auto l_chplt_trgt : l_perv_functional_vector) - { - uint8_t l_attr_chip_unit_pos = 0; //actual value is read in FAPI_ATTR_GET below - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_chplt_trgt, - l_attr_chip_unit_pos)); - - if (!((l_attr_chip_unit_pos == 0x07 - || l_attr_chip_unit_pos == 0x08/* McChiplet */) || - (l_attr_chip_unit_pos == 0x09 || l_attr_chip_unit_pos == 0x0A - || l_attr_chip_unit_pos == 0x0B - || l_attr_chip_unit_pos == 0x0C/* ObusChiplet */) || - (l_attr_chip_unit_pos == 0x0D || l_attr_chip_unit_pos == 0x0E - || l_attr_chip_unit_pos == 0x0F/* PcieChiplet */) || - (l_attr_chip_unit_pos == 0x06/* XbusChiplet */))) - { - continue; - } - - FAPI_INF("Call Scan0 Module (scan region=PLL, scan types=GPTR)"); - FAPI_TRY(p9_perv_sbe_cmn_scan0_module(l_chplt_trgt, REGIONS_PLL_ONLY, - SCAN_TYPES_GPTR)); - - FAPI_INF("Call Scan0 Module (scan region=PLL, scan types=GPTR)"); - FAPI_TRY(p9_perv_sbe_cmn_scan0_module(l_chplt_trgt, REGIONS_PLL_ONLY, - SCAN_TYPES_BNDY_FUNC)); - - //TODO:Load Ring Module : Scan initialize PLL BNDY chain - } + FAPI_DBG("Scan initialize MC chiplet ring"); + FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_pll_bndy_bucket_1, fapi2::RING_MODE_SET_PULSE_NSL)); } - FAPI_DBG("Exiting ..."); - fapi_try_exit: + FAPI_INF("Exiting ..."); return fapi2::current_err; - } diff --git a/import/chips/p9/procedures/hwp/perv/p9_sbe_npll_initf.C b/import/chips/p9/procedures/hwp/perv/p9_sbe_npll_initf.C index d4371a7b..2a8399c3 100644 --- a/import/chips/p9/procedures/hwp/perv/p9_sbe_npll_initf.C +++ b/import/chips/p9/procedures/hwp/perv/p9_sbe_npll_initf.C @@ -36,17 +36,17 @@ fapi2::ReturnCode p9_sbe_npll_initf(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip) { + FAPI_INF("Entering ..."); + uint8_t l_read_attr = 0; const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM; RingID ringID = perv_pll_bndy_bucket_1; - FAPI_INF("Entering ..."); - FAPI_DBG("Get the attribute ATTR_NEST_PLL_BUCKET"); - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_NEST_PLL_BUCKET, FAPI_SYSTEM , l_read_attr)); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_NEST_PLL_BUCKET, FAPI_SYSTEM , l_read_attr), + "Error from FAPI_ATTR_GET (ATTR_NEST_PLL_BUCKET)"); switch(l_read_attr) { - case 1: ringID = perv_pll_bndy_bucket_1; break; @@ -68,13 +68,16 @@ fapi2::ReturnCode p9_sbe_npll_initf(const break; default: - FAPI_TRY(!(fapi2::FAPI2_RC_SUCCESS), "Invalid values of ATTR_NEST_PLL_BUCKET") + FAPI_ASSERT(false, + fapi2::P9_SBE_NPLL_INITF_UNSUPPORTED_BUCKET(). + set_TARGET(i_target_chip). + set_BUCKET_INDEX(l_read_attr), + "Unsupported Nest PLL bucket value!"); } FAPI_TRY(fapi2::putRing(i_target_chip, ringID, fapi2::RING_MODE_SET_PULSE_NSL)); - FAPI_INF("Exiting ..."); - fapi_try_exit: + FAPI_INF("Exiting ..."); return fapi2::current_err; } |