summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2014-11-14 13:35:57 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-11-14 15:43:16 -0600
commit95da7d69e4fca4ade64867c27f5bd8b50f9454fc (patch)
treeb3a88f03b5775694287e290afcc8f1b9c9d8e970
parentb64bb5c5a99290bac5077a610b3f8f101a7c859e (diff)
downloadblackbird-hostboot-95da7d69e4fca4ade64867c27f5bd8b50f9454fc.tar.gz
blackbird-hostboot-95da7d69e4fca4ade64867c27f5bd8b50f9454fc.zip
Fixes for live VPD support on Habanero
Correctly decode the rank value from SPD when applying it to the planar vpd lookup. Change-Id: I80bed605cc52df510d2ae4c61df5a686edc53ce0 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14491 Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Elizabeth Liner <eliner@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/usr/hwpf/hwp/dimm_spd_attributes.xml27
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C99
2 files changed, 86 insertions, 40 deletions
diff --git a/src/usr/hwpf/hwp/dimm_spd_attributes.xml b/src/usr/hwpf/hwp/dimm_spd_attributes.xml
index bbaab01d9..5b036355e 100644
--- a/src/usr/hwpf/hwp/dimm_spd_attributes.xml
+++ b/src/usr/hwpf/hwp/dimm_spd_attributes.xml
@@ -22,7 +22,7 @@
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: dimm_spd_attributes.xml,v 1.38000999 2014/10/16 21:35:22 jdsloat Exp $ -->
+<!-- $Id: dimm_spd_attributes.xml,v 1.42 2014-11-14 20:00:37 dcrowell Exp $ -->
<!-- XML file specifying DIMM SPD attributes used by HW Procedures. -->
<attributes>
@@ -158,7 +158,8 @@ The following attributes can be queried from both DDR3 and DDR4 DIMMs
Located in DDR4 SPD byte 12, bits 5-3.
</description>
<valueType>uint8</valueType>
- <enum>R1 = 0x00, R2 = 0x01, R3 = 0x02, R4 = 0x03</enum>
+ <!-- RX means an invalid value, only used to init vars -->
+ <enum>R1 = 0x00, R2 = 0x01, R4 = 0x03, RX = 0xFF</enum>
<platInit/>
</attribute>
@@ -608,7 +609,7 @@ The attribute would contain byte 69 nibble 1, followed by byte 69 nibble 0, foll
<!-- @fixme RTC:117484
<attribute>
<id>ATTR_VPD_DIMM_RCD_OUTPUT_TIMING</id>
- <targetType>TARGET_TYPE_DIMM</targetType>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
<description>RCD Timing. Supplied by VPD, used by mss_eff_config.C. Each dimm will have a value.
consumer: mss_eff_config
</description>
@@ -616,6 +617,7 @@ The attribute would contain byte 69 nibble 1, followed by byte 69 nibble 0, foll
<enum>1T = 0x01, 3T = 0x03</enum>
<odmVisable/>
<odmChangeable/>
+ <array> 2 2</array>
</attribute>
-->
@@ -2519,6 +2521,7 @@ Data will be pulled from backplane VPD if IS DIMMs present.</description>
</enum>
<platInit/>
</attribute>
+
<!--@fixme RTC: 112608
<attribute>
<id>ATTR_VPD_POWER_CONTROL_CAPABLE</id>
@@ -2529,6 +2532,22 @@ Data will be pulled from backplane VPD if IS DIMMs present.</description>
<platInit/>
<odmVisable/>
</attribute>
- -->
+-->
+
+<!-- @fixme RTC:117484
+ <attribute>
+ <id>ATTR_VPD_DIMM_RCD_IBT</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>RCD IBT. Used in mss_dram_init and is computed in mss_eff_cnfg. Can be overwritten by ODM vendors if done from the PNOR or odm_eff_cnfg. Each dimm will have a value.
+creator: mss_eff_cnfg
+consumer: mss_dram_init
+firmware notes: none</description>
+ <valueType>uint32</valueType>
+ <enum>IBT_OFF = 0, IBT_100 = 100, IBT_150 = 150, IBT_200 = 200, IBT_300 = 300</enum>
+ <odmVisable/>
+ <odmChangeable/>
+ <array> 2 2</array>
+</attribute>
+-->
</attributes>
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
index 49afc18dc..1d47ded0c 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
@@ -329,9 +329,14 @@ fapi::ReturnCode getMBvpdTermData(
{
//MT keyword is located in the SPDX record,
//and found by using ATTR_SPD_NUM_RANKS
- //T1: one dimm, rank 1 T2: one dimm, rank 2 T3: one dimm, rank 4
- //T5: two dimm, rank 1 T6: two dimm, rank 2 T8: two dimm, rank 4
- uint8_t l_spd_dimm_ranks[2][2] = {{0,0},{0,0}};
+ //T1: one dimm, rank 1 T2: one dimm, rank 2 T3: one dimm, rank 4
+ //T5: two dimm, rank 1 T6: two dimm, rank 2 T8: two dimm, rank 4
+ fapi::ATTR_SPD_NUM_RANKS_Type l_spd_dimm_ranks[2][2] = {
+ {fapi::ENUM_ATTR_SPD_NUM_RANKS_RX,
+ fapi::ENUM_ATTR_SPD_NUM_RANKS_RX},
+ {fapi::ENUM_ATTR_SPD_NUM_RANKS_RX,
+ fapi::ENUM_ATTR_SPD_NUM_RANKS_RX}
+ };
uint8_t l_mba_port;
uint8_t l_mba_dimm;
@@ -367,29 +372,37 @@ fapi::ReturnCode getMBvpdTermData(
l_fapirc = FAPI_ATTR_GET(ATTR_SPD_NUM_RANKS,
&l_target_dimm_array[l_dimm_index],
l_spd_dimm_ranks[l_mba_port][l_mba_dimm]);
+ if(l_fapirc)
+ {
+ FAPI_ERR("getMBvpdTermData: read of ATTR_SPD_NUM_RANKS failed");
+ break;
+ }
}
if(l_fapirc)
{
- FAPI_ERR("getMBvpdTermData: read of ATTR_SPD_NUM_RANKS failed");
break;
}
- uint8_t l_rankCopy = 0;
+ fapi::ATTR_SPD_NUM_RANKS_Type l_rankCopy =
+ fapi::ENUM_ATTR_SPD_NUM_RANKS_RX;
uint8_t l_dimmInvalid = 0;
- /* Mismatched rank numbers between the paired ports is an error that
- * should deconfigure the parent MBA so the data for that MBA should
- * never be fetched. The same is for mismatched slot 1 and slot 0
- * on the same port
+ bool l_double_drop = false;
+ /* Mismatched rank numbers between the paired ports is an error
+ * that should deconfigure the parent MBA so the data for that
+ * MBA should never be fetched. The same is for mismatched slot 1
+ * and slot 0 on the same port
*/
//single or double drop
- if(l_spd_dimm_ranks[0][1] == 0 && l_spd_dimm_ranks[1][1] == 0)
+ if( (l_spd_dimm_ranks[0][1] == fapi::ENUM_ATTR_SPD_NUM_RANKS_RX)
+ && (l_spd_dimm_ranks[1][1] == fapi::ENUM_ATTR_SPD_NUM_RANKS_RX) )
{
//if the two match, it's a valid case.
if(l_spd_dimm_ranks[0][0] == l_spd_dimm_ranks[1][0])
{
//0000, set to 1
- if(l_spd_dimm_ranks[0][0] == 0)
+ if(l_spd_dimm_ranks[0][0]
+ == fapi::ENUM_ATTR_SPD_NUM_RANKS_RX)
{
l_rankCopy = 1;
//throwing error for all empty
@@ -399,10 +412,14 @@ fapi::ReturnCode getMBvpdTermData(
const uint8_t DIMM_P1S0 = l_spd_dimm_ranks[1][0];
const uint8_t DIMM_P1S1 = l_spd_dimm_ranks[1][1];
FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_DIMMS_NOT_FOUND);
+ break;
//either 0101,0202,0404.
- }else
+ }
+ else
+ {
l_rankCopy = l_spd_dimm_ranks[0][0];
+ }
}else
{
//throwing error for invalid dimm combination
@@ -414,7 +431,8 @@ fapi::ReturnCode getMBvpdTermData(
l_spd_dimm_ranks[0][1] == l_spd_dimm_ranks[1][1])
{
//either 1111,2222,4444
- l_rankCopy = l_spd_dimm_ranks[0][0] + 4;
+ l_rankCopy = l_spd_dimm_ranks[0][0];
+ l_double_drop = true;
}else
{
//throwing error for invalid dimm combination
@@ -436,33 +454,35 @@ fapi::ReturnCode getMBvpdTermData(
fapi::MBvpdKeyword l_MT_Keyword = fapi::MBVPD_KEYWORD_T1;
switch (l_rankCopy)
{
- case 1:
- l_MT_Keyword = fapi::MBVPD_KEYWORD_T1;
- break;
- case 2:
- l_MT_Keyword = fapi::MBVPD_KEYWORD_T2;
- break;
- case 4:
- l_MT_Keyword = fapi::MBVPD_KEYWORD_T4;
- break;
- case 5:
- l_MT_Keyword = fapi::MBVPD_KEYWORD_T5;
+ case fapi::ENUM_ATTR_SPD_NUM_RANKS_R1:
+ if( l_double_drop ) {
+ l_MT_Keyword = fapi::MBVPD_KEYWORD_T5;
+ } else {
+ l_MT_Keyword = fapi::MBVPD_KEYWORD_T1;
+ }
break;
- case 6:
- l_MT_Keyword = fapi::MBVPD_KEYWORD_T6;
+ case fapi::ENUM_ATTR_SPD_NUM_RANKS_R2:
+ if( l_double_drop ) {
+ l_MT_Keyword = fapi::MBVPD_KEYWORD_T6;
+ } else {
+ l_MT_Keyword = fapi::MBVPD_KEYWORD_T2;
+ }
break;
- case 8:
- l_MT_Keyword = fapi::MBVPD_KEYWORD_T8;
+ case fapi::ENUM_ATTR_SPD_NUM_RANKS_R4:
+ if( l_double_drop ) {
+ l_MT_Keyword = fapi::MBVPD_KEYWORD_T8;
+ } else {
+ l_MT_Keyword = fapi::MBVPD_KEYWORD_T4;
+ }
break;
default:
- FAPI_ERR("Incorrect data from dimm ranks : 0x%02x",l_rankCopy);
+ FAPI_ERR("Invalid dimm rank : 0x%02x",l_rankCopy);
const uint8_t & RANK_NUM = l_rankCopy;
FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INVALID_MT_DATA);
break;
}
if(l_fapirc)
{
- FAPI_ERR("getMBvpdTermData: Invalid rank 0x%02x",l_rankCopy);
break;
}
@@ -471,20 +491,27 @@ fapi::ReturnCode getMBvpdTermData(
l_mbTarget,
reinterpret_cast<uint8_t *>(l_pMtBuffer),
l_MtBufsize);
+ if (l_fapirc)
+ {
+ FAPI_ERR("getMBvpdTermData: Read of Tx (%d) keyword failed",l_MT_Keyword);
+ break; // break out with fapirc
+ }
//else custom_dimm is 1 and we need to use the CDIMM
- }else{
+ }
+ else
+ {
l_fapirc = fapiGetMBvpdField(fapi::MBVPD_RECORD_VSPD,
fapi::MBVPD_KEYWORD_MT,
l_mbTarget,
reinterpret_cast<uint8_t *>(l_pMtBuffer),
l_MtBufsize);
+ if (l_fapirc)
+ {
+ FAPI_ERR("getMBvpdTermData: Read of MT keyword failed");
+ break; // break out with fapirc
+ }
}
- if (l_fapirc)
- {
- FAPI_ERR("getMBvpdTermData: Read of MT keyword failed");
- break; // break out with fapirc
- }
// Check that sufficient MT was returned.
if (l_MtBufsize < MT_KEYWORD_SIZE )
OpenPOWER on IntegriCloud