From 01030a212c0793d0f8c84c8ff187fe7db0e07df7 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Date: Thu, 15 Nov 2018 00:20:34 -0600 Subject: AXONE Bringup CI Change-Id: I611879498fe0b728547209716cecf6d940a9a820 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72837 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: RAJA DAS --- customrc | 2 +- src/sbefw/core/pk_app_cfg.h | 2 +- src/sbefw/core/sbecmdprocessor.C | 2 +- src/test/framework/autocitest | 11 +- src/test/framework/build-script | 56 +++++---- src/test/framework/create-sandbox | 36 +++--- src/test/framework/populate-sandbox | 37 +++++- src/test/framework/setup-env | 5 +- src/test/testcases/testAbort.py | 24 ++-- src/test/testcases/testAduMem_124B.py | 25 ++-- src/test/testcases/testAduMem_ecc.py | 25 ++-- src/test/testcases/testAduMem_itag.py | 25 ++-- src/test/testcases/testAduMem_noEccNoItag.py | 25 ++-- src/test/testcases/testAduMem_withEccItag.py | 25 ++-- .../testAduMem_withEccWithItagReadWrite.py | 27 +++-- src/test/testcases/testAxone.simics | 126 +++++++++++++++++++++ src/test/testcases/testCntlInstruction.py | 27 +++-- src/test/testcases/testContinueMpipl.py | 25 ++-- src/test/testcases/testContinueSbeBoot.py | 25 ++-- src/test/testcases/testEnterMpipl.py | 25 ++-- src/test/testcases/testExecutorCntrlTimer.py | 24 ++-- src/test/testcases/testExecutorMemory.py | 17 ++- src/test/testcases/testExecutorPSU.py | 17 ++- src/test/testcases/testExecutorPutRing.py | 24 ++-- src/test/testcases/testExecutorStopTimer.py | 24 ++-- src/test/testcases/testFastArray.py | 26 +++-- src/test/testcases/testFifoReset.py | 28 +++-- src/test/testcases/testFlushNVDIMM.py | 24 +++- src/test/testcases/testGetCapabilities.py | 28 +++-- src/test/testcases/testGetMem.py | 25 ++-- src/test/testcases/testGetMem_expdata.py | 25 ++-- src/test/testcases/testGetRing.py | 25 ++-- src/test/testcases/testHostFFDC.py | 25 ++-- src/test/testcases/testIstepAuto.py | 33 +++++- src/test/testcases/testIstepInvalid.py | 25 ++-- src/test/testcases/testIstepInvalidFenced.py | 25 ++-- src/test/testcases/testIstepSuccess.py | 25 ++-- src/test/testcases/testMatchStashPair.py | 26 +++-- src/test/testcases/testMemPBA.py | 25 ++-- src/test/testcases/testMemUtil.py | 3 +- src/test/testcases/testPSUGetCapabilities.py | 23 +++- src/test/testcases/testPSUReadSbeMem.py | 25 ++-- src/test/testcases/testPSUSetFFDCAddr.py | 25 ++-- src/test/testcases/testPSUSetStashPair.py | 26 +++-- src/test/testcases/testPSUUtil.py | 8 +- src/test/testcases/testPsuHostPassThrough.py | 25 ++-- src/test/testcases/testPutGetRegFpr.py | 25 ++-- src/test/testcases/testPutGetRegGpr.py | 26 +++-- src/test/testcases/testPutGetRegSpr.py | 25 ++-- src/test/testcases/testPutMem_fail.py | 25 ++-- src/test/testcases/testQuiesce.py | 25 ++-- src/test/testcases/testRunTillSbeBooted.py | 10 +- src/test/testcases/testSbeDump.py | 29 +++-- src/test/testcases/testScomUtil.py | 4 +- src/test/testcases/testSecurity.py | 34 ++++-- src/test/testcases/testSecurityListDump.py | 23 +++- src/test/testcases/testSram.py | 25 ++-- src/test/testcases/testStartInstruction.py | 25 ++-- src/test/testcases/testStopClocks.py | 27 +++-- src/test/testcases/testStopInstruction.py | 25 ++-- src/test/testcases/testSuspendIO.py | 26 +++-- src/test/testcases/testSystemFabricMap.py | 24 ++-- src/test/testcases/testTraceArray.py | 24 ++-- src/test/testcases/testUnsecureMemRegions.py | 25 ++-- src/test/testcases/testUtil.py | 23 +++- src/tools/debug/simics-debug-framework.py | 116 ++++++++++++------- src/tools/debug/simics/sbe_startupAxone.simics | 53 +++++++++ src/tools/trace/ppe2fsp.c | 2 +- 68 files changed, 1334 insertions(+), 448 deletions(-) create mode 100644 src/test/testcases/testAxone.simics create mode 100644 src/tools/debug/simics/sbe_startupAxone.simics diff --git a/customrc b/customrc index 8386ee77..40abef8c 100755 --- a/customrc +++ b/customrc @@ -35,4 +35,4 @@ export SANDBOXNAME=test_sb export MACHINE=NIMBUS export BACKING_BUILD=/esw/fips940/Builds/b0405a_1915.940 export SIMICSOPTIONS="-nre" - +export SIMICS_TAR=/gsa/ausgsa/projects/s/simics_published_builds/p10/973eb447cf3b9e7abbc173783d81ab25e3ff998a/ diff --git a/src/sbefw/core/pk_app_cfg.h b/src/sbefw/core/pk_app_cfg.h index 9557fed5..aedafdd0 100644 --- a/src/sbefw/core/pk_app_cfg.h +++ b/src/sbefw/core/pk_app_cfg.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/sbefw/core/sbecmdprocessor.C b/src/sbefw/core/sbecmdprocessor.C index 2d4e77b0..7e3fe7bb 100644 --- a/src/sbefw/core/sbecmdprocessor.C +++ b/src/sbefw/core/sbecmdprocessor.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/test/framework/autocitest b/src/test/framework/autocitest index a57486b8..7930b5f9 100755 --- a/src/test/framework/autocitest +++ b/src/test/framework/autocitest @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -91,7 +91,14 @@ then fi fi -execute_in_sandbox "run-fsp-it $NOWIN --machine $MACHINE $SBE_TEST_XML" "ppc" || exit -1 +if [ "$MACHINE_TYPE" = "NIMBUS" ]; then + execute_in_sandbox "run-fsp-it $NOWIN --machine $MACHINE_TYPE $SBE_TEST_XML" "ppc" || exit -1 +elif [ "$MACHINE_TYPE" = "AXONE" ]; then + curDir=`pwd` + cd $SANDBOXBASE/simics/ + ./runsim -m axone sbe_script_to_run=$SBETESTDIRAXONE/sbe_startupAxone.simics sbe_scripts_path=$SBETESTDIRAXONE sbe_ci=TRUE sbe_ci_script=$SBETESTDIRAXONE/testAxone.simics || exit -1 + cd $curDir +fi exit 0 diff --git a/src/test/framework/build-script b/src/test/framework/build-script index 35c4d5fa..579a8364 100755 --- a/src/test/framework/build-script +++ b/src/test/framework/build-script @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2018 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -41,32 +41,38 @@ source "$SBEROOT/src/test/framework/setup-env" # Build SEEPROM Image bash -c "make install -j" || exit -1 -# Create simics sandbox. -create-sandbox > create-sandbox.log 2>&1 & -CREATESANDBOX_PID=$! +while read -d ':' p; do -# Check sandbox create completion. -wait $CREATESANDBOX_PID -if [ $? -eq 0 ]; then - cat create-sandbox.log -else - echo "----Sandbox creation failed." - cat create-sandbox.log - exit -1 -fi + export MACHINE_TYPE="$p" + echo "Setting up test simics for machine: '$MACHINE_TYPE'" + + # Create simics sandbox. + create-sandbox > create-sandbox.log 2>&1 & + CREATESANDBOX_PID=$! + + # Check sandbox create completion. + wait $CREATESANDBOX_PID + if [ $? -eq 0 ]; then + cat create-sandbox.log + else + echo "----Sandbox creation failed." + cat create-sandbox.log + exit -1 + fi -# Add SBE files to simics sandbox. -populate-sandbox || exit -1 + # Add SBE files to simics sandbox. + populate-sandbox || exit -1 -sbetest-start.sh || exit -1 + sbetest-start.sh || exit -1 -# Check copyright completion. -#wait $COPYRIGHT_PID -#if [ $? -eq 0 ]; then -# cat copyright.log -#else -# echo "----Copyright check failed." -# cat copyright.log -# exit -1 -#fi + # Check copyright completion. + #wait $COPYRIGHT_PID + #if [ $? -eq 0 ]; then + # cat copyright.log + #else + # echo "----Copyright check failed." + # cat copyright.log + # exit -1 + #fi +done <<< "$MACHINE:" diff --git a/src/test/framework/create-sandbox b/src/test/framework/create-sandbox index 0ddf74a5..78caa74c 100755 --- a/src/test/framework/create-sandbox +++ b/src/test/framework/create-sandbox @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2017 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -53,22 +53,24 @@ export sb=$SANDBOXBASE/src execute_in_sandbox "ecc --inject ${SBE_IMG_OUT_LOC}/sbe_seeprom.bin --output ${SBE_IMG_OUT_LOC}/sbe_seeprom.bin.ecc --p8 " "ppc" || exit -1 -# Run presimsetup workarounds. -echo "----Running presimsetup workarounds." -if [ -f ${CITESTPATH}/etc/workarounds.presimsetup ]; -then - ${CITESTPATH}/etc/workarounds.presimsetup || exit -1 -fi +echo $MACHINE_TYPE +if [ "$MACHINE_TYPE" = "NIMBUS" ]; then + # Run presimsetup workarounds. + echo "----Running presimsetup workarounds." + if [ -f ${CITESTPATH}/etc/workarounds.presimsetup ]; + then + ${CITESTPATH}/etc/workarounds.presimsetup || exit -1 + fi -# Run start_simics to populate simics directories. -echo "----Setting up simics." -execute_in_sandbox "start_simics -no_start -machine $MACHINE -batch_mode" \ - "ppc" || exit -1 + # Run start_simics to populate simics directories. + echo "----Setting up simics." + execute_in_sandbox "start_simics -no_start -machine $MACHINE_TYPE -batch_mode" \ + "ppc" || exit -1 -# Run postsimsetup workarounds. -echo "----Running postsimsetup workarounds." -if [ -f ${CITESTPATH}/etc/workarounds.postsimsetup ]; -then - ${CITESTPATH}/etc/workarounds.postsimsetup || exit -1 + # Run postsimsetup workarounds. + echo "----Running postsimsetup workarounds." + if [ -f ${CITESTPATH}/etc/workarounds.postsimsetup ]; + then + ${CITESTPATH}/etc/workarounds.postsimsetup || exit -1 + fi fi - diff --git a/src/test/framework/populate-sandbox b/src/test/framework/populate-sandbox index f765d8fc..8fc16243 100755 --- a/src/test/framework/populate-sandbox +++ b/src/test/framework/populate-sandbox @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2018 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -57,4 +57,37 @@ execute_in_sandbox "cd $SBEFW_DIR; mk install_all" \ # Copy test files. -cp -r $SBEROOT/src/test/testcases/* $SBETESTDIR/ || exit -1 +if [ "$MACHINE_TYPE" = "NIMBUS" ]; then + + cp -r $SBEROOT/src/test/testcases/* $SBETESTDIR/ || exit -1 + +elif [ "$MACHINE_TYPE" = "AXONE" ]; then + + echo "Untar simics.tar.gz into the sandbox" + tar -xf $SIMICS_TAR/simics.tar.gz -C $SANDBOXBASE/simics/ || exit -1 + + echo "Create the test directory for axone" + mkdir -p $SANDBOXBASE/simics/targets/p9_axone/sbeTest/ || exit -1 + + echo "Copy binary to simics workspace" + cp $SANDBOXBASE/images/ppc/lab/flash/sbe_seeprom_p9a_10.bin.ecc $SBEROMDIRAXONE/ || exit -1 + + echo "Copy engd (scandef.abr) from backing build" + cp $BACKING_BUILD/obj/ppc/simu/data/cec-chip/scandef.abr $SANDBOXBASE/simics/import/cec-chip/scandef.abr || exit -1 + + echo "Copy test files." + cp $SANDBOXBASE/obj/ppc/simu/scripts/sbfw/* $SBETESTDIRAXONE/ || exit -1 + cp $SBEROOT/src/import/chips/p9/security/p9_security_white_black_list.csv $SBETESTDIRAXONE/ || exit -1 + cp $SBEROOT/src/build/security/securityRegListGen.py $SBETESTDIRAXONE/ || exit -1 + cp $SBEROOT/src/tools/debug/simics/sbe_startupAxone.simics $SBETESTDIRAXONE/ || exit -1 + cp $SBEROOT/src/test/testcases/testAxone.simics $SBETESTDIRAXONE/ || exit -1 + + echo "Copy fsp-trace" + execute_in_sandbox "which fsp-trace > $SBETESTDIRAXONE/.fsp_trace_path" "ppc" || exit -1 + fsp_trace_path=`cat $SBETESTDIRAXONE/.fsp_trace_path` || exit -1 + rm $SBETESTDIRAXONE/.fsp_trace_path || exit -1 + cp $fsp_trace_path $SBETESTDIRAXONE || exit -1 + + echo "Install simics" + $SANDBOXBASE/simics/INSTALL.sh || exit -1 +fi diff --git a/src/test/framework/setup-env b/src/test/framework/setup-env index 69b05c40..c2dba1d0 100755 --- a/src/test/framework/setup-env +++ b/src/test/framework/setup-env @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2016 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -75,8 +75,11 @@ export -f execute_in_sandbox # Setup machine type. export MACHINE=${MACHINE:-$DEFAULT_MACHINE} +export MACHINE=$MACHINE:AXONE export SBETESTDIR=$SANDBOXBASE/simics/targets/p9_nimbus/sbeTest +export SBETESTDIRAXONE=$SANDBOXBASE/simics/targets/p9_axone/sbeTest/ +export SBEROMDIRAXONE=$SANDBOXBASE/simics/import/boot_roms/ export SBEFW_DIR=$SANDBOXBASE/src/sbei/sbfw/ export SBEFW_IMG_DIR=$SANDBOXBASE/src/sbei/sbfw/img export AUTOSIM_FFDC_XML=$SBETESTDIR/ffdc.xml diff --git a/src/test/testcases/testAbort.py b/src/test/testcases/testAbort.py index 6c5ccdfc..eeaceb9c 100755 --- a/src/test/testcases/testAbort.py +++ b/src/test/testcases/testAbort.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -47,12 +48,21 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); \ No newline at end of file diff --git a/src/test/testcases/testAduMem_124B.py b/src/test/testcases/testAduMem_124B.py index f89c05fd..91a193c5 100644 --- a/src/test/testcases/testAduMem_124B.py +++ b/src/test/testcases/testAduMem_124B.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # @@ -26,6 +26,7 @@ import sys import os import struct sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil as testMemProcUtil err = False @@ -62,12 +63,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testAduMem_ecc.py b/src/test/testcases/testAduMem_ecc.py index bcd03645..c427bc9a 100644 --- a/src/test/testcases/testAduMem_ecc.py +++ b/src/test/testcases/testAduMem_ecc.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil as testMemProcUtil err = False @@ -68,12 +69,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testAduMem_itag.py b/src/test/testcases/testAduMem_itag.py index 1b5be988..1172ef94 100644 --- a/src/test/testcases/testAduMem_itag.py +++ b/src/test/testcases/testAduMem_itag.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil as testMemProcUtil err = False @@ -79,12 +80,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testAduMem_noEccNoItag.py b/src/test/testcases/testAduMem_noEccNoItag.py index 2d54334c..b4350561 100644 --- a/src/test/testcases/testAduMem_noEccNoItag.py +++ b/src/test/testcases/testAduMem_noEccNoItag.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -26,6 +26,7 @@ import sys import os import struct sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil as testMemProcUtil err = False @@ -81,12 +82,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testAduMem_withEccItag.py b/src/test/testcases/testAduMem_withEccItag.py index 5a04f484..27740483 100644 --- a/src/test/testcases/testAduMem_withEccItag.py +++ b/src/test/testcases/testAduMem_withEccItag.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil as testMemProcUtil err = False @@ -67,12 +68,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testAduMem_withEccWithItagReadWrite.py b/src/test/testcases/testAduMem_withEccWithItagReadWrite.py index c5c4f307..c821cf2b 100644 --- a/src/test/testcases/testAduMem_withEccWithItagReadWrite.py +++ b/src/test/testcases/testAduMem_withEccWithItagReadWrite.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -86,12 +87,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() - -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testAxone.simics b/src/test/testcases/testAxone.simics new file mode 100644 index 00000000..38d7f848 --- /dev/null +++ b/src/test/testcases/testAxone.simics @@ -0,0 +1,126 @@ +backplane0.proc0.pib_cmp.pib_psu->tppsu_tpbr_interrupt_msg_available=[NIL] + +echo "*******************Run testRunTillSbeBooted.py************************" + +run-python-file targets/p9_axone/sbeTest/testRunTillSbeBooted.py + +echo "*******************Run testPSUSetStashPair.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testPSUSetStashPair.py + +echo "*******************Run testIstep.xml*******************" + +sbe-istep 2.2 5.1 + +run-python-file targets/p9_axone/sbeTest/testMatchStashPair.py + +run-python-file targets/p9_axone/sbeTest/testIstepInvalid.py + +run-python-file targets/p9_axone/sbeTest/testIstepInvalidFenced.py + +echo "*******************Run testSuspendIO.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testSuspendIO.py + +echo "*******************Run testGeneric.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testGetCapabilities.py + +run-python-file targets/p9_axone/sbeTest/testSbeDump.py + +run-python-file targets/p9_axone/sbeTest/testHostFFDC.py + +run-python-file targets/p9_axone/sbeTest/testPSUReadSbeMem.py + +echo "*******************Run testUnsecureMemRegions.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testUnsecureMemRegions.py + +echo "*******************Run testPutGetMem.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testMemPBA.py + +run-python-file targets/p9_axone/sbeTest/testPsuHostPassThrough.py + +echo "*******************Run testAduMem.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testAduMem_ecc.py + +run-python-file targets/p9_axone/sbeTest/testAduMem_itag.py + +run-python-file targets/p9_axone/sbeTest/testAduMem_withEccItag.py + +run-python-file targets/p9_axone/sbeTest/testAduMem_noEccNoItag.py + +run-python-file targets/p9_axone/sbeTest/testAduMem_124B.py + +echo "*******************Run testPSUSetFFDCAddr.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testPSUSetFFDCAddr.py + +echo "*******************Run testPSUGetCapabilities.py*******************" + +run-python-file targets/p9_axone/sbeTest/testPSUGetCapabilities.py + +echo "*******************Run testSram.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testSram.py + +echo "*******************Run istep 5.2*******************" +sbe-istep 5 2 + +echo "*******************Run testRegAccess.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testStopInstruction.py + +run-python-file targets/p9_axone/sbeTest/testPutGetRegGpr.py + +run-python-file targets/p9_axone/sbeTest/testPutGetRegFpr.py + +run-python-file targets/p9_axone/sbeTest/testPutGetRegSpr.py + +run-python-file targets/p9_axone/sbeTest/testStartInstruction.py + +echo "*******************Run testFifoReset.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testFifoReset.py + +run-python-file targets/p9_axone/sbeTest/testIstepInvalidFenced.py + +echo "*******************Run testSystemFabricMap.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testSystemFabricMap.py + +echo "*******************Run testExecutorCntrlTimer.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testExecutorCntrlTimer.py + +run-python-file targets/p9_axone/sbeTest/testExecutorStopTimer.py + +echo "*******************Run testSecurity.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testSecurity.py + +echo "*******************Run testStopClocks.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testStopClocks.py + +echo "*******************Run testGetRing.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testGetRing.py + +echo "*******************Run testExecutorPutRing.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testExecutorPutRing.py + +echo "*******************Run testFastAccess.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testFastArray.py + +echo "*******************Run testQuiesce.xml*******************" + +run-python-file targets/p9_axone/sbeTest/testQuiesce.py + +echo "*******************Run sbe-trace*******************" + +sbe-trace 0 diff --git a/src/test/testcases/testCntlInstruction.py b/src/test/testcases/testCntlInstruction.py index c6bacede..1ac0cf4b 100644 --- a/src/test/testcases/testCntlInstruction.py +++ b/src/test/testcases/testCntlInstruction.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -499,12 +500,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() - -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testContinueMpipl.py b/src/test/testcases/testContinueMpipl.py index bb79d0e2..3257811e 100755 --- a/src/test/testcases/testContinueMpipl.py +++ b/src/test/testcases/testContinueMpipl.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -47,12 +48,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testContinueSbeBoot.py b/src/test/testcases/testContinueSbeBoot.py index 532ece01..84de959b 100755 --- a/src/test/testcases/testContinueSbeBoot.py +++ b/src/test/testcases/testContinueSbeBoot.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -47,12 +48,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testEnterMpipl.py b/src/test/testcases/testEnterMpipl.py index c4907945..f5598887 100755 --- a/src/test/testcases/testEnterMpipl.py +++ b/src/test/testcases/testEnterMpipl.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -47,12 +48,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testExecutorCntrlTimer.py b/src/test/testcases/testExecutorCntrlTimer.py index fae474d7..96e6809d 100644 --- a/src/test/testcases/testExecutorCntrlTimer.py +++ b/src/test/testcases/testExecutorCntrlTimer.py @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -134,12 +134,22 @@ def main(): if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testExecutorMemory.py b/src/test/testcases/testExecutorMemory.py index 8bd1dab7..aec0375e 100644 --- a/src/test/testcases/testExecutorMemory.py +++ b/src/test/testcases/testExecutorMemory.py @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -39,6 +39,9 @@ import testClass as testObj import testRegistry as reg +sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) +import testUtil #------------------------------- # This is a Test Expected Data @@ -77,5 +80,15 @@ def main(): print "\n" if __name__=="__main__": - main() + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) + else: + main() diff --git a/src/test/testcases/testExecutorPSU.py b/src/test/testcases/testExecutorPSU.py index b201f4b6..c01287b4 100644 --- a/src/test/testcases/testExecutorPSU.py +++ b/src/test/testcases/testExecutorPSU.py @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -39,6 +39,9 @@ import testPSUUtil import testRegistry as reg +sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) +import testUtil #------------------------------- # This is a Test Expected Data @@ -137,5 +140,15 @@ def main(): print "\n" if __name__=="__main__": - main() + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) + else: + main() diff --git a/src/test/testcases/testExecutorPutRing.py b/src/test/testcases/testExecutorPutRing.py index db5f8769..4585d7f5 100644 --- a/src/test/testcases/testExecutorPutRing.py +++ b/src/test/testcases/testExecutorPutRing.py @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -217,12 +217,22 @@ def main(): regObj.ExecuteTestOp( testPSUUtil.simSbeObj, host_test_data_failure5 ) if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testExecutorStopTimer.py b/src/test/testcases/testExecutorStopTimer.py index 9d0b1384..1cc62053 100644 --- a/src/test/testcases/testExecutorStopTimer.py +++ b/src/test/testcases/testExecutorStopTimer.py @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -136,12 +136,22 @@ def main(): raise Exception('Timer Not cancelled '); if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testFastArray.py b/src/test/testcases/testFastArray.py index 69c062e6..dbba1baa 100644 --- a/src/test/testcases/testFastArray.py +++ b/src/test/testcases/testFastArray.py @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -70,11 +72,21 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testFifoReset.py b/src/test/testcases/testFifoReset.py index a9596738..28c99287 100644 --- a/src/test/testcases/testFifoReset.py +++ b/src/test/testcases/testFifoReset.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest") +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -70,12 +71,25 @@ def main(): raise print("\nTest completed with no errors") -main() +#------------------------------------------------- +# Calling all test code +#------------------------------------------------- +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testFlushNVDIMM.py b/src/test/testcases/testFlushNVDIMM.py index 3350bd77..a7d6ca17 100755 --- a/src/test/testcases/testFlushNVDIMM.py +++ b/src/test/testcases/testFlushNVDIMM.py @@ -6,6 +6,7 @@ # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2017,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,6 +25,7 @@ import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -47,12 +49,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testGetCapabilities.py b/src/test/testcases/testGetCapabilities.py index 5fd8491e..51b5c780 100755 --- a/src/test/testcases/testGetCapabilities.py +++ b/src/test/testcases/testGetCapabilities.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2018 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -61,9 +62,6 @@ EXPDATA3 = [0xa8,0x0,0x0,0x03, #getcapability/getSbeFFDC/quiesce #------------------------------------------------- def main( ): ( rc, out ) = quiet_run_command( "sbe-ddlevel 0", output_modes.regular ) - if(rc == "DD1"): - print "Not running Get Capabilities on DD1" - return testUtil.runCycles( 10000000 ) testUtil.writeUsFifo( TESTDATA ) testUtil.writeEot( ) @@ -78,12 +76,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testGetMem.py b/src/test/testcases/testGetMem.py index 8f9b7563..535a10f4 100644 --- a/src/test/testcases/testGetMem.py +++ b/src/test/testcases/testGetMem.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -64,12 +65,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testGetMem_expdata.py b/src/test/testcases/testGetMem_expdata.py index 890042ac..f0c5214a 100644 --- a/src/test/testcases/testGetMem_expdata.py +++ b/src/test/testcases/testGetMem_expdata.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -73,12 +74,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testGetRing.py b/src/test/testcases/testGetRing.py index e241fd54..ca8da56d 100644 --- a/src/test/testcases/testGetRing.py +++ b/src/test/testcases/testGetRing.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -59,12 +60,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testHostFFDC.py b/src/test/testcases/testHostFFDC.py index 60c61e24..af5ec676 100644 --- a/src/test/testcases/testHostFFDC.py +++ b/src/test/testcases/testHostFFDC.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # @@ -25,6 +25,7 @@ import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testPSUUtil import testRegistry as reg import testUtil @@ -151,12 +152,22 @@ def main(): readData = testUtil.extractHWPFFDC(True, readData) if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) - else: + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + else: + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testIstepAuto.py b/src/test/testcases/testIstepAuto.py index 1d2cda07..d68d2135 100755 --- a/src/test/testcases/testIstepAuto.py +++ b/src/test/testcases/testIstepAuto.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -26,8 +26,32 @@ import sys import copy from sim_commands import * import imp + err = False -testUtil = imp.load_source("testUtil", os.environ['SBE_TOOLS_PATH'] + "/testUtil.py") + +def getMachineName(): + try: + sbeScriptsPath = simenv.sbe_scripts_path + macineType = "axone" + except: + macineType = "nimbus" + finally: + return macineType + +def collectFFDC(): + if getMachineName() == "axone": + simics.SIM_run_command('sbe-trace 0') + simics.SIM_run_command('sbe-stack 0') + simics.SIM_run_command('sbe-regffdc 0') + simics.SIM_run_command('backplane0.proc0.pib_cmp.sbe_ppe->ppe_state') + simics.SIM_run_command('backplane0.proc0.cfam_cmp.sbe_fifo->upstream_hw_fifo') + simics.SIM_run_command('backplane0.proc0.cfam_cmp.sbe_fifo->downstream_hw_fifo') + +if getMachineName() == "axone": + SBE_TOOLS_PATH = simenv.sbe_scripts_path +else: + SBE_TOOLS_PATH = os.environ['SBE_TOOLS_PATH'] +testUtil = imp.load_source("testUtil", SBE_TOOLS_PATH + "/testUtil.py") EXPDATA = [0xc0,0xde,0xa1,0x01, 0x0,0x0,0x0,0x0, 0x00,0x0,0x0,0x03]; @@ -88,11 +112,14 @@ def sbe_istep_func( inum1, inum2, node=0, isfleetwood=0): testUtil.runCycles( 10000000 ) testUtil.writeUsFifo( TESTDATA, node, isfleetwood ) testUtil.writeEot( node, isfleetwood ) + testUtil.runCycles( 10000 ) testUtil.readDsFifo( EXPDATA, node, isfleetwood ) + testUtil.runCycles( 10000 ) testUtil.readEot( node, isfleetwood ) except: print ("\nTest completed with error(s). Raise error") + collectFFDC() # TODO via RTC 142706 # Currently simics commands created using hooks always return # success. Need to check from simics command a way to return @@ -102,3 +129,5 @@ def sbe_istep_func( inum1, inum2, node=0, isfleetwood=0): print ("\nTest completed with no errors") #sys.exit(0); + + diff --git a/src/test/testcases/testIstepInvalid.py b/src/test/testcases/testIstepInvalid.py index f735ea3e..3123ee03 100755 --- a/src/test/testcases/testIstepInvalid.py +++ b/src/test/testcases/testIstepInvalid.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2016 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -48,12 +49,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testIstepInvalidFenced.py b/src/test/testcases/testIstepInvalidFenced.py index 57a9bdf7..b5c0b795 100755 --- a/src/test/testcases/testIstepInvalidFenced.py +++ b/src/test/testcases/testIstepInvalidFenced.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2016 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -48,12 +49,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testIstepSuccess.py b/src/test/testcases/testIstepSuccess.py index 6c98f9d8..28ffccab 100755 --- a/src/test/testcases/testIstepSuccess.py +++ b/src/test/testcases/testIstepSuccess.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -47,12 +48,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testMatchStashPair.py b/src/test/testcases/testMatchStashPair.py index 95606266..d8c0f686 100644 --- a/src/test/testcases/testMatchStashPair.py +++ b/src/test/testcases/testMatchStashPair.py @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil err = False @@ -53,12 +55,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testMemPBA.py b/src/test/testcases/testMemPBA.py index dc52bc38..e57bb6df 100644 --- a/src/test/testcases/testMemPBA.py +++ b/src/test/testcases/testMemPBA.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil err = False @@ -124,12 +125,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testMemUtil.py b/src/test/testcases/testMemUtil.py index b73a5f39..b7d02c2d 100644 --- a/src/test/testcases/testMemUtil.py +++ b/src/test/testcases/testMemUtil.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017,2018 +# Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # @@ -26,6 +26,7 @@ import sys import os import struct sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testPSUUtil import testRegistry as reg import testUtil diff --git a/src/test/testcases/testPSUGetCapabilities.py b/src/test/testcases/testPSUGetCapabilities.py index 922eb80e..456ae306 100644 --- a/src/test/testcases/testPSUGetCapabilities.py +++ b/src/test/testcases/testPSUGetCapabilities.py @@ -27,6 +27,7 @@ import sys import os import struct sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testPSUUtil import testRegistry as reg import testUtil @@ -149,10 +150,20 @@ def main(): raise Exception('data mistmach') if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testPSUReadSbeMem.py b/src/test/testcases/testPSUReadSbeMem.py index a91fbc48..4f53a24e 100644 --- a/src/test/testcases/testPSUReadSbeMem.py +++ b/src/test/testcases/testPSUReadSbeMem.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # @@ -25,6 +25,7 @@ import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testPSUUtil import testRegistry as reg import testUtil @@ -147,12 +148,22 @@ def main(): print "SUCCESS: read seeprom offset not aligned" if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testPSUSetFFDCAddr.py b/src/test/testcases/testPSUSetFFDCAddr.py index 5e0a3bc4..5e64c6c6 100644 --- a/src/test/testcases/testPSUSetFFDCAddr.py +++ b/src/test/testcases/testPSUSetFFDCAddr.py @@ -6,7 +6,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -101,12 +102,22 @@ def main(): regObj.ExecuteTestOp( testPSUUtil.simSbeObj, host_test_data_success ) if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testPSUSetStashPair.py b/src/test/testcases/testPSUSetStashPair.py index 378b101c..24918f55 100644 --- a/src/test/testcases/testPSUSetStashPair.py +++ b/src/test/testcases/testPSUSetStashPair.py @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,6 +27,7 @@ import sys import os import struct sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testPSUUtil import testRegistry as reg import testUtil @@ -265,12 +267,22 @@ def main(): testUtil.runCycles( 10000000 ); if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testPSUUtil.py b/src/test/testcases/testPSUUtil.py index 553f5ca1..0255b38f 100644 --- a/src/test/testcases/testPSUUtil.py +++ b/src/test/testcases/testPSUUtil.py @@ -6,7 +6,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -58,8 +58,10 @@ FAILURE = 0 ''' This is a simulator obj mapped. Refer simics folks if new objects are needed. ''' -simSbeObj = conf.p9Proc0.sbe.scom_space -simHostObj = conf.p9Proc0.p9_mem_map.host_xscom_device_mm +if testUtil.getMachineName() == "axone": + simSbeObj = conf.backplane0.proc0.pib_cmp.sbe_scom_space +else: + simSbeObj = conf.p9Proc0.sbe.scom_space simMemObj = conf.system_cmp0.phys_mem ''' diff --git a/src/test/testcases/testPsuHostPassThrough.py b/src/test/testcases/testPsuHostPassThrough.py index d63bd212..6fa3126f 100644 --- a/src/test/testcases/testPsuHostPassThrough.py +++ b/src/test/testcases/testPsuHostPassThrough.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # @@ -25,6 +25,7 @@ import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testPSUUtil import testRegistry as reg import testUtil @@ -133,12 +134,22 @@ def main(): print ("Success - Wrote an invalid size which failed") if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testPutGetRegFpr.py b/src/test/testcases/testPutGetRegFpr.py index 95444633..cf1a4c84 100755 --- a/src/test/testcases/testPutGetRegFpr.py +++ b/src/test/testcases/testPutGetRegFpr.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -71,12 +72,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testPutGetRegGpr.py b/src/test/testcases/testPutGetRegGpr.py index 6a0463a0..7fa24669 100755 --- a/src/test/testcases/testPutGetRegGpr.py +++ b/src/test/testcases/testPutGetRegGpr.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -62,6 +63,7 @@ def main( ): testUtil.writeUsFifo( PUTREG_TESTDATA ) testUtil.writeEot( ) testUtil.readDsFifo( PUTREG_EXPDATA ) + testUtil.runCycles( 10000000 ) testUtil.readEot( ) testUtil.writeUsFifo( GETREG_TESTDATA ) testUtil.writeEot( ) @@ -71,12 +73,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testPutGetRegSpr.py b/src/test/testcases/testPutGetRegSpr.py index 5b77d297..2b4f793c 100755 --- a/src/test/testcases/testPutGetRegSpr.py +++ b/src/test/testcases/testPutGetRegSpr.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -71,12 +72,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testPutMem_fail.py b/src/test/testcases/testPutMem_fail.py index f683a9c8..762b64ac 100644 --- a/src/test/testcases/testPutMem_fail.py +++ b/src/test/testcases/testPutMem_fail.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -74,12 +75,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testQuiesce.py b/src/test/testcases/testQuiesce.py index c6e6c987..5353d40e 100755 --- a/src/test/testcases/testQuiesce.py +++ b/src/test/testcases/testQuiesce.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2018 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil err = False @@ -51,12 +52,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testRunTillSbeBooted.py b/src/test/testcases/testRunTillSbeBooted.py index 0e5898e4..16b7a475 100644 --- a/src/test/testcases/testRunTillSbeBooted.py +++ b/src/test/testcases/testRunTillSbeBooted.py @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2018 +# Contributors Listed Below - COPYRIGHT 2018,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,13 +25,18 @@ import os import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False import testScomUtil from sim_commands import * -lbus = conf.p9Proc0.proc_lbus_map + +if testUtil.getMachineName() == "axone": + lbus = conf.backplane0.proc0.cfam_cmp.lbus_map +else: + lbus = conf.p9Proc0.proc_lbus_map while True: try: diff --git a/src/test/testcases/testSbeDump.py b/src/test/testcases/testSbeDump.py index f4f472a2..8e92f07d 100644 --- a/src/test/testcases/testSbeDump.py +++ b/src/test/testcases/testSbeDump.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest") +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False import testScomUtil @@ -42,7 +43,7 @@ def main(): testUtil.runCycles(10000000) # Generate FSPI rc - testScomUtil.getscom(0x0A000000, [0x00, 0xFE, 0x00, 0x11], True) + testScomUtil.getscom(0x0A000027, [0x00, 0xFE, 0x00, 0x11], True) testUtil.writeUsFifo(TESTDATA) testUtil.writeEot() @@ -120,12 +121,22 @@ def main(): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() - -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testScomUtil.py b/src/test/testcases/testScomUtil.py index 23b20005..7e56e572 100644 --- a/src/test/testcases/testScomUtil.py +++ b/src/test/testcases/testScomUtil.py @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,7 @@ import sys import os import struct sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False diff --git a/src/test/testcases/testSecurity.py b/src/test/testcases/testSecurity.py index 770ef012..d4e3efaf 100644 --- a/src/test/testcases/testSecurity.py +++ b/src/test/testcases/testSecurity.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017,2018 +# Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # @@ -25,10 +25,20 @@ import os import sys import struct +sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) +import testUtil import testScomUtil -SECURITY_FILE = "../../src/import/chips/p9/security/p9_security_white_black_list.csv" -SECURITY_SCRIPT = "../../src/build/security/securityRegListGen.py" +#SECURITY_FILE = "../../src/import/chips/p9/security/p9_security_white_black_list.csv" +#SECURITY_SCRIPT = "../../src/build/security/securityRegListGen.py" + +if testUtil.getMachineName() == "axone": + SECURITY_FILE = "targets/p9_axone/sbeTest/p9_security_white_black_list.csv" + SECURITY_SCRIPT = "targets/p9_axone/sbeTest/securityRegListGen.py" +else: + SECURITY_FILE = "../../src/import/chips/p9/security/p9_security_white_black_list.csv" + SECURITY_SCRIPT = "../../src/build/security/securityRegListGen.py" def getlist(cmd): os.system("python "+SECURITY_SCRIPT+" "+cmd+" -f "+SECURITY_FILE+" > temp") @@ -253,9 +263,19 @@ def binary_search(item, list, first, last, isMap = False): # Calling all test code #------------------------------------------------- if __name__=="__main__": - main() + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() - if err: - print ("\nTest Suite completed with error(s)") + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") + main() + + if err: + print ("\nTest Suite completed with error(s)") + else: + print ("\nTest Suite completed with no errors") diff --git a/src/test/testcases/testSecurityListDump.py b/src/test/testcases/testSecurityListDump.py index fb529b5a..78d3eda3 100644 --- a/src/test/testcases/testSecurityListDump.py +++ b/src/test/testcases/testSecurityListDump.py @@ -6,6 +6,7 @@ # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -92,12 +93,22 @@ def main(): if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testSram.py b/src/test/testcases/testSram.py index 8e775127..0ec9c018 100644 --- a/src/test/testcases/testSram.py +++ b/src/test/testcases/testSram.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -25,6 +25,7 @@ import sys import os sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -160,12 +161,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testStartInstruction.py b/src/test/testcases/testStartInstruction.py index 5150a13d..e2c5e1c2 100644 --- a/src/test/testcases/testStartInstruction.py +++ b/src/test/testcases/testStartInstruction.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -54,12 +55,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testStopClocks.py b/src/test/testcases/testStopClocks.py index 6d665010..5df9cb91 100644 --- a/src/test/testcases/testStopClocks.py +++ b/src/test/testcases/testStopClocks.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -127,12 +128,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() - -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testStopInstruction.py b/src/test/testcases/testStopInstruction.py index 0ee8e177..37c77900 100644 --- a/src/test/testcases/testStopInstruction.py +++ b/src/test/testcases/testStopInstruction.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,7 @@ # IBM_PROLOG_END_TAG import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False #from testWrite import * @@ -54,12 +55,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testSuspendIO.py b/src/test/testcases/testSuspendIO.py index 2d30b44d..09d1250b 100755 --- a/src/test/testcases/testSuspendIO.py +++ b/src/test/testcases/testSuspendIO.py @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017 +# Contributors Listed Below - COPYRIGHT 2017,2019 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,6 +25,7 @@ import sys sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil err = False @@ -47,12 +49,22 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testSystemFabricMap.py b/src/test/testcases/testSystemFabricMap.py index 56163c02..d97105fe 100644 --- a/src/test/testcases/testSystemFabricMap.py +++ b/src/test/testcases/testSystemFabricMap.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -94,12 +94,22 @@ def main(): if __name__ == "__main__": - main() - if err: - print ( "\nTest Suite completed with error(s)" ) - #sys.exit(1) + if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() + + print ( "\nTest Suite completed with no errors" ) else: - print ( "\nTest Suite completed with no errors" ) - #sys.exit(0); + main() + if err: + print ( "\nTest Suite completed with error(s)" ) + #sys.exit(1) + else: + print ( "\nTest Suite completed with no errors" ) + #sys.exit(0); diff --git a/src/test/testcases/testTraceArray.py b/src/test/testcases/testTraceArray.py index eb6c67d7..030719e4 100644 --- a/src/test/testcases/testTraceArray.py +++ b/src/test/testcases/testTraceArray.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -89,11 +89,21 @@ def main( ): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testUnsecureMemRegions.py b/src/test/testcases/testUnsecureMemRegions.py index a3c19cd7..a0b0d21f 100644 --- a/src/test/testcases/testUnsecureMemRegions.py +++ b/src/test/testcases/testUnsecureMemRegions.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2017,2018 +# Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # @@ -26,6 +26,7 @@ import sys import os import struct sys.path.append("targets/p9_nimbus/sbeTest" ) +sys.path.append("targets/p9_axone/sbeTest" ) import testUtil import testMemUtil as testMemProcUtil err = False @@ -212,11 +213,21 @@ def main(): #------------------------------------------------- # Calling all test code #------------------------------------------------- -main() +if testUtil.getMachineName() == "axone": + try: + main() + except: + print ( "\nTest Suite completed with error(s)" ) + testUtil.collectFFDC() + raise() -if err: - print ("\nTest Suite completed with error(s)") - #sys.exit(1) + print ( "\nTest Suite completed with no errors" ) else: - print ("\nTest Suite completed with no errors") - #sys.exit(0); + main() + + if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) + else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); diff --git a/src/test/testcases/testUtil.py b/src/test/testcases/testUtil.py index 35c20720..95626fa1 100644 --- a/src/test/testcases/testUtil.py +++ b/src/test/testcases/testUtil.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2018 +# Contributors Listed Below - COPYRIGHT 2015,2019 # [+] International Business Machines Corp. # # @@ -32,7 +32,10 @@ cyclesPerIter = 20000; def getLbus( node, isfleetwood ): #This is non-fleetwood system, where node is 0 by default if (isfleetwood == 0): - lbus=conf.p9Proc0.proc_lbus_map + if getMachineName() == "axone": + lbus=conf.backplane0.proc0.cfam_cmp.lbus_map + else: + lbus=conf.p9Proc0.proc_lbus_map else: # This is fleetwood system if(node == 0): @@ -259,3 +262,19 @@ def checkEqual( data, expdata ): print "Expected Data", expdata raise Exception('data mistmach'); +def getMachineName(): + try: + sbeScriptsPath = simenv.sbe_scripts_path + machineType = "axone" + except: + machineType = "nimbus" + finally: + return machineType + +def collectFFDC(): + simics.SIM_run_command('sbe-trace 0') + simics.SIM_run_command('sbe-stack 0') + simics.SIM_run_command('sbe-regffdc 0') + simics.SIM_run_command('backplane0.proc0.pib_cmp.sbe_ppe->ppe_state') + simics.SIM_run_command('backplane0.proc0.cfam_cmp.sbe_fifo->upstream_hw_fifo') + simics.SIM_run_command('backplane0.proc0.cfam_cmp.sbe_fifo->downstream_hw_fifo') \ No newline at end of file diff --git a/src/tools/debug/simics-debug-framework.py b/src/tools/debug/simics-debug-framework.py index 62be477f..359df50d 100755 --- a/src/tools/debug/simics-debug-framework.py +++ b/src/tools/debug/simics-debug-framework.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -31,56 +31,78 @@ import sys import imp import struct -testIstepAuto = imp.load_source("testIstepAuto", os.environ['SBE_TOOLS_PATH'] + "/testIstepAuto.py") -sbeDebug = imp.load_source("sbeDebug", os.environ['SBE_TOOLS_PATH'] + "/sbe-debug.py") +def getMachineName(): + try: + sbeScriptsPath = simenv.sbe_scripts_path + macineType = "axone" + except: + macineType = "nimbus" + finally: + return macineType + +if getMachineName() == "axone": + SBE_TOOLS_PATH = simenv.sbe_scripts_path +else: + SBE_TOOLS_PATH = os.environ['SBE_TOOLS_PATH'] +print "SBE_TOOLS_PATH = " + SBE_TOOLS_PATH + +testIstepAuto = imp.load_source("testIstepAuto", SBE_TOOLS_PATH + "/testIstepAuto.py") +sbeDebug = imp.load_source("sbeDebug", SBE_TOOLS_PATH + "/sbe-debug.py") err = False g_isFleetwood = 0 syms = {}; def check_sbe_tools_path (): - global SBE_TOOLS_PATH - global g_isFleetwood - SBE_TOOLS_PATH = os.environ['SBE_TOOLS_PATH']; - #Figure out if it's a fleetwood system - cmd1 = "pipe \"echo $cec_type\" \"cat > temp1.map\"" - ( rc, out ) = quiet_run_command( cmd1, output_modes.regular ) - if ( rc ): - print "simics ERROR running %s: %d "%( cmd1, rc ) - with open('temp1.map', 'r') as f: - map = f.read().strip() - if(map == "p9_fleetwood"): - g_isFleetwood = 1 - else: + global g_isFleetwood + #Figure out if it's a fleetwood system + + #TODO: Assuming that axone cannot be fleetwood (multinode system). Confirm + #this before merging the code. + if getMachineName() == "axone": g_isFleetwood = 0 + else: + cmd1 = "pipe \"echo $cec_type\" \"cat > temp1.map\"" + ( rc, out ) = quiet_run_command( cmd1, output_modes.regular ) + if ( rc ): + print "simics ERROR running %s: %d "%( cmd1, rc ) + with open('temp1.map', 'r') as f: + map = f.read().strip() + if(map == "p9_fleetwood"): + g_isFleetwood = 1 + else: + g_isFleetwood = 0 def get_dd_level(procNr = 0, nodeNr = 0): global g_isFleetwood - if g_isFleetwood: - node = nodeNr + 1 - cmd = "pipe \"D"+str(node)+"Proc"+str(procNr)+".sbe.mibo_space.map\" \"cat > temp.map\"" + if getMachineName() == "axone": + ddlevel = 'AXONE' else: - cmd = "pipe \"p9Proc"+str(procNr)+".sbe.mibo_space.map\" \"cat > temp.map\"" - - print "simics running %s: "%( cmd) - ( rc, out ) = quiet_run_command( cmd, output_modes.regular ) - if ( rc ): - print "simics ERROR running %s: %d "%( cmd, rc ) - ddlevel = 'DD1' - with open('temp.map', 'r') as f: - map = f.read() - map = map.split() if g_isFleetwood: - if map[map.index('D'+str(node)+'Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0x80000000': - ddlevel = "DD1" - if map[map.index('D'+str(node)+'Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0xff800000': - ddlevel = "DD2" + node = nodeNr + 1 + cmd = "pipe \"D"+str(node)+"Proc"+str(procNr)+".sbe.mibo_space.map\" \"cat > temp.map\"" else: - if map[map.index('p9Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0x80000000': - ddlevel = "DD1" - if map[map.index('p9Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0xff800000': - ddlevel = "DD2" + cmd = "pipe \"p9Proc"+str(procNr)+".sbe.mibo_space.map\" \"cat > temp.map\"" + + print "simics running %s: "%( cmd) + ( rc, out ) = quiet_run_command( cmd, output_modes.regular ) + if ( rc ): + print "simics ERROR running %s: %d "%( cmd, rc ) + ddlevel = 'DD1' + with open('temp.map', 'r') as f: + map = f.read() + map = map.split() + if g_isFleetwood: + if map[map.index('D'+str(node)+'Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0x80000000': + ddlevel = "DD1" + if map[map.index('D'+str(node)+'Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0xff800000': + ddlevel = "DD2" + else: + if map[map.index('p9Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0x80000000': + ddlevel = "DD1" + if map[map.index('p9Proc'+str(procNr)+'.sbe.fi2c_bo:fi2cfsm')-1] == '0xff800000': + ddlevel = "DD2" print "running image - ["+ddlevel+"]" return ddlevel @@ -160,7 +182,10 @@ def collectStackUsage ( procNr, nodeNr=0 ): node = nodeNr + 1 cmd = "pipe \"D"+str(node)+"Proc"+str(procNr)+".sbe.mibo_space.x 0x" + syms[thread][0] + " 0x"+syms[thread][1]+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> "+thread+"\"" else: - cmd = "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x 0x" + syms[thread][0] + " 0x"+syms[thread][1]+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> "+thread+"\"" + if getMachineName() == "axone": + cmd = "pipe \"backplane0.proc" + `procNr` + ".pib_cmp.sbe_mibo.x 0x" + syms[thread][0] + " 0x"+syms[thread][1]+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> "+thread+"\"" + else: + cmd = "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x 0x" + syms[thread][0] + " 0x"+syms[thread][1]+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> "+thread+"\"" print "simics running %s: "%( cmd) ( rc, out ) = quiet_run_command( cmd, output_modes.regular ) if ( rc ): @@ -203,7 +228,10 @@ def collectRegFfdc( procNr, nodeNr=0 ): node = nodeNr + 1 cmd= "pipe \"D"+str(node)+"Proc"+str(procNr)+".sbe.mibo_space.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\"" else: - cmd= "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\"" + if getMachineName() == "axone": + cmd = "pipe \"backplane0.proc" + `procNr` + ".pib_cmp.sbe_mibo.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\"" + else: + cmd= "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> DumpFullPIBMEM\"" print "simics running %s: "%( cmd) ( rc, out ) = quiet_run_command( cmd, output_modes.regular ) if ( rc ): @@ -227,9 +255,15 @@ def collectTrace ( procNr, nodeNr=0 ): cmd1 = "pipe \"D"+str(node)+"Proc"+str(procNr)+".sbe.mibo_space.x 0x" + syms['g_pk_trace_buf'][0] + " 0x2028\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> ppetrace.bin\"" else: fileName = "sbe_" + `procNr` + "_tracMERG" - cmd1 = "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x 0x" + syms['g_pk_trace_buf'][0] + " 0x2028\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> ppetrace.bin\"" + if getMachineName() == "axone": + cmd1 = "pipe \"backplane0.proc" + `procNr` + ".pib_cmp.sbe_mibo.x 0x" + syms['g_pk_trace_buf'][0] + " 0x2028\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> ppetrace.bin\"" + else: + cmd1 = "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x 0x" + syms['g_pk_trace_buf'][0] + " 0x2028\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> ppetrace.bin\"" cmd2 = "shell \"" + SBE_TOOLS_PATH + "/ppe2fsp ppetrace.bin sbetrace.bin \"" - cmd3 = "shell \"" + "fsp-trace -s " + SBE_TOOLS_PATH + "/sbeStringFile_"+get_dd_level(procNr, nodeNr)+" sbetrace.bin >" + fileName + "\"" + if getMachineName() == "axone": + cmd3 = "shell \"" + SBE_TOOLS_PATH + "/fsp-trace -s " + SBE_TOOLS_PATH + "/sbeStringFile_"+get_dd_level(procNr, nodeNr)+" sbetrace.bin >" + fileName + "\"" + else: + cmd3 = "shell \"fsp-trace -s " + SBE_TOOLS_PATH + "/sbeStringFile_"+get_dd_level(procNr, nodeNr)+" sbetrace.bin >" + fileName + "\"" cmd4 = "shell \"" + "cat " + fileName + "\"" print "simics running %s: "%( cmd1) diff --git a/src/tools/debug/simics/sbe_startupAxone.simics b/src/tools/debug/simics/sbe_startupAxone.simics new file mode 100644 index 00000000..03dc26a9 --- /dev/null +++ b/src/tools/debug/simics/sbe_startupAxone.simics @@ -0,0 +1,53 @@ +####################################### +#Declare simics environment variables +####################################### +decl { + group "sbe_ci" + + param sbe_scripts_path : string or nil = NIL + ! SBE scripts_path at time 0 + result sbe_scripts_path : string or nil + + param sbe_ci : bool = FALSE + ! is sbe-ci TRUE + result sbe_ci : bool + + param sbe_ci_script : string or nil = NIL + ! SBE ci script to run at time 0 + result sbe_ci_script : string or nil +} +if $sbe_scripts_path != NIL { + add-directory $sbe_scripts_path +} +if $sbe_ci_script != NIL { + $sbe_ci_script = (lookup-file $sbe_ci_script) +} + +################################### +#Enable SBE +################################### +echo "Enable the SBE" + +(get-master-cec-chips)[0].invoke parallel_store SCOM 0x5003A "90000000_00000000" 64 +# Set security enabled bit +(get-master-cec-chips)[0].invoke parallel_store SCOM 0x00050001 "0C000002_00000000" 64 + +echo "Attempting to register SBE Tools" +# Load SBE debug tools. +try { + run-python-file (lookup-file "%script%/simics-debug-framework.py") + +} except { echo "ERROR: Failed to load SBE debug tools." } + + +#If we are running CI, run the test cases +if $sbe_ci == TRUE { + try { + run-command-file $sbe_ci_script + } except{ + echo " Debug ::SBE CI Script error" + q 1 + } + #Kill runsim if any test case fails. + q 0 +} diff --git a/src/tools/trace/ppe2fsp.c b/src/tools/trace/ppe2fsp.c index 6021f1d0..c9a2991b 100755 --- a/src/tools/trace/ppe2fsp.c +++ b/src/tools/trace/ppe2fsp.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ -- cgit v1.2.1