diff options
author | Shakeeb <shakeebbk@in.ibm.com> | 2016-08-17 01:58:47 -0500 |
---|---|---|
committer | AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com> | 2016-09-02 07:58:32 -0400 |
commit | ba7f9cc584351b770de629d4493712840a18ba9d (patch) | |
tree | 34c4b0a12efb423837cb0135ac777c8831784dbc /src/test/testcases/testUtil.py | |
parent | 185dabde31e9d83443da2222babbd0f547fb227e (diff) | |
download | talos-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/testcases/testUtil.py')
-rw-r--r-- | src/test/testcases/testUtil.py | 26 |
1 files changed, 26 insertions, 0 deletions
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") |