summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2013-07-22 10:03:46 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-08-09 11:06:58 -0500
commit5b6ce29d510f5393728ab8bdfdf6d90a26bf1d0c (patch)
treebc62c7b51fb124125ae60890b40ac6bde38f280c /src/build
parentb390d78d49a76b69c80afe036ee5350878686152 (diff)
downloadtalos-hostboot-5b6ce29d510f5393728ab8bdfdf6d90a26bf1d0c.tar.gz
talos-hostboot-5b6ce29d510f5393728ab8bdfdf6d90a26bf1d0c.zip
Tweaks for simics scripts
1) Moved hardcoded cpu to 1 place only 2) Attempt to use Simics commands for masterproc Change-Id: If6bb1f60342d16da54cb558a4092425da2ed1215 RTC: 51267 CQ: SW214903 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5509 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/debug/simics-debug-framework.py3
-rwxr-xr-xsrc/build/simics/hb-simdebug.py13
-rwxr-xr-xsrc/build/simics/startup.simics30
3 files changed, 25 insertions, 21 deletions
diff --git a/src/build/debug/simics-debug-framework.py b/src/build/debug/simics-debug-framework.py
index 8abf60a3d..bda3bb6c0 100755
--- a/src/build/debug/simics-debug-framework.py
+++ b/src/build/debug/simics-debug-framework.py
@@ -353,7 +353,8 @@ def hexDumpToNumber(hexlist):
# Fetch the current HRMOR value.
def getHRMOR():
- runStr = "(system_cmp0.cpu0_0_04_0).read-reg HRMOR"
+ # Note: will default to using the currently selected cpu
+ runStr = "($hb_cpu).read-reg HRMOR"
( result, out ) = quiet_run_command( runStr, output_modes.regular )
return result
diff --git a/src/build/simics/hb-simdebug.py b/src/build/simics/hb-simdebug.py
index 44dab075b..f241757ae 100755
--- a/src/build/simics/hb-simdebug.py
+++ b/src/build/simics/hb-simdebug.py
@@ -164,10 +164,9 @@ Examples: \n
#------------------------------------------------
#------------------------------------------------
def hb_singlethread():
- run_command("foreach $cpu in (system_cmp0.get-processor-list) " +
- "{ pdisable $cpu}");
- run_command("penable cpu0_0_05_0");
- run_command("pselect cpu0_0_05_0");
+ # Note: will default to using the currently selected cpu
+ # emulates the SBE thread count register
+ run_command("($hb_cpu).write-reg scratch7 0x0000800000000000");
return
new_command("hb-singlethread",
@@ -175,8 +174,7 @@ new_command("hb-singlethread",
[],
alias = "hb-st",
type = ["hostboot-commands"],
- short = "Disable all threads except cpu0_0_05_0.")
-
+ short = "Disable all threads except 1 - Must be run before starting sim.")
#------------------------------------------------
@@ -217,3 +215,6 @@ Examples: \n
hb-getallregs pc\n
""")
+
+#------------------------------------------------
+#------------------------------------------------
diff --git a/src/build/simics/startup.simics b/src/build/simics/startup.simics
index e6d999c85..7e1b484ee 100755
--- a/src/build/simics/startup.simics
+++ b/src/build/simics/startup.simics
@@ -9,27 +9,29 @@ python "os.environ['HB_MACHINE'] = \""+$hb_machine+"\""
# Setup some common vars to use across machine types
-echo "Note: Error messages for cecdrawer0_XXX are expected for non-Brazos machines"
$hb_masterproc = ""
-try {
- # Attempt to use the Brazos name
- @SIM_get_object("cecdrawer0_p8Proc0")
- $hb_masterproc = "cecdrawer0_p8Proc0"
-} except {
- # Default to Tuleta/Orlena name
- $hb_masterproc = "p8Proc0"
-}
+@simenv.hb_masterproc = quiet_run_command("get-master-proc")[0]
+echo "Master Proc is: "+$hb_masterproc
$hb_pnor = ""
+@simenv.hb_pnor = quiet_run_command("get-master-pnor")[0]
try {
- # Attempt to use the Brazos name
- @SIM_get_object("cecdrawer0_fpga0")
- $hb_pnor = "cecdrawer0_fpga0"
+ @SIM_get_object(simenv.hb_pnor[0])
} except {
- # Default to Tuleta/Orlena name
- $hb_pnor = "fpga0"
+ try {
+ # Attempt to use the Brazos name
+ @SIM_get_object("cecdrawer0_fpga0")
+ $hb_pnor = "cecdrawer0_fpga0"
+ } except {
+ # Default to Tuleta/Orlena name
+ $hb_pnor = "fpga0"
+ }
}
+echo "Master PNOR is: "+$hb_pnor
+# Choose a default core to start with
+$hb_cpu = "system_cmp0.cpu0_0_04_0"
+echo "Defaulting to CPU "+$hb_cpu+" for Hostboot tools"
# Load HB debug tools.
try {
OpenPOWER on IntegriCloud