diff options
author | Andre Marin <aamarin@us.ibm.com> | 2016-04-17 10:25:38 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-05-20 09:58:23 -0400 |
commit | 06e5c818cb0f6dbd8cf1273afdfb8cb6759a5347 (patch) | |
tree | d05cf0c882923cb241aa8285c4adf44c91e2b8fc /src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C | |
parent | e975f03d70583acbe4259b9c2316f76d424cc7f0 (diff) | |
download | talos-hostboot-06e5c818cb0f6dbd8cf1273afdfb8cb6759a5347.tar.gz talos-hostboot-06e5c818cb0f6dbd8cf1273afdfb8cb6759a5347.zip |
Add eff_config functionality needed for RIT, fix cas_latency bug & attr files
Change-Id: If16f403c0ba7376e32b4a0eaa8958381d62b6e39
Original-Change-Id: I508ea4b156ff26ff7c652e28510a535b90030434
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23796
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Tested-by: Hostboot CI
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24843
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C index 50afba8ed..bc38cf585 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C @@ -30,10 +30,10 @@ namespace mss // Table 24 - tREFI and tRFC parameters static const std::vector<std::pair<uint8_t, uint64_t> > TREFI_BASE = { - // { density in GBs, tREFI(base) in nanoseconds } - {2, 7800}, - {4, 7800}, - {8, 7800}, + // { density in GBs, tREFI(base) in picoseconds } + {2, 7800000}, + {4, 7800000}, + {8, 7800000}, // 16Gb - TBD }; @@ -43,10 +43,10 @@ static const std::vector<std::pair<uint8_t, uint64_t> > TREFI_BASE = // Table 24 - tREFI and tRFC parameters static const std::vector<std::pair<uint8_t, uint64_t> > TRFC1_MIN = { - // { density in GBs, tRFC1(min) in nanoseconds } - {2, 160}, - {4, 260}, - {8, 350}, + // { density in GBs, tRFC1(min) in picoseconds } + {2, 160000}, + {4, 260000}, + {8, 350000}, // 16Gb - TBD }; @@ -56,10 +56,10 @@ static const std::vector<std::pair<uint8_t, uint64_t> > TRFC1_MIN = // Table 24 - tREFI and tRFC parameters static const std::vector<std::pair<uint8_t, uint64_t> > TRFC2_MIN = { - // { density in GBs, tRFC2(min) in nanoseconds } - {2, 110}, - {4, 160}, - {8, 260}, + // { density in GBs, tRFC2(min) in picoseconds } + {2, 110000}, + {4, 160000}, + {8, 260000}, // 16Gb - TBD }; @@ -69,10 +69,10 @@ static const std::vector<std::pair<uint8_t, uint64_t> > TRFC2_MIN = // Table 24 - tREFI and tRFC parameters static const std::vector<std::pair<uint8_t, uint64_t> > TRFC4_MIN = { - // { density in GBs, tRFC4(min) in nanoseconds } - {2, 90}, - {4, 110}, - {8, 160}, + // { density in GBs, tRFC4(min) in picoseconds } + {2, 90000}, + {4, 110000}, + {8, 160000}, // 16Gb - TBD }; @@ -82,9 +82,9 @@ static const std::vector<std::pair<uint8_t, uint64_t> > TRFC4_MIN = // Table 42 - Refresh parameters by logical rank density static const std::vector<std::pair<uint8_t, uint64_t> > TRFC_DLR1 = { - // { density in GBs, tRFC4(min) in nanoseconds } - {4, 90}, - {8, 120}, + // { density in GBs, tRFC4(min) in picoseconds } + {4, 90000}, + {8, 120000}, // 16Gb - TBD }; @@ -94,9 +94,9 @@ static const std::vector<std::pair<uint8_t, uint64_t> > TRFC_DLR1 = // Table 42 - Refresh parameters by logical rank density static const std::vector<std::pair<uint8_t, uint64_t> > TRFC_DLR2 = { - // { density in GBs, tRFC4(min) in nanoseconds } - {4, 55}, - {8, 90} + // { density in GBs, tRFC4(min) in picoseconds } + {4, 55000}, + {8, 90000} // 16Gb - TBD }; @@ -106,9 +106,9 @@ static const std::vector<std::pair<uint8_t, uint64_t> > TRFC_DLR2 = // Table 42 - Refresh parameters by logical rank density static const std::vector<std::pair<uint8_t, uint64_t> > TRFC_DLR4 = { - // { density in GBs, tRFC4(min) in nanoseconds } - {4, 40}, - {8, 55} + // { density in GBs, tRFC4(min) in picoseconds } + {4, 40000}, + {8, 55000} // 16Gb - TBD }; @@ -123,48 +123,48 @@ fapi2::ReturnCode calc_trefi1(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_ta uint8_t l_quotient = 0; uint8_t l_remainder = 0; uint64_t l_output = 0; - uint8_t l_temp_ref_range = 0; + uint8_t l_temp_refresh_range = 0; uint8_t l_dram_density = 0; bool l_found_value = true; FAPI_TRY( mss::eff_dram_density(i_target, l_dram_density) ); - FAPI_TRY( mss::mrw_temp_ref_range(l_temp_ref_range) ); + FAPI_TRY( mss::mrw_temp_refresh_range(l_temp_refresh_range) ); - switch(l_temp_ref_range) + l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + + switch(l_temp_refresh_range) { - case fapi2::ENUM_ATTR_MRW_TEMP_REF_RANGE_NORMAL: - l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + case fapi2::ENUM_ATTR_MRW_TEMP_REFRESH_RANGE_NORMAL: FAPI_TRY( check::fail_for_invalid_map(i_target, l_found_value, l_dram_density, - l_temp_ref_range, - "Could not find sdram density given" - "normal temp_ref_range.") ); + l_temp_refresh_range, + "Could not find sdram density given " + "normal temp_refresh_range.") ); break; - case fapi2::ENUM_ATTR_MRW_TEMP_REF_RANGE_EXTEND: - l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + case fapi2::ENUM_ATTR_MRW_TEMP_REFRESH_RANGE_EXTEND: FAPI_TRY( check::fail_for_invalid_map(i_target, l_found_value, l_dram_density, - l_temp_ref_range, - "Could not find sdram density given" - "extended temp_ref_range.") ); + l_temp_refresh_range, + "Could not find sdram density given " + "extended temp_refresh_range.") ); l_quotient = l_output / 2; l_remainder = l_output % 2; o_value = l_quotient + (l_remainder == 0 ? 0 : 1); break; default: - // l_temp_ref_range will be a platform attribute set by the MRW, + // Temperature Refresh Range will be a platform attribute set by the MRW, // which they "shouldn't" mess up as long as use "attribute" enums. // if openpower messes this up we can at least catch it FAPI_ASSERT(false, fapi2::MSS_INVALID_TEMP_REF_RANGE(). - set_TEMP_REF_RANGE(l_temp_ref_range), + set_TEMP_REF_RANGE(l_temp_refresh_range), "%s Incorrect Temperature Ref. Range received: %d ", mss::c_str(i_target), - l_temp_ref_range); + l_temp_refresh_range); break; } @@ -184,51 +184,51 @@ fapi2::ReturnCode calc_trefi2(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_ta uint8_t l_quotient = 0; uint8_t l_remainder = 0; uint64_t l_output = 0; - uint8_t l_temp_ref_range = 0; + uint8_t l_temp_refresh_range = 0; uint8_t l_dram_density = 0; bool l_found_value = true; - FAPI_TRY( mss::mrw_temp_ref_range(l_temp_ref_range) ); + FAPI_TRY( mss::mrw_temp_refresh_range(l_temp_refresh_range) ); FAPI_TRY( mss::eff_dram_density(i_target, l_dram_density) ); - switch(l_temp_ref_range) + l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + + switch(l_temp_refresh_range) { - case fapi2::ENUM_ATTR_MRW_TEMP_REF_RANGE_NORMAL: - l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + case fapi2::ENUM_ATTR_MRW_TEMP_REFRESH_RANGE_NORMAL: FAPI_TRY( check::fail_for_invalid_map(i_target, l_found_value, l_dram_density, - l_temp_ref_range, - "Could not find sdram density given" - "normal temp_ref_range.") ); + l_temp_refresh_range, + "Could not find sdram density given " + "normal temp_refresh_range.") ); l_remainder = l_output % 2; o_value = l_quotient + (l_remainder == 0 ? 0 : 1); break; - case fapi2::ENUM_ATTR_MRW_TEMP_REF_RANGE_EXTEND: - l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + case fapi2::ENUM_ATTR_MRW_TEMP_REFRESH_RANGE_EXTEND: FAPI_TRY( check::fail_for_invalid_map(i_target, l_found_value, l_dram_density, - l_temp_ref_range, - "Could not find sdram density given" - "extended temp_ref_range.") ); + l_temp_refresh_range, + "Could not find sdram density given " + "extended temp_refresh_range.") ); l_quotient = l_output / 4; l_remainder = l_output % 4; o_value = l_quotient + (l_remainder == 0 ? 0 : 1); break; default: - // l_temp_ref_range will be a platform attribute set by the MRW, + // Temperature Refresh Range will be a platform attribute set by the MRW, // which they "shouldn't" mess up as long as use "attribute" enums. // if openpower messes this up we can at least catch it FAPI_ASSERT(false, fapi2::MSS_INVALID_TEMP_REF_RANGE(). - set_TEMP_REF_RANGE(l_temp_ref_range), + set_TEMP_REF_RANGE(l_temp_refresh_range), "%s Incorrect Temperature Ref. Range received: %d ", mss::c_str(i_target), - l_temp_ref_range); + l_temp_refresh_range); break; } @@ -248,51 +248,51 @@ fapi2::ReturnCode calc_trefi4( const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_t uint8_t l_quotient = 0; uint8_t l_remainder = 0; uint64_t l_output = 0; - uint8_t l_temp_ref_range = 0; + uint8_t l_temp_refresh_range = 0; uint8_t l_dram_density = 0; bool l_found_value = true; - FAPI_TRY( mss::mrw_temp_ref_range(l_temp_ref_range) ); + FAPI_TRY( mss::mrw_temp_refresh_range(l_temp_refresh_range) ); FAPI_TRY( mss::eff_dram_density(i_target, l_dram_density) ); - switch(l_temp_ref_range) + l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + + switch(l_temp_refresh_range) { - case fapi2::ENUM_ATTR_MRW_TEMP_REF_RANGE_NORMAL: - l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + case fapi2::ENUM_ATTR_MRW_TEMP_REFRESH_RANGE_NORMAL: FAPI_TRY( check::fail_for_invalid_map(i_target, l_found_value, l_dram_density, - l_temp_ref_range, - "Could not find sdram density given" - "normal temp_ref_range.") ); + l_temp_refresh_range, + "Could not find sdram density given " + "normal temp_refresh_range.") ); l_quotient = l_output / 4; l_remainder = l_output % 4; o_value = l_quotient + (l_remainder == 0 ? 0 : 1); break; - case fapi2::ENUM_ATTR_MRW_TEMP_REF_RANGE_EXTEND: - l_found_value = mss::find_value_from_key(TREFI_BASE, l_dram_density, l_output); + case fapi2::ENUM_ATTR_MRW_TEMP_REFRESH_RANGE_EXTEND: FAPI_TRY( check::fail_for_invalid_map(i_target, l_found_value, l_dram_density, - l_temp_ref_range, - "Could not find sdram density given" - "extended temp_ref_range.") ); + l_temp_refresh_range, + "Could not find sdram density given " + "extended temp_refresh_range.") ); l_quotient = l_output / 8; l_remainder = l_output % 8; o_value = l_quotient + (l_remainder == 0 ? 0 : 1); break; default: - // l_temp_ref_range will be a platform attribute set by the MRW, + // Temperature Refresh Range will be a platform attribute set by the MRW, // which they "shouldn't" mess up as long as use "attribute" enums. // if openpower messes this up we can at least catch it FAPI_ASSERT(false, fapi2::MSS_INVALID_TEMP_REF_RANGE(). - set_TEMP_REF_RANGE(l_temp_ref_range), + set_TEMP_REF_RANGE(l_temp_refresh_range), "%s Incorrect Temperature Ref. Range received: %d ", mss::c_str(i_target), - l_temp_ref_range); + l_temp_refresh_range); break; } |