summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2016-10-19 16:33:08 -0500
committerAMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>2016-10-26 03:34:06 -0400
commit4b2c048529a64a79cbce403e070c5a7c138ba117 (patch)
treeff8a61422049aabc9e60d50fcc908e48992e11d8 /src/tools
parentedefd286237fbc62a50095585a3b4c60134cc599 (diff)
downloadtalos-sbe-4b2c048529a64a79cbce403e070c5a7c138ba117.tar.gz
talos-sbe-4b2c048529a64a79cbce403e070c5a7c138ba117.zip
Temporary Fix for timer
Also include fix for changing the behavior on simics CMVC-Prereq: 1009109 Change-Id: Ib191e2c30ac508d2506ea1ed48dd76cc59da62f2 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31519 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com> Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Tested-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'src/tools')
-rwxr-xr-xsrc/tools/debug/simics-debug-framework.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/debug/simics-debug-framework.py b/src/tools/debug/simics-debug-framework.py
index 3e064158..ec925983 100755
--- a/src/tools/debug/simics-debug-framework.py
+++ b/src/tools/debug/simics-debug-framework.py
@@ -83,7 +83,24 @@ def collectTrace ( procNr ):
SIM_run_alone( run_command, cmd3 )
SIM_run_alone( run_command, cmd4 )
+# MAGIC_INSTRUCTION hap handler
+# arg contains the integer parameter n passed to MAGIC_INSTRUCTION(n)
+# See src/include/arch/ppc.H for the definitions of the magic args.
+# SBE magic args should range 8000..8190.
+def sbe_magic_instruction_callback(user_arg, cpu, inst_num):
+ # Check if its for ppe processor
+ if(SIM_get_class_name(SIM_object_class(cpu)) != "ppe"):
+ return;
+
+ if inst_num == 8000: #MAGIC_SIMICS_CHECK
+ iface = SIM_get_interface(cpu, "int_register")
+ iface.write(iface.get_number("r3"), 1)
+ print "SBE::isSimicsRunning = true"
# Run the registration automatically whenever this script is loaded.
register_sbe_debug_framework_tools()
+# Register the magic instruction hap handler (a callback).
+# Currently registering a range does not work on simics for sbe
+SIM_hap_add_callback( "Core_Magic_Instruction", sbe_magic_instruction_callback, None )
+
OpenPOWER on IntegriCloud