diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2013-06-21 18:02:01 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-08-19 13:39:26 -0500 |
commit | 22fe965be7e4d7644170217d830784b9949f5622 (patch) | |
tree | b582750b2164568af24b59d6f4acc7b005f4d48b | |
parent | feaffb8d2ba4f109114d8f644c40fb8c02b2c7ae (diff) | |
download | blackbird-hostboot-22fe965be7e4d7644170217d830784b9949f5622.tar.gz blackbird-hostboot-22fe965be7e4d7644170217d830784b9949f5622.zip |
SW208050 : INITPROC: Hostboot - Low Priority HW Init Procedures
- update procmvpd.dat to disable mcl for murano model in PowerBus PG
issue seen wne new init file was introduced
- pick-up reqested hwp versions:
proc_chiplet_scom_init 1.16
mss_eff_grouping 1.25
mss_setup_bars 1.28
p8.a_x_pci_dmi_fir.scom.initfile 1.1
Change-Id: Id306f47c7fccf3af83155ba993b34e3a3eb44fb9
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5798
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
10 files changed, 576 insertions, 196 deletions
diff --git a/src/makefile b/src/makefile index fb8c225a9..c803d941d 100644 --- a/src/makefile +++ b/src/makefile @@ -89,7 +89,7 @@ hbicore_DATA_MODULES = sample.if p8.dmi.scom.if cen.dmi.scom.if \ p8.as.scom.if p8.nx.scom.if p8.dmi.custom.scom.if \ cen.dmi.custom.scom.if p8.abus.custom.scom.if \ p8.xbus.custom.scom.if p8.psi.scom.if p8.tpbridge.scom.if \ - p8.cxa.scom.if + p8.cxa.scom.if p8.a_x_pci_dmi_fir.scom.if hbicore_test_OBJECTS = ${hbicore_OBJECTS} hbicore_test_MODULES = ${hbicore_MODULES} diff --git a/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.C b/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.C index be79c7fb7..20f174449 100644 --- a/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.C +++ b/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.C @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: mss_setup_bars.C,v 1.27 2013/05/06 15:02:09 jmcgill Exp $ +// $Id: mss_setup_bars.C,v 1.28 2013/05/23 14:54:28 jmcgill Exp $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2012 // *! All Rights Reserved -- Property of IBM @@ -38,6 +38,7 @@ //------------------------------------------------------------------------------ // Version:| Author: | Date: | Comment: //---------|----------|---------|----------------------------------------------- +// 1.27 | jmcgill | 05/21/13| address FW review issues // 1.26 | jmcgill | 04/22/13| rewrite to line up with attribute changes // 1.23 | bellows | 12/04/12| more updates // 1.22 | gpaulraj | 10/03/12| review updates @@ -103,6 +104,15 @@ fapi::ReturnCode mss_setup_bars_init_nm_bars( rc_ecmd |= MCFGP.setBit(MCFGP_RSVD_1_BIT); rc_ecmd |= MCFGP.setBit(MCFGP_ENABLE_FASTPATH_BIT); + // check buffer manipulation return codes + if (rc_ecmd) + { + FAPI_ERR("mss_setup_bars_init_nm_bars: Error 0x%X setting up MCFGP base data buffer", + rc_ecmd); + rc.setEcmdError(rc_ecmd); + break; + } + if (i_pri_valid) { // MCFGPQ_VALID @@ -145,6 +155,16 @@ fapi::ReturnCode mss_setup_bars_init_nm_bars( bool alt_valid = i_group_data[MSS_MCS_GROUP_32_ALT_VALID_INDEX]; if (alt_valid) { + if (i_group_data[MSS_MCS_GROUP_32_ALT_BASE_INDEX] != + (i_group_data[MSS_MCS_GROUP_32_BASE_INDEX] + + (i_group_data[MSS_MCS_GROUP_32_SIZE_INDEX]/2))) + { + FAPI_ERR("mss_setup_bars_init_nm_bars: Invalid non-mirrored alternate BAR configuration"); + FAPI_SET_HWP_ERROR(rc, + RC_MSS_SETUP_BARS_NM_ALT_BAR_ERR); + break; + } + // MCFGPAQ_VALID rc_ecmd |= MCFGPA.setBit(MCFGPA_VALID_BIT); @@ -162,39 +182,29 @@ fapi::ReturnCode mss_setup_bars_init_nm_bars( (MCFGPA_BASE_ADDRESS_END_BIT- MCFGPA_BASE_ADDRESS_START_BIT)+1); - if (i_group_data[MSS_MCS_GROUP_32_ALT_BASE_INDEX] != - (i_group_data[MSS_MCS_GROUP_32_BASE_INDEX] + - (i_group_data[MSS_MCS_GROUP_32_SIZE_INDEX]/2))) + // check buffer manipulation return codes + if (rc_ecmd) { - FAPI_ERR("Invalid non-mirrored alternate BAR configuration"); - FAPI_SET_HWP_ERROR(rc, - RC_MSS_SETUP_BARS_NM_ALT_BAR_ERR); + FAPI_ERR("mss_setup_bars_init_nm_bars: Error 0x%X setting up MCFGPA data buffer", + rc_ecmd); + rc.setEcmdError(rc_ecmd); break; } } - - // check buffer manipulation return codes - if (rc_ecmd) - { - FAPI_ERR("mss_setup_bars_init_nm_bars: Error 0x%X setting up MCFGPA data buffer", - rc_ecmd); - rc.setEcmdError(rc_ecmd); - break; - } } // write registers rc = fapiPutScom(i_mcs_target, MCS_MCFGP_0x02011800, MCFGP); if (!rc.ok()) { - FAPI_ERR("Error from fapiPutScom (MCS_MCFGP_0x02011800)"); + FAPI_ERR("mss_setup_bars_init_nm_bars: Error from fapiPutScom (MCS_MCFGP_0x02011800)"); break; } rc = fapiPutScom(i_mcs_target, MCS_MCFGPA_0x02011814, MCFGPA); if (!rc.ok()) { - FAPI_ERR("Error from fapiPutScom (MCS_MCFGPA_0x02011814)"); + FAPI_ERR("mss_setup_bars_init_nm_bars: Error from fapiPutScom (MCS_MCFGPA_0x02011814)"); break; } } while(0); @@ -278,7 +288,7 @@ fapi::ReturnCode mss_setup_bars_init_m_bars( (i_group_data[MSS_MCS_GROUP_32_BASE_INDEX] + (i_group_data[MSS_MCS_GROUP_32_SIZE_INDEX]/2))) { - FAPI_ERR("Invalid mirrored alternate BAR configuration"); + FAPI_ERR("mss_setup_bars_init_m_bars: Invalid mirrored alternate BAR configuration"); FAPI_SET_HWP_ERROR(rc, RC_MSS_SETUP_BARS_M_ALT_BAR_ERR); break; @@ -299,13 +309,13 @@ fapi::ReturnCode mss_setup_bars_init_m_bars( rc = fapiPutScom(i_mcs_target, MCS_MCFGPM_0x02011801, MCFGPM); if (!rc.ok()) { - FAPI_ERR("Error from fapiPutScom (MCS_MCFGPM_0x02011801)"); + FAPI_ERR("mss_setup_bars_init_m_bars: Error from fapiPutScom (MCS_MCFGPM_0x02011801)"); break; } rc = fapiPutScom(i_mcs_target, MCS_MCFGPMA_0x02011815, MCFGPMA); if (!rc.ok()) { - FAPI_ERR("Error from fapiPutScom (MCS_MCFGPMA_0x02011815"); + FAPI_ERR("mss_setup_bars_init_m_bars: Error from fapiPutScom (MCS_MCFGPMA_0x02011815"); break; } } while(0); @@ -330,7 +340,7 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) rc = FAPI_ATTR_GET(ATTR_MSS_MCS_GROUP_32, &i_pu_target, group_data); if (!rc.ok()) { - FAPI_ERR("Error reading ATTR_MSS_MCS_GROUP_32"); + FAPI_ERR("mss_setup_bars: Error reading ATTR_MSS_MCS_GROUP_32"); break; } @@ -341,7 +351,7 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) fapi::TARGET_STATE_FUNCTIONAL); if (!rc.ok()) { - FAPI_ERR("Error from fapiGetChildChiplets"); + FAPI_ERR("mss_setup_bars: Error from fapiGetChildChiplets"); break; } @@ -355,7 +365,7 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &(*iter), mcs_pos); if (!rc.ok()) { - FAPI_ERR("Error reading ATTR_CHIP_UNIT_POS"); + FAPI_ERR("mss_setup_bars: Error reading ATTR_CHIP_UNIT_POS"); break; } @@ -386,7 +396,7 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) const uint8_t& MCS_POS = mcs_pos; const uint8_t& GROUP_INDEX_A = nm_bar_group_index; const uint8_t& GROUP_INDEX_B = i; - FAPI_ERR("MCS %d is listed as a member in multiple non-mirrored groups", + FAPI_ERR("mss_setup_bars: MCS %d is listed as a member in multiple non-mirrored groups", mcs_pos); FAPI_SET_HWP_ERROR( rc, @@ -413,7 +423,7 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) group_data[nm_bar_group_index]); if (!rc.ok()) { - FAPI_ERR("Error from mss_setup_bars_init_nm_bars"); + FAPI_ERR("mss_setup_bars: Error from mss_setup_bars_init_nm_bars"); break; } @@ -443,7 +453,7 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) const uint8_t& MCS_POS = mcs_pos; const uint8_t& GROUP_INDEX_A = m_bar_group_index; const uint8_t& GROUP_INDEX_B = i; - FAPI_ERR("MCS %d is listed as a member in multiple mirrored groups", + FAPI_ERR("mss_setup_bars: MCS %d is listed as a member in multiple mirrored groups", mcs_pos); FAPI_SET_HWP_ERROR( rc, @@ -460,14 +470,14 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) break; } - // write non-mirrored BARs based on group configuration + // write mirrored BARs based on group configuration rc = mss_setup_bars_init_m_bars( *iter, m_bar_valid, group_data[m_bar_group_index]); if (!rc.ok()) { - FAPI_ERR("Error from mss_setup_bars_init_m_bars"); + FAPI_ERR("mss_setup_bars: Error from mss_setup_bars_init_m_bars"); break; } @@ -476,7 +486,7 @@ fapi::ReturnCode mss_setup_bars(const fapi::Target& i_pu_target) rc = FAPI_ATTR_SET(ATTR_MSS_MEM_IPL_COMPLETE, &i_pu_target, final); if (!rc.ok()) { - FAPI_ERR("Error from FAPI_ATTR_SET (ATTR_MSS_MEM_IPL_COMPLETE)"); + FAPI_ERR("mss_setup_bars: Error from FAPI_ATTR_SET (ATTR_MSS_MEM_IPL_COMPLETE)"); break; } } diff --git a/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.H b/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.H index 3862438d7..6649ae144 100644 --- a/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.H +++ b/src/usr/hwpf/hwp/dram_initialization/proc_setup_bars/mss_setup_bars.H @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: mss_setup_bars.H,v 1.4 2013/04/26 13:57:03 jmcgill Exp $ +// $Id: mss_setup_bars.H,v 1.5 2013/05/23 23:32:23 jmcgill Exp $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 // *! All Rights Reserved -- Property of IBM @@ -101,16 +101,13 @@ const uint8_t MSS_MCS_GROUP_32_M_START_INDEX = 8; const uint8_t MSS_MCS_GROUP_32_M_END_INDEX = 15; // second array dimension (group definition) -const uint8_t MSS_MCS_GROUP_32_MCS_SIZE_INDEX = 0; const uint8_t MSS_MCS_GROUP_32_MCS_IN_GROUP_INDEX = 1; const uint8_t MSS_MCS_GROUP_32_SIZE_INDEX = 2; const uint8_t MSS_MCS_GROUP_32_BASE_INDEX = 3; const uint8_t MSS_MCS_GROUP_32_MEMBERS_START_INDEX = 4; -const uint8_t MSS_MCS_GROUP_32_MEMBERS_END_INDEX = 11; const uint8_t MSS_MCS_GROUP_32_ALT_VALID_INDEX = 12; const uint8_t MSS_MCS_GROUP_32_ALT_SIZE_INDEX = 13; const uint8_t MSS_MCS_GROUP_32_ALT_BASE_INDEX = 14; -const uint8_t MSS_MCS_GROUP_32_LARGEST_MBA_INDEX = 15; //------------------------------------------------------------------------------ diff --git a/src/usr/hwpf/hwp/initfiles/p8.a_x_pci_dmi_fir.scom.initfile b/src/usr/hwpf/hwp/initfiles/p8.a_x_pci_dmi_fir.scom.initfile new file mode 100644 index 000000000..17f04b748 --- /dev/null +++ b/src/usr/hwpf/hwp/initfiles/p8.a_x_pci_dmi_fir.scom.initfile @@ -0,0 +1,262 @@ +#-- $Id: p8.a_x_pci_dmi_fir.scom.initfile,v 1.1 2013/05/15 04:27:09 jmcgill Exp $ +#------------------------------------------------------------------------------- +#-- +#-- (C) Copyright International Business Machines Corp. 2011 +#-- All Rights Reserved -- Property of IBM +#-- *** IBM Confidential *** +#-- +#-- TITLE : p8.a_x_pci_dmi_fir.scom.initfile +#-- DESCRIPTION : Perform base A/X/DMI/PCI base FIR configuration +#-- +#-- OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com +#-- +#-------------------------------------------------------------------------------- + +SyntaxVersion = 1 + + +#-------------------------------------------------------------------------------- +#-- Defines +#-------------------------------------------------------------------------------- + +define mcl_enabled = ((ATTR_CHIP_REGIONS_TO_ENABLE[2] & 0x0080000000000000) != 0); +define mcr_enabled = ((ATTR_CHIP_REGIONS_TO_ENABLE[2] & 0x0040000000000000) != 0); +define xbus_enabled = (ATTR_PROC_X_ENABLE == ENUM_ATTR_PROC_X_ENABLE_ENABLE); +define abus_enabled = (ATTR_PROC_A_ENABLE == ENUM_ATTR_PROC_A_ENABLE_ENABLE); +define pcie_enabled = (ATTR_PROC_PCIE_ENABLE == ENUM_ATTR_PROC_PCIE_ENABLE_ENABLE); + + +#-------------------------------------------------------------------------------- +#-- SCOM initializations +#-------------------------------------------------------------------------------- + + +#-- IOMC# (DMI) +#-- set base configuration for IOMC FIR, leaving link specific FIR bits *masked* +#-- (will be unmasked by IO training procedure) +#-- IOMC0.BUSCTL.SCOM.FIR_ACTION0_REG +scom 0x02011A06 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (mcl_enabled); +} + +#-- IOMC0.BUSCTL.SCOM.FIR_ACTION1_REG +scom 0x02011A07 { + bits, scom_data, expr; + 0:63, 0xE07070707000C000, (mcl_enabled); +} + +#-- IOMC0.BUSCTL.SCOM.FIR_MASK_REG +scom 0x02011A03 { + bits, scom_data, expr; + 0:63, 0x1FFFFFFFFFFF0000, (mcl_enabled); +} + +#-- IOMC1.BUSCTL.SCOM.FIR_ACTION0_REG +scom 0x02011E06 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (mcr_enabled); +} + +#-- IOMC1.BUSCTL.SCOM.FIR_ACTION1_REG +scom 0x02011E07 { + bits, scom_data, expr; + 0:63, 0xE07070707000C000, (mcr_enabled); +} + +#-- IOMC1.BUSCTL.SCOM.FIR_MASK_REG +scom 0x02011E03 { + bits, scom_data, expr; + 0:63, 0x1FFFFFFFFFFF0000, (mcr_enabled); +} + + + +#-- XBUS IO (EI4) +#-- set base configuration for FIR, leaving link specific FIR bits *masked* +#-- (will be unmasked by IO training procedure) +#-- XBUS1.BUSCTL.SCOM.FIR_ACTION0_REG +scom 0x04011406 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (xbus_enabled); +} + +#-- XBUS1.BUSCTL.SCOM.FIR_ACTION1_REG +scom 0x04011407 { + bits, scom_data, expr; + 0:63, 0xE07070707070C000, (xbus_enabled); +} + +#-- XBUS1.BUSCTL.SCOM.FIR_MASK_REG +scom 0x04011403 { + bits, scom_data, expr; + 0:63, 0x1FFFFFFFFFFF0000, (xbus_enabled); +} + +#-- XBUS PB (PBEN) +#-- set base configuration for FIR, leaving link specific FIR bits *masked* +#-- (will be unmasked by iovalid procedure) +#-- EN.PB.PBEN.MISC_IO.SCOM.FIR_REG_ACTION0 +scom 0x04010C06 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (xbus_enabled); +} + +#-- EN.PB.PBEN.MISC_IO.SCOM.FIR_REG_ACTION1 +scom 0x04010C07 { + bits, scom_data, expr; + 0:63, 0x9248000000000000, (xbus_enabled); +} + +#-- EN.PB.PBEN.MISC_IO.SCOM.FIR_MASK_REG +scom 0x04010C03 { + bits, scom_data, expr; + 0:63, 0xFFF4F7FFFC000000, (xbus_enabled); +} + +#-- XBUS pervasive LFIR +#-- EN.PB.TPC.EPS.FIR.LOCAL_FIR_ACTION0 +scom 0x04040010 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (xbus_enabled); +} + +#-- EN.PB.TPC.EPS.FIR.LOCAL_FIR_ACTION1 +scom 0x04040011 { + bits, scom_data, expr; + 0:63, 0xFFFE000000000000, (xbus_enabled); +} + +#-- EN.PB.TPC.EPS.FIR.LOCAL_FIR_MASK +scom 0x0404000D { + bits, scom_data, expr; + 0:63, 0x0001FFFFFF800000, (xbus_enabled); +} + +#-- XBUS chiplet XFIR +#-- EN.PB.TPC.FIR_MASK +scom 0x04040002 { + bits, scom_data, expr; + 0:63, 0x203FFFE000000000, (xbus_enabled); +} + + + +#-- ABUS IO (EDI) +#-- set base configuration for FIR, leaving link specific FIR bits *masked* +#-- (will be unsmaked by IO training procedure) +#-- ABUS.BUSCTL.SCOM.FIR_ACTION0_REG +scom 0x08010C06 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (abus_enabled); +} + +#-- ABUS.BUSCTL.SCOM.FIR_ACTION1_REG +scom 0x08010C07 { + bits, scom_data, expr; + 0:63, 0xE07070707070C000, (abus_enabled); +} + +#-- ABUS.BUSCTL.SCOM.FIR_MASK_REG +scom 0x08010C03 { + bits, scom_data, expr; + 0:63, 0x1FFFFFFFFFFF0000, (abus_enabled); +} + +#-- ABUS PB (PBES) +#-- set base configuration for FIR, leaving link specific FIR bits *masked* +#-- (will be unmasked by iovalid procedure) +#-- ES.PBES_WRAP_TOP.PBES_TOP.MISC_IO.SCOM.PB_IOA_FIR_ACTION0_REG +scom 0x08010806 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (abus_enabled); +} + +#-- ES.PBES_WRAP_TOP.PBES_TOP.MISC_IO.SCOM.PB_IOA_FIR_ACTION1_REG +scom 0x08010807 { + bits, scom_data, expr; + 0:63, 0x0249861800000000, (abus_enabled); +} + +#-- ES.PBES_WRAP_TOP.PBES_TOP.MISC_IO.SCOM.PB_IOA_FIR_MASK_REG +scom 0x08010803 { + bits, scom_data, expr; + 0:63, 0xFFFFFFFFFC000000, (abus_enabled); +} + +#-- ABUS pervasive LFIR +#-- ES.PBES_WRAP_TOP.TPC.EPS.FIR.LOCAL_FIR_ACTION0 +scom 0x08040010 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (abus_enabled); +} + +#-- ES.PBES_WRAP_TOP.TPC.EPS.FIR.LOCAL_FIR_ACTION1 +scom 0x08040011 { + bits, scom_data, expr; + 0:63, 0xFFF0000000000000, (abus_enabled); +} + +#-- ES.PBES_WRAP_TOP.TPC.EPS.FIR.LOCAL_FIR_MASK +scom 0x0804000D { + bits, scom_data, expr; + 0:63, 0x000FFFFFFF800000, (abus_enabled); +} + +#-- ABUS chiplet XFIR +#-- ES.PBES_WRAP_TOP.TPC.FIR_MASK +scom 0x08040002 { + bits, scom_data, expr; + 0:63, 0x23FFFFE000000000, (abus_enabled); +} + + +#-- PCI IOP FIR +#-- set base configuration for + + +#-- FBUS PB +#-- set base configuration for FIR, leaving link specific FIR bits *masked* +#-- ES.PBES_WRAP_TOP.PBES_TOP.MISC_IOF.SCOM.PB_IOF_FIR_ACTION0_REG +scom 0x09010806 { + bits, scom_data, expr; + 0:63, 0xFE082030FE082030, (pcie_enabled); +} + +#-- ES.PBES_WRAP_TOP.PBES_TOP.MISC_IOF.SCOM.PB_IOF_FIR_ACTION1_REG +scom 0x09010807 { + bits, scom_data, expr; + 0:63, 0x01D7DFCC01D7DFCC, (pcie_enabled); +} + +#-- ES.PBES_WRAP_TOP.PBES_TOP.MISC_IOF.SCOM.PB_IOF_FIR_MASK_REG +scom 0x09010803 { + bits, scom_data, expr; + 0:63, 0xFFFFFFFFFFFFFFFF, (pcie_enabled); +} + +#-- PCIE pervasive LFIR +#-- ES.PE_WRAP_TOP.TPC.EPS.FIR.LOCAL_FIR_ACTION0 +scom 0x09040010 { + bits, scom_data, expr; + 0:63, 0x0000000000000000, (pcie_enabled); +} + +#-- ES.PE_WRAP_TOP.TPC.EPS.FIR.LOCAL_FIR_ACTION1 +scom 0x09040011 { + bits, scom_data, expr; + 0:63, 0xFFF0000000000000, (pcie_enabled); +} + +#-- ES.PE_WRAP_TOP.TPC.EPS.FIR.LOCAL_FIR_MASK +scom 0x0904000D { + bits, scom_data, expr; + 0:63, 0x000FFFFFFF800000, (pcie_enabled); +} + +#-- PCIE chiplet XFIR +#-- ES.PE_WRAP_TOP.TPC.FIR_MASK +scom 0x09040002 { + bits, scom_data, expr; + 0:63, 0x211FFFE000000000, (pcie_enabled); +} diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C index 0017cac92..37fcc87cb 100644 --- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C +++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.C @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: mss_eff_grouping.C,v 1.24 2013/04/09 20:34:54 bellows Exp $ +// $Id: mss_eff_grouping.C,v 1.25 2013/05/23 11:18:45 gpaulraj Exp $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 // *! All Rights Reserved -- Property of IBM @@ -312,14 +312,14 @@ extern "C" { for(pos=0;pos<8;pos++) { - eff_grouping_data.groupID[gp_pos][0] = eff_grouping_data.MCS_size[pos]; - eff_grouping_data.groupID[gp_pos][1] = 1; - eff_grouping_data.groupID[gp_pos][4]= pos; + eff_grouping_data.groupID[gp_pos][MCS_SIZE] = eff_grouping_data.MCS_size[pos]; + eff_grouping_data.groupID[gp_pos][MCS_IN_GROUP] = 1; + eff_grouping_data.groupID[gp_pos][MEMBERS_START_ID]= pos; if(eff_grouping_data.MBA_size[pos][0]>eff_grouping_data.MBA_size[pos][1]) - eff_grouping_data.groupID[gp_pos][15]= eff_grouping_data.MBA_size[pos][0]; + eff_grouping_data.groupID[gp_pos][LARGEST_MBA_SIZE]= eff_grouping_data.MBA_size[pos][0]; else - eff_grouping_data.groupID[gp_pos][15]= eff_grouping_data.MBA_size[pos][1]; + eff_grouping_data.groupID[gp_pos][LARGEST_MBA_SIZE]= eff_grouping_data.MBA_size[pos][1]; gp_pos++; } @@ -332,7 +332,7 @@ extern "C" { count =0; for(pos=0;pos< gp_pos;pos++) { - if(eff_grouping_data.groupID[0][0] == eff_grouping_data.groupID[pos][0] && eff_grouping_data.groupID[pos][0] !=0) + if(eff_grouping_data.groupID[0][MCS_SIZE] == eff_grouping_data.groupID[pos][MCS_SIZE] && eff_grouping_data.groupID[pos][MCS_SIZE] !=0) { count++; } @@ -341,15 +341,15 @@ extern "C" { if(count == 8) { done=1; - eff_grouping_data.groupID[0][1] = 8; - eff_grouping_data.groupID[0][4] = 0; - eff_grouping_data.groupID[0][5] = 4; - eff_grouping_data.groupID[0][6] = 1; - eff_grouping_data.groupID[0][7] = 5; - eff_grouping_data.groupID[0][8] = 2; - eff_grouping_data.groupID[0][9] = 6; - eff_grouping_data.groupID[0][10] = 3; - eff_grouping_data.groupID[0][11] = 7; + eff_grouping_data.groupID[0][MCS_IN_GROUP] = 8; + eff_grouping_data.groupID[0][MEMBERS_START_ID+0] = 0; + eff_grouping_data.groupID[0][MEMBERS_START_ID+1] = 4; + eff_grouping_data.groupID[0][MEMBERS_START_ID+2] = 1; + eff_grouping_data.groupID[0][MEMBERS_START_ID+3] = 5; + eff_grouping_data.groupID[0][MEMBERS_START_ID+4] = 2; + eff_grouping_data.groupID[0][MEMBERS_START_ID+5] = 6; + eff_grouping_data.groupID[0][MEMBERS_START_ID+6] = 3; + eff_grouping_data.groupID[0][MEMBERS_START_ID+7] = 7; for(uint8_t i=1;i<16;i++) for(uint8_t j=0;j<16;j++) eff_grouping_data.groupID[i][j]=0; @@ -401,21 +401,21 @@ extern "C" { { done =1; //define the group_data - eff_grouping_data.groupID[0][0] =eff_grouping_data.groupID[config_4MCS[pos1][0]][0]; - eff_grouping_data.groupID[0][1] = 4; - eff_grouping_data.groupID[0][4] = config_4MCS[pos1][0]; - eff_grouping_data.groupID[0][5] = config_4MCS[pos1][2]; - eff_grouping_data.groupID[0][6] = config_4MCS[pos1][1]; - eff_grouping_data.groupID[0][7] = config_4MCS[pos1][3]; - eff_grouping_data.groupID[0][15] =eff_grouping_data.groupID[config_4MCS[pos1][0]][15]; - - eff_grouping_data.groupID[1][0] =eff_grouping_data.groupID[config_4MCS[pos2][0]][0]; - eff_grouping_data.groupID[1][1] = 4; - eff_grouping_data.groupID[1][4] = config_4MCS[pos2][0]; - eff_grouping_data.groupID[1][5] = config_4MCS[pos2][2]; - eff_grouping_data.groupID[1][6] = config_4MCS[pos2][1]; - eff_grouping_data.groupID[1][7] = config_4MCS[pos2][3]; - eff_grouping_data.groupID[1][15] =eff_grouping_data.groupID[config_4MCS[pos2][0]][15]; + eff_grouping_data.groupID[0][MCS_SIZE] =eff_grouping_data.groupID[config_4MCS[pos1][0]][0]; + eff_grouping_data.groupID[0][MCS_IN_GROUP] = 4; + eff_grouping_data.groupID[0][MEMBERS_START_ID+0] = config_4MCS[pos1][0]; + eff_grouping_data.groupID[0][MEMBERS_START_ID+1] = config_4MCS[pos1][2]; + eff_grouping_data.groupID[0][MEMBERS_START_ID+2] = config_4MCS[pos1][1]; + eff_grouping_data.groupID[0][MEMBERS_START_ID+3] = config_4MCS[pos1][3]; + eff_grouping_data.groupID[0][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[config_4MCS[pos1][0]][15]; + + eff_grouping_data.groupID[1][MCS_SIZE] =eff_grouping_data.groupID[config_4MCS[pos2][0]][0]; + eff_grouping_data.groupID[1][MCS_IN_GROUP] = 4; + eff_grouping_data.groupID[1][MEMBERS_START_ID+0] = config_4MCS[pos2][0]; + eff_grouping_data.groupID[1][MEMBERS_START_ID+1] = config_4MCS[pos2][2]; + eff_grouping_data.groupID[1][MEMBERS_START_ID+2] = config_4MCS[pos2][1]; + eff_grouping_data.groupID[1][MEMBERS_START_ID+3] = config_4MCS[pos2][3]; + eff_grouping_data.groupID[1][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[config_4MCS[pos2][0]][15]; for(uint8_t i=2;i<16;i++) for(uint8_t j=0;j<16;j++) @@ -435,13 +435,13 @@ extern "C" { if(allowed) { //define the group_data - tempgpID.groupID[0][0] = eff_grouping_data.groupID[config_4MCS[pos1][0]][0]; - tempgpID.groupID[0][1] = 4; - tempgpID.groupID[0][4] = config_4MCS[pos1][0]; - tempgpID.groupID[0][5] = config_4MCS[pos1][2]; - tempgpID.groupID[0][6] = config_4MCS[pos1][1]; - tempgpID.groupID[0][7] = config_4MCS[pos1][3]; - tempgpID.groupID[0][15] = eff_grouping_data.groupID[config_4MCS[pos1][0]][15]; + tempgpID.groupID[0][MCS_SIZE] = eff_grouping_data.groupID[config_4MCS[pos1][0]][0]; + tempgpID.groupID[0][MCS_IN_GROUP] = 4; + tempgpID.groupID[0][MEMBERS_START_ID+0] = config_4MCS[pos1][0]; + tempgpID.groupID[0][MEMBERS_START_ID+1] = config_4MCS[pos1][2]; + tempgpID.groupID[0][MEMBERS_START_ID+2] = config_4MCS[pos1][1]; + tempgpID.groupID[0][MEMBERS_START_ID+3] = config_4MCS[pos1][3]; + tempgpID.groupID[0][LARGEST_MBA_SIZE] = eff_grouping_data.groupID[config_4MCS[pos1][0]][15]; gp++; for(int i=0; i<4;i++) { @@ -455,18 +455,18 @@ extern "C" { { for(pos=0;pos< gp_pos;pos=pos+2) { - if(eff_grouping_data.groupID[pos][0] == eff_grouping_data.groupID[pos+1][0] && eff_grouping_data.groupID[pos][0] !=0 ) + if(eff_grouping_data.groupID[pos][MCS_SIZE] == eff_grouping_data.groupID[pos+1][MCS_SIZE] && eff_grouping_data.groupID[pos][MCS_SIZE] !=0 ) { //group - tempgpID.groupID[gp][0] =eff_grouping_data.groupID[pos][0] ; - tempgpID.groupID[gp][1] = 2; - tempgpID.groupID[gp][4] = pos; - tempgpID.groupID[gp][5] = pos+1; - tempgpID.groupID[gp][15] =eff_grouping_data.groupID[pos][15] ; + tempgpID.groupID[gp][MCS_SIZE] =eff_grouping_data.groupID[pos][MCS_SIZE] ; + tempgpID.groupID[gp][MCS_IN_GROUP] = 2; + tempgpID.groupID[gp][MEMBERS_START_ID+0] = pos; + tempgpID.groupID[gp][MEMBERS_START_ID+1] = pos+1; + tempgpID.groupID[gp][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE] ; grouped[pos]=1; grouped[pos+1]=1; - eff_grouping_data.groupID[pos][0]=0; - eff_grouping_data.groupID[pos+1][0]=0; + eff_grouping_data.groupID[pos][MCS_SIZE]=0; + eff_grouping_data.groupID[pos+1][MCS_SIZE]=0; gp++; } } @@ -475,15 +475,15 @@ extern "C" { { for(pos=0;pos< gp_pos;pos++) { - if(eff_grouping_data.groupID[pos][0] !=0 ) + if(eff_grouping_data.groupID[pos][MCS_SIZE] !=0 ) { //group - tempgpID.groupID[gp][0] =eff_grouping_data.groupID[pos][0] ; - tempgpID.groupID[gp][1] = 1; - tempgpID.groupID[gp][4] = pos; - tempgpID.groupID[gp][15] =eff_grouping_data.groupID[pos][15] ; + tempgpID.groupID[gp][MCS_SIZE] =eff_grouping_data.groupID[pos][MCS_SIZE] ; + tempgpID.groupID[gp][MCS_IN_GROUP] = 1; + tempgpID.groupID[gp][MEMBERS_START_ID+0] = pos; + tempgpID.groupID[gp][LARGEST_MBA_SIZE] =eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE] ; grouped[pos]=1; - eff_grouping_data.groupID[pos][0]=0; + eff_grouping_data.groupID[pos][MCS_SIZE]=0; gp++; } } @@ -496,9 +496,9 @@ extern "C" { for(uint8_t i=0;i<8;i++) { - if(grouped[i] !=1 && eff_grouping_data.groupID[i][0] != 0 ) + if(grouped[i] !=1 && eff_grouping_data.groupID[i][MCS_SIZE] != 0 ) { - FAPI_ERR ("UNABLE TO GROUP MCS%d size is %d", i,eff_grouping_data.groupID[i][0]); + FAPI_ERR ("UNABLE TO GROUP MCS%d size is %d", i,eff_grouping_data.groupID[i][MCS_SIZE]); ungroup++; if(ungroup == 1) { // First time, call out the Main error FAPI_SET_HWP_ERROR(ungroup_rc, RC_MSS_UNABLE_TO_GROUP_SUMMARY); @@ -529,13 +529,13 @@ extern "C" { { for(uint8_t i=0;i<16;i++) { - if( eff_grouping_data.groupID[i][0] !=0) + if( eff_grouping_data.groupID[i][MCS_SIZE] !=0) { gp_pos++; - FAPI_INF(" group no= %d , num of MCS = %d , size of MCS = %d \n ", i,eff_grouping_data.groupID[i][1],eff_grouping_data.groupID[i][0]); + FAPI_INF(" group no= %d , num of MCS = %d , size of MCS = %d \n ", i,eff_grouping_data.groupID[i][MCS_IN_GROUP],eff_grouping_data.groupID[i][MCS_SIZE]); for(uint8_t k=0 ; k< eff_grouping_data.groupID[i][1];k++) { - FAPI_INF("MCSID%d = %d \n ", k, eff_grouping_data.groupID[i][4+k]); + FAPI_INF("MCSID%d = %d \n ", k, eff_grouping_data.groupID[i][MEMBERS_START_ID+k]); } } } @@ -548,26 +548,26 @@ extern "C" { uint64_t total_size_non_mirr =0; for(pos=0;pos<=gp_pos;pos++) { - eff_grouping_data.groupID[pos][2] = eff_grouping_data.groupID[pos][0]*eff_grouping_data.groupID[pos][1]; + eff_grouping_data.groupID[pos][GROUP_SIZE] = eff_grouping_data.groupID[pos][MCS_SIZE]*eff_grouping_data.groupID[pos][MCS_IN_GROUP]; //eff_grouping_data.groupID[pos+8][2]= eff_grouping_data.groupID[pos][2]/2; // group size when mirrored - count = mss_eff_grouping_recursion(eff_grouping_data.groupID[pos][2]); + count = mss_eff_grouping_recursion(eff_grouping_data.groupID[pos][GROUP_SIZE]); if(count>1) { - FAPI_INF("MCS pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][3]); + FAPI_INF("MCS pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][GROUP_SIZE]); - eff_grouping_data.groupID[pos][2] = eff_grouping_data.groupID[pos][15]*2*eff_grouping_data.groupID[pos][1]; - eff_grouping_data.groupID[pos][13] = eff_grouping_data.groupID[pos][1]*(eff_grouping_data.groupID[pos][0]-eff_grouping_data.groupID[pos][15]); + eff_grouping_data.groupID[pos][GROUP_SIZE] = eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE]*2*eff_grouping_data.groupID[pos][MCS_IN_GROUP]; + eff_grouping_data.groupID[pos][ALT_SIZE] = eff_grouping_data.groupID[pos][MCS_IN_GROUP]*(eff_grouping_data.groupID[pos][MCS_SIZE]-eff_grouping_data.groupID[pos][LARGEST_MBA_SIZE]); //mirrored group - //eff_grouping_data.groupID[pos+8][2] = eff_grouping_data.groupID[pos][2]/2; //group size with alternate bars - //eff_grouping_data.groupID[pos+8][13] = eff_grouping_data.groupID[pos][13]/2; - eff_grouping_data.groupID[pos][12] =1; + //eff_grouping_data.groupID[pos+8][GROUP_SIZE] = eff_grouping_data.groupID[pos][GROUP_SIZE]/2; //group size with alternate bars + //eff_grouping_data.groupID[pos+8][ALT_SIZE] = eff_grouping_data.groupID[pos][ALT_SIZE]/2; + eff_grouping_data.groupID[pos][ALT_VALID] =1; } - total_size_non_mirr += eff_grouping_data.groupID[pos][2]; + total_size_non_mirr += eff_grouping_data.groupID[pos][GROUP_SIZE]; } for(i=0;i<gp_pos;i++) { @@ -581,7 +581,7 @@ extern "C" { { for(i=pos;i< gp_pos;i++) { - if ( eff_grouping_data.groupID[i][2] > eff_grouping_data.groupID[pos][2]) + if ( eff_grouping_data.groupID[i][GROUP_SIZE] > eff_grouping_data.groupID[pos][GROUP_SIZE]) { for(j=0;j<16;j++) temp[j] = eff_grouping_data.groupID[pos][j]; for(j=0;j<16;j++) eff_grouping_data.groupID[pos][j] = eff_grouping_data.groupID[i][j]; @@ -595,17 +595,17 @@ extern "C" { // calcutate mirrored group size for(pos=0;pos<gp_pos;pos++) { - if(eff_grouping_data.groupID[pos][0]!=0 && eff_grouping_data.groupID[pos][1]>1 ) + if(eff_grouping_data.groupID[pos][MCS_SIZE]!=0 && eff_grouping_data.groupID[pos][MCS_IN_GROUP]>1 ) { - eff_grouping_data.groupID[pos+8][2]= eff_grouping_data.groupID[pos][2]/2; // group size when mirrored + eff_grouping_data.groupID[pos+8][GROUP_SIZE]= eff_grouping_data.groupID[pos][GROUP_SIZE]/2; // group size when mirrored - if(eff_grouping_data.groupID[pos][12]) + if(eff_grouping_data.groupID[pos][ALT_VALID]) { - FAPI_INF("Mirrored group pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][3]); + FAPI_INF("Mirrored group pos %d needs alternate bars defintation group Size %d\n",pos,eff_grouping_data.groupID[pos][GROUP_SIZE]); //mirrored group - eff_grouping_data.groupID[pos+8][2] = eff_grouping_data.groupID[pos][2]/2; //group size with alternate bars - eff_grouping_data.groupID[pos+8][13] = eff_grouping_data.groupID[pos][13]/2; + eff_grouping_data.groupID[pos+8][GROUP_SIZE] = eff_grouping_data.groupID[pos][GROUP_SIZE]/2; //group size with alternate bars + eff_grouping_data.groupID[pos+8][ALT_SIZE] = eff_grouping_data.groupID[pos][ALT_SIZE]/2; } } @@ -630,34 +630,34 @@ extern "C" { if(pos==0) { - eff_grouping_data.groupID[pos][3] =mss_base_address; + eff_grouping_data.groupID[pos][BASE_ADDR] =mss_base_address; - if(eff_grouping_data.groupID[pos][12]) + if(eff_grouping_data.groupID[pos][ALT_VALID]) { - eff_grouping_data.groupID[pos][14] = eff_grouping_data.groupID[pos][3]+ eff_grouping_data.groupID[pos][2]/2; + eff_grouping_data.groupID[pos][ALT_BASE_ADDR] = eff_grouping_data.groupID[pos][BASE_ADDR]+ eff_grouping_data.groupID[pos][GROUP_SIZE]/2; } } else { - eff_grouping_data.groupID[pos][3] = eff_grouping_data.groupID[pos-1][3]+eff_grouping_data.groupID[pos-1][2]; + eff_grouping_data.groupID[pos][BASE_ADDR] = eff_grouping_data.groupID[pos-1][BASE_ADDR]+eff_grouping_data.groupID[pos-1][GROUP_SIZE]; - if(eff_grouping_data.groupID[pos][12]) + if(eff_grouping_data.groupID[pos][ALT_VALID]) { - eff_grouping_data.groupID[pos][14] = eff_grouping_data.groupID[pos][3]+ eff_grouping_data.groupID[pos][2]/2; + eff_grouping_data.groupID[pos][ALT_BASE_ADDR] = eff_grouping_data.groupID[pos][BASE_ADDR]+ eff_grouping_data.groupID[pos][GROUP_SIZE]/2; } } - if(eff_grouping_data.groupID[pos][1]>1 ) + if(eff_grouping_data.groupID[pos][MCS_IN_GROUP]>1 ) { - eff_grouping_data.groupID[pos+8][3]=mirror_base; - mirror_base= mirror_base + eff_grouping_data.groupID[pos+8][2]; - if(eff_grouping_data.groupID[pos][12]) + eff_grouping_data.groupID[pos+8][BASE_ADDR]=mirror_base; + mirror_base= mirror_base + eff_grouping_data.groupID[pos+8][GROUP_SIZE]; + if(eff_grouping_data.groupID[pos][ALT_VALID]) { - eff_grouping_data.groupID[pos+8][14] = eff_grouping_data.groupID[pos+8][3]+ eff_grouping_data.groupID[pos+8][2]/2; //mirrored base address with alternate bars + eff_grouping_data.groupID[pos+8][ALT_BASE_ADDR] = eff_grouping_data.groupID[pos+8][BASE_ADDR]+ eff_grouping_data.groupID[pos+8][GROUP_SIZE]/2; //mirrored base address with alternate bars } } @@ -682,11 +682,11 @@ extern "C" { { count=0; MC_IN_GP.flushTo0(); - if(eff_grouping_data.groupID[i][0]!=0) + if(eff_grouping_data.groupID[i][MCS_SIZE]!=0) { - count = eff_grouping_data.groupID[i][1]; + count = eff_grouping_data.groupID[i][MCS_IN_GROUP]; for(uint8_t j=0;j<count;j++) - MC_IN_GP.setBit(eff_grouping_data.groupID[i][4+j]); + MC_IN_GP.setBit(eff_grouping_data.groupID[i][MEMBERS_START_ID+j]); mcs_in_group[i]= MC_IN_GP.getByte(0); } } @@ -700,7 +700,12 @@ extern "C" { FAPI_DBG(" ATTR_MSS_MEM_MC_IN_GROUP[7]: 0x%x", mcs_in_group[7]); rc= FAPI_ATTR_SET(ATTR_MSS_MEM_MC_IN_GROUP, &i_target, mcs_in_group); - if (!rc.ok())FAPI_ERR("Error writing ATTR_MSS_MEM_MC_IN_GROUP"); + if (!rc.ok()) + { + FAPI_ERR("Error writing ATTR_MSS_MEM_MC_IN_GROUP"); + break; + } + uint64_t mem_bases[8]; uint64_t l_memory_sizes[8]; @@ -710,23 +715,23 @@ extern "C" { //uint32_t temp[8]; for(uint8_t i=0;i<8;i++) { - if(eff_grouping_data.groupID[i][0]>0) + if(eff_grouping_data.groupID[i][MCS_SIZE]>0) { - FAPI_INF (" Group %d MCS Size %4dGB",i,eff_grouping_data.groupID[i][0]); - FAPI_INF (" No of MCS %4d ",eff_grouping_data.groupID[i][1]); - FAPI_INF (" Group Size %4dGB",eff_grouping_data.groupID[i][2]); - FAPI_INF (" Base Add. %4dGB ",eff_grouping_data.groupID[i][3]); - FAPI_INF (" Mirrored Group SIze %4dGB", eff_grouping_data.groupID[i+8][2]); - FAPI_INF (" Mirror Base Add %4dGB" , eff_grouping_data.groupID[i+8][3]); - for(uint8_t j=4;j<4+eff_grouping_data.groupID[i][1];j++) + FAPI_INF (" Group %d MCS Size %4dGB",i,eff_grouping_data.groupID[i][MCS_SIZE]); + FAPI_INF (" No of MCS %4d ",eff_grouping_data.groupID[i][MCS_IN_GROUP]); + FAPI_INF (" Group Size %4dGB",eff_grouping_data.groupID[i][GROUP_SIZE]); + FAPI_INF (" Base Add. %4dGB ",eff_grouping_data.groupID[i][BASE_ADDR]); + FAPI_INF (" Mirrored Group SIze %4dGB", eff_grouping_data.groupID[i+8][GROUP_SIZE]); + FAPI_INF (" Mirror Base Add %4dGB" , eff_grouping_data.groupID[i+8][BASE_ADDR]); + for(uint8_t j=4;j<4+eff_grouping_data.groupID[i][MCS_IN_GROUP];j++) { FAPI_INF (" MCSID%d- Pos %4d",(j-4),eff_grouping_data.groupID[i][j]); } - FAPI_INF (" Alter-bar %4d",eff_grouping_data.groupID[i][12]); - FAPI_INF("Alter-bar base add = %4dGB ",eff_grouping_data.groupID[i][14]); - FAPI_INF("Alter-bar size = %4dGB",eff_grouping_data.groupID[i][13]); - FAPI_INF("Alter-bar Mirrored Base add = %4dGB ", eff_grouping_data.groupID[i+8][14]); - FAPI_INF("Alter-bar Mirrored size = %4dGB", eff_grouping_data.groupID[i+8][13]); + FAPI_INF (" Alter-bar %4d",eff_grouping_data.groupID[i][ALT_VALID]); + FAPI_INF("Alter-bar base add = %4dGB ",eff_grouping_data.groupID[i][ALT_BASE_ADDR]); + FAPI_INF("Alter-bar size = %4dGB",eff_grouping_data.groupID[i][ALT_SIZE]); + FAPI_INF("Alter-bar Mirrored Base add = %4dGB ", eff_grouping_data.groupID[i+8][ALT_BASE_ADDR]); + FAPI_INF("Alter-bar Mirrored size = %4dGB", eff_grouping_data.groupID[i+8][ALT_SIZE]); } else { @@ -742,28 +747,23 @@ extern "C" { eff_grouping_data.groupID[i][9] = 0; } } -// rc = FAPI_ATTR_GET(ATTR_MSS_MCS_GROUP_32, &target, eff_grouping_data.groupID); -// if (!rc.ok()) -// { -// FAPI_ERR("Error reading ATTR_MSS_MCS_GROUP"); -// // break; -// } - // base addresses for distinct non-mirrored ranges - mem_bases[0]=eff_grouping_data.groupID[0][3]; + + // base addresses for distinct non-mirrored ranges + mem_bases[0]=eff_grouping_data.groupID[0][BASE_ADDR]; mem_bases[0] = mem_bases[0] <<30; - mem_bases[1]=eff_grouping_data.groupID[1][3]; + mem_bases[1]=eff_grouping_data.groupID[1][BASE_ADDR]; mem_bases[1] = mem_bases[1] <<30; - mem_bases[2]=eff_grouping_data.groupID[2][3]; + mem_bases[2]=eff_grouping_data.groupID[2][BASE_ADDR]; mem_bases[2] = mem_bases[2] <<30; - mem_bases[3]=eff_grouping_data.groupID[3][3]; + mem_bases[3]=eff_grouping_data.groupID[3][BASE_ADDR]; mem_bases[3] = mem_bases[3] <<30; - mem_bases[4]=eff_grouping_data.groupID[4][3]; + mem_bases[4]=eff_grouping_data.groupID[4][BASE_ADDR]; mem_bases[4] = mem_bases[4] <<30; - mem_bases[5]=eff_grouping_data.groupID[5][3]; + mem_bases[5]=eff_grouping_data.groupID[5][BASE_ADDR]; mem_bases[5] = mem_bases[5] <<30; - mem_bases[6]=eff_grouping_data.groupID[6][3]; + mem_bases[6]=eff_grouping_data.groupID[6][BASE_ADDR]; mem_bases[6] = mem_bases[6] <<30; - mem_bases[7]=eff_grouping_data.groupID[7][3]; + mem_bases[7]=eff_grouping_data.groupID[7][BASE_ADDR]; mem_bases[7] = mem_bases[7] <<30; FAPI_DBG(" ATTR_PROC_MEM_BASES[0]: %016llx", mem_bases[0]); @@ -779,25 +779,25 @@ extern "C" { if (!rc.ok()) { FAPI_ERR("Error writing ATTR_PROC_MEM_BASES"); - //break; + break; } // sizes for distinct non-mirrored ranges - l_memory_sizes[0]=eff_grouping_data.groupID[0][2]; + l_memory_sizes[0]=eff_grouping_data.groupID[0][GROUP_SIZE]; l_memory_sizes[0] = l_memory_sizes[0] <<30; - l_memory_sizes[1]=eff_grouping_data.groupID[1][2]; + l_memory_sizes[1]=eff_grouping_data.groupID[1][GROUP_SIZE]; l_memory_sizes[1] = l_memory_sizes[1] <<30; - l_memory_sizes[2]=eff_grouping_data.groupID[2][2]; + l_memory_sizes[2]=eff_grouping_data.groupID[2][GROUP_SIZE]; l_memory_sizes[2] = l_memory_sizes[2] <<30; - l_memory_sizes[3]=eff_grouping_data.groupID[3][2]; + l_memory_sizes[3]=eff_grouping_data.groupID[3][GROUP_SIZE]; l_memory_sizes[3] = l_memory_sizes[3] <<30; - l_memory_sizes[4]=eff_grouping_data.groupID[4][2]; + l_memory_sizes[4]=eff_grouping_data.groupID[4][GROUP_SIZE]; l_memory_sizes[4] = l_memory_sizes[4] <<30; - l_memory_sizes[5]=eff_grouping_data.groupID[5][2]; + l_memory_sizes[5]=eff_grouping_data.groupID[5][GROUP_SIZE]; l_memory_sizes[5] = l_memory_sizes[5] <<30; - l_memory_sizes[6]=eff_grouping_data.groupID[6][2]; + l_memory_sizes[6]=eff_grouping_data.groupID[6][GROUP_SIZE]; l_memory_sizes[6] = l_memory_sizes[6] <<30; - l_memory_sizes[7]=eff_grouping_data.groupID[7][2]; + l_memory_sizes[7]=eff_grouping_data.groupID[7][GROUP_SIZE]; l_memory_sizes[7] = l_memory_sizes[7] <<30; FAPI_DBG(" ATTR_PROC_MEM_SIZES[0]: %016llx", l_memory_sizes[0]); @@ -815,13 +815,7 @@ extern "C" { FAPI_ERR("Error writing ATTR_PROC_MEM_SIZES"); break; } - rc = FAPI_ATTR_GET(ATTR_PROC_MEM_SIZES, &i_target, l_memory_sizes); - if (!rc.ok()) - { - FAPI_ERR("Error writing ATTR_PROC_MEM_SIZES"); - break; - } - FAPI_DBG(" ATTR_PROC_MEM_SIZES[0]: %016llx", l_memory_sizes[0]); + FAPI_DBG(" ATTR_PROC_MEM_SIZES[0]: %016llx", l_memory_sizes[0]); FAPI_DBG(" ATTR_PROC_MEM_SIZES[1]: %016llx", l_memory_sizes[1]); FAPI_DBG(" ATTR_PROC_MEM_SIZES[2]: %016llx", l_memory_sizes[2]); FAPI_DBG(" ATTR_PROC_MEM_SIZES[3]: %016llx", l_memory_sizes[3]); @@ -839,19 +833,12 @@ extern "C" { // process mirrored ranges // - // read chip base address attribute -/// rc = FAPI_ATTR_GET(ATTR_PROC_MIRROR_BASE, &i_chip_target, mirror_base); -// if (!rc.ok()) -// { -// FAPI_ERR("Error reading ATTR_PROC_MIRROR_BASE"); -// break; -// } // base addresses for distinct mirrored ranges - mirror_bases[0] = eff_grouping_data.groupID[8][3]; - mirror_bases[1] = eff_grouping_data.groupID[9][3]; - mirror_bases[2] = eff_grouping_data.groupID[10][3]; - mirror_bases[3] = eff_grouping_data.groupID[11][3]; + mirror_bases[0] = eff_grouping_data.groupID[8][BASE_ADDR]; + mirror_bases[1] = eff_grouping_data.groupID[9][BASE_ADDR]; + mirror_bases[2] = eff_grouping_data.groupID[10][BASE_ADDR]; + mirror_bases[3] = eff_grouping_data.groupID[11][BASE_ADDR]; mirror_bases[0] = mirror_bases[0]<<30; mirror_bases[1] = mirror_bases[1]<<30; @@ -870,10 +857,10 @@ extern "C" { } // sizes for distinct mirrored ranges - l_mirror_sizes[0]=eff_grouping_data.groupID[8][2]; - l_mirror_sizes[1]=eff_grouping_data.groupID[9][2]; - l_mirror_sizes[2]=eff_grouping_data.groupID[10][2]; - l_mirror_sizes[3]=eff_grouping_data.groupID[11][2]; + l_mirror_sizes[0]=eff_grouping_data.groupID[8][GROUP_SIZE]; + l_mirror_sizes[1]=eff_grouping_data.groupID[9][GROUP_SIZE]; + l_mirror_sizes[2]=eff_grouping_data.groupID[10][GROUP_SIZE]; + l_mirror_sizes[3]=eff_grouping_data.groupID[11][GROUP_SIZE]; l_mirror_sizes[0] = l_mirror_sizes[0]<<30; l_mirror_sizes[1] = l_mirror_sizes[1]<<30; diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.H b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.H index 52787e713..8bb490a9b 100644 --- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.H +++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_grouping.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: mss_eff_grouping.H,v 1.5 2012/09/25 16:22:25 bellows Exp $ +// $Id: mss_eff_grouping.H,v 1.6 2013/05/23 11:19:17 gpaulraj Exp $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 // *! All Rights Reserved -- Property of IBM @@ -41,18 +41,42 @@ //------------------------------------------------------------------------------ // Version:| Author: | Date: | Comment: //---------|----------|---------|----------------------------------------------- +// 1.6 | gpaulraj | 05/22/13| added constants for debugging purpose // 1.5 | bellows | 09/25/12| review updates made // 1.4 | bellows | 08/31/12| object updated, call updated // 1.3 | bellows | 07/27/12| updated for setup_bars full function // 1.2 | bellows | 07/16/12| added in Id tag // 1.1 | gpaulraj | 03/19/12| Updated + #ifndef MSS_EFF_GROUPINGHWPB_H_ #define MSS_EFF_GROUPINGHWPB_H_ - +//------------------------------------------------------------------------------ +// Header file include Constant definitions +//------------------------------------------------------------------------------ #include <fapi.H> +//------------------------------------------------------------------------------ +// Constant definitions +//------------------------------------------------------------------------------ + +const uint8_t MCS_SIZE = 0; +const uint8_t MCS_IN_GROUP = 1; +const uint8_t GROUP_SIZE = 2; +const uint8_t BASE_ADDR = 3; +const uint8_t MEMBERS_START_ID = 4; +const uint8_t MEMBERS_END = 11; +const uint8_t ALT_VALID = 12; +const uint8_t ALT_SIZE = 13; +const uint8_t ALT_BASE_ADDR = 14; +const uint8_t LARGEST_MBA_SIZE = 15; + +//------------------------------------------------------------------------------ +// Class declaration +//------------------------------------------------------------------------------ + + class target_vector { public: std::vector<fapi::Target> t; }; @@ -69,6 +93,10 @@ public: uint32_t MCS_size[MBA_SIZE_MCS]; }; +//------------------------------------------------------------------------------ +// Structure definitions +//------------------------------------------------------------------------------ + typedef fapi::ReturnCode (*mss_eff_grouping_FP_t)(const fapi::Target&, std::vector<fapi::Target> & i_associated_centaurs ); extern "C" diff --git a/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.C b/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.C index 56f3d04c8..a1ba95958 100644 --- a/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.C +++ b/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.C @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: proc_chiplet_scominit.C,v 1.13 2013/05/02 16:33:30 jmcgill Exp $ +// $Id: proc_chiplet_scominit.C,v 1.16 2013/07/31 21:10:31 jmcgill Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_chiplet_scominit.C,v $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2012 @@ -42,6 +42,7 @@ //------------------------------------------------------------------------------ #include <fapiHwpExecInitFile.H> #include <proc_chiplet_scominit.H> +#include "p8_scom_addresses.H" extern "C" { @@ -53,9 +54,17 @@ extern "C" { fapi::ReturnCode proc_chiplet_scominit(const fapi::Target & i_target) { fapi::ReturnCode rc; + uint32_t rc_ecmd = 0; + fapi::TargetType target_type; std::vector<fapi::Target> initfile_targets; uint8_t nx_enabled; + uint8_t mcs_pos; + uint8_t master_mcs_pos = 0xFF; + fapi::Target master_mcs; + + ecmdDataBufferBase data(64); + ecmdDataBufferBase mask(64); // mark HWP entry FAPI_INF("proc_chiplet_scominit: Start"); @@ -184,6 +193,22 @@ fapi::ReturnCode proc_chiplet_scominit(const fapi::Target & i_target) PROC_CHIPLET_SCOMINIT_NX_IF, PROC_CHIPLET_SCOMINIT_AS_IF); } + // execute A/X/PCI/DMI FIR init SCOM initfile + FAPI_INF("proc_chiplet_scominit: Executing %s on %s", + PROC_CHIPLET_SCOMINIT_A_X_PCI_DMI_IF, i_target.toEcmdString()); + FAPI_EXEC_HWP( + rc, + fapiHwpExecInitFile, + initfile_targets, + PROC_CHIPLET_SCOMINIT_A_X_PCI_DMI_IF); + if (!rc.ok()) + { + FAPI_ERR("proc_chiplet_scominit: Error from fapiHwpExecInitfile executing %s on %s", + PROC_CHIPLET_SCOMINIT_A_X_PCI_DMI_IF, + i_target.toEcmdString()); + break; + } + // determine set of functional MCS chiplets std::vector<fapi::Target> mcs_targets; rc = fapiGetChildChiplets(i_target, @@ -219,6 +244,70 @@ fapi::ReturnCode proc_chiplet_scominit(const fapi::Target & i_target) i->toEcmdString()); break; } + + // determine MCS position + rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &(*i), mcs_pos); + + if (!rc.ok()) + { + FAPI_ERR("proc_chiplet_scominit: Error from FAPI_ATTR_GET (ATTR_POS)"); + break; + } + + if (mcs_pos < master_mcs_pos) + { + fapi::Target cen_target_unused; + rc = fapiGetOtherSideOfMemChannel(*i, + cen_target_unused, + fapi::TARGET_STATE_FUNCTIONAL); + // use return code only to indicate presence of connected Centaur, + // do not propogate/emit error if not connected + if (rc.ok()) + { + FAPI_DBG("Updating master_mcs_pos to %d", mcs_pos); + FAPI_DBG(" Target: %s", cen_target_unused.toEcmdString()); + master_mcs = *i; + master_mcs_pos = mcs_pos; + } + else + { + rc = fapi::FAPI_RC_SUCCESS; + } + } + + } + if (!rc.ok()) + { + break; + } + + if (master_mcs.getType() == fapi::TARGET_TYPE_MCS_CHIPLET) + { + // set MCMODE0Q_ENABLE_CENTAUR_SYNC on first target only + // (this bit is required to be set on at most one MCS/chip) + rc_ecmd |= data.setBit(MCSMODE0_EN_CENTAUR_SYNC_BIT); + rc_ecmd |= mask.setBit(MCSMODE0_EN_CENTAUR_SYNC_BIT); + + // check buffer manipulation return codes + if (rc_ecmd) + { + FAPI_ERR("proc_chiplet_scominit: Error 0x%X setting up MCSMODE0 data buffer", + rc_ecmd); + rc.setEcmdError(rc_ecmd); + break; + } + + // write register with updated content + rc = fapiPutScomUnderMask(master_mcs, + MCS_MCSMODE0_0x02011807, + data, + mask); + if (!rc.ok()) + { + FAPI_ERR("proc_chiplet_scominit: fapiPutScomUnderMask error (MCS_MCSMODE0_0x02011807)"); + break; + } + } if (!rc.ok()) { diff --git a/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.H b/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.H index 1c6a42a61..e20b02c8b 100644 --- a/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.H +++ b/src/usr/hwpf/hwp/nest_chiplets/proc_chiplet_scominit/proc_chiplet_scominit.H @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: proc_chiplet_scominit.H,v 1.11 2013/04/08 13:49:12 jmcgill Exp $ +// $Id: proc_chiplet_scominit.H,v 1.13 2013/05/30 13:13:07 jmcgill Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_chiplet_scominit.H,v $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2012 @@ -49,13 +49,18 @@ // Constant definitions //------------------------------------------------------------------------------ -const char * const PROC_CHIPLET_SCOMINIT_FBC_IF = "p8.fbc.scom.if"; -const char * const PROC_CHIPLET_SCOMINIT_PSI_IF = "p8.psi.scom.if"; -const char * const PROC_CHIPLET_SCOMINIT_TPBRIDGE_IF = "p8.tpbridge.scom.if"; -const char * const PROC_CHIPLET_SCOMINIT_NX_IF = "p8.nx.scom.if"; -const char * const PROC_CHIPLET_SCOMINIT_AS_IF = "p8.as.scom.if"; -const char * const PROC_CHIPLET_SCOMINIT_CXA_IF = "p8.cxa.scom.if"; -const char * const PROC_CHIPLET_SCOMINIT_MCS_IF = "p8.mcs.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_FBC_IF = "p8.fbc.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_PSI_IF = "p8.psi.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_TPBRIDGE_IF = "p8.tpbridge.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_NX_IF = "p8.nx.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_AS_IF = "p8.as.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_CXA_IF = "p8.cxa.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_A_X_PCI_DMI_IF = "p8.a_x_pci_dmi_fir.scom.if"; +const char * const PROC_CHIPLET_SCOMINIT_MCS_IF = "p8.mcs.scom.if"; + + +// MCS Mode0 Register field/bit definitions +const uint32_t MCSMODE0_EN_CENTAUR_SYNC_BIT = 61; //------------------------------------------------------------------------------ // Structure definitions @@ -84,6 +89,7 @@ extern "C" { * - p8.tpbridge.scom.initfile * - p8.nx.scom.initfile * - p8.cxa.scom.initfile + * - p8.a_x_pci_dmi_fir.scom.initfile * - p8.as.scom.initfile * - p8.mcs.scom.initfile for each functional MCS chiplet * diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile index 012c3f6c1..67aa2984f 100644 --- a/src/usr/hwpf/makefile +++ b/src/usr/hwpf/makefile @@ -159,7 +159,8 @@ HWP_INITFILES = hwp/initfiles/sample.initfile \ hwp/initfiles/p8.xbus.custom.scom.initfile \ hwp/initfiles/p8.psi.scom.initfile \ hwp/initfiles/p8.tpbridge.scom.initfile \ - hwp/initfiles/p8.cxa.scom.initfile + hwp/initfiles/p8.cxa.scom.initfile \ + hwp/initfiles/p8.a_x_pci_dmi_fir.scom.initfile HWP_IF_DEFINE_DIR = hwp/initfiles diff --git a/src/usr/vpd/makefile b/src/usr/vpd/makefile index c895bd037..c581e7b75 100644 --- a/src/usr/vpd/makefile +++ b/src/usr/vpd/makefile @@ -28,7 +28,7 @@ OBJS = vpd.o spd.o ipvpd.o mvpd.o dimmPres.o cvpd.o SUBDIRS = test.d BINARY_FILES = $(IMGDIR)/dimmspd.dat:3a9f53e3684e57401ed0aed75f25980fca99f40b -BINARY_FILES += $(IMGDIR)/procmvpd.dat:9473e24c02c40a577700ae0292676c4b82698c13 +BINARY_FILES += $(IMGDIR)/procmvpd.dat:7dabbe4879dcdd19ed236573aa68e8671fa8c3c7 BINARY_FILES += $(IMGDIR)/cvpd.dat:7410a45451fb7826daf1ae218f81b2a694e64234 include ${ROOTPATH}/config.mk |