diff options
4 files changed, 68 insertions, 349 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.C b/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.C index 025667cf..aaa63711 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.C @@ -39,7 +39,7 @@ // *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com> // *HWP FW Owner: Thi Tran <thi@us.ibm.com> // *HWP Team: Nest -// *HWP Level: 2 +// *HWP Level: 3 // *HWP Consumed by: SBE,HB,FSP // @@ -48,39 +48,34 @@ //------------------------------------------------------------------------------ #include <p9_fbc_utils.H> #include <p9_misc_scom_addresses.H> +#include <p9_misc_scom_addresses_fld.H> //------------------------------------------------------------------------------ // Constant definitions //------------------------------------------------------------------------------ -// ADU PMisc Register field/bit definitions -const uint32_t ALTD_SND_MODE_DISABLE_CHECKSTOP_BIT = 19; -const uint32_t ALTD_SND_MODE_MANUAL_CLR_PB_STOP_BIT = 21; -const uint32_t ALTD_SND_MODE_PB_STOP_BIT = 22; - -// FBC Mode Register field/bit definitions -const uint32_t PU_FBC_MODE_PB_INITIALIZED_BIT = 0; - // FBC base address determination constants // system ID (large system) const uint8_t FABRIC_ADDR_LS_SYSTEM_ID_START_BIT = 8; const uint8_t FABRIC_ADDR_LS_SYSTEM_ID_END_BIT = 12; +// msel bits (large & small system) +const uint8_t FABRIC_ADDR_MSEL_START_BIT = 13; +const uint8_t FABRIC_ADDR_MSEL_END_BIT = 14; // group ID (large system) const uint8_t FABRIC_ADDR_LS_GROUP_ID_START_BIT = 15; const uint8_t FABRIC_ADDR_LS_GROUP_ID_END_BIT = 18; // chip ID (large system) const uint8_t FABRIC_ADDR_LS_CHIP_ID_START_BIT = 19; const uint8_t FABRIC_ADDR_LS_CHIP_ID_END_BIT = 21; -// msel bits (large & small system) -const uint8_t FABRIC_ADDR_MSEL_START_BIT = 13; -const uint8_t FABRIC_ADDR_MSEL_END_BIT = 14; //------------------------------------------------------------------------------ // Function definitions //------------------------------------------------------------------------------ + +// NOTE: see comments above function prototype in header fapi2::ReturnCode p9_fbc_utils_get_fbc_state( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, bool& o_is_initialized, @@ -88,25 +83,34 @@ fapi2::ReturnCode p9_fbc_utils_get_fbc_state( { FAPI_DBG("Start"); - // TODO: HW328175 - // fapi2::buffer<uint64_t> l_fbc_mode_data; - // FAPI_TRY(fapi2::getScom(i_target, PU_FBC_MODE_REG, l_fbc_mode_data), - // "Error reading FBC Mode Register"); - // // fabric is initialized if PB_INITIALIZED bit is one/set - // o_is_initialized = l_fbc_mode_data.getBit<PU_FBC_MODE_PB_INITIALIZED_BIT>(); + fapi2::ATTR_CHIP_EC_FEATURE_HW328175_Type l_hw328175; + fapi2::buffer<uint64_t> l_fbc_mode_data; + fapi2::buffer<uint64_t> l_pmisc_mode_data; - // currently, sampling FBC init from PB Mode register is unreliable - // as init can drop perodically at runtime (based on legacy sleep backoff) - // until this issue is fixed, just return true to caller - o_is_initialized = true; + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_EC_FEATURE_HW328175, i_target, l_hw328175), + "Error from FAPI_ATTR_GET (ATTR_CHIP_EC_FEATURE_HW328175"); + + if (l_hw328175) + { + // sampling FBC init from PB Mode register is unreliable + // as init can drop perodically at runtime (based on legacy sleep backoff), + // just return true to caller + o_is_initialized = true; + } + else + { + FAPI_TRY(fapi2::getScom(i_target, PU_PB_CENT_SM0_PB_CENT_MODE, l_fbc_mode_data), + "Error reading FBC Mode Register"); + // fabric is initialized if PB_INITIALIZED bit is one/set + o_is_initialized = l_fbc_mode_data.getBit<PU_PB_CENT_SM0_PB_CENT_MODE_PB_CENT_PBIXXX_INIT>(); + } // read ADU PMisc Mode Register state - fapi2::buffer<uint64_t> l_pmisc_mode_data; FAPI_TRY(fapi2::getScom(i_target, PU_SND_MODE_REG, l_pmisc_mode_data), "Error reading ADU PMisc Mode register"); // fabric is running if FBC_STOP bit is zero/clear - o_is_running = !(l_pmisc_mode_data.getBit<ALTD_SND_MODE_PB_STOP_BIT>()); + o_is_running = !(l_pmisc_mode_data.getBit<PU_SND_MODE_REG_PB_STOP>()); fapi_try_exit: FAPI_DBG("End"); @@ -114,6 +118,7 @@ fapi_try_exit: } +// NOTE: see comments above function prototype in header fapi2::ReturnCode p9_fbc_utils_override_fbc_stop( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target) { @@ -125,12 +130,12 @@ fapi2::ReturnCode p9_fbc_utils_override_fbc_stop( "Error reading ADU PMisc Mode register"); // set bit to disable checkstop forwarding and write back - l_pmisc_mode_data.setBit<ALTD_SND_MODE_DISABLE_CHECKSTOP_BIT>(); + l_pmisc_mode_data.setBit<PU_SND_MODE_REG_DISABLE_CHECKSTOP>(); FAPI_TRY(fapi2::putScom(i_target, PU_SND_MODE_REG, l_pmisc_mode_data), "Error writing ADU PMisc Mode register to disable checkstop forwarding to FBC"); // set bit to manually clear stop control and write back - l_pmisc_mode_data.setBit<ALTD_SND_MODE_MANUAL_CLR_PB_STOP_BIT>(); + l_pmisc_mode_data.setBit<PU_SND_MODE_REG_MANUAL_CLR_PB_STOP>(); FAPI_TRY(fapi2::putScom(i_target, PU_SND_MODE_REG, l_pmisc_mode_data), "Error writing ADU PMisc Mode register to manually clear FBC stop control"); @@ -140,6 +145,7 @@ fapi_try_exit: } +// NOTE: see comments above function prototype in header fapi2::ReturnCode p9_fbc_utils_get_chip_base_address( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, const p9_fbc_utils_addr_mode_t i_addr_mode, @@ -155,7 +161,6 @@ fapi2::ReturnCode p9_fbc_utils_get_chip_base_address( fapi2::buffer<uint64_t> l_base_address; const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM; - FAPI_DBG("Start"); // retreive attributes which statically determine chips position in memory map @@ -186,7 +191,7 @@ fapi2::ReturnCode p9_fbc_utils_get_chip_base_address( "Error from FAPI_ATTR_GET (ATTR_MEM_MIRROR_PLACEMENT_POLICY)"); // apply system ID - // occupies one field for large system map (three fields for small system map) + // occupies one field for large system map l_base_address.insertFromRight < FABRIC_ADDR_LS_SYSTEM_ID_START_BIT, (FABRIC_ADDR_LS_SYSTEM_ID_END_BIT - FABRIC_ADDR_LS_SYSTEM_ID_START_BIT + 1) > (l_fabric_system_id); diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.H b/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.H index 15a6ff37..5c7f54c9 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.H +++ b/src/import/chips/p9/procedures/hwp/nest/p9_fbc_utils.H @@ -34,7 +34,7 @@ // *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com> // *HWP FW Owner: Thi Tran <thi@us.ibm.com> // *HWP Team: Nest -// *HWP Level: 2 +// *HWP Level: 3 // *HWP Consumed by: SBE,HB,FSP // @@ -78,9 +78,9 @@ const uint64_t FABRIC_CACHELINE_SIZE = 0x80; /// @brief Read FBC/ADU registers to determine state of fabric init and stop /// control signals /// -/// @param[in] i_target Reference to processor chip target -/// @param[out] o_is_initialized State of fabric init signal -/// @param[out] o_is_running State of fabric pervasive stop control +/// @param[in] i_target Reference to processor chip target +/// @param[out] o_is_initialized State of fabric init signal +/// @param[out] o_is_running State of fabric pervasive stop control /// @return fapi::ReturnCode, FAPI2_RC_SUCCESS if success, else error code. /// fapi2::ReturnCode p9_fbc_utils_get_fbc_state( @@ -92,7 +92,7 @@ fapi2::ReturnCode p9_fbc_utils_get_fbc_state( /// @brief Use ADU pMisc Mode register to clear fabric stop signal, overriding /// a stop condition caused by a checkstop /// -/// @param[in] i_target Reference to processor chip target +/// @param[in] i_target Reference to processor chip target /// @return fapi::ReturnCode, FAPI2_RC_SUCCESS if success, else error code. /// fapi2::ReturnCode p9_fbc_utils_override_fbc_stop( diff --git a/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml index 2ce95cff..b379f649 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml @@ -359,6 +359,24 @@ </attribute> <!-- ******************************************************************** --> <attribute> + <id>ATTR_CHIP_EC_FEATURE_HW328175</id> + <targetType>TARGET_TYPE_PROC_CHIP</targetType> + <description> + HW328175 : PB mode register does not reflect steady-state value + of PB init + </description> + <chipEcFeature> + <chip> + <name>ENUM_ATTR_NAME_NIMBUS</name> + <ec> + <value>0x20</value> + <test>LESS_THAN</test> + </ec> + </chip> + </chipEcFeature> + </attribute> + <!-- ******************************************************************** --> + <attribute> <id>ATTR_CHIP_EC_FEATURE_HW367321</id> <targetType>TARGET_TYPE_PROC_CHIP</targetType> <description> @@ -1104,16 +1122,15 @@ <id>ATTR_CHIP_EC_FEATURE_DISABLE_SPEC_STWCX</id> <targetType>TARGET_TYPE_PROC_CHIP</targetType> <description> - Nimbus DD1.0 DD2.0 - HW353069 / HW358383 / HW358418 / HW358662 / HW358824 / HW363605 + Nimbus DD1 only: HW353069 / HW358383 / HW358418 / HW358662 / HW358824 / HW363605 Not doing Performance: MB State - Need to disable speculative stwcx </description> <chipEcFeature> <chip> <name>ENUM_ATTR_NAME_NIMBUS</name> <ec> - <value>0x10</value> - <test>GREATER_THAN_OR_EQUAL</test> + <value>0x20</value> + <test>LESS_THAN</test> </ec> </chip> </chipEcFeature> @@ -2412,8 +2429,7 @@ <id>ATTR_CHIP_EC_FEATURE_HW403465</id>> <targetType>TARGET_TYPE_PROC_CHIP</targetType> <description> - Nimbus DD1.0 DD2.0 - L1 access latency increases when data footprint should still + Nimbus DD1: L1 access latency increases when data footprint should still be within L1 cache size. Revert L1 LRU changes </description> <chipEcFeature> @@ -2421,7 +2437,7 @@ <name>ENUM_ATTR_NAME_NIMBUS</name> <ec> <value>0x20</value> - <test>LESS_THAN_OR_EQUAL</test> + <test>LESS_THAN</test> </ec> </chip> </chipEcFeature> @@ -2513,313 +2529,6 @@ </attribute> <!-- ******************************************************************** --> <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW403766</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW403766 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW405047</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW405047 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW405602</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW405602 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW405605</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW405605 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW405865</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW405865 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW406641</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW406641 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW406972</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW406972 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW407065</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW407065 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW407165</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW407165 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW408628</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW408628 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW408876</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW408876 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW408917</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW408917 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW408988</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW408988 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW409270</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW409270 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW409365</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW409365 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW408891</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - Nimbus DD1.0 DD2.0 - HW408891 - Recovery WAT - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x10</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW405021</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW409194 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x10</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> - <id>ATTR_CHIP_EC_FEATURE_HW409194</id>> - <targetType>TARGET_TYPE_PROC_CHIP</targetType> - <description> - HW409194 - </description> - <chipEcFeature> - <chip> - <name>ENUM_ATTR_NAME_NIMBUS</name> - <ec> - <value>0x20</value> - <test>GREATER_THAN_OR_EQUAL</test> - </ec> - </chip> - </chipEcFeature> - </attribute> - <!-- ******************************************************************** --> - <attribute> <id>ATTR_CHIP_EC_FEATURE_HW395939</id> <targetType>TARGET_TYPE_PROC_CHIP</targetType> <description> @@ -3169,10 +2878,10 @@ </attribute> <attribute> - <id>ATTR_CHIP_EC_FEATURE_MSS_NIMBUS_EC_LESS_THAN_TWO_OH</id> + <id>ATTR_CHIP_EC_FEATURE_MSS_UT_EC_NIMBUS_LESS_THAN_TWO_OH</id> <targetType>TARGET_TYPE_PROC_CHIP</targetType> <description> - Attribute used only for memory subsystem procedures. Tells us whether + Attribute used only for memory subsystem unit tests. Tells us whether the chip EC we're running on is less than 2.0 and we're on a Nimbus </description> <chipEcFeature> diff --git a/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml index 409ab805..cac558af 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml @@ -415,6 +415,11 @@ attribute tank </entry> <entry> + <name>ATTR_CHIP_EC_FEATURE_HW328175</name> + <virtual/> + </entry> + + <entry> <name>ATTR_PROC_XSCOM_BAR_BASE_ADDR_OFFSET</name> <value>0x000003FC00000000</value> </entry> |