summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorShakeeb <shakeebbk@in.ibm.com>2016-08-17 01:58:47 -0500
committerAMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>2016-09-02 07:58:32 -0400
commitba7f9cc584351b770de629d4493712840a18ba9d (patch)
tree34c4b0a12efb423837cb0135ac777c8831784dbc /src/test
parent185dabde31e9d83443da2222babbd0f547fb227e (diff)
downloadtalos-sbe-ba7f9cc584351b770de629d4493712840a18ba9d.tar.gz
talos-sbe-ba7f9cc584351b770de629d4493712840a18ba9d.zip
SBE HWP FFDC support
Change-Id: I2a578bbd0661c64f4ef1d3703b162327c9c9a036 RTC:129076 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28448 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/testcases/testCntlInstruction.py60
-rw-r--r--src/test/testcases/testUtil.py26
2 files changed, 74 insertions, 12 deletions
diff --git a/src/test/testcases/testCntlInstruction.py b/src/test/testcases/testCntlInstruction.py
index f3143e70..b30ff49c 100644
--- a/src/test/testcases/testCntlInstruction.py
+++ b/src/test/testcases/testCntlInstruction.py
@@ -254,22 +254,13 @@ INST_EXPDATA_ERR = [0xc0,0xde,0xa7,0x01,
0x00,0x00,0x00,0x03]
STOP_INST_EXPDATA_ERR_WTH_FFDC = [0xc0,0xde,0xa7,0x01,
- 0x00,0xFE,0x00,0x0A,
- 0xFF,0xDC,0x00,0x02,
- 0x00,0xCE,0xBC,0xB2,
- 0x00,0x00,0x00,0x05]
+ 0x00,0xFE,0x00,0x0A]
START_INST_EXPDATA_ERR_WTH_FFDC = [0xc0,0xde,0xa7,0x01,
- 0x00,0xFE,0x00,0x0A,
- 0xFF,0xDC,0x00,0x02,
- 0x00,0x25,0x64,0xDB,
- 0x00,0x00,0x00,0x05]
+ 0x00,0xFE,0x00,0x0A]
STEP_INST_EXPDATA_ERR_WTH_FFDC = [0xc0,0xde,0xa7,0x01,
- 0x00,0xFE,0x00,0x0A,
- 0xFF,0xDC,0x00,0x02,
- 0x00,0x0D,0x06,0x8E,
- 0x00,0x00,0x00,0x05]
+ 0x00,0xFE,0x00,0x0A]
# MAIN Test Run Starts Here...
#-------------------------------------------------
@@ -301,18 +292,30 @@ def main( ):
testUtil.writeUsFifo( INST_STOP_0_0_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STOP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_STOP_0_1_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STOP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_STOP_0_2_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STOP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_STOP_0_3_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STOP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
#stop all thread in core0
@@ -323,6 +326,9 @@ def main( ):
testUtil.writeUsFifo( INST_STOP0_ALL_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STOP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
# Control Instruction Message - Start
@@ -346,18 +352,30 @@ def main( ):
testUtil.writeUsFifo( INST_START_0_0_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( START_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_START_0_1_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( START_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_START_0_2_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( START_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_START_0_3_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( START_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
#start all thread in core0
@@ -368,6 +386,9 @@ def main( ):
testUtil.writeUsFifo( INST_START0_ALL_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( START_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
# Control Instruction Message - Step
@@ -390,18 +411,30 @@ def main( ):
testUtil.writeUsFifo( INST_STEP_0_0_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STEP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_STEP_0_1_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STEP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_STEP_0_2_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STEP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
testUtil.writeUsFifo( INST_STEP_0_3_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STEP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
#step all thread in core0
@@ -412,6 +445,9 @@ def main( ):
testUtil.writeUsFifo( INST_STEP0_ALL_TESTDATA_WITHOUT_WARN_FLG )
testUtil.writeEot( )
testUtil.readDsFifo( STEP_INST_EXPDATA_ERR_WTH_FFDC )
+ testUtil.extractHWPFFDC( )
+ #flush out distance
+ testUtil.readDsEntryReturnVal()
testUtil.readEot( )
# Control Instruction Message - Sreset
diff --git a/src/test/testcases/testUtil.py b/src/test/testcases/testUtil.py
index 2312d2b7..b92fda60 100644
--- a/src/test/testcases/testUtil.py
+++ b/src/test/testcases/testUtil.py
@@ -147,6 +147,32 @@ def readEntry(obj, address, size):
return value
+def extractHWPFFDC(dumpToFile = False):
+ '''Header extraction'''
+ data = readDsEntryReturnVal()
+ magicBytes = ((data[0] << 8) | data[1])
+ if (magicBytes == 0xFFDC) :
+ print ("\nMagic Bytes Match")
+ else :
+ raise Exception('data mistmach')
+ packLen = ((data[2] << 8) | data[3])
+ print ("\nFFDC package length = " + str(packLen))
+
+ data = readDsEntryReturnVal()
+ fapiRc = ((data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3])
+ print ("\nFAPI rc = " + str(hex(fapiRc)))
+
+ if(dumpToFile):
+ myBin = open('trace.bin', 'wb')
+ print ("\nwriting "+'trace.bin')
+ for i in range(0, packLen-2):
+ data = readDsEntryReturnVal()
+ if(dumpToFile):
+ myBin.write(bytearray(data))
+ if(dumpToFile):
+ print("write to a file Done")
+ myBin.close()
+
def read(obj, address, size):
""" Read from memory space """
iface = SIM_get_interface(obj, "memory_space")
OpenPOWER on IntegriCloud