summaryrefslogtreecommitdiffstats
path: root/src/build/debug
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-08-07 13:58:25 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-14 00:08:52 -0400
commita4d7e37251ac2959acb36fc61a34865dfdabef2f (patch)
tree97cd8b18db658b5ea35eee7017c93fc1d81c59fb /src/build/debug
parentfd19d0c74a506e6ef053fa96dabe5f673195049a (diff)
downloadtalos-hostboot-a4d7e37251ac2959acb36fc61a34865dfdabef2f.tar.gz
talos-hostboot-a4d7e37251ac2959acb36fc61a34865dfdabef2f.zip
Support for SMM in HB debug tools
Fix a bug related to handling mirrored memory (SMM) in our simics debug framework Change-Id: I28c659081efb1fc742a4e7a2baf6bba314ef0e3a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44297 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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/debug')
-rw-r--r--[-rwxr-xr-x]src/build/debug/simics-debug-framework.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/build/debug/simics-debug-framework.py b/src/build/debug/simics-debug-framework.py
index 653b56678..26cc90176 100755..100644
--- a/src/build/debug/simics-debug-framework.py
+++ b/src/build/debug/simics-debug-framework.py
@@ -615,8 +615,11 @@ def magic_instruction_callback(user_arg, cpu, arg):
#print ">> %d:%s" % (entry[0], entry[1])
#check if base == hrmor, or if memory space encompasses the
#entire base memory which is: hrmor + 0x2000000 (32 MB)
- if (entry[0] == hb_hrmor) or ((entry[0] < hb_hrmor) and (entry[0] + entry[4] >= hb_hrmor + 0x2000000 )
- or (entry[0] == 134217728) or (entry[0] == 136314880) ): #0x8000000 or 0x8200000
+ if ((entry[0] == hb_hrmor) or
+ ((entry[0] < hb_hrmor) and
+ (entry[0] + entry[4] >= hb_hrmor + 0x2000000) or
+ (entry[0] == 134217728) or
+ (entry[0] == 136314880))): #0x8000000 or 0x8200000
target = entry[5]
priority = entry[6]
# Check if there is a target that needs to be investigated that
@@ -625,8 +628,10 @@ def magic_instruction_callback(user_arg, cpu, arg):
#print "Continuous trace target = %s" % (target)
smm_map_entries = target.map
for smm_entry in smm_map_entries:
- if (smm_entry[0] == (node_num*per_node)) or (entry[0] == hb_hrmor):
+ if ((smm_entry[0] == (node_num*per_node)) or
+ (entry[0] == hb_hrmor)):
mem_object = simics.SIM_object_name(smm_entry[1])
+ base_addr = smm_entry[0]
#print "Found entry %s for hrmor %x" % (mem_object, hb_hrmor)
low_priority = priority
#break
@@ -646,7 +651,10 @@ def magic_instruction_callback(user_arg, cpu, arg):
# Figure out if we are running out of the cache or mainstore
# Add the HRMOR if we're running from memory
if 'cache' not in mem_object:
- hb_tracBinaryBuffer = hb_tracBinaryBuffer + hb_hrmor - per_node*node_num - base_addr
+ hb_tracBinaryBuffer = (hb_tracBinaryBuffer +
+ hb_hrmor -
+ per_node*node_num -
+ base_addr)
tracbin = ["hbTracBINARY","hbTracBINARY1","hbTracBINARY2","hbTracBINARY3"]
tracmerg = ["hbTracMERG","hbTracMERG1","hbTracMERG2","hbTracMERG3"]
OpenPOWER on IntegriCloud