diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2012-05-30 22:51:33 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-06-08 14:25:44 -0500 |
commit | ad6cf41f0adc544fb8dacae893fa25b57ba2cf82 (patch) | |
tree | d4cb851443c4fcc25e647af6876b1ff8e70dda44 /src/build/debug/simics-debug-framework.py | |
parent | f9df2e083971910e20fe47bfe3c117b7df9db6da (diff) | |
download | talos-hostboot-ad6cf41f0adc544fb8dacae893fa25b57ba2cf82.tar.gz talos-hostboot-ad6cf41f0adc544fb8dacae893fa25b57ba2cf82.zip |
Improve distribution mechanism for FSP delivery.
Replaced 'cpfiles' with a set of makefiles that does all
of the old function and also allows more complex behaviors
such as creating a TAR file of all our common code.
Moved the delivery location of our content into a simics sandbox
to match the locations in an FSP build. Updated debug tools
to handle living in a different location.
Removed 'post_model_hook.simics' and replaced with the
{startup,standalone,combined}.simics files.
Updated various scripts that were calling 'cpfiles' to instead
call 'hbDistribute' (which in turn calls the makefiles).
RTC: 41640
Change-Id: I10d1782ae89a397725e880c44ba44d01b0e4b011
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1173
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/debug/simics-debug-framework.py')
-rwxr-xr-x | src/build/debug/simics-debug-framework.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/build/debug/simics-debug-framework.py b/src/build/debug/simics-debug-framework.py index 33fcee913..27f074fe2 100755 --- a/src/build/debug/simics-debug-framework.py +++ b/src/build/debug/simics-debug-framework.py @@ -89,15 +89,19 @@ class DebugFrameworkProcess: tool = ""; # string - tool module name. toolOptions = ""; # string - tool options outputToString = None; # mode - String output instead of STDOUT. - imgPath = "./"; # Image dir path override. + imgPath = None; # Image dir path override. result = ""; # Result string for Usage-mode. outputFile = None; # Output file for results in addition to STDOUT def __init__(self, tool = "Printk", toolOptions = "", outputToString = None, usage = None, - imgPath = "./",outputFile = None): + imgPath = None, + outputFile = None): + # Assign instance 'imgPath' variable. + self.imgPath = imgPath if imgPath else (os.environ['HB_TOOLPATH']+"/"); + # Determine sub-process arguments. - process_args = ["./simics-debug-framework.pl"]; + process_args = [self.imgPath+"simics-debug-framework.pl"]; if (usage): # Pass --usage if Usage mode selected. process_args = process_args + [ "--usage" ]; outputToString = True; @@ -109,7 +113,6 @@ class DebugFrameworkProcess: self.tool = tool; self.toolOptions = toolOptions; self.outputToString = outputToString; - self.imgPath = imgPath; self.outputFile = open(outputFile, 'w') if outputFile else None; # Read a message from the process pipe. @@ -229,7 +232,7 @@ class DebugFrameworkProcess: # @param imgPath - Image path override. def run_hb_debug_framework(tool = "Printk", toolOpts = "", outputToString = None, usage = None, - imgPath = "./", outputFile = None): + imgPath = None, outputFile = None): # Create debug sub-process. fp = DebugFrameworkProcess(tool,toolOpts,outputToString, usage,imgPath,outputFile) @@ -262,7 +265,7 @@ def run_hb_debug_framework(tool = "Printk", toolOpts = "", # @brief Create a simics command wrapper for each debug tool module. def register_hb_debug_framework_tools(): # Find all modules from within Hostboot subdirectory. - files = os.listdir("./Hostboot") + files = os.listdir(os.environ['HB_TOOLPATH']+"/Hostboot") # Filter out any prefixed with '_' (utility module) or a '.' (hidden file). pattern = re.compile("[^\._]"); @@ -402,21 +405,22 @@ def magic_instruction_callback(user_arg, cpu, arg): saveCommand = "(system_cmp0.phys_mem)->map[0][1]->image.save tracBINARY 0x%x %d"%(pTracBinaryBuffer,cbUsed) SIM_run_alone(run_command, saveCommand ) # Run fsp-trace on tracBINARY file (implied), append output to tracMERG - os.system( "fsp-trace ./ -s hbotStringFile >>tracMERG 2>/dev/null" ) + os.system( "fsp-trace ./ -s "+os.environ['HB_TOOLPATH']+ + "/hbotStringFile >>tracMERG 2>/dev/null" ) # Continuous trace: Open the symbols and find the address for # "g_tracBinaryInfo" Convert to a number and save in tracBinaryInfoAddr # The layout of g_tracBinaryInfo is a 64-bit pointer to the mixed buffer # followed by a 64-bit count of bytes used in the buffer. See # src/usr/trace/trace.C and mixed_trace_info_t. -for line in open('hbicore.syms'): +for line in open(os.environ['HB_TOOLPATH']+'/hbicore.syms'): if "g_tracBinaryInfo" in line: words=line.split(",") tracBinaryInfoAddr=int(words[1],16) break # Find the address of the g_cont_trace_trigger_info and save it in # contTraceTrigInfo -for line in open('hbicore.syms'): +for line in open(os.environ['HB_TOOLPATH']+'/hbicore.syms'): if "g_cont_trace_trigger_info" in line: words=line.split(",") contTraceTrigInfo=int(words[1],16) |