diff options
Diffstat (limited to 'src/build/simics/hb-simdebug.py')
-rwxr-xr-x | src/build/simics/hb-simdebug.py | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/src/build/simics/hb-simdebug.py b/src/build/simics/hb-simdebug.py index 70d9190d4..12f4a2c17 100755 --- a/src/build/simics/hb-simdebug.py +++ b/src/build/simics/hb-simdebug.py @@ -1,25 +1,25 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/build/simics/hb-simdebug.py $ +# $Source: src/build/simics/hb-simdebug.py $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011-2012 +# COPYRIGHT International Business Machines Corp. 2011,2013 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END_TAG +# IBM_PROLOG_END_TAG import os,sys import conf import configuration @@ -35,21 +35,30 @@ import random def dumpL3(): # "constants" - L3_SIZE = 0x800000; + L3_SIZE = 0x800000 + FULL_MEM_SIZE = 32*1024*1024 # 32 MB print # Get a timestamp on when dump was collected t = datetime.datetime.now().strftime("%Y%m%d%H%M%S") - #print t + + # Get memory object. + mem = conf.system_cmp0.phys_mem.map[0][1]; + if 'l3_cache_ram' in mem.name: + offset = 0 + size = L3_SIZE + else: + offset = getHRMOR() + size = FULL_MEM_SIZE #dump L3 to hbdump.<timestamp> - string = "(system_cmp0.phys_mem)->map[0][1]->image.save hbdump.%s 0 0x%x"%(t, L3_SIZE) + string = "(system_cmp0.phys_mem)->map[0][1]->image.save hbdump.%s 0x%x 0x%x"%(t, offset, size) #print string result = run_command(string) #print result - print "HostBoot dump saved to %s/hbdump.%s."%(os.getcwd(),t) + print "HostBoot dump saved to %s/hbdump.%s"%(os.getcwd(),t) return |