summaryrefslogtreecommitdiffstats
path: root/src/usr/diag
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2014-12-18 01:13:58 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-01-16 13:43:35 -0600
commit7595946c1ffd602893ee85ec007a7e9c68217b70 (patch)
tree27691a85ee1ff802ef174f05f4e4de62a887c21c /src/usr/diag
parentf2680e6637e324f2619500a6870e7e23265319a4 (diff)
downloadtalos-hostboot-7595946c1ffd602893ee85ec007a7e9c68217b70.tar.gz
talos-hostboot-7595946c1ffd602893ee85ec007a7e9c68217b70.zip
PRD: Add test cases for PRD HBRT
Change-Id: I392129ddcd2e698bacbd806e5a232faa41addd6a RTC: 119788 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14966 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag')
-rw-r--r--src/usr/diag/prdf/runtime/test/makefile13
-rw-r--r--src/usr/diag/prdf/runtime/test/prdfTest_MbaSp.H59
-rwxr-xr-xsrc/usr/diag/prdf/test/makefile51
-rwxr-xr-xsrc/usr/diag/prdf/test/prdf_hb_common_test.mk81
4 files changed, 155 insertions, 49 deletions
diff --git a/src/usr/diag/prdf/runtime/test/makefile b/src/usr/diag/prdf/runtime/test/makefile
index 182d20ee1..0b09790c7 100644
--- a/src/usr/diag/prdf/runtime/test/makefile
+++ b/src/usr/diag/prdf/runtime/test/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2014
+# Contributors Listed Below - COPYRIGHT 2014,2015
# [+] International Business Machines Corp.
#
#
@@ -26,8 +26,17 @@
HOSTBOOT_RUNTIME = 1
ROOTPATH = ../../../../../..
MODULE = testprdf_rt
+VPATH += ../../test
-#TESTS = *.H
+#ROOTPATH must be defined before including prdf_hb_common_test.mk
+include ../../test/prdf_hb_common_test.mk
+
+EXTRAINCDIR += ${PRD_USR_PATH}/common/runtime
+
+#------------------------------------------------------------------------------
+# objects
+#------------------------------------------------------------------------------
+TESTS += prdfTest_MbaSp.H
include $(ROOTPATH)/config.mk
diff --git a/src/usr/diag/prdf/runtime/test/prdfTest_MbaSp.H b/src/usr/diag/prdf/runtime/test/prdfTest_MbaSp.H
new file mode 100644
index 000000000..9e1179d04
--- /dev/null
+++ b/src/usr/diag/prdf/runtime/test/prdfTest_MbaSp.H
@@ -0,0 +1,59 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/runtime/test/prdfTest_MbaSp.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __TEST_PRDFMBASPTEST_H
+#define __TEST_PRDFMBASPTEST_H
+
+#include <cxxtest/TestSuite.H>
+#include <errl/errlentry.H>
+#include <errl/errlmanager.H>
+#include <prdfTrace.H>
+#include <prdfMain.H>
+#include "prdfsimMacros.H"
+
+class MBAFIRSP:public CxxTest::TestSuite
+{
+ public:
+
+ void TestSpl(void)
+ {
+ PRDS_BEGIN("MBAFIR01 special attention");
+ PRDS_ERROR_ENTRY("NODE{0}:MEMBUF{4}", PRDF::SPECIAL);
+ PRDS_EXPECTED_SIGNATURE("NODE{0}:MEMBUF{4}:MBA{0}", 0x9e8b0001);
+ // GLOBAL_SP_FIR
+ PRDS_SCR_WRITE("NODE{0}:MEMBUF{4}", 0x570F001A, 0x1000000000000000);
+ // MEM_CHIPLET_SPA_FIR[0] Attention from MBAFIR01
+ PRDS_SCR_WRITE("NODE{0}:MEMBUF{4}", 0x03040004, 0x8000000000000000);
+ // set MBASPA
+ PRDS_SCR_WRITE("NODE{0}:MEMBUF{4}:MBA{0}", 0x03010611,
+ 0x4000000000000000);
+ PRDS_START_SIM();
+ if(!(PRDS_END()))
+ {
+ TS_FAIL("Expected Signature Failed MBAFIR01 "
+ "recoverable attention");
+ }
+ }
+};
+#endif
diff --git a/src/usr/diag/prdf/test/makefile b/src/usr/diag/prdf/test/makefile
index a55537a20..976a7a7c8 100755
--- a/src/usr/diag/prdf/test/makefile
+++ b/src/usr/diag/prdf/test/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2012,2014
+# Contributors Listed Below - COPYRIGHT 2012,2015
# [+] International Business Machines Corp.
#
#
@@ -27,64 +27,21 @@ ROOTPATH = ../../../../..
MODULE = testprdf
+#ROOTPATH must be defined before including prdf_hb_common_test.mk
+include prdf_hb_common_test.mk
+
#------------------------------------------------------------------------------
# paths
#------------------------------------------------------------------------------
PRD_USR_PATH = ${ROOTPATH}/src/usr/diag/prdf
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf/common
-EXTRAINCDIR += ${PRD_USR_PATH}
-EXTRAINCDIR += ${PRD_USR_PATH}/common
-EXTRAINCDIR += ${PRD_USR_PATH}/common/plugins
-EXTRAINCDIR += ${PRD_USR_PATH}/common/util
-EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/service
-EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/register
-EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/resolution
-EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/config
-EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/rule
-EXTRAINCDIR += ${PRD_USR_PATH}/common/plat
-EXTRAINCDIR += ${PRD_USR_PATH}/common/plat/pegasus
-EXTRAINCDIR += ${PRD_USR_PATH}/common/mnfgtools
-EXTRAINCDIR += ${PRD_USR_PATH}/mnfgtools
-EXTRAINCDIR += ${PRD_USR_PATH}/framework/service
-EXTRAINCDIR += ${PRD_USR_PATH}/test
-
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/errl
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/util
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
-
#------------------------------------------------------------------------------
# objects
#------------------------------------------------------------------------------
-
-OBJS += prdfsimHomRegisterAccess.o
-OBJS += prdfsimRasServices.o
-OBJS += prdfsimScrDataSet.o
-OBJS += prdfsimScrDB.o
-OBJS += prdfsimServices.o
-OBJS += prdsimSignatureParser.o
-OBJS += prdfsimUtil.o
OBJS += prdfsimMfgSync.o
OBJS += prdfsimFspSyncSvc.o
OBJS += prdfsimFspMfgThresholdFile.o
TESTS += prdfTest_MfgSync.H
-TESTS += prdfTest_ABus.H
-TESTS += prdfTest_Ex.H
-TESTS += prdfTest.H
-TESTS += prdfTest_Mba.H
-TESTS += prdfTest_Mcs.H
-TESTS += prdfTest_Proc.H
-TESTS += prdfTest_XBus.H
-TESTS += prdfTest_McsMciFir.H
-TESTS += prdfTest_ProcCentFir.H
-TESTS += prdfTest_ProcMbsFir.H
-TESTS += prdfTest_ProcTpLFir.H
-TESTS += prdfTest_CentCs.H
-TESTS += prdfTest_CenTpLFir.H
include ${ROOTPATH}/config.mk
diff --git a/src/usr/diag/prdf/test/prdf_hb_common_test.mk b/src/usr/diag/prdf/test/prdf_hb_common_test.mk
new file mode 100755
index 000000000..0d068bb48
--- /dev/null
+++ b/src/usr/diag/prdf/test/prdf_hb_common_test.mk
@@ -0,0 +1,81 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/diag/prdf/test/prdf_hb_common_test.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2012,2015
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+
+#------------------------------------------------------------------------------
+# paths
+#------------------------------------------------------------------------------
+PRD_USR_PATH = ${ROOTPATH}/src/usr/diag/prdf
+PRD_USR_TEST_PATH = ${ROOTPATH}/src/usr/diag/prdf/test
+
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf/common
+EXTRAINCDIR += ${PRD_USR_PATH}
+EXTRAINCDIR += ${PRD_USR_PATH}/common
+EXTRAINCDIR += ${PRD_USR_PATH}/common/plugins
+EXTRAINCDIR += ${PRD_USR_PATH}/common/util
+EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/service
+EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/register
+EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/resolution
+EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/config
+EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/rule
+EXTRAINCDIR += ${PRD_USR_PATH}/common/plat
+EXTRAINCDIR += ${PRD_USR_PATH}/common/plat/pegasus
+EXTRAINCDIR += ${PRD_USR_PATH}/common/mnfgtools
+EXTRAINCDIR += ${PRD_USR_PATH}/mnfgtools
+EXTRAINCDIR += ${PRD_USR_PATH}/framework/service
+EXTRAINCDIR += ${PRD_USR_PATH}/test
+
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/errl
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/util
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
+
+#------------------------------------------------------------------------------
+# objects
+#------------------------------------------------------------------------------
+
+OBJS += prdfsimHomRegisterAccess.o
+OBJS += prdfsimRasServices.o
+OBJS += prdfsimScrDataSet.o
+OBJS += prdfsimScrDB.o
+OBJS += prdfsimServices.o
+OBJS += prdsimSignatureParser.o
+OBJS += prdfsimUtil.o
+
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_ABus.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_Ex.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_Mba.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_Mcs.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_Proc.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_XBus.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_McsMciFir.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_ProcCentFir.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_ProcMbsFir.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_ProcTpLFir.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_CentCs.H
+TESTS += ${PRD_USR_TEST_PATH}/prdfTest_CenTpLFir.H
OpenPOWER on IntegriCloud