diff options
| author | Stephen Glancy <sglancy@us.ibm.com> | 2019-06-18 11:20:16 -0400 |
|---|---|---|
| committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-06-20 10:55:59 -0500 |
| commit | 30d44084f5741a909fdbb7de1a8f71eac2a4e3c5 (patch) | |
| tree | bda53dae4db35687f2cc98133afde4fe0e879a06 /src/import | |
| parent | 1d850029be30edff0f2e660e1f28cb50ae3f2411 (diff) | |
| download | talos-hostboot-30d44084f5741a909fdbb7de1a8f71eac2a4e3c5.tar.gz talos-hostboot-30d44084f5741a909fdbb7de1a8f71eac2a4e3c5.zip | |
Adds a helper function to hold CKE's high in draminit
In order to reduce build size, the hostboot team is trying
new compile flags. They encountered an issue with ccs::execute
being used in draminit. This commit moves the ccs::execute into a
helper function.
Change-Id: I86c869950ae608bec990bfd68723d34b26cc6ab3
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79116
Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
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>
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/79136
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: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import')
3 files changed, 39 insertions, 13 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C index cff51d629..9e894b10f 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C @@ -206,4 +206,32 @@ fapi_try_exit: return fapi2::current_err; } +/// +/// @brief Helper function to bring CKE high and hold for 400 cycles +/// @param[in] i_target MCA target on which to operate +/// @return FAPI2_RC_SUCCESS if and only if ok +/// +fapi2::ReturnCode draminit_cke_helper( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target) +{ + + auto l_des = mss::ccs::des_command(); + mss::ccs::program l_program; + + // Also a Deselect command must be registered as required from the Spec. + // Register DES instruction, which pulls CKE high. Idle 400 cycles, and then begin RCD loading + // Note: This only is sent to one of the MCA as we still have the mux_addr_sel bit set, meaning + // we'll PDE/DES all DIMM at the same time. + l_des.arr1.insertFromRight<MCBIST_CCS_INST_ARR1_00_IDLES, MCBIST_CCS_INST_ARR1_00_IDLES_LEN>(400); + l_program.iv_instructions.push_back(l_des); + + FAPI_TRY( mss::ccs::execute(mss::find_target<fapi2::TARGET_TYPE_MCBIST>(i_target), + l_program, + i_target), + "%s Failed execute in p9_mss_draminit", + mss::c_str(i_target) ); + +fapi_try_exit: + return fapi2::current_err; +} + } // namespace diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.H b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.H index 9f8b7b23a..bfb73ae92 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.H @@ -169,5 +169,12 @@ inline fapi2::ReturnCode perform_rcd_load_dispatch<DEFAULT_KIND>(const kind_t&, return perform_rcd_load<DEFAULT_KIND>(i_target, i_inst); } +/// +/// @brief Helper function to bring CKE high and hold for 400 cycles +/// @param[in] i_target MCA target on which to operate +/// @return FAPI2_RC_SUCCESS if and only if ok +/// +fapi2::ReturnCode draminit_cke_helper( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target); + } #endif diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C index d3c462535..62a9e3114 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C @@ -60,9 +60,6 @@ extern "C" { fapi2::buffer<uint64_t> l_data; - mss::ccs::instruction_t l_des = mss::ccs::des_command(); - mss::ccs::program l_program; - // Up, down P down, up N. Somewhat magic numbers - came from Centaur and proven to be the // same on Nimbus. Why these are what they are might be lost to time ... constexpr uint64_t PCLK_INITIAL_VALUE = 0b10; @@ -157,16 +154,10 @@ extern "C" mss::c_str(i_target) ); } - // Also a Deselect command must be registered as required from the Spec. - // Register DES instruction, which pulls CKE high. Idle 400 cycles, and then begin RCD loading - // Note: This only is sent to one of the MCA as we still have the mux_addr_sel bit set, meaning - // we'll PDE/DES all DIMM at the same time. - l_des.arr1.insertFromRight<MCBIST_CCS_INST_ARR1_00_IDLES, MCBIST_CCS_INST_ARR1_00_IDLES_LEN>(400); - l_program.iv_instructions.push_back(l_des); - - FAPI_TRY( mss::ccs::execute(i_target, l_program, l_mcas[0]), - "%s Failed execute in p9_mss_draminit", - mss::c_str(i_target) ); + // Holds our CKE high for 400 cycles - required by the JEDEC spec + FAPI_TRY( mss::draminit_cke_helper(l_mcas[0]), + "%s Failed to hold CKE high in p9_mss_draminit", + mss::c_str(i_target)); // Per conversation with Shelton and Steve 10/9/15, turn off addr_mux_sel after the CKE CCS but // before the RCD/MRS CCSs |

