diff options
Diffstat (limited to 'src')
6 files changed, 122 insertions, 216 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H index 036d1de49..c9178b30d 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H @@ -17987,99 +17987,6 @@ fapi_try_exit: /// -/// @brief ATTR_FREQ_PROC_REFCLOCK_KHZ getter -/// @param[out] uint32_t& reference to store the value -/// @note Generated by gen_accessors.pl generateParameters (SYSTEM) -/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK -/// @note The frequency of the processor refclock in kHz. Provided by the Machine Readable -/// Workbook. This can be overridden to adjust the refclock -/// frequency. -/// -inline fapi2::ReturnCode freq_proc_refclock_khz(uint32_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_FREQ_PROC_REFCLOCK_KHZ, fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_FREQ_PROC_REFCLOCK_KHZ: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_FREQ_MEM_REFCLOCK getter -/// @param[out] uint32_t& reference to store the value -/// @note Generated by gen_accessors.pl generateParameters (SYSTEM) -/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK -/// @note The frequency of the memory refclock in MHz. Provided by the Machine Readable -/// Workbook. This is read by the set_ref_clock HWP to find out the desired -/// frequency. This can be overridden to adjust the refclock -/// frequency. -/// -inline fapi2::ReturnCode freq_mem_refclock(uint32_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_FREQ_MEM_REFCLOCK, fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_FREQ_MEM_REFCLOCK: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_MAX_ALLOWED_DIMM_FREQ getter -/// @param[out] uint32_t* memory to store the value -/// @note Generated by gen_accessors.pl generateParameters (SYSTEM A) -/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK -/// @note Maximum frequency (in MHz) that this system can run the DIMMs at. There are 4 -/// possible values determined by the dimm configuration. [0]=One rank, single drop -/// [1]=Two rank, single drop [2]=One rank, dual drop [3]=Two rank, dual drop A -/// value of zero would indicate an unsupported -/// configuration. -/// -inline fapi2::ReturnCode max_allowed_dimm_freq(uint32_t* o_array) -{ - uint32_t l_value[4]; - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MAX_ALLOWED_DIMM_FREQ, fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>(), l_value) ); - memcpy(o_array, &l_value, 16); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MAX_ALLOWED_DIMM_FREQ: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_REQUIRED_SYNCH_MODE getter -/// @param[out] uint8_t& reference to store the value -/// @note Generated by gen_accessors.pl generateParameters (SYSTEM) -/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK -/// @note Specify the system policy to enforce synchronous mode between memory and nest. -/// This drives the value of ATTR_MEM_IN_SYNCH_MODE. UNDETERMINED : Run -/// synchronously if the dimm and nest freq matches ALWAYS : Require matching -/// frequencies and deconfigure memory that does not match the nest NEVER : Do not -/// run synchronously, even if the frequencies -/// match -/// -inline fapi2::ReturnCode required_synch_mode(uint8_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_REQUIRED_SYNCH_MODE, fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_REQUIRED_SYNCH_MODE: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - - -/// /// @brief ATTR_EFF_DRAM_GEN getter /// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM> /// @param[out] ref to the value uint8_t diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C index 0d77b65b6..652749e06 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C @@ -67,8 +67,13 @@ extern "C" // Get nest freq && F/W attr that tells me if sync mode is required // or if I have to figure that out - FAPI_TRY( mss::required_synch_mode(l_required_sync_mode) ); - FAPI_TRY( FAPI_ATTR_GET( fapi2::ATTR_FREQ_PB_MHZ, fapi2::Target<TARGET_TYPE_SYSTEM>(), l_nest_freq) ); + FAPI_TRY( FAPI_ATTR_GET( fapi2::ATTR_REQUIRED_SYNCH_MODE, + fapi2::Target<TARGET_TYPE_SYSTEM>(), + l_required_sync_mode ) ); + + FAPI_TRY( FAPI_ATTR_GET( fapi2::ATTR_FREQ_PB_MHZ, + fapi2::Target<TARGET_TYPE_SYSTEM>(), + l_nest_freq) ); FAPI_INF("Retrieved req'd sync mode: %d and nest freq %d", l_required_sync_mode, l_nest_freq); @@ -87,7 +92,9 @@ extern "C" const auto& l_proc_chip = mss::find_target<TARGET_TYPE_PROC_CHIP>(l_mcbist); // Cast converts enum class to uint8_t& expected for ATTR_SET - FAPI_TRY( FAPI_ATTR_SET( fapi2::ATTR_MC_SYNC_MODE, l_proc_chip, reinterpret_cast<uint8_t(&)>(l_mc_in_sync) ), + FAPI_TRY( FAPI_ATTR_SET( fapi2::ATTR_MC_SYNC_MODE, + l_proc_chip, + reinterpret_cast<uint8_t(&)>(l_mc_in_sync) ), "Failed to set ATTR_MC_SYNC_MODE"); } diff --git a/src/import/chips/p9/procedures/xml/attribute_info/freq_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/freq_attributes.xml index 0494e5e6e..3b67d35c3 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/freq_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/freq_attributes.xml @@ -79,9 +79,9 @@ <!-- ********************************************************************* --> <attribute> <id>ATTR_MEMVPD_POS</id> - <targetType>TARGET_TYPE_MCA</targetType> + <targetType>TARGET_TYPE_MCS</targetType> <description> - The position of the MCA target's VPD selector data, relative to the EEPROM + The position of the MCS target's VPD selector data, relative to the EEPROM that contains its data. For systems with a single EEPROM for all chips, this should be equivalent to ATTR_FAPI_POS (the logical MCA position). For systems with an EEPROM per chip, this value should be equivalent to diff --git a/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml index 81f12340e..297029202 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml @@ -3259,116 +3259,4 @@ <mssAccessorName>eff_dram_txs</mssAccessorName> </attribute> - <attribute> - <id>ATTR_VPD_OVERRIDE_MT</id> - <targetType>TARGET_TYPE_MCA</targetType> - <description> - Byte-for-byte override for the bucket of MT data that would - normally come from VPD. If ATTR_VPD_OVERRIDE_MT_ENABLE!=0 then - the value of this attribute will be returned to callers of - fapi2::getVPD() instead of the actual VPD contents. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <array>255</array> - <platInit/> - <overrideOnly/> - </attribute> - - <attribute> - <id>ATTR_VPD_OVERRIDE_MT_ENABLE</id> - <targetType>TARGET_TYPE_MCA</targetType> - <description> - Set equal to 1 to activate the use of ATTR_VPD_OVERRIDE_MT. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <platInit/> - <overrideOnly/> - </attribute> - - <attribute> - <id>ATTR_VPD_OVERRIDE_MR</id> - <targetType>TARGET_TYPE_MCA</targetType> - <description> - Byte-for-byte override for the bucket of MR data that would - normally come from VPD. If ATTR_VPD_OVERRIDE_MR_ENABLE!=0 then - the value of this attribute will be returned to callers of - fapi2::getVPD() instead of the actual VPD contents. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <array>255</array> - <platInit/> - <overrideOnly/> - </attribute> - - <attribute> - <id>ATTR_VPD_OVERRIDE_MR_ENABLE</id> - <targetType>TARGET_TYPE_MCA</targetType> - <description> - Set equal to 1 to activate the use of ATTR_VPD_OVERRIDE_MR. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <platInit/> - <overrideOnly/> - </attribute> - - <attribute> - <id>ATTR_VPD_OVERRIDE_MW</id> - <targetType>TARGET_TYPE_MCA</targetType> - <description> - Byte-for-byte override for the bucket of MW data that would - normally come from VPD. If ATTR_VPD_OVERRIDE_MW_ENABLE!=0 then - the value of this attribute will be returned to callers of - fapi2::getVPD() instead of the actual VPD contents. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <array>255</array> - <platInit/> - <overrideOnly/> - </attribute> - - <attribute> - <id>ATTR_VPD_OVERRIDE_MW_ENABLE</id> - <targetType>TARGET_TYPE_MCA</targetType> - <description> - Set equal to 1 to activate the use of ATTR_VPD_OVERRIDE_MW. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <platInit/> - <overrideOnly/> - </attribute> - - <attribute> - <id>ATTR_SPD_OVERRIDE</id> - <targetType>TARGET_TYPE_DIMM</targetType> - <description> - Byte-for-byte override for the bucket of data that would - normally come from SPD. If ATTR_SPD_OVERRIDE_ENABLE!=0 then - the value of this attribute will be returned to callers of - fapi2::getSPD() instead of the actual SPD contents. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <array>512</array> - <platInit/> - <overrideOnly/> - </attribute> - - <attribute> - <id>ATTR_SPD_OVERRIDE_ENABLE</id> - <targetType>TARGET_TYPE_DIMM</targetType> - <description> - Set equal to 1 to activate the use of ATTR_SPD_OVERRIDE. - </description> - <initToZero></initToZero> - <valueType>uint8</valueType> - <platInit/> - <overrideOnly/> - </attribute> - </attributes> diff --git a/src/import/chips/p9/procedures/xml/attribute_info/memory_override_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/memory_override_attributes.xml index 3247b6660..56df0ca0d 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/memory_override_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/memory_override_attributes.xml @@ -17,6 +17,110 @@ <!-- --> <!-- IBM_PROLOG_END_TAG --> -<!-- Empty xml for HB to mirror and ease rebase for adding attributes --> <attributes> + + <attribute> + <id>ATTR_VPD_OVERRIDE_MT</id> + <targetType>TARGET_TYPE_MCS</targetType> + <description> + Byte-for-byte override for the bucket of MT data that would + normally come from VPD. If ATTR_VPD_OVERRIDE_MT_ENABLE!=0 then + the value of this attribute will be returned to callers of + fapi2::getVPD() instead of the actual VPD contents. + </description> + <valueType>uint8</valueType> + <array>255</array> + <platInit/> + <overrideOnly/> + </attribute> + + <attribute> + <id>ATTR_VPD_OVERRIDE_MT_ENABLE</id> + <targetType>TARGET_TYPE_MCS</targetType> + <description> + Set equal to 1 to activate the use of ATTR_VPD_OVERRIDE_MT. + </description> + <valueType>uint8</valueType> + <platInit/> + <overrideOnly/> + </attribute> + + <attribute> + <id>ATTR_VPD_OVERRIDE_MR</id> + <targetType>TARGET_TYPE_MCS</targetType> + <description> + Byte-for-byte override for the bucket of MR data that would + normally come from VPD. If ATTR_VPD_OVERRIDE_MR_ENABLE!=0 then + the value of this attribute will be returned to callers of + fapi2::getVPD() instead of the actual VPD contents. + </description> + <valueType>uint8</valueType> + <array>255</array> + <platInit/> + <overrideOnly/> + </attribute> + + <attribute> + <id>ATTR_VPD_OVERRIDE_MR_ENABLE</id> + <targetType>TARGET_TYPE_MCS</targetType> + <description> + Set equal to 1 to activate the use of ATTR_VPD_OVERRIDE_MR. + </description> + <valueType>uint8</valueType> + <platInit/> + <overrideOnly/> + </attribute> + + <attribute> + <id>ATTR_VPD_OVERRIDE_MW</id> + <targetType>TARGET_TYPE_MCA</targetType> + <description> + Byte-for-byte override for the bucket of MW data that would + normally come from VPD. If ATTR_VPD_OVERRIDE_MW_ENABLE!=0 then + the value of this attribute will be returned to callers of + fapi2::getVPD() instead of the actual VPD contents. + </description> + <valueType>uint8</valueType> + <array>255</array> + <platInit/> + <overrideOnly/> + </attribute> + + <attribute> + <id>ATTR_VPD_OVERRIDE_MW_ENABLE</id> + <targetType>TARGET_TYPE_MCA</targetType> + <description> + Set equal to 1 to activate the use of ATTR_VPD_OVERRIDE_MW. + </description> + <valueType>uint8</valueType> + <platInit/> + <overrideOnly/> + </attribute> + + <attribute> + <id>ATTR_SPD_OVERRIDE</id> + <targetType>TARGET_TYPE_DIMM</targetType> + <description> + Byte-for-byte override for the bucket of data that would + normally come from SPD. If ATTR_SPD_OVERRIDE_ENABLE!=0 then + the value of this attribute will be returned to callers of + fapi2::getSPD() instead of the actual SPD contents. + </description> + <valueType>uint8</valueType> + <array>512</array> + <platInit/> + <overrideOnly/> + </attribute> + + <attribute> + <id>ATTR_SPD_OVERRIDE_ENABLE</id> + <targetType>TARGET_TYPE_DIMM</targetType> + <description> + Set equal to 1 to activate the use of ATTR_SPD_OVERRIDE. + </description> + <valueType>uint8</valueType> + <platInit/> + <overrideOnly/> + </attribute> + </attributes> diff --git a/src/import/hwpf/fapi2/include/fapi2_vpd_access.H b/src/import/hwpf/fapi2/include/fapi2_vpd_access.H index daf8b006f..31909c566 100644 --- a/src/import/hwpf/fapi2/include/fapi2_vpd_access.H +++ b/src/import/hwpf/fapi2/include/fapi2_vpd_access.H @@ -37,10 +37,10 @@ namespace fapi2 constexpr uint64_t VPD_INFO_INVALID = 0xffffffffffffffff; /// @brief Specialized class representing required VPDInfo to be used -/// in collecting VPD for the MCA target type. -/// @tparam T fapi2::TARGET_TYPE_MCA +/// in collecting VPD for the MCS target type. +/// @tparam T fapi2::TARGET_TYPE_MCS template<> -class VPDInfo<TARGET_TYPE_MCA> +class VPDInfo<TARGET_TYPE_MCS> { public: // @brief VPDInfo constructor @@ -71,7 +71,7 @@ class VPDInfo<TARGET_TYPE_MCA> /// @note passing nullptr for o_blob will return the size of the keyword /// /// Example: -/// fapi2::VPDInfo<fapi2::TARGET_TYPE_MCA> vpdInfo(MR_keyword); +/// fapi2::VPDInfo<fapi2::TARGET_TYPE_MCS> vpdInfo(MR_keyword); /// vpdInfo.iv_freq = 2667; /// /// uint8_t * blob = NULL; @@ -79,7 +79,7 @@ class VPDInfo<TARGET_TYPE_MCA> /// FAPI_TRY(getVPD( mcs, vpdInfo, blob )); /// blob = static_cast<uint8_t *>(malloc(vpdInfo.iv_size)); /// FAPI_TRY(getVPD( mcs, vpdInfo, blob )); -/// blob now contains the VPD data for the MCA. +/// blob now contains the VPD data for the MCS. /// template<TargetType T> ReturnCode getVPD(const Target<T>& i_target, |