diff options
author | spashabk-in <shakeebbk@in.ibm.com> | 2017-05-03 03:27:08 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-07-04 02:11:03 -0400 |
commit | cab5852648c8b9cc7c4ec99b6048cfc7e9f1fe9b (patch) | |
tree | c72731cde0131b418a7ff6d223aea4404f5f9b78 /src/test/testcases/testUtil.py | |
parent | 9b263c83d108c238aaa2770a80fae1970b5d944a (diff) | |
download | talos-sbe-cab5852648c8b9cc7c4ec99b6048cfc7e9f1fe9b.tar.gz talos-sbe-cab5852648c8b9cc7c4ec99b6048cfc7e9f1fe9b.zip |
SBE internal FFDC over HOST interface
Change-Id: I015486d58293f447ddc93635b72aa12c76689f30
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35212
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/test/testcases/testUtil.py')
-rw-r--r-- | src/test/testcases/testUtil.py | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/test/testcases/testUtil.py b/src/test/testcases/testUtil.py index 5fd46307..3e78bd50 100644 --- a/src/test/testcases/testUtil.py +++ b/src/test/testcases/testUtil.py @@ -150,9 +150,13 @@ def readEntry(obj, address, size): return value -def extractHWPFFDC(dumpToFile = False): +def extractHWPFFDC(dumpToFile = False, readData = None): '''Header extraction''' - data = readDsEntryReturnVal() + if(readData != None): + data = readData[:4] + readData = readData[4:] + else: + data = readDsEntryReturnVal() magicBytes = ((data[0] << 8) | data[1]) if (magicBytes == 0xFFDC) : print ("\nMagic Bytes Match") @@ -161,13 +165,21 @@ def extractHWPFFDC(dumpToFile = False): packLen = ((data[2] << 8) | data[3]) print ("\nFFDC package length = " + str(packLen)) # extract Sequence ID, Command class and command - data = readDsEntryReturnVal() + if(readData != None): + data = readData[:4] + readData = readData[4:] + else: + data = readDsEntryReturnVal() seqId = ((data[0] << 24) | (data[1] << 16)) cmdClass = data[2] cmd = data[3] print ("\n SeqId ["+str(seqId)+"] CmdClass ["+str(cmdClass)+"] Cmd ["+str(cmd)+"]") - data = readDsEntryReturnVal() + if(readData != None): + data = readData[:4] + readData = readData[4:] + else: + data = readDsEntryReturnVal() fapiRc = ((data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]) print ("\nFAPI rc = " + str(hex(fapiRc))) @@ -175,12 +187,17 @@ def extractHWPFFDC(dumpToFile = False): myBin = open('hwp_ffdc.bin', 'wb') print ("\nwriting "+'hwp_ffdc.bin') for i in range(0, packLen-3): - data = readDsEntryReturnVal() + if(readData != None): + data = readData[:4] + readData = readData[4:] + else: + data = readDsEntryReturnVal() if(dumpToFile): myBin.write(bytearray(data)) if(dumpToFile): print("write to a file Done") myBin.close() + return readData def read(obj, address, size): """ Read from memory space """ |