diff options
author | Stephen Glancy <sglancy@us.ibm.com> | 2018-08-02 16:35:37 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2018-08-20 16:15:21 -0500 |
commit | 28b83673a11719bac517edb613f01a6ee9bfe566 (patch) | |
tree | 9da5c5789c907854829b13ad2800bfbabd318eb4 /src/import/chips/p9/procedures/hwp/memory/lib/mcbist | |
parent | 1b5a02cab7f8c7f0de2536a46ae8c8448023e484 (diff) | |
download | talos-hostboot-28b83673a11719bac517edb613f01a6ee9bfe566.tar.gz talos-hostboot-28b83673a11719bac517edb613f01a6ee9bfe566.zip |
Moves conversions to be in the generic code space
Change-Id: Id0270a97066a06615b165ccd8c84e444d134394e
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63845
Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64048
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/mcbist')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H index 92e66f80b..bafdc6e98 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H @@ -43,6 +43,7 @@ #include <generic/memory/lib/utils/poll.H> #include <generic/memory/lib/utils/memory_size.H> +#include <lib/utils/mss_nimbus_conversions.H> #include <lib/shared/mss_const.H> #include <lib/utils/bit_count.H> #include <lib/utils/num.H> @@ -418,6 +419,30 @@ class mcbistTraits<fapi2::TARGET_TYPE_MCS> }; +/// +/// @brief Return the estimated time an MCBIST subtest will take to complete +/// Useful for initial polling delays, probably isn't accurate for much else +/// as it doesn't take refresh in to account (which will necessarily slow down +/// the program.) +/// @param[in] i_target the target from which to gather memory frequency +/// @param[in] i_bytes number of *bytes* in the address range +/// @param[in] i_64B_per mss::YES if the command is 64B, mss::NO if it's 128B. Defaults to mss::YES +/// @return the initial polling delay for this program in ns +/// +template< fapi2::TargetType T > +inline uint64_t calculate_initial_delay(const fapi2::Target<T>& i_target, + const uint64_t i_bytes, + const bool i_64B_per = mss::YES) +{ + // TODO RTC: 164104 Update MCBIST delay calculator. As we learn more about what + // the lab really needs, we can probably make this function better. + const uint64_t l_bytes_per_cmd = (i_64B_per == mss::YES) ? 64 : 128; + + // Best case is a command takes 4 cycles. Given the number of commands and address space size + // we can get some idea of how long to wait before we start polling. + return cycles_to_ns(i_target, (i_bytes / l_bytes_per_cmd) * mss::CYCLES_PER_CMD); +} + namespace mcbist { |