From 98bf4ecbde2d327d0c7707cbe96654486bcfcc50 Mon Sep 17 00:00:00 2001 From: Ben Gass Date: Mon, 7 Oct 2019 18:03:22 -0400 Subject: Update OMI DS template support - Allow DS template 1 to be turned off - Leave DS template 0 only bit on if no other templates enabled - Remove overly restrictive DS template checks Change-Id: I7d5d02b949043d1cbae340c392ce587cd5bac26f Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84969 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Adam S Hale Dev-Ready: Benjamin Gass Reviewed-by: Thi N Tran Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84973 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R Geddes --- .../procedures/hwp/initfiles/p9a_omi_init_scom.C | 10 +++++++++- .../chips/p9/procedures/hwp/memory/p9a_omi_init.C | 23 ++++++++-------------- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src/import/chips') diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9a_omi_init_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9a_omi_init_scom.C index 3801b25b9..68c8df463 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9a_omi_init_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9a_omi_init_scom.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,6 +40,8 @@ fapi2::ReturnCode p9a_omi_init_scom(const fapi2::Target& FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_ENABLE_DL_TMPL_7, TGT0, l_TGT0_ATTR_PROC_ENABLE_DL_TMPL_7)); fapi2::ATTR_PROC_ENABLE_DL_TMPL_4_Type l_TGT0_ATTR_PROC_ENABLE_DL_TMPL_4; FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_ENABLE_DL_TMPL_4, TGT0, l_TGT0_ATTR_PROC_ENABLE_DL_TMPL_4)); + fapi2::ATTR_PROC_ENABLE_DL_TMPL_1_Type l_TGT0_ATTR_PROC_ENABLE_DL_TMPL_1; + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_ENABLE_DL_TMPL_1, TGT0, l_TGT0_ATTR_PROC_ENABLE_DL_TMPL_1)); fapi2::ATTR_PROC_TMPL_0_PACING_Type l_TGT0_ATTR_PROC_TMPL_0_PACING; FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_TMPL_0_PACING, TGT0, l_TGT0_ATTR_PROC_TMPL_0_PACING)); fapi2::ATTR_PROC_TMPL_1_PACING_Type l_TGT0_ATTR_PROC_TMPL_1_PACING; @@ -64,6 +66,12 @@ fapi2::ReturnCode p9a_omi_init_scom(const fapi2::Target& l_scom_buffer.insert<6, 1, 63, uint64_t>(l_MCP_CHAN0_DSTL_DSTLCFG_TMPL4_DISABLE_ON ); } + if ((l_TGT0_ATTR_PROC_ENABLE_DL_TMPL_1 == fapi2::ENUM_ATTR_PROC_ENABLE_DL_TMPL_1_DISABLED)) + { + constexpr auto l_MCP_CHAN0_DSTL_DSTLCFG_TMPL1_DIS_ON = 0x1; + l_scom_buffer.insert<3, 1, 63, uint64_t>(l_MCP_CHAN0_DSTL_DSTLCFG_TMPL1_DIS_ON ); + } + FAPI_TRY(fapi2::putScom(TGT0, 0x701090bull, l_scom_buffer)); } { diff --git a/src/import/chips/p9/procedures/hwp/memory/p9a_omi_init.C b/src/import/chips/p9/procedures/hwp/memory/p9a_omi_init.C index b11696597..60d52d748 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9a_omi_init.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9a_omi_init.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -90,20 +90,13 @@ fapi2::ReturnCode p9a_omi_init_enable_templates(const fapi2::Target(); - FAPI_TRY(putScom(i_target, P9A_MCC_DSTLCFG, l_data)); + if (l_enable_tmpl_1 || l_enable_tmpl_4 || l_enable_tmpl_7) + { + //Turn off temp0_only + FAPI_TRY(getScom(i_target, P9A_MCC_DSTLCFG, l_data)); + l_data.clearBit(); + FAPI_TRY(putScom(i_target, P9A_MCC_DSTLCFG, l_data)); + } fapi_try_exit: -- cgit v1.2.1