summaryrefslogtreecommitdiffstats
path: root/src/usr/lpc/test
diff options
context:
space:
mode:
authorBill Hoffa <wghoffa@us.ibm.com>2017-06-16 17:11:20 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-18 15:50:35 -0400
commit54a3bfc6323e7231580da74bcd965988d3e780af (patch)
tree78b037f38f1400ce71187a7e0bf3184bb61da9bc /src/usr/lpc/test
parent9511dde54f55257edd1c47ff709742638c21fbe8 (diff)
downloadblackbird-hostboot-54a3bfc6323e7231580da74bcd965988d3e780af.tar.gz
blackbird-hostboot-54a3bfc6323e7231580da74bcd965988d3e780af.zip
Add support for LPC error detection and recovery
Change-Id: Iea9bd4425aeb798acd85484402c627fb623cae94 Also-By: Matt Ploetz <maploetz@us.ibm.com> RTC: 133649 RTC: 134582 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45397 Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/lpc/test')
-rw-r--r--src/usr/lpc/test/lpcddtest.H68
1 files changed, 67 insertions, 1 deletions
diff --git a/src/usr/lpc/test/lpcddtest.H b/src/usr/lpc/test/lpcddtest.H
index 0883f83e7..2e7395451 100644
--- a/src/usr/lpc/test/lpcddtest.H
+++ b/src/usr/lpc/test/lpcddtest.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -222,6 +222,72 @@ class LpcDdTest : public CxxTest::TestSuite
TS_FAIL("LpcDD::test_hwfail> No error from bad address");
}
}
+
+
+ /**
+ * @brief LPC HW Failure
+ * Test handling of invalid address
+ * This address has to be within the range to pass checkAddr, but
+ * not actaully a valid LPC address.
+ */
+ void _test_invalidAddress(void)
+ {
+ TRACFCOMP( g_trac_lpc, "LpcDdTest::test_invalidAddress>" );
+ errlHndl_t l_err = NULL;
+
+ TARGETING::Target* sentinel =
+ TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL;
+ size_t opsize = 4;
+ uint8_t data[12];
+
+ // pass a bad address
+ l_err = deviceRead( sentinel,
+ data,
+ opsize,
+ DEVICE_LPC_ADDRESS(LPC::TRANS_ABS,0xDEADBEEF) );
+ if( l_err )
+ {
+ delete l_err;
+ }
+ else
+ {
+ TS_FAIL("LpcDD::test_invalidAddress> No error from invalid address test");
+ }
+ }
+
+ /**
+ * @brief LPC HW Failure
+ * Test handling of invalid address
+ * This address has to be within the range to pass checkAddr, but
+ * not actaully a valid LPC address.
+ */
+ void _test_invalidTransferSize(void)
+ {
+ TRACFCOMP( g_trac_lpc, "LpcDdTest::test_invalidTransferSize>" );
+ errlHndl_t l_err = NULL;
+
+ TARGETING::Target* sentinel =
+ TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL;
+ size_t opsize = 4;
+ uint8_t data[12];
+
+ // pass a bad address
+ l_err = deviceRead( sentinel,
+ data,
+ opsize,
+ DEVICE_LPC_ADDRESS(LPC::TRANS_ABS,0x12345678) );
+ if( l_err )
+ {
+ delete l_err;
+ }
+ else
+ {
+ TS_FAIL("LpcDD::test_invalidTransferSize> No error from invalid transfer size test");
+ }
+ }
+
+
+
};
#endif
OpenPOWER on IntegriCloud