From d400a7beb23440efa9e5abef4a510abcf44bc5c6 Mon Sep 17 00:00:00 2001 From: whs Date: Thu, 28 Apr 2016 07:25:54 -0500 Subject: Changes related to packaging of memory vpd on Nimbus Create a HWP to process MR and MT keyword to map to memory vpd keyword. Change specialization from MCS to MCA. Change-Id: I426e4c7600e2158737c82e3c2380518c392ada5b RTC: 144519 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23775 Tested-by: Jenkins Server Reviewed-by: Brian R. Silver Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Daniel M. Crowell Reviewed-by: Matt K. Light Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23797 Reviewed-by: Sachin Gupta --- import/hwpf/fapi2/include/fapi2_vpd_access.H | 24 ++++++++++++++---------- import/hwpf/fapi2/include/plat/plat_vpd_access.H | 9 ++++----- import/hwpf/fapi2/include/plat/vpd_access.H | 6 +++--- 3 files changed, 21 insertions(+), 18 deletions(-) (limited to 'import/hwpf') diff --git a/import/hwpf/fapi2/include/fapi2_vpd_access.H b/import/hwpf/fapi2/include/fapi2_vpd_access.H index b1d889b6..daf8b006 100644 --- a/import/hwpf/fapi2/include/fapi2_vpd_access.H +++ b/import/hwpf/fapi2/include/fapi2_vpd_access.H @@ -33,28 +33,32 @@ namespace fapi2 { +/// constants for VPD Info +constexpr uint64_t VPD_INFO_INVALID = 0xffffffffffffffff; + /// @brief Specialized class representing required VPDInfo to be used -/// in collecting VPD for the MCS target type. -/// @tparam T fapi2::TARGET_TYPE_MCS +/// in collecting VPD for the MCA target type. +/// @tparam T fapi2::TARGET_TYPE_MCA template<> -class VPDInfo +class VPDInfo { public: // @brief VPDInfo constructor VPDInfo( const fapi2::MemVpdData& i_vpd_type) : iv_vpd_type(i_vpd_type), - iv_size(0), iv_freq(0), iv_rank_count_dimm_0(0), - iv_rank_count_dimm_1(0), iv_dimm_drop_per_port(0) + iv_size(VPD_INFO_INVALID), + iv_freq_mhz(VPD_INFO_INVALID), + iv_rank_count_dimm_0(VPD_INFO_INVALID), + iv_rank_count_dimm_1(VPD_INFO_INVALID) {}; // type of vpd field to return fapi2::MemVpdData_t iv_vpd_type; // size of the vpd data size_t iv_size; - uint64_t iv_freq; + uint64_t iv_freq_mhz; uint64_t iv_rank_count_dimm_0; uint64_t iv_rank_count_dimm_1; - uint64_t iv_dimm_drop_per_port; }; @@ -67,15 +71,15 @@ class VPDInfo /// @note passing nullptr for o_blob will return the size of the keyword /// /// Example: -/// fapi2::VPDInfo vpdInfo(MR_keyword); -/// vpdInfo.iv_speed_bin = 2400_SPEED_BIN; +/// fapi2::VPDInfo vpdInfo(MR_keyword); +/// vpdInfo.iv_freq = 2667; /// /// uint8_t * blob = NULL; /// /// FAPI_TRY(getVPD( mcs, vpdInfo, blob )); /// blob = static_cast(malloc(vpdInfo.iv_size)); /// FAPI_TRY(getVPD( mcs, vpdInfo, blob )); -/// blob now contains the VPD data for the MCS. +/// blob now contains the VPD data for the MCA. /// template ReturnCode getVPD(const Target& i_target, diff --git a/import/hwpf/fapi2/include/plat/plat_vpd_access.H b/import/hwpf/fapi2/include/plat/plat_vpd_access.H index d9f32ee9..6097689a 100644 --- a/import/hwpf/fapi2/include/plat/plat_vpd_access.H +++ b/import/hwpf/fapi2/include/plat/plat_vpd_access.H @@ -30,9 +30,9 @@ namespace fapi2 { // -- platform specific getVPD implementation goes here -- -// platform specific for MCS target -- test code only -inline fapi2::ReturnCode platGetVPD(const fapi2::Target& i_target, - VPDInfo& io_vpd_info, +// platform specific for MCA target -- test code only +inline fapi2::ReturnCode platGetVPD(const fapi2::Target& i_target, + VPDInfo& io_vpd_info, uint8_t* o_blob) { fapi2::ReturnCode l_rc = fapi2::FAPI2_RC_SUCCESS; @@ -45,10 +45,9 @@ inline fapi2::ReturnCode platGetVPD(const fapi2::Target& { o_blob[0] = 111; - io_vpd_info.iv_freq = 10000; + io_vpd_info.iv_freq_mhz = 10000; io_vpd_info.iv_rank_count_dimm_0 = 1; io_vpd_info.iv_rank_count_dimm_1 = 8; - io_vpd_info.iv_dimm_drop_per_port = 6; } diff --git a/import/hwpf/fapi2/include/plat/vpd_access.H b/import/hwpf/fapi2/include/plat/vpd_access.H index b227fab1..ed6fefaf 100644 --- a/import/hwpf/fapi2/include/plat/vpd_access.H +++ b/import/hwpf/fapi2/include/plat/vpd_access.H @@ -33,9 +33,9 @@ namespace fapi2 { // -- platform specializations for getVPD go here -- -// specialization for MCS target -template<> fapi2::ReturnCode getVPD(const fapi2::Target& i_target, - VPDInfo& io_vpd_info, +// specialization for MCA target +template<> fapi2::ReturnCode getVPD(const fapi2::Target& i_target, + VPDInfo& io_vpd_info, uint8_t* o_blob) { return platGetVPD( i_target, io_vpd_info, o_blob ); -- cgit v1.2.1