summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/fapiTestHwpDq.C
diff options
context:
space:
mode:
authorElliott Dahle <dedahle@us.ibm.com>2013-07-22 11:07:23 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-30 14:44:28 -0500
commit9319829a92387bc15ab63a5a90710a518e43a453 (patch)
tree3d3818c368d9cc78ad77f832c7e6a8cc94176d98 /src/usr/hwpf/hwp/fapiTestHwpDq.C
parentc600aad20e783024b998a52d17d9d4650b9005a0 (diff)
downloadtalos-hostboot-9319829a92387bc15ab63a5a90710a518e43a453.tar.gz
talos-hostboot-9319829a92387bc15ab63a5a90710a518e43a453.zip
Access Bad DQ via ATTR_BAD_DQ_BITMAP and show unconnected DQs
Change-Id: Id703749de7c08aef337904a2dccac3af2e90a108 RTC: 72937 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5510 Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Tested-by: Jenkins Server Reviewed-by: William H. Schwartz <whs@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/fapiTestHwpDq.C')
-rw-r--r--src/usr/hwpf/hwp/fapiTestHwpDq.C104
1 files changed, 53 insertions, 51 deletions
diff --git a/src/usr/hwpf/hwp/fapiTestHwpDq.C b/src/usr/hwpf/hwp/fapiTestHwpDq.C
index 9ea23ec89..6fadbe27d 100644
--- a/src/usr/hwpf/hwp/fapiTestHwpDq.C
+++ b/src/usr/hwpf/hwp/fapiTestHwpDq.C
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/usr/hwpf/hwp/fapiTestHwpDq.C $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/fapiTestHwpDq.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file fapiTestHwpDq.C
*
@@ -102,48 +101,51 @@ fapi::ReturnCode fapiTestHwpDq(const fapi::Target & i_mba)
break;
}
- // Get the bad DQ Bitmap for the DIMM, rank 3
- l_rc = dimmGetBadDqBitmap(i_mba, l_port, l_dimm, 3, l_dqBitmap);
-
- if (l_rc)
+ // Get the bad DQ Bitmap for all ranks and print any non-zero data
+ uint8_t l_rank = 0;
+ for (l_rank = 0; l_rank < 3; l_rank++)
{
- FAPI_ERR("fapiTestHwpDq: Error from dimmGetBadDqBitmap");
- break;
- }
-
- // If the data is not all zeroes then skip the rest of the test, do not
- // want to modify any real Bad DQ records
- bool l_nonZeroData = false;
+ // Get the bad DQ Bitmap for the rank
+ l_rc = dimmGetBadDqBitmap(i_mba, l_port, l_dimm, l_rank,
+ l_dqBitmap);
- for (uint8_t i = 0; i < DIMM_DQ_RANK_BITMAP_SIZE; i++)
- {
- if (l_dqBitmap[i] != 0)
+ if (l_rc)
{
- FAPI_INF("fapiTestHwpDq: Non-zero DQ data, skipping test");
- l_nonZeroData = true;
+ FAPI_ERR("fapiTestHwpDq: Error from dimmGetBadDqBitmap");
break;
}
+
+ // Trace any bad DQs
+ for (uint8_t i = 0; i < DIMM_DQ_RANK_BITMAP_SIZE; i++)
+ {
+ if (l_dqBitmap[i] != 0)
+ {
+ FAPI_INF("fapiTestHwpDq: Non-zero DQ data. Rank:%d, Byte:%d, Val:0x02%x",
+ l_rank, i, l_dqBitmap[i]);
+ }
+ }
}
- if (l_nonZeroData)
+ if (l_rc)
{
break;
}
+ // Record the two bytes of the bad DQ bitmap that this function
+ // will change so that it can be restored
+ uint8_t l_origDq2 = l_dqBitmap[2];
+ uint8_t l_origDq6 = l_dqBitmap[6];
+
// Set 2 bad DQ bits
l_dqBitmap[2] = 0x40;
l_dqBitmap[6] = 0x20;
- // Set the bad DQ Bitmap
- l_rc = dimmSetBadDqBitmap(i_mba, 1, 0, 3, l_dqBitmap);
+ // Set the bad DQ Bitmap for the last rank
+ l_rc = dimmSetBadDqBitmap(i_mba, l_port, l_dimm, l_rank, l_dqBitmap);
if (l_rc)
{
FAPI_ERR("fapiTestHwpDq: Error from dimmSetBadDqBitmap");
-
- // TODO
- FAPI_ERR("fapiTestHwpDq: Waiting for SPD DD support for writes (story 35766)");
- l_rc = fapi::FAPI_RC_SUCCESS;
break;
}
@@ -151,7 +153,7 @@ fapi::ReturnCode fapiTestHwpDq(const fapi::Target & i_mba)
l_dqBitmap[2] = 0;
l_dqBitmap[6] = 0;
- l_rc = dimmGetBadDqBitmap(i_mba, 1, 0, 3, l_dqBitmap);
+ l_rc = dimmGetBadDqBitmap(i_mba, l_port, l_dimm, l_rank, l_dqBitmap);
if (l_rc)
{
@@ -169,11 +171,11 @@ fapi::ReturnCode fapiTestHwpDq(const fapi::Target & i_mba)
break;
}
- // Write the data back to zero
- l_dqBitmap[2] = 0;
- l_dqBitmap[6] = 0;
+ // Write the original data back
+ l_dqBitmap[2] = l_origDq2;
+ l_dqBitmap[6] = l_origDq6;
- l_rc = dimmSetBadDqBitmap(i_mba, 1, 0, 3, l_dqBitmap);
+ l_rc = dimmSetBadDqBitmap(i_mba, l_port, l_dimm, l_rank, l_dqBitmap);
if (l_rc)
{
OpenPOWER on IntegriCloud