diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2016-09-13 16:39:24 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-09-16 00:09:12 -0400 |
commit | 892b6efc65c24d8b227f10e4912825eb68eac1e9 (patch) | |
tree | 67874d7e27c6d3c97f3338b3e1e4395631421bb8 /src | |
parent | e44109af8f74ef3a27fa858ee01cea7dd4c44e63 (diff) | |
download | talos-hostboot-892b6efc65c24d8b227f10e4912825eb68eac1e9.tar.gz talos-hostboot-892b6efc65c24d8b227f10e4912825eb68eac1e9.zip |
Do not lose traces during cache to mem transition
There is a window in the simics ipl when we have two objects
covering the same physical addresses. Our continuous trace
logic needs to pull the data from the same object that is
catching the memory accesses in the model. This is indicated
by a priority field in the map structure. (Note - in our
case we want to use the cache object until it goes away in
proc_exit_cache_contained istep.)
Change-Id: I6fc89c142a5fa48b2577867fbf5056ee0bb13289
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29607
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/build/debug/simics-debug-framework.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/build/debug/simics-debug-framework.py b/src/build/debug/simics-debug-framework.py index 20985a794..ff7bf0844 100755 --- a/src/build/debug/simics-debug-framework.py +++ b/src/build/debug/simics-debug-framework.py @@ -567,26 +567,30 @@ def magic_instruction_callback(user_arg, cpu, arg): # Find the entry in the memory map that includes our # base memory region. Can't assume object is "ram" + low_priority = 10 mem_map_entries = (conf.system_cmp0.phys_mem).map for entry in mem_map_entries: + # 0=base, 1=name, 5=mirrored target, 6=priority #print ">> %d:%s" % (entry[0], entry[1]) if (entry[0] == (node_num*per_node)) or (entry[0] == hb_hrmor): target = entry[5] + priority = entry[6] # Check if there is a target that needs to be investigated that # points to another object or map - if target != None: + if (target != None) and (priority < low_priority): #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): mem_object = simics.SIM_object_name(smm_entry[1]) #print "Found entry %s for hrmor %x" % (mem_object, hb_hrmor) - break + low_priority = priority + #break break - else: + elif priority < low_priority: mem_object = simics.SIM_object_name(entry[1]) #print "Found entry %s for hrmor %d" % (mem_object, hb_hrmor) - break + #break if mem_object == None: print "Could not find entry for hrmor %d" % (hb_hrmor) |