summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorVan Lee <vanlee@us.ibm.com>2012-02-22 17:45:18 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-03 10:02:45 -0600
commit5e39cbfb113f2af65a17fde4317231e248051ac8 (patch)
treee2b7729f542574791413aa998de8d0a560451946 /src/build
parent6dea332771095c9a5891e2e7dea051cfc9e4f22d (diff)
downloadtalos-hostboot-5e39cbfb113f2af65a17fde4317231e248051ac8.tar.gz
talos-hostboot-5e39cbfb113f2af65a17fde4317231e248051ac8.zip
VPO continuous trace support for VBU (AWAN) execution environemt
Change-Id: Ib304cb0e203e4a4b69a07e824cb88581462463e2 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/687 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/debug/simics-debug-framework.py31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/build/debug/simics-debug-framework.py b/src/build/debug/simics-debug-framework.py
index d29fb1bdc..9453440a6 100755
--- a/src/build/debug/simics-debug-framework.py
+++ b/src/build/debug/simics-debug-framework.py
@@ -234,6 +234,10 @@ def register_hb_debug_framework_tools():
pattern = re.compile("[^\._]");
files = [f for f in files if pattern.match(f)]
+ # Filter out modules written for vbu only
+ pattern = re.compile("AutoIpl|ContTrace");
+ files = [f for f in files if not pattern.match(f)]
+
# Remove the .pm extension from the tool modules.
files = [re.sub("\.pm","",f) for f in files];
@@ -291,6 +295,14 @@ def readLongLong(address):
hexlist = dumpSimicsMemory(address,8)
return hexDumpToNumber(hexlist)
+def readLong(address):
+ hexlist = dumpSimicsMemory(address,4)
+ return hexDumpToNumber(hexlist)
+
+def writeLong(address,datvalue):
+ conf.phys_mem.memory[[address,address+3]] = [0,0,0,datvalue]
+ return
+
# Write simics memory. address is an integer.
@@ -335,15 +347,26 @@ def magic_instruction_callback(user_arg, cpu, arg):
pTracBinaryBuffer = readLongLong(tracBinaryInfoAddr)
# Read the count of bytes used in the tracBinary buffer
cbUsed = readLongLong(tracBinaryInfoAddr+8)
+ triggerActive = readLong(tracBinaryInfoAddr+16)
+ if triggerActive == 0 and cbUsed == 1:
+ pTracBinaryBuffer = readLongLong(tracBinaryInfoAddr+24)
+ cbUsed = readLongLong(tracBinaryInfoAddr+32)
+ writeLong(tracBinaryInfoAddr+40,0)
+ # Reset the buffer byte count in Simics memory to 1, preserving
+ # the byte at offset 0 of the buffer which contains a 0x02 in
+ # fsp-trace style.
+ writeLongLong(tracBinaryInfoAddr+32,1)
+ else:
+ writeLong(tracBinaryInfoAddr+16,0)
+ # Reset the buffer byte count in Simics memory to 1, preserving
+ # the byte at offset 0 of the buffer which contains a 0x02 in
+ # fsp-trace style.
+ writeLongLong(tracBinaryInfoAddr+8,1)
# Save the tracBinary buffer to a file named tracBINARY in current dir
saveCommand = "memory_image_ln0.save tracBINARY 0x%x %d"%(pTracBinaryBuffer,cbUsed)
SIM_run_alone(run_command, saveCommand )
# Run fsp-trace on tracBINARY file (implied), append output to tracMERG
os.system( "fsp-trace ./ -s hbotStringFile >>tracMERG 2>/dev/null" )
- # Reset the buffer byte count in Simics memory to 1, preserving the byte
- # at offset 0 of the buffer which contains a 0x02 in fsp-trace style.
- writeLongLong(tracBinaryInfoAddr+8, 1 )
-
# Continuous trace: Open the symbols and find the address for
# "g_tracBinaryInfo" Convert to a number and save in tracBinaryInfoAddr
OpenPOWER on IntegriCloud