Skip to content

Commit

Permalink
Disable automatic collection of SIM logs with MAGIC_SET_LOG_LEVEL
Browse files Browse the repository at this point in the history
While we were trying to trace down some PSU simics bugs we added
a new feature where HB can elevate log levels of simics components
and copy out simics traces to a file which can be used for FFDC.
We found the bug which prompted this and we are seeing issues where
attempting to set the log level on procs in node2 is problematic.
This commit makes it so no logs are captured unless the env var
ENABLE_HB_SIMICS_LOGS is set in simics env.

Change-Id: Icc049b86daf89ff037edb1b5a1cf99c9ce551a2d
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68140
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: CALEB SCHLOSSIN <calebs@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: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
crgeddes authored and dcrowell77 committed Nov 1, 2018
1 parent 2f6cb7e commit 608fd96
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/build/debug/simics-debug-framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,15 @@ def magic_instruction_callback(user_arg, cpu, arg):
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( os.environ.has_key('DISABLE_HB_SIMICS_LOGS') ):
print("Skipping Hostboot Simics Logging because DISABLE_HB_SIMICS_LOGS")
if( not os.environ.has_key('ENABLE_HB_SIMICS_LOGS') ):
#print("Skipping Hostboot Simics Logging because ENABLE_HB_SIMICS_LOGS is not set")
return

hb_hrmor = cpu.hrmor
per_node = 0x200000000000 #32TB
per_chip = 0x40000000000 #4TB
node_num = hb_hrmor//per_node
# TODO RTC:200729 right now for 3 node systems the chip is getting calculated wrong
proc_num = hb_hrmor//per_chip
comp_id = cpu.r4
log_level = cpu.r5
Expand All @@ -604,6 +605,7 @@ def magic_instruction_callback(user_arg, cpu, arg):
# Right now only 2 components are supported, this if check
# needs to be updated if more components are supported
if comp_id >= 0 or comp_id <= 1:
#TODO RTC:200729 Simics team is coming up with a better way to lookup object
#check if D1Proc0 exists
D1Proc0String = "D1Proc0"
try:
Expand Down Expand Up @@ -634,8 +636,8 @@ def magic_instruction_callback(user_arg, cpu, arg):
couldNotFindCommand = "shell \" Unable to find valid object on this system type, neither %s nor %s were found \""%(D1Proc0String, P9Proc0String)
SIM_run_alone(run_command, couldNotFindCommand )
if arg == 7023: # MAGIC_TOGGLE_OUTPUT
if( os.environ.has_key('DISABLE_HB_SIMICS_LOGS') ):
print("Skipping Hostboot Simics Logging because DISABLE_HB_SIMICS_LOGS")
if( not os.environ.has_key('ENABLE_HB_SIMICS_LOGS') ):
#print("Skipping Hostboot Simics Logging because ENABLE_HB_SIMICS_LOGS is not set")
return

enable = cpu.r4
Expand Down

0 comments on commit 608fd96

Please sign in to comment.