diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2019-12-18 08:33:09 -0600 |
---|---|---|
committer | William G Hoffa <wghoffa@us.ibm.com> | 2020-01-07 13:14:40 -0600 |
commit | 4198ffbc2ae5404b05baff55be8e6f39578389cc (patch) | |
tree | 9a584a1c840224787aa954dcc689e39e9a10c7ba /src/build/debug/simics-debug-framework.py | |
parent | ddad6a525c4c12bfda720f065f359da62933580e (diff) | |
download | talos-hostboot-4198ffbc2ae5404b05baff55be8e6f39578389cc.tar.gz talos-hostboot-4198ffbc2ae5404b05baff55be8e6f39578389cc.zip |
Force a Hostboot dump on any TI in Simics
Execute a magic instruction in the TI path to force a hostboot
dump to be collected on any TI while running in Simics.
Change-Id: I8aeffb2b646bbe8480568e8af33a658400fa01a5
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/88831
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/build/debug/simics-debug-framework.py')
-rw-r--r-- | src/build/debug/simics-debug-framework.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/build/debug/simics-debug-framework.py b/src/build/debug/simics-debug-framework.py index 69465da3f..fd90806bb 100644 --- a/src/build/debug/simics-debug-framework.py +++ b/src/build/debug/simics-debug-framework.py @@ -516,7 +516,7 @@ def magic_instruction_callback(user_arg, cpu, arg): # Stop the simulation, much like a hard-coded breakpoint SIM_break_simulation( "Simulation stopped. (hap 7007)" ) - if arg == 7008: + if arg == 7008: # MAGIC_RANDOM cpu.r3 = random.randint(1, 0xffffffffffffffffL) if arg == 7009: # MAGIC_MEMORYLEAK_FUNCTION @@ -525,6 +525,10 @@ def magic_instruction_callback(user_arg, cpu, arg): if arg == 7011: #MAGIC_SIMICS_CHECK cpu.r3 = 1 print "TimeManager::cv_isSimicsRunning = true" + # Clear the dump flag in case it was still set from a previous boot + # (this call happens only 1 time and it is very early in the boot) + if( os.environ.has_key('HB_DUMP_COMPLETE') ): + del os.environ['HB_DUMP_COMPLETE'] if arg == 7012: # MAGIC_LOAD_PAYLOAD #For P9 the Payload load is much faster due to PNOR @@ -537,6 +541,17 @@ def magic_instruction_callback(user_arg, cpu, arg): #SIM_run_alone( run_command, cmd ) print "MAGIC_LOAD_PAYLOAD not implemented\n"; + if arg == 7014: # MAGIC_HB_DUMP + # Collect a hostboot dump + # (no args) + + # Make sure we only do 1 dump even though every thread will TI + if( not os.environ.has_key('HB_DUMP_COMPLETE') ): + print "Generating Hostboot Dump for TI" + os.environ['HB_DUMP_COMPLETE']="1" + cmd1 = "hb-Dump quiet" + SIM_run_alone(run_command, cmd1 ) + if arg == 7018: # MAGIC_BREAK_ON_ERROR # Stop the simulation if an env var is set if( os.environ.has_key('HB_BREAK_ON_ERROR') ): @@ -573,6 +588,7 @@ def magic_instruction_callback(user_arg, cpu, arg): percent_s = "%s" dateCommand = "shell \" date +'%s > TRACE REGS: %d %d' \""%(percent_s,first_num,second_num) SIM_run_alone(run_command, dateCommand ) + if arg == 7022: # MAGIC_SET_LOG_LEVEL if( not os.environ.has_key('ENABLE_HB_SIMICS_LOGS') ): #print("Skipping Hostboot Simics Logging because ENABLE_HB_SIMICS_LOGS is not set") |