From 301f2149330c763b8fc1fea2cda72b690e318b78 Mon Sep 17 00:00:00 2001 From: Yue Du Date: Tue, 7 Feb 2017 09:51:53 -0600 Subject: IPL Only: Drop chiplet fence in scomcust instead of startclocks Change-Id: I4f60bdfa33dc7752851411155d97c0a2d913ef99 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36031 Tested-by: Jenkins Server Reviewed-by: Michael S. Floyd Reviewed-by: AMIT KUMAR Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36143 Tested-by: FSP CI Jenkins Reviewed-by: Sachin Gupta --- .../procedures/hwp/cache/p9_hcd_cache_scomcust.C | 79 ++++++++-------------- .../procedures/hwp/cache/p9_hcd_cache_scomcust.H | 31 +++++---- .../hwp/cache/p9_hcd_cache_startclocks.C | 6 -- .../p9/procedures/hwp/core/p9_hcd_core_scomcust.C | 53 ++++++--------- .../p9/procedures/hwp/core/p9_hcd_core_scomcust.H | 24 ++++--- .../procedures/hwp/core/p9_hcd_core_startclocks.C | 7 +- 6 files changed, 86 insertions(+), 114 deletions(-) (limited to 'src/import') diff --git a/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_scomcust.C b/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_scomcust.C index b2c3c296..d7047ce4 100644 --- a/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_scomcust.C +++ b/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_scomcust.C @@ -24,70 +24,49 @@ /* IBM_PROLOG_END_TAG */ /// /// @file p9_hcd_cache_scomcust.C -/// @brief Core Chiplet PCB Arbitration -/// -/// *HWP HWP Owner : David Du -/// *HWP FW Owner : Sangeetha T S -/// *HWP Team : PM -/// *HWP Consumed by : SBE:SGPE -/// *HWP Level : 1 -/// -/// Procedure Summary: -/// If CME, request PCB Mux. -/// Poll for PCB Mux grant -/// Else (SBE) -/// Nop (as the CME is not running in bringing up the first Core) +/// @brief Cache Customization SCOMs /// +// *HWP HWP Owner : David Du +// *HWP Backup HWP Owner : Greg Still +// *HWP FW Owner : Sangeetha T S +// *HWP Team : PM +// *HWP Consumed by : SBE:SGPE +// *HWP Level : 2 + //------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ -#include -//#include -//will be replaced with real scom address header file + +#include +#include #include "p9_hcd_cache_scomcust.H" //------------------------------------------------------------------------------ // Constant Definitions: Core Chiplet PCB Arbitration //------------------------------------------------------------------------------ -extern "C" +fapi2::ReturnCode +p9_hcd_cache_scomcust( + const fapi2::Target& i_target) { + FAPI_INF(">>p9_hcd_cache_scomcust"); + fapi2::buffer l_data64; + uint8_t l_attr_system_ipl_phase; + fapi2::Target l_sys; - fapi2::ReturnCode - p9_hcd_cache_scomcust( - const fapi2::Target& i_target) - { - -#if 0 - - fapi2::buffer data; - - //Dynamically built (and installed) routine that is inserted by the .XIP - //Customization. process. (New for P9) - //(TODO: this part of the process is a placeholder at this point) - //Dynamically built pointer where a NULL is checked before execution - //If NULL (a potential early value); return - //Else call the function at the pointer; - //pointer is filled in by XIP Customization - //Customization items: - //Epsilon settings scan flush to super safe - //Customize Epsilon settings for system config - //LCO setup (chiplet specific) - //FW setups up based victim caches - - return fapi2::FAPI2_RC_SUCCESS; - - FAPI_CLEANUP(); - return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA; - -#endif - - return fapi2::FAPI2_RC_SUCCESS; - - } // Procedure + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SYSTEM_IPL_PHASE, l_sys, + l_attr_system_ipl_phase)); + if (l_attr_system_ipl_phase != fapi2::ENUM_ATTR_SYSTEM_IPL_PHASE_CACHE_CONTAINED) + { + FAPI_DBG("Drop chiplet fence via NET_CTRL0[18]"); + FAPI_TRY(putScom(i_target, EQ_NET_CTRL0_WAND, MASK_UNSET(18))); + } -} // extern C +fapi_try_exit: + FAPI_INF("< -/// *HWP FW Owner : Sangeetha T S -/// *HWP Team : PM -/// *HWP Consumed by : SBE:SGPE -/// *HWP Level : 1 +/// @brief Cache Customization SCOMs /// +// *HWP HWP Owner : David Du +// *HWP Backup HWP Owner : Greg Still +// *HWP FW Owner : Sangeetha T S +// *HWP Team : PM +// *HWP Consumed by : SBE:SGPE +// *HWP Level : 2 + #ifndef __P9_HCD_CACHE_SCOMCUST_H__ #define __P9_HCD_CACHE_SCOMCUST_H__ -extern "C" -{ + +#include /// @typedef p9_hcd_cache_scomcust_FP_t /// function pointer typedef definition for HWP call support - typedef fapi2::ReturnCode (*p9_hcd_cache_scomcust_FP_t) ( - const fapi2::Target&); +typedef fapi2::ReturnCode (*p9_hcd_cache_scomcust_FP_t) ( + const fapi2::Target&); +extern "C" +{ /// @brief Core Chiplet PCB Arbitration /// @@ -56,7 +59,9 @@ extern "C" p9_hcd_cache_scomcust( const fapi2::Target& i_target); - -} // extern C +} #endif // __P9_HCD_CACHE_SCOMCUST_H__ + + + diff --git a/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_startclocks.C b/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_startclocks.C index 414b4922..64820534 100644 --- a/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_startclocks.C +++ b/src/import/chips/p9/procedures/hwp/cache/p9_hcd_cache_startclocks.C @@ -328,12 +328,6 @@ p9_hcd_cache_startclocks( // Cleaning up // ------------------------------- - if (l_attr_system_ipl_phase != fapi2::ENUM_ATTR_SYSTEM_IPL_PHASE_CACHE_CONTAINED) - { - FAPI_DBG("Drop chiplet fence via NET_CTRL0[18]"); - FAPI_TRY(putScom(i_target, EQ_NET_CTRL0_WAND, MASK_UNSET(18))); - } - /// @todo RTC158181 ignore xstop checkstop in sim, review for lab /* FAPI_DBG("Check the Global Checkstop FIR"); diff --git a/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_scomcust.C b/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_scomcust.C index 842f605d..307010ca 100644 --- a/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_scomcust.C +++ b/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_scomcust.C @@ -26,12 +26,6 @@ /// @file p9_hcd_core_scomcust.C /// @brief Core Customization SCOMs /// -/// *HWP HWP Owner : David Du -/// *HWP FW Owner : Reshmi Nair -/// *HWP Team : PM -/// *HWP Consumed by : SBE:CME -/// *HWP Level : 1 -/// /// Procedure Summary: /// Dynamically built (and installed) routine that is inserted by the .XIP /// Customization. process. (New for P9) (TODO: this part of the process is @@ -40,44 +34,39 @@ /// If NULL (a potential early value); return /// Else call the function at the pointer; /// pointer is filled in by XIP Customization -/// + +// *HWP HWP Owner : David Du +// *HWP Backup HWP Owner : Greg Still +// *HWP FW Owner : Sangeetha T S +// *HWP Team : PM +// *HWP Consumed by : SBE:CME +// *HWP Level : 2 //----------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------- -#include -//#include -//will be replaced with real scom address header file + +#include +#include #include "p9_hcd_core_scomcust.H" //----------------------------------------------------------------------------- // Constant Definitions: Core Customization SCOMs //----------------------------------------------------------------------------- -extern "C" +fapi2::ReturnCode +p9_hcd_core_scomcust( + const fapi2::Target& i_target) { + FAPI_INF(">>p9_hcd_core_scomcust"); + fapi2::buffer l_data64; - fapi2::ReturnCode - p9_hcd_core_scomcust( - const fapi2::Target& i_target) - { - -#if 0 - - fapi2::buffer data; - - return fapi2::FAPI2_RC_SUCCESS; - - FAPI_CLEANUP(); - return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA; - -#endif - - return fapi2::FAPI2_RC_SUCCESS; - - } // Procedure - + FAPI_DBG("Drop chiplet fence via NET_CTRL0[18]"); + FAPI_TRY(putScom(i_target, C_NET_CTRL0_WAND, MASK_UNSET(18))); -} // extern C +fapi_try_exit: + FAPI_INF("< -/// *HWP FW Owner : Reshmi Nair -/// *HWP Team : PM -/// *HWP Consumed by : SBE:CME -/// *HWP Level : 1 -/// +// *HWP HWP Owner : David Du +// *HWP Backup HWP Owner : Greg Still +// *HWP FW Owner : Sangeetha T S +// *HWP Team : PM +// *HWP Consumed by : SBE:CME +// *HWP Level : 2 #ifndef __P9_HCD_CORE_SCOMCUST_H__ #define __P9_HCD_CORE_SCOMCUST_H__ -extern "C" -{ +#include /// @typedef p9_hcd_core_scomcust_FP_t /// function pointer typedef definition for HWP call support - typedef fapi2::ReturnCode (*p9_hcd_core_scomcust_FP_t) ( - const fapi2::Target&); +typedef fapi2::ReturnCode (*p9_hcd_core_scomcust_FP_t) ( + const fapi2::Target&); +extern "C" +{ /// @brief Core Customization SCOMs /// @@ -58,6 +59,7 @@ extern "C" p9_hcd_core_scomcust( const fapi2::Target& i_target); -} // extern C +} #endif // __P9_HCD_CORE_SCOMCUST_H__ + diff --git a/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_startclocks.C b/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_startclocks.C index 48017020..c3a71b23 100644 --- a/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_startclocks.C +++ b/src/import/chips/p9/procedures/hwp/core/p9_hcd_core_startclocks.C @@ -277,8 +277,11 @@ p9_hcd_core_startclocks( // Cleaning up // ------------------------------- - FAPI_DBG("Drop chiplet fence via NET_CTRL0[18]"); - FAPI_TRY(putScom(i_target, C_NET_CTRL0_WAND, MASK_UNSET(18))); + if (l_attr_system_ipl_phase == fapi2::ENUM_ATTR_SYSTEM_IPL_PHASE_CACHE_CONTAINED) + { + FAPI_DBG("Drop chiplet fence via NET_CTRL0[18]"); + FAPI_TRY(putScom(i_target, C_NET_CTRL0_WAND, MASK_UNSET(18))); + } /// @todo RTC158181 ignore xstop checkstop in sim, review for lab /* -- cgit v1.2.1