summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/fapiTestHwpDq.C
diff options
context:
space:
mode:
authorTerry J. Opie <opiet@us.ibm.com>2012-04-25 11:39:05 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-06-18 16:38:55 -0500
commite9de3b17d17a3c230ae9db3ed7d4139950cd4963 (patch)
treed71fec7cbd502e07d94c64590cff1401c9f3b155 /src/usr/hwpf/hwp/fapiTestHwpDq.C
parente14f34f3648159c2fd5d62900ee5568ca2b78af3 (diff)
downloadtalos-hostboot-e9de3b17d17a3c230ae9db3ed7d4139950cd4963.tar.gz
talos-hostboot-e9de3b17d17a3c230ae9db3ed7d4139950cd4963.zip
Preload PNOR VPD correctly
- Handle Venice, Murano, Tuleta - Change SPD code to use VPD_REC_NUM attribute - Modify FAPI/HWPF tests to use present DIMM targets Change-Id: I2348a2da90ea85a966f3724f8b3694a0b8f03916 RTC: 40774 Depends-on: I7d1b41c9f9e87baa9d42b78bf4351e3b6d774cb5 RTC: 39133 Depends-on: Ia0f22c87f8bc3959324fa8347e191f2b47b4325c RTC: 35835 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/950 Tested-by: Jenkins Server Reviewed-by: ADAM R. MUHLE <armuhle@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.C86
1 files changed, 62 insertions, 24 deletions
diff --git a/src/usr/hwpf/hwp/fapiTestHwpDq.C b/src/usr/hwpf/hwp/fapiTestHwpDq.C
index d3de5e1eb..746a30a6e 100644
--- a/src/usr/hwpf/hwp/fapiTestHwpDq.C
+++ b/src/usr/hwpf/hwp/fapiTestHwpDq.C
@@ -1,25 +1,26 @@
-// 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
+/* 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
+ */
/**
* @file fapiTestHwpDq.C
*
@@ -31,6 +32,7 @@
* Flag Defect/Feature User Date Description
* ------ -------------- ---------- ----------- ----------------------------
* mjjones 02/21/2012 Created
+ * mjjones 06/14/2012 Test functional DIMM
*/
#include <fapiTestHwpDq.H>
@@ -62,8 +64,44 @@ fapi::ReturnCode fapiTestHwpDq(const fapi::Target & i_mba)
FAPI_INF("fapiTestHwpDq: Got expected error from dimmGetBadDqBitmap");
l_rc = fapi::FAPI_RC_SUCCESS;
- // Get the bad DQ Bitmap for port1, dimm0, rank3
- l_rc = dimmGetBadDqBitmap(i_mba, 1, 0, 3, l_dqBitmap);
+ // Get associated functional DIMMs
+ std::vector<fapi::Target> l_dimms;
+ l_rc = fapiGetAssociatedDimms(i_mba, l_dimms);
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiTestHwpDq: Error from fapiGetAssociatedDimms");
+ break;
+ }
+
+ if (l_dimms.size() == 0)
+ {
+ FAPI_ERR("fapiTestHwpDq: Did not find any functional DIMMs, skipping");
+ break;
+ }
+
+ // Get the first DIMM's port and dimm number
+ uint8_t l_port = 0;
+ uint8_t l_dimm = 0;
+
+ l_rc = FAPI_ATTR_GET(ATTR_MBA_PORT, &(l_dimms[0]), l_port);
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiTestHwpDq: Error getting ATTR_MBA_PORT");
+ break;
+ }
+
+ l_rc = FAPI_ATTR_GET(ATTR_MBA_DIMM, &(l_dimms[0]), l_dimm);
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiTestHwpDq: Error getting ATTR_MBA_DIMM");
+ 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)
{
OpenPOWER on IntegriCloud