summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2/test
diff options
context:
space:
mode:
authorVitaly Marin <mvitaly@us.ibm.com>2016-08-28 15:52:35 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-09-18 13:13:11 -0400
commit83efa306d8460f901459b936c341781633c7b507 (patch)
tree86a6b613687f1cbc8e44947dbb42e41aad9084e9 /src/usr/fapi2/test
parentebeb735ad3227137996822e03cf1108b549b8b69 (diff)
downloadtalos-hostboot-83efa306d8460f901459b936c341781633c7b507.tar.gz
talos-hostboot-83efa306d8460f901459b936c341781633c7b507.zip
Added support for 'Put Ring from Image' command on HB for SBE
Change-Id: I4930633f87bdb61acb19e01f17a8006277f7868d RTC:132654 CMVC-Prereq: 1004971 CMVC-Prereq: 1005024 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28887 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Vitaly Marin <mvitaly@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/test')
-rw-r--r--src/usr/fapi2/test/fapi2HwAccessTest.H21
-rw-r--r--src/usr/fapi2/test/p9_hwtests.C24
-rw-r--r--src/usr/fapi2/test/p9_hwtests.H2
3 files changed, 44 insertions, 3 deletions
diff --git a/src/usr/fapi2/test/fapi2HwAccessTest.H b/src/usr/fapi2/test/fapi2HwAccessTest.H
index 0773ced18..c113f5d18 100644
--- a/src/usr/fapi2/test/fapi2HwAccessTest.H
+++ b/src/usr/fapi2/test/fapi2HwAccessTest.H
@@ -159,6 +159,25 @@ void test_fapi2HwAccess()
// a false negative on the next case (future?)
}
+
+// this test should only be run before HOSTBOOT runtime
+// otherwise it will trigger false positive test result
+
+#ifndef __HOSTBOOT_RUNTIME
+
+ //this test should not be run at runtime
+ numTests++;
+ FAPI_INVOKE_HWP(l_errl, p9_platPutRingWRingID_pass);
+ if(l_errl)
+ {
+ TS_FAIL("Error from p9_platPutRingWRingID_pass !!");
+ numFails++;
+ errlCommit(l_errl,FAPI2_COMP_ID);
+ delete l_errl; // delete unexpected error log so we dont get
+ // a false negative on the next case
+ }
+#endif
+
numTests++;
FAPI_INVOKE_HWP(l_errl, p9_ringtest_getring_fail, fapi2_procTarget);
if(l_errl != NULL)
@@ -171,7 +190,6 @@ void test_fapi2HwAccess()
numFails++;
}
-
numTests++;
FAPI_INVOKE_HWP(l_errl, p9_opmodetest_getsetopmode);
if(l_errl)
@@ -255,7 +273,6 @@ void test_fapi2HwAccess()
}while(0);
FAPI_INF("fapi2HwAccessTest Test Complete. %d/%d fails", numFails , numTests);
-
}
};
diff --git a/src/usr/fapi2/test/p9_hwtests.C b/src/usr/fapi2/test/p9_hwtests.C
index e157092ea..fedf8582f 100644
--- a/src/usr/fapi2/test/p9_hwtests.C
+++ b/src/usr/fapi2/test/p9_hwtests.C
@@ -298,11 +298,33 @@ fapi2::ReturnCode p9_ringtest_modring_pass(
fapi_try_exit:
FAPI_INF("Exiting p9_ringtest_modring_pass...");
-
return fapi2::current_err;
}
+fapi2::ReturnCode p9_platPutRingWRingID_pass()
+{
+ //every test is displayed this way via FAPI_INF
+ FAPI_INF("Entering p9_platPutRingWRingID_pass ...");
+ // get the master proc
+ TARGETING::Target * l_procTest;
+ TARGETING::targetService().masterProcChipTargetHandle( l_procTest);
+ fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ l_fapi2CpuTarget((l_procTest));
+
+ fapi2::ReturnCode l_status =
+ fapi2::putRing(l_fapi2CpuTarget, ob0_fure,
+ fapi2::RING_MODE_SET_PULSE_NO_OPCG_COND);
+
+ if(l_status!= fapi2::FAPI2_RC_SUCCESS)
+ {
+ TS_FAIL("p9_platPutRingWRingID_pass>> proc test - failed");
+ }
+
+ return l_status;
+}
+
+
fapi2::ReturnCode p9_opmodetest_getsetopmode()
{
FAPI_INF("Ensure that getOpMode return NORMAL initially");
diff --git a/src/usr/fapi2/test/p9_hwtests.H b/src/usr/fapi2/test/p9_hwtests.H
index 06727b9d2..cdafe1b06 100644
--- a/src/usr/fapi2/test/p9_hwtests.H
+++ b/src/usr/fapi2/test/p9_hwtests.H
@@ -74,6 +74,8 @@ fapi2::ReturnCode p9_cfamtest_putcfam_pass(
fapi2::ReturnCode p9_opmodetest_getsetopmode();
+fapi2::ReturnCode p9_platPutRingWRingID_pass();
+
fapi2::ReturnCode p9_opmodetest_ignorehwerr(
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
uint8_t fail);
OpenPOWER on IntegriCloud