From ae6df59506b64974d5fb330d2800370a3e93c0b0 Mon Sep 17 00:00:00 2001 From: "Sunil.Kumar" Date: Tue, 26 Jul 2016 08:36:33 -0500 Subject: RTC 128326 SBE : SBE ChipOps : Generic Messages : Get SBE FFDC Change-Id: I034a43f67244a6f5e50c54b10f8bd4e013c6076a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27610 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: RAJA DAS Reviewed-by: Sachin Gupta Reviewed-by: AMIT J. TENDOLKAR --- src/test/testcases/testGeneric.xml | 5 +++++ src/test/testcases/testGetCapabilities.py | 3 ++- src/test/testcases/testSbeDump.py | 26 ++++++++++++-------------- 3 files changed, 19 insertions(+), 15 deletions(-) (limited to 'src/test') diff --git a/src/test/testcases/testGeneric.xml b/src/test/testcases/testGeneric.xml index 85ce990a..7609f707 100755 --- a/src/test/testcases/testGeneric.xml +++ b/src/test/testcases/testGeneric.xml @@ -6,6 +6,7 @@ + @@ -28,3 +29,7 @@ run-python-file targets/p9_nimbus/sbeTest/testGetCapabilities.py yes + + run-python-file targets/p9_nimbus/sbeTest/testSbeDump.py + yes + diff --git a/src/test/testcases/testGetCapabilities.py b/src/test/testcases/testGetCapabilities.py index 4a61d761..006d17c2 100755 --- a/src/test/testcases/testGetCapabilities.py +++ b/src/test/testcases/testGetCapabilities.py @@ -6,6 +6,7 @@ # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2015,2016 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,7 +48,7 @@ EXPDATA2 = [0xa4,0x0,0x0,0x0f, #GetMemPba/PutMemPba/GetSramOcc/PutSramOcc 0xa7,0x0,0x0,0x1, # control Instruction 0x00,0x0,0x0,0x0]; -EXPDATA3 = [0xa8,0x0,0x0,0x02, #getcapability +EXPDATA3 = [0xa8,0x0,0x0,0x03, #getcapability/getSbeFFDC 0x0,0x0,0x0,0x0, 0xc0,0xde,0xa8,0x02, 0x0,0x0,0x0,0x0, diff --git a/src/test/testcases/testSbeDump.py b/src/test/testcases/testSbeDump.py index 7d7a7d77..184a70e8 100644 --- a/src/test/testcases/testSbeDump.py +++ b/src/test/testcases/testSbeDump.py @@ -6,6 +6,7 @@ # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2016 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,11 +28,12 @@ import testUtil err = False #from testWrite import * -TESTDATA = [0, 0, 0, 3, - 0, 0, 0xA1, 0x01, - 0, 0x02, 0x00, 0x2] +TESTDATA = [0, 0, 0, 2, + 0, 0, 0xA8, 0x01] -EXPDATA = [0xc0, 0xde, 0xa1, 0x01] +EXPDATA = [0xc0, 0xde, 0xa8, 0x01, + 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x3] # MAIN Test Run Starts Here... #------------------------------------------------- @@ -39,15 +41,7 @@ def main(): testUtil.runCycles(10000000) testUtil.writeUsFifo(TESTDATA) testUtil.writeEot() - testUtil.readDsFifo(EXPDATA) - #flush out primary and secondary status - data = testUtil.readDsEntryReturnVal() - - #flush hwp ffdc - data = testUtil.readDsEntryReturnVal() - data = testUtil.readDsEntryReturnVal() - #start processing sbe ffdc data = testUtil.readDsEntryReturnVal() magicBytes = ((data[0] << 8) | data[1]) if (magicBytes == 0xFFDC) : @@ -94,8 +88,12 @@ def main(): myBin.write(bytearray(data)) print("write to a file Done") myBin.close() - #flush out distance - data = testUtil.readDsEntryReturnVal() + + #Read the Exp data + print ("Read the Expected data") + testUtil.readDsFifo( EXPDATA ) + testUtil.readEot( ) + #------------------------------------------------- # Calling all test code #------------------------------------------------- -- cgit v1.2.1