summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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