aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-02-23 05:43:34 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-02-28 20:28:28 -0600
commit8cbd3880c3211e29eeb1f93d591439e6fbabc873 (patch)
tree0dfb38907e2fa69f4fbe3d080969bb80bfdca4ec
parentfe6d86b92a0054f7f063cd957091889f4ccd853a (diff)
downloadskiboot-8cbd3880c3211e29eeb1f93d591439e6fbabc873.zip
skiboot-8cbd3880c3211e29eeb1f93d591439e6fbabc873.tar.gz
skiboot-8cbd3880c3211e29eeb1f93d591439e6fbabc873.tar.bz2
direct-controls: mambo fix for multiple chips
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/direct-controls.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/direct-controls.c b/core/direct-controls.c
index 411a1b2..45a4008 100644
--- a/core/direct-controls.c
+++ b/core/direct-controls.c
@@ -29,21 +29,27 @@ extern unsigned long callthru_tcl(const char *str, int len);
static void mambo_sreset_cpu(struct cpu_thread *cpu)
{
+ uint32_t chip_id = pir_to_chip_id(cpu->pir);
uint32_t core_id = pir_to_core_id(cpu->pir);
uint32_t thread_id = pir_to_thread_id(cpu->pir);
char tcl_cmd[50];
- snprintf(tcl_cmd, sizeof(tcl_cmd), "mysim cpu 0:%i:%i start_thread 0x100", core_id, thread_id);
+ snprintf(tcl_cmd, sizeof(tcl_cmd),
+ "mysim cpu %i:%i:%i start_thread 0x100",
+ chip_id, core_id, thread_id);
callthru_tcl(tcl_cmd, strlen(tcl_cmd));
}
static void mambo_stop_cpu(struct cpu_thread *cpu)
{
+ uint32_t chip_id = pir_to_chip_id(cpu->pir);
uint32_t core_id = pir_to_core_id(cpu->pir);
uint32_t thread_id = pir_to_thread_id(cpu->pir);
char tcl_cmd[50];
- snprintf(tcl_cmd, sizeof(tcl_cmd), "mysim cpu 0:%i:%i stop_thread", core_id, thread_id);
+ snprintf(tcl_cmd, sizeof(tcl_cmd),
+ "mysim cpu %i:%i:%i stop_thread",
+ chip_id, core_id, thread_id);
callthru_tcl(tcl_cmd, strlen(tcl_cmd));
}