summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2018-02-01 09:55:43 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-03 20:39:27 -0500
commit371ca0eb55aeee32899d9296ed69c00a39e2fe64 (patch)
treec03ece912f1ee7ffd6e757a3af63b2c5111ae988
parentaeec96752c1ac8dc14a41ff61ae51128580fb87d (diff)
downloadblackbird-hostboot-371ca0eb55aeee32899d9296ed69c00a39e2fe64.tar.gz
blackbird-hostboot-371ca0eb55aeee32899d9296ed69c00a39e2fe64.zip
Add attribute for row repair data
Change-Id: I1bbbe901afa73b30dde43927c363ee724af4525d RTC: 174670 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52438 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: Benjamin J Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Brian J Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52708 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H32
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H1
-rwxr-xr-xsrc/import/chips/p9/procedures/xml/attribute_info/memory_spd_attributes.xml23
3 files changed, 55 insertions, 1 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 d24cbea29..47fbf0e2b 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
@@ -20650,6 +20650,38 @@ fapi_try_exit:
return fapi2::current_err;
}
+///
+/// @brief ATTR_ROW_REPAIR_DATA getter
+/// @param[in] const ref to the TARGET_TYPE_DIMM
+/// @param[out] uint8_t* memory to store the value
+/// @note Generated by gen_accessors.pl generateParameters (PROC_CHIP)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note Row Repair Data for a DIMM target. Data for 4 master ranks * 32 bits per row
+/// repair Each row repair contains: -5 bits: DRAM position (x8: 0-9, x4: 0-19) -3
+/// bits: slave ranks (0-7) -2 bits: bank group (0-3) -3 bits: bank (0-7) -18 bits:
+/// row -1 bits:
+/// unused
+///
+inline fapi2::ReturnCode row_repair_data(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& 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[4][4];
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_ROW_REPAIR_DATA, i_target, l_value) );
+ memcpy(o_array, &l_value, 16);
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_ROW_REPAIR_DATA: 0x%lx",
+ uint64_t(fapi2::current_err));
+ return fapi2::current_err;
+}
+
///
/// @brief ATTR_MSS_MRW_SAFEMODE_MEM_THROTTLED_N_COMMANDS_PER_PORT getter
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H b/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
index 1958501e3..cee0e9b84 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
@@ -77,6 +77,7 @@ enum sizes
MARK_STORE_COUNT = 8, ///< Elements in a VPD mark/store array
BAD_DQ_BYTE_COUNT = 10, ///< Elements in a BAD_DQ_BITMAP attribute array
+ ROW_REPAIR_BYTE_COUNT = 4, ///< Elements in a ROW_REPAIR_DATA attribute array.
BYTES_PER_GB = 1000000000, ///< Multiplier to go from GB to B
T_PER_MT = 1000000, ///< Multiplier to go from MT/s to T/s
diff --git a/src/import/chips/p9/procedures/xml/attribute_info/memory_spd_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/memory_spd_attributes.xml
index 10bbf9e59..b2a022ac6 100755
--- a/src/import/chips/p9/procedures/xml/attribute_info/memory_spd_attributes.xml
+++ b/src/import/chips/p9/procedures/xml/attribute_info/memory_spd_attributes.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2016,2017 -->
+<!-- Contributors Listed Below - COPYRIGHT 2016,2018 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
@@ -689,4 +689,25 @@
<mssAccessorName>eff_nibble_map</mssAccessorName>
</attribute>
+ <attribute>
+ <id>ATTR_ROW_REPAIR_DATA</id>
+ <targetType>TARGET_TYPE_DIMM</targetType>
+ <description>
+ Row Repair Data for a DIMM target.
+ Data for 4 master ranks * 32 bits per row repair
+ Each row repair contains:
+ -5 bits: DRAM position (x8: 0-9, x4: 0-19)
+ -3 bits: slave ranks (0-7)
+ -2 bits: bank group (0-3)
+ -3 bits: bank (0-7)
+ -18 bits: row
+ -1 bits: unused
+ </description>
+ <initToZero></initToZero>
+ <valueType>uint8</valueType>
+ <writeable/>
+ <array>4 4</array>
+ <mssAccessorName>row_repair_data</mssAccessorName>
+ </attribute>
+
</attributes>
OpenPOWER on IntegriCloud