summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2017-05-31 02:22:02 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-05-31 05:21:56 -0400
commit5110484932840cd55a361b6bbe8bef5aa24b27e3 (patch)
tree0e55a53786b5b330f883996fd574bde2357a1820 /src
parentbcbe74a0770581a51e827291d93201d0fd1f8251 (diff)
downloadtalos-sbe-5110484932840cd55a361b6bbe8bef5aa24b27e3.tar.gz
talos-sbe-5110484932840cd55a361b6bbe8bef5aa24b27e3.zip
Remove dependency of sbe obj path for sbestate, ppestate etc
Change-Id: I5afe599e9f128ac0721d437cef0b5a2057dc346f Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41156 Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Shakeeb A. Pasha B K <shakeebbk@in.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/debug/sbe-debug.py51
1 files changed, 28 insertions, 23 deletions
diff --git a/src/tools/debug/sbe-debug.py b/src/tools/debug/sbe-debug.py
index f4359b95..d59311a7 100755
--- a/src/tools/debug/sbe-debug.py
+++ b/src/tools/debug/sbe-debug.py
@@ -34,11 +34,15 @@ err = False
baseAddr = 0xfffe8000
syms = {};
-if 'SBE_TOOLS_PATH' in os.environ:
- SBE_TOOLS_PATH = os.environ['SBE_TOOLS_PATH'];
-else:
- print "SBE_TOOLS_PATH not defined"
- exit(1)
+SBE_TOOLS_PATH = ""
+def getSbeObjPath():
+ if 'SBE_TOOLS_PATH' in os.environ:
+ SBE_TOOLS_PATH = os.environ['SBE_TOOLS_PATH'];
+ else:
+ print "SBE_TOOLS_PATH not defined"
+ exit(1)
+ print "SBE_TOOLS_PATH", SBE_TOOLS_PATH
+ return SBE_TOOLS_PATH
def getTraceFilePath():
fspTrace = SBE_TOOLS_PATH + "/fsp-trace"
@@ -220,7 +224,7 @@ def collectAttr( sbeObjDir, target, node, proc, ddsuffix, file_path ):
print "ERROR running %s: %d " % ( cmd3, rc )
return 1
-def ppeState( sbeObjDir, target, node, proc, file_path ):
+def ppeState( target, node, proc, file_path ):
if(target == 'FILE'):
print "File path: ", file_path
fileHandle = open(file_path)
@@ -244,7 +248,7 @@ def ppeState( sbeObjDir, target, node, proc, file_path ):
print "ERROR running %s: %d " % ( cmd1, rc )
return 1
-def sbeLocalRegister( sbeObjDir, target, node, proc, file_path ):
+def sbeLocalRegister( target, node, proc, file_path ):
if(target == 'FILE'):
print "File path: ", file_path
fileHandle = open(file_path)
@@ -269,7 +273,7 @@ def sbeLocalRegister( sbeObjDir, target, node, proc, file_path ):
print "ERROR running %s: %d " % ( cmd1, rc )
return 1
-def sbeState( sbeObjDir, target, node, proc, file_path ):
+def sbeState( target, node, proc, file_path ):
if(target == 'FILE'):
print "File path: ", file_path
fileHandle = open(file_path)
@@ -286,7 +290,7 @@ def sbeState( sbeObjDir, target, node, proc, file_path ):
print '********************************************************************'
fileHandle.close()
else:
- cmd1 = ("p9_pibms_reg_dump_wrap.exe -quiet" +\
+ cmd1 = ("p9_pibms_reg_dump_wrap.exe -verbose" +\
" -n" + str(node) + " -p" + str(proc))
print "cmd1:", cmd1
rc = os.system( cmd1 )
@@ -441,31 +445,32 @@ def main( argv ):
# check if the file path exist or not
assert os.path.exists(arg), "Did not find the file at, "+str(arg)
- sbeObjDir = SBE_TOOLS_PATH;
- print "sbeObjDir", sbeObjDir
- fillSymTable(sbeObjDir, target, ddsuffix)
if ( level == 'all' ):
print "Parsing everything"
- collectTrace( sbeObjDir, target, node, proc, ddsuffix, file_path )
- collectAttr( sbeObjDir, target, node, proc, ddsuffix, file_path )
+ fillSymTable(getSbeObjPath(), target, ddsuffix)
+ collectTrace( getSbeObjPath(), target, node, proc, ddsuffix, file_path )
+ collectAttr( getSbeObjPath(), target, node, proc, ddsuffix, file_path )
sbeStatus( target, node, proc )
- ppeState( sbeObjDir, target, node, proc, file_path )
- sbeState( sbeObjDir, target, node, proc, file_path )
- sbeLocalRegister( sbeObjDir, target, node, proc, file_path )
+ ppeState( target, node, proc, file_path )
+ sbeState( target, node, proc, file_path )
+ sbeLocalRegister( target, node, proc, file_path )
elif ( level == 'trace' ):
- collectTrace( sbeObjDir, target, node, proc, ddsuffix, file_path )
+ fillSymTable(getSbeObjPath(), target, ddsuffix)
+ collectTrace( getSbeObjPath(), target, node, proc, ddsuffix, file_path )
elif ( level == 'forced-trace' ):
- forcedCollectTrace( sbeObjDir, target, node, proc, ddsuffix, file_path )
+ fillSymTable(getSbeObjPath(), target, ddsuffix)
+ forcedCollectTrace( getSbeObjPath(), target, node, proc, ddsuffix, file_path )
elif ( level == 'attr' ):
- collectAttr( sbeObjDir, target, node, proc, ddsuffix, file_path )
+ fillSymTable(getSbeObjPath(), target, ddsuffix)
+ collectAttr( getSbeObjPath(), target, node, proc, ddsuffix, file_path )
elif ( level == 'ppestate' ):
- ppeState( sbeObjDir, target, node, proc, file_path )
+ ppeState( target, node, proc, file_path )
elif ( level == 'sbestate' ):
- sbeState( sbeObjDir, target, node, proc, file_path )
+ sbeState( target, node, proc, file_path )
elif ( level == 'sbestatus' ):
sbeStatus( target, node, proc )
elif ( level == 'sbelocalregister' ):
- sbeLocalRegister( sbeObjDir, target, node, proc, file_path )
+ sbeLocalRegister( target, node, proc, file_path )
if(target != 'FILE'):
# On cronus, set the FIFO mode to previous state
OpenPOWER on IntegriCloud