From 3aff96c3a891fb7bbb7c0cdd74160e358f5681ed Mon Sep 17 00:00:00 2001 From: Brian Silver Date: Wed, 17 Aug 2016 08:29:44 -0500 Subject: Implement MRW attributes; dram_clks, db_util, 2n_mode ATTR_MSS_MRW_MEM_M_DRAM_CLOCKS ATTR_MSS_MRW_MAX_DRAM_DATABUS_UTIL ATTR_MSS_MRW_DRAM_2N_MODE TSYS_ADR, TSYS_DATA moved the MT VPD GPO, RLO, WLO moved to the MT VPD Update hb defaults Update unit test to catch the 2N mode MRW changes Change-Id: I3d998c70d30df978062ce923096ba741d597782e Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28383 Dev-Ready: Brian R. Silver Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Matt K. Light Reviewed-by: Louis Stermole Reviewed-by: Christian R. Geddes Reviewed-by: Daniel M. Crowell Reviewed-by: ANDRE A. MARIN Reviewed-by: JACOB L. HARVEY Reviewed-by: STEPHEN GLANCY Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28390 Tested-by: FSP CI Jenkins --- .../hwp/memory/lib/eff_config/eff_config.C | 13 +- .../hwp/memory/lib/mss_attribute_accessors.H | 179 --------------------- .../p9/procedures/hwp/memory/p9_mss_eff_config.C | 5 - .../xml/attribute_info/memory_mcs_attributes.xml | 15 -- .../xml/attribute_info/memory_mrw_attributes.xml | 78 +-------- .../fapi2/xml/attribute_info/hb_temp_defaults.xml | 15 -- 6 files changed, 18 insertions(+), 287 deletions(-) (limited to 'src/import') diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/eff_config.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/eff_config.C index aeb3f1a29..dca96e80d 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/eff_config.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/eff_config.C @@ -2598,12 +2598,21 @@ fapi2::ReturnCode eff_config::geardown_mode(const fapi2::Target -/// @param[out] ref to the value uint8_t -/// @note Generated by gen_accessors.pl generateParameters (D) -/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK -/// @note DRAM data bus utilization percent to use to determine -/// cfg_nm_n_per_port -/// -inline fapi2::ReturnCode databus_util(const fapi2::Target& i_target, uint8_t& o_value) -{ - uint8_t l_value[2]; - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_DATABUS_UTIL, i_target.getParent(), l_value) ); - o_value = l_value[mss::index(i_target)]; - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_DATABUS_UTIL: 0x%lx (target: %s)", - uint64_t(fapi2::current_err), mss::c_str(i_target)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_MSS_DATABUS_UTIL getter -/// @param[in] const ref to the fapi2::Target -/// @param[out] ref to the value uint8_t -/// @note Generated by gen_accessors.pl generateParameters (D.1) -/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK -/// @note DRAM data bus utilization percent to use to determine -/// cfg_nm_n_per_port -/// -inline fapi2::ReturnCode databus_util(const fapi2::Target& i_target, uint8_t& o_value) -{ - uint8_t l_value[2]; - auto l_mca = i_target.getParent(); - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_DATABUS_UTIL, l_mca.getParent(), l_value) ); - o_value = l_value[mss::index(l_mca)]; - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_DATABUS_UTIL: 0x%lx (target: %s)", - uint64_t(fapi2::current_err), mss::c_str(i_target)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_MSS_DATABUS_UTIL getter -/// @param[in] const ref to the fapi2::Target -/// @param[out] uint8_t* memory to store the value -/// @note Generated by gen_accessors.pl generateParameters (E) -/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK -/// @note DRAM data bus utilization percent to use to determine -/// cfg_nm_n_per_port -/// -inline fapi2::ReturnCode databus_util(const fapi2::Target& i_target, uint8_t* o_array) -{ - if (o_array == nullptr) - { - FAPI_ERR("nullptr passed to attribute accessor %s", __func__); - return fapi2::FAPI2_RC_INVALID_PARAMETER; - } - - uint8_t l_value[2]; - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_DATABUS_UTIL, i_target, l_value) ); - memcpy(o_array, &l_value, 2); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_DATABUS_UTIL: 0x%lx (target: %s)", - uint64_t(fapi2::current_err), mss::c_str(i_target)); - return fapi2::current_err; -} - /// /// @brief ATTR_MSS_OCC_THROTTLED_N_CMDS getter /// @param[in] const ref to the fapi2::Target @@ -19689,67 +19613,6 @@ fapi_try_exit: return fapi2::current_err; } -/// -/// @brief ATTR_MSS_MRW_OFFSET_GPO getter -/// @param[out] int8_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 Global Offset in number of Clocks. Delta from the value calculated or taken from -/// VPD. -/// -inline fapi2::ReturnCode mrw_offset_gpo(int8_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MRW_OFFSET_GPO, fapi2::Target(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_MRW_OFFSET_GPO: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_MSS_MRW_OFFSET_RLO getter -/// @param[out] int8_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 Read Latency Offset in number of Clocks. Delta from the value calculated or -/// taken from -/// VPD. -/// -inline fapi2::ReturnCode mrw_offset_rlo(int8_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MRW_OFFSET_RLO, fapi2::Target(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_MRW_OFFSET_RLO: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_MSS_MRW_OFFSET_WLO getter -/// @param[out] int8_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 Write Latency Offset in number of -/// Clocks -/// -inline fapi2::ReturnCode mrw_offset_wlo(int8_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MRW_OFFSET_WLO, fapi2::Target(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_MRW_OFFSET_WLO: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - /// /// @brief ATTR_MSS_MRW_PERIODIC_MEMCAL_MODE_OPTIONS getter /// @param[out] uint16_t& reference to store the value @@ -19799,48 +19662,6 @@ fapi_try_exit: return fapi2::current_err; } -/// -/// @brief ATTR_MSS_MRW_TSYS_ADR 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 Phase rotator value for the memory sub-system clock in ticks. Ticks are 1/128 of -/// one cycle of -/// clock. -/// -inline fapi2::ReturnCode mrw_tsys_adr(uint8_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MRW_TSYS_ADR, fapi2::Target(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_MRW_TSYS_ADR: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - -/// -/// @brief ATTR_MSS_MRW_TSYS_DATA 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 Phase rotator value for the memory sub-system data in ticks. Ticks are 1/128 of -/// one cycle of -/// clock. -/// -inline fapi2::ReturnCode mrw_tsys_data(uint8_t& o_value) -{ - - FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MRW_TSYS_DATA, fapi2::Target(), o_value) ); - return fapi2::current_err; - -fapi_try_exit: - FAPI_ERR("failed accessing ATTR_MSS_MRW_TSYS_DATA: 0x%lx (system target)", - uint64_t(fapi2::current_err)); - return fapi2::current_err; -} - /// /// @brief ATTR_MSS_MRW_DRAM_2N_MODE getter /// @param[out] uint8_t& reference to store the value diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C index 4589c5fa4..40f7e7514 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C @@ -230,11 +230,6 @@ fapi2::ReturnCode p9_mss_eff_config( const fapi2::Target l_throttled_n_commands ) ); } - { - uint8_t l_databus_util[mss::PORTS_PER_MCS] = {0x5A, 0x5A}; - FAPI_TRY( FAPI_ATTR_SET( fapi2::ATTR_MSS_DATABUS_UTIL, i_target, l_databus_util ) ); - } - { uint16_t l_cal_step[mss::PORTS_PER_MCS] = {0xFAC0, 0xFAC0}; FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_MSS_CAL_STEP_ENABLE, i_target, l_cal_step) ); 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 4e5a41f7a..29ea1984b 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 @@ -2120,21 +2120,6 @@ vmem_regulator_max_dimm_count - - ATTR_MSS_DATABUS_UTIL - TARGET_TYPE_MCS - - - - DRAM data bus utilization percent to use to determine cfg_nm_n_per_port - - - uint8 - - 2 - databus_util - - ATTR_MSS_OCC_THROTTLED_N_CMDS TARGET_TYPE_MCS diff --git a/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml index f4ee6b02d..79eb711ca 100755 --- a/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml @@ -89,6 +89,7 @@ + mrw_mem_m_dram_clocks @@ -102,6 +103,8 @@ uint32 + + mrw_max_dram_databus_util @@ -128,7 +131,7 @@ TARGET_TYPE_SYSTEM Capable power control settings. In MRW. uint8 - OFF = 0x00, SLOWEXIT = 0x01, FASTEXIT = 0x02 + OFF = 0x00, POWER_DOWN = 0x01, STR = 0x02, PD_AND_STR = 0x03 @@ -243,6 +246,7 @@ NORMAL + mrw_fine_refresh_mode @@ -259,6 +263,7 @@ NORMAL + mrw_temp_refresh_range @@ -307,48 +312,6 @@ mrw_cleaner_enable - - ATTR_MSS_MRW_OFFSET_GPO - TARGET_TYPE_SYSTEM - - Global Offset in number of Clocks. Delta from the value calculated or taken from VPD. - - int8 - nck - - 0 - - mrw_offset_gpo - - - - ATTR_MSS_MRW_OFFSET_RLO - TARGET_TYPE_SYSTEM - - Read Latency Offset in number of Clocks. Delta from the value calculated or taken from VPD. - - int8 - nck - - 0 - - mrw_offset_rlo - - - - ATTR_MSS_MRW_OFFSET_WLO - TARGET_TYPE_SYSTEM - - Write Latency Offset in number of Clocks - - int8 - nck - - 0 - - mrw_offset_wlo - - ATTR_MSS_MRW_PERIODIC_MEMCAL_MODE_OPTIONS TARGET_TYPE_SYSTEM @@ -403,34 +366,6 @@ mrw_periodic_zqcal_mode_options - - ATTR_MSS_MRW_TSYS_ADR - TARGET_TYPE_SYSTEM - - Phase rotator value for the memory sub-system clock in ticks. - Ticks are 1/128 of one cycle of clock. - - uint8 - tick - - 0x21 - mrw_tsys_adr - - - - ATTR_MSS_MRW_TSYS_DATA - TARGET_TYPE_SYSTEM - - Phase rotator value for the memory sub-system data in ticks. - Ticks are 1/128 of one cycle of clock. - - uint8 - tick - 0x18 - - mrw_tsys_data - - ATTR_MSS_MRW_DRAM_2N_MODE TARGET_TYPE_SYSTEM @@ -444,6 +379,7 @@ AUTO + mrw_dram_2n_mode diff --git a/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml b/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml index 7cfb3daef..e08ce5ce6 100644 --- a/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml +++ b/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml @@ -378,24 +378,9 @@ ATTR_MSS_OCC_THROTTLED_N_CMDS - - ATTR_MSS_MRW_OFFSET_WLO - - - ATTR_MSS_MRW_OFFSET_GPO - - - ATTR_MSS_MRW_OFFSET_RLO - ATTR_MSS_MRW_PERIODIC_MEMCAL_MODE_OPTIONS - - ATTR_MSS_MRW_TSYS_ADR - - - ATTR_MSS_MRW_TSYS_DATA - ATTR_MSS_MRW_DRAM_2N_MODE -- cgit v1.2.1