summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/dimm
diff options
context:
space:
mode:
authorStephen Glancy <sglancy@us.ibm.com>2019-06-18 11:20:16 -0400
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-06-20 10:55:59 -0500
commit30d44084f5741a909fdbb7de1a8f71eac2a4e3c5 (patch)
treebda53dae4db35687f2cc98133afde4fe0e879a06 /src/import/chips/p9/procedures/hwp/memory/lib/dimm
parent1d850029be30edff0f2e660e1f28cb50ae3f2411 (diff)
downloadtalos-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/chips/p9/procedures/hwp/memory/lib/dimm')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C28
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.H7
2 files changed, 35 insertions, 0 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
OpenPOWER on IntegriCloud