summaryrefslogtreecommitdiffstats
path: root/src/import/chips/centaur/procedures/hwp/perv
diff options
context:
space:
mode:
authorJoe McGill <jmcgill@us.ibm.com>2017-12-08 12:50:03 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-01-13 13:36:32 -0500
commit142e05201115169d3253721e1ea4f105029fc41e (patch)
treeee0580185ef54ab166211ce4359a6fe50760486f /src/import/chips/centaur/procedures/hwp/perv
parentca9bfdb954dbb8bc033c0b41bdd984aa6a7062df (diff)
downloadtalos-hostboot-142e05201115169d3253721e1ea4f105029fc41e.tar.gz
talos-hostboot-142e05201115169d3253721e1ea4f105029fc41e.zip
Disable read data delay for Cumulus DD1.0, enable for DD1.1
centaur.mbs.scan.initfile Remove static application of read data delay disables Centaur will now flush to read data delay enabled cen_initf Add block to re-rotate tcn_mbs_func and: - fix existing spy parity errors - apply read data delay disables, executed only when attached chip is Cumulus DD1.0 Change-Id: I10279decbbf27df911a94ce27d11b4d2e30b6e5f RTC: 138785 CQ: HW419021 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50720 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50736 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/centaur/procedures/hwp/perv')
-rw-r--r--src/import/chips/centaur/procedures/hwp/perv/cen_initf.C93
-rw-r--r--src/import/chips/centaur/procedures/hwp/perv/cen_initf.mk3
2 files changed, 94 insertions, 2 deletions
diff --git a/src/import/chips/centaur/procedures/hwp/perv/cen_initf.C b/src/import/chips/centaur/procedures/hwp/perv/cen_initf.C
index cd0fb34b1..7f3c32a5d 100644
--- a/src/import/chips/centaur/procedures/hwp/perv/cen_initf.C
+++ b/src/import/chips/centaur/procedures/hwp/perv/cen_initf.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -45,6 +45,7 @@
#include <cen_gen_scom_addresses_fixes.H>
#include <centaur_misc_constants.H>
#include <cen_ring_id.h>
+#include <cen_common_funcs.H>
//------------------------------------------------------------------------------
// Function definitions
@@ -54,6 +55,16 @@ fapi2::ReturnCode
cen_initf(const fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP>& i_target)
{
FAPI_DBG("Start");
+ fapi2::Target<fapi2::TARGET_TYPE_DMI> l_attached_dmi_target =
+ i_target.getParent<fapi2::TARGET_TYPE_DMI>();
+ fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_attached_proc_target =
+ l_attached_dmi_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
+ fapi2::ATTR_CHIP_EC_FEATURE_HW419021_Type l_hw419021;
+ fapi2::buffer<uint64_t> l_nest_clk_scansel_data = 0;
+ fapi2::buffer<uint64_t> l_nest_clk_scandata0_data = 0;
+ uint64_t l_nest_clk_scansel_addr = get_scom_addr(SCAN_CHIPLET_NEST, CEN_GENERIC_CLK_SCANSEL);
+ uint64_t l_nest_clk_scandata0_addr = get_scom_addr(SCAN_CHIPLET_NEST, CEN_GENERIC_CLK_SCANDATA0);
+
FAPI_TRY(fapi2::putRing(i_target, tcn_mbs_func),
"Error from putRing (tcn_mbs_func)");
FAPI_TRY(fapi2::putRing(i_target, tcn_mbs_cmsk),
@@ -83,6 +94,86 @@ cen_initf(const fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP>& i_target)
FAPI_TRY(fapi2::putRing(i_target, tcm_perv_func),
"Error from putRing (tcm_perv_func)");
+ // re-rotate tcn_mbs_func to fixup spy parity, and set:
+ // MBU.MBS.CFG_UNALIGNED_US_DTAG_TRANSFER_DISABLE=ON
+ // MBU.MBS.CFG_UNALIGNED_NONBYP_US_DTAG_TRANSFER_DISABLE=ON
+ // if attached to P9C DD1.0
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_EC_FEATURE_HW419021,
+ l_attached_proc_target,
+ l_hw419021),
+ "Error from FAPI_ATTR_GET (ATTR_CHIP_EC_FEATURE_HW419021)");
+
+ FAPI_DBG("Re-scanning tcn_mbs_func (HW419021=%d)",
+ l_hw419021);
+ // ring length is 76490 bits
+ // MBU.MBS.ARB.DACTL.MODESLAT_PARITYQ.SLC.L2 = bit 50610 (set to 0 for all chips)
+ // MBU.MBS.ARB.CHARB.MODE_PARITYQ.ESC.L2 = bit 72419 (set to 0 for HW419021 only)
+ // MBU.MBS.CFG_UNALIGNED_US_DTAG_TRANSFER_DISABLE = bit 72837 (set to 1 for HW419021 only)
+ // MBU.MBS.CFG_UNALIGNED_NONBYP_US_DTAG_TRANSFER_DISABLE = bit 72843 (set to 1 for HW419021 only)
+ // inject header
+ l_nest_clk_scansel_data.setBit<8>().setBit<20>();
+ FAPI_TRY(fapi2::putScom(i_target, l_nest_clk_scansel_addr, l_nest_clk_scansel_data));
+ l_nest_clk_scandata0_data = 0xA5A55A5A00000000;
+ FAPI_TRY(fapi2::putScom(i_target, l_nest_clk_scandata0_addr, l_nest_clk_scandata0_data));
+
+ // scan 0..50610 (460*110 + 10)
+ for (auto ii = 0; ii < 460; ii++)
+ {
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x6E, l_nest_clk_scandata0_data));
+ }
+
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x0A, l_nest_clk_scandata0_data));
+
+ // flip MBU.MBS.ARB.DACTL.MODESLAT_PARITYQ.SLC.L2
+ FAPI_DBG("Flip DACTL parity");
+ l_nest_clk_scandata0_data.clearBit<0>();
+ FAPI_TRY(fapi2::putScom(i_target, l_nest_clk_scandata0_addr, l_nest_clk_scandata0_data));
+
+ // scan 50610..72419 (198*110 + 29)
+ for (auto ii = 0; ii < 198; ii++)
+ {
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x6E, l_nest_clk_scandata0_data));
+ }
+
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x1D, l_nest_clk_scandata0_data));
+
+ if (l_hw419021)
+ {
+ // flip MBU.MBS.ARB.CHARB.MODE_PARITYQ.ESC.L2
+ FAPI_DBG("Flip CHARB parity");
+ l_nest_clk_scandata0_data.clearBit<0>();
+ FAPI_TRY(fapi2::putScom(i_target, l_nest_clk_scandata0_addr, l_nest_clk_scandata0_data));
+ }
+
+ // scan 72419..72837 (3*110 + 88)
+ for (auto ii = 0; ii < 3; ii++)
+ {
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x6E, l_nest_clk_scandata0_data));
+ }
+
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x58, l_nest_clk_scandata0_data));
+
+ if (l_hw419021)
+ {
+ // flip chicken switches
+ FAPI_DBG("Flip chicken switches");
+ l_nest_clk_scandata0_data.setBit<0>().setBit<6>();
+ FAPI_TRY(fapi2::putScom(i_target, l_nest_clk_scandata0_addr, l_nest_clk_scandata0_data));
+ }
+
+ // scan 72837..76490 (33*110 + 23)
+ for (auto ii = 0; ii < 33; ii++)
+ {
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x6E, l_nest_clk_scandata0_data));
+ }
+
+ FAPI_TRY(fapi2::getScom(i_target, l_nest_clk_scandata0_addr + 0x17, l_nest_clk_scandata0_data));
+
+ // check header
+ FAPI_ASSERT((l_nest_clk_scandata0_data == 0xA5A55A5A00000000),
+ fapi2::CEN_INITF_HEADER_MISMATCH().set_TARGET(i_target),
+ "Error rotating tcn_mbs_func ring -- header mismatch!");
+
fapi_try_exit:
FAPI_DBG("End");
return fapi2::current_err;
diff --git a/src/import/chips/centaur/procedures/hwp/perv/cen_initf.mk b/src/import/chips/centaur/procedures/hwp/perv/cen_initf.mk
index 0dd23ac3f..375d611dd 100644
--- a/src/import/chips/centaur/procedures/hwp/perv/cen_initf.mk
+++ b/src/import/chips/centaur/procedures/hwp/perv/cen_initf.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016,2017
+# Contributors Listed Below - COPYRIGHT 2016,2018
# [+] International Business Machines Corp.
#
#
@@ -27,5 +27,6 @@
-include 01common.mk
PROCEDURE=cen_initf
+lib${PROCEDURE}_DEPLIBS+=cen_common_funcs
$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud