summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H
diff options
context:
space:
mode:
authorwhs <whs@us.ibm.com>2016-06-02 13:45:11 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-06-23 15:44:04 -0400
commit45c6a566f49ea3223492e35e21abc7fa9a058970 (patch)
tree9c161a08bc4ca374ff7f360ba965ba833ad655ea /src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H
parentf8861cd116368d7af30fb2c30e2920848fb35a94 (diff)
downloadtalos-hostboot-45c6a566f49ea3223492e35e21abc7fa9a058970.tar.gz
talos-hostboot-45c6a566f49ea3223492e35e21abc7fa9a058970.zip
Packaging of memory vpd on Nimbus, MCA->MCS
Change from MCA to MCS target. Update decode logic. Change-Id: I71408c25ce33cf6e342bb704b5d173f8d98229dc RTC: 144519 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25403 Tested-by: Jenkins Server Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: William H. Schwartz <whs@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25472 Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H')
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H81
1 files changed, 27 insertions, 54 deletions
diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H
index dca3b3fad..6f8c2d9e2 100644
--- a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H
+++ b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.H
@@ -45,71 +45,44 @@ enum
KEYWORD_BYTE_SIZE = 2,
};
typedef char keywordName_t [KEYWORD_BYTE_SIZE + 1];
-
-/// Structure for the layout of the MR and MT mapping keyword
-enum mappingKeywordEnum
-{
- MAPPING_LAYOUT_VERSION = 1,
- MAPPING_LAYOUT_INVALID = 0xff,
- MAPPING_LAYOUT_LAST = 0x00,
- MAPPING_LAYOUT_MAXROWS = 38, //header,0..9,A..Z,end mark
-
- MAPPING_LAYOUT_MCA0 = 0x8000, //mca position 0
- MAPPING_LAYOUT_MCA15 = 0x0001, //mca position 15
- MAPPING_LAYOUT_DIMM0_RANK0 = 0x80, //Dimm 0 rank count = 0
- MAPPING_LAYOUT_DIMM0_RANK4 = 0x10, //Dimm 0 rank count = 4
- MAPPING_LAYOUT_DIMM1_RANK0 = 0x08, //Dimm 1 rank count = 0
- MAPPING_LAYOUT_DIMM1_RANK4 = 0x01, //Dimm 1 rank count = 4
- MAPPING_LAYOUT_FREQ0 = 0x08, //Frequency index 0
- MAPPING_LAYOUT_FREQ3 = 0x01, //Frequency index 3
-};
-union mappingKeywordRow
-{
- struct //first entry is version
- {
- uint8_t layoutVersion;
- uint16_t headerReserved;
- uint16_t dataVersion;
- } __attribute__((packed));
- struct //criteria mapping entries
- {
- uint8_t mcaMaskMSB; // mca mask high order byte
- uint8_t mcaMaskLSB; // mca mask low order byte
- uint8_t rankMask; // high nibble rank 0, low nibble rank 1
- uint8_t freqMask; // high nibble reserved
- char keywordChar; // 0..9,A..Z
- } __attribute__((packed));
-};
}
typedef fapi2::ReturnCode (*p9_get_mem_vpd_keyword_t)(
- const fapi2::Target<fapi2::TARGET_TYPE_MCA>&,
- const fapi2::VPDInfo<fapi2::TARGET_TYPE_MCA>&,
+ const fapi2::Target<fapi2::TARGET_TYPE_MCS>&,
+ const fapi2::VPDInfo<fapi2::TARGET_TYPE_MCS>&,
const uint8_t*,
const size_t,
fapi2::keywordName_t&);
extern "C"
{
- /// @brief Return VPD keyword based on MCA, VPDInfo, and MR/MT mapping
+ /// @brief Return VPD keyword based on MCS, VPDInfo, and MR/MT mapping
/// The MR and MT keyword contains a header followed by a table. Each
/// row in the table has criteria to select a vpd keyword.
///
- /// 0 1 2 3 4
- /// mmmm.mmmm.mmmm.mmmm.rrrr.ssss.xxxx.ffff.dddd.dddd
+ /// 0 1 2 3 4 5
+ /// mmmm.mmmm.mmmm.mmmm.rrrr.rrrr.rrrr.rrrr.ffff.xxxx.dddd.dddd
///
- /// m...m mca position
- /// 0x8000 mca position 0
- /// 0x0001 mca position 15
- /// rrrr dimm 0 rank count = 0,1,2,4
- /// 0x80 rank count 0
- /// 0x10 rank count 4
- /// ssss dimm 1 rank count = 0,1,2,4
- /// 0x08 rank count 0
- /// 0x01 rank count 4
+ /// m...m mcs ATTR_MEMVPD_POS position
+ /// 0x8000 mcs vpd position 0 (proc 0, postion 0)
+ /// ... through ..
+ /// 0x1000 mcs vpd position 3 (proc 0, postion 3)
+ /// 0x0800 mcs vpd position 4 (proc 1, postion 0)
+ /// ... through ..
+ /// 0x0100 mcs vpd position 7 (proc 1, position 3)
+ /// ... through ..
+ /// 0x0001 mcs vpd position 15(proc 3, position 3)
+ /// r...r Dimm rank count pair
+ /// 0x8000 dimm0 rank count 0, dimm1 rank count 0
+ /// 0x4000 dimm0 rank count 0, dimm1 rank count 1
+ /// ... through ..
+ /// 0x0002 dimm0 rank count 4, dimm1 rank count 2
+ /// 0x0001 dimm0 rank count 4, dimm1 rank count 4
/// ffff frequency index from ATTR_MEMVPD_FREQS_MHZ
- /// 0x08 index 0
- /// 0x01 index 3
+ /// 0x80 index 0
+ /// ... through ..
+ /// 0x10 index 3
+ // (frequency index 4-7 reserved)
/// dddd second char in keyword name
///
/// All the configurations for a particular keyword are 'OR'ed into the
@@ -120,15 +93,15 @@ extern "C"
/// Note: this interface should not be called directly by HWPs,
/// it is provided for platform use behind the getVPD() interface.
///
- /// @param[in] i_target, the MCA
+ /// @param[in] i_target, the MCS
/// @param[in] i_vpd_info, vpd criteria
/// @param[in] i_pMapping, MR or MT keyword data
/// @param[in] i_mappingSize, size of i_pMapping buffer
/// @param[out] o_keywordName, keyword with vpd
/// @return FAPI2_RC_SUCCESS iff ok
fapi2::ReturnCode p9_get_mem_vpd_keyword (
- const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,
- const fapi2::VPDInfo<fapi2::TARGET_TYPE_MCA>& i_vpd_info,
+ const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target,
+ const fapi2::VPDInfo<fapi2::TARGET_TYPE_MCS>& i_vpd_info,
const uint8_t* i_pMapping,
const size_t i_mappingSize,
fapi2::keywordName_t& o_keywordName);
OpenPOWER on IntegriCloud