summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/utils
diff options
context:
space:
mode:
authorJacob Harvey <jlharvey@us.ibm.com>2017-07-10 16:42:09 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-18 10:52:26 -0400
commit25a46875b4bd8e7da5d5b2e342467ee2183e228b (patch)
tree0a5f26174ebbcb86dbe1fb407b79404dfa9a7708 /src/import/chips/p9/procedures/hwp/memory/lib/utils
parentd4c08be2b76339d60f098968bfe05f5a34a19c0b (diff)
downloadtalos-hostboot-25a46875b4bd8e7da5d5b2e342467ee2183e228b.tar.gz
talos-hostboot-25a46875b4bd8e7da5d5b2e342467ee2183e228b.zip
L3 work for mss xmls
mss_spd, mss_volt, mss_general, mss_data_buffer, mss_update_errors Change-Id: I1252d6d11900e88e0842c234c5ed815063e68ec0 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42962 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44229 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/utils')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.C8
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.H76
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.C6
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.H9
4 files changed, 15 insertions, 84 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.C b/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.C
index 1aa042f58..c55657845 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.C
@@ -28,9 +28,9 @@
/// @brief Contains common functions that perform checks
///
// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com>
-// *HWP FW Owner: Brian Silver <bsilver@us.ibm.com>
+// *HWP FW Owner: Jacob Harvey <jlharvey@us.ibm.com>
// *HWP Team: Memory
-// *HWP Level: 2
+// *HWP Level: 3
// *HWP Consumed by: FSP:HB
#include <fapi2.H>
@@ -72,5 +72,5 @@ fapi_try_exit:
return fapi2::current_err;
};
-}
-}
+} // ns check
+} // ns mss
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.H b/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.H
index a5cbd8012..0b9a46f3f 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/checker.H
@@ -28,9 +28,9 @@
/// @brief Contains common functions that perform checks
///
// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com>
-// *HWP FW Owner: Brian Silver <bsilver@us.ibm.com>
+// *HWP FW Owner: Jacob Harvey <jlharvey@us.ibm.com>
// *HWP Team: Memory
-// *HWP Level: 2
+// *HWP Level: 3
// *HWP Consumed by: FSP:HB
#ifndef _CHECKER_H_
@@ -93,78 +93,6 @@ fapi_try_exit:
}
///
-/// @brief Checks homogenous DDR4 dimm configuration (e.g. DDR4)
-/// @param[in] i_target the controller target
-/// @return fapi2::FAPI2_RC_SUCCESS iff ok
-///
-inline fapi2::ReturnCode dram_type(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target)
-{
- uint8_t l_dram_gen[PORTS_PER_MCS][MAX_DIMM_PER_PORT] = {0};
-
- // Retrieve DDR4 dimm attributes
- FAPI_TRY(eff_dram_gen(i_target, &(l_dram_gen[0][0])));
-
- // Make sure all DRAMs are DDR4 or throw an error
- for (const auto& l_mca : i_target.getChildren<fapi2::TARGET_TYPE_MCA>())
- {
- const auto l_port_num = mss::index(l_mca);
-
- for (const auto& l_dimm : l_mca.getChildren<fapi2::TARGET_TYPE_DIMM>())
- {
- const auto l_dimm_num = mss::index(l_dimm);
-
- FAPI_INF("%s DRAM device type is %llX",
- mss::c_str(l_dimm),
- l_dram_gen[l_port_num][l_dimm_num]);
-
- // Nimbus supports only DDR4
- FAPI_ASSERT(l_dram_gen[l_port_num][l_dimm_num] == fapi2::ENUM_ATTR_EFF_DRAM_GEN_DDR4,
- fapi2::MSS_UNSUPPORTED_DEV_TYPE().
- set_DEV_TYPE(l_dram_gen[l_port_num][l_dimm_num]),
- "%s Incorrect DRAM device generation, DRAM generation is %llx",
- mss::c_str(l_dimm),
- l_dram_gen[l_port_num][l_dimm_num]);
- }// dimm
- }// mca
-
-fapi_try_exit:
- return fapi2::current_err;
-
-}// dram_type
-
-///
-/// @brief Checks conditional and implements traces & exits if it fails
-/// @param[in] i_target the dimm target
-/// @param[in] i_conditional conditional that we are testing against
-/// @param[in] i_key map key
-/// @param[in] i_data additional returned data
-/// @param[in] i_err_str error string to print out when conditional fails
-/// @return ReturnCode
-///
-inline fapi2::ReturnCode fail_for_invalid_map(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target,
- const bool i_conditional,
- const uint64_t i_key,
- const uint64_t i_data = 0,
- const char* i_err_str = "")
-{
- // Invalid keys won't return useful or valid data so we allow optional data
- FAPI_ASSERT(i_conditional,
- fapi2::MSS_INVALID_KEY().
- set_KEY(i_key).
- set_DATA(i_data).
- set_DIMM_TARGET(i_target),
- "%s. %s Could not find value from key %d. Returned data: %d.",
- c_str(i_target),
- i_err_str,
- i_key,
- i_data);
-
- return fapi2::FAPI2_RC_SUCCESS;
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
/// @brief Checks to make sure ATTR_MSS_MRW_TEMP_REFRESH_MODE and ATTR_MSS_MRW_FINE_REFRESH_MODE are set correctly
/// @return fapi2::FAPI2_RC_SUCCESS if okay
/// @note from DDR4 DRAM Spec (79-4B) 4.9.4 page 48
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.C b/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.C
index ad8baffff..41bc0b0c6 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.C
@@ -27,10 +27,10 @@
/// @file fake_spd.H
/// @brief A tool to return fake (fixed) DIMM SPD for testing, development
///
-// *HWP HWP Owner: Brian Silver <bsilver@us.ibm.com>
-// *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com>
+// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Jacob Harvey <jlharvey@us.ibm.com>
// *HWP Team: Memory
-// *HWP Level: 2
+// *HWP Level: 3
// *HWP Consumed by: HB:FSP
// This shouldn't be callable by HB
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.H b/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.H
index 151e0f5b4..1084494b7 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/fake_spd.H
@@ -27,10 +27,10 @@
/// @file fake_spd.H
/// @brief A tool to return fake (fixed) DIMM SPD for testing, development
///
-// *HWP HWP Owner: Brian Silver <bsilver@us.ibm.com>
-// *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com>
+// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Jacob Harvey <jlharvey@us.ibm.com>
// *HWP Team: Memory
-// *HWP Level: 2
+// *HWP Level: 3
// *HWP Consumed by: HB:FSP
// This shouldn't be callable by HB
@@ -43,6 +43,9 @@
#include <fapi2.H>
#include <cstdint>
+///
+/// @brief SPD_TYPE class for our "fake" SPD for testing purposes
+///
enum class spd_type
{
VBU_16GB_2RX4_2400_DDR4_RDIMM,
OpenPOWER on IntegriCloud