coreboot: fail when trying to reboot/stop a core on non-x86 architecture
authorReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 18 Jul 2019 11:36:55 +0000 (13:36 +0200)
committerReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 18 Jul 2019 11:36:55 +0000 (13:36 +0200)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

usr/drivers/cpuboot/main.c

index 460ee86..b75237b 100644 (file)
@@ -266,6 +266,10 @@ static int update_cpu(int argc, char** argv)
         USER_PANIC_ERR(err, "get_apic_id failed.");
     }
 
+    if (cpu_type == CPU_ARM7 || cpu_type == CPU_ARM8) {
+        USER_PANIC("don't know how to update core on this architecture!");
+    }
+
     struct capref kcb;
     err = create_or_get_kcb_cap(target_id, &kcb);
     if (err_is_fail(err)) {
@@ -315,6 +319,10 @@ static int stop_cpu(int argc, char** argv)
         USER_PANIC_ERR(err, "get_apic_id failed.");
     }
 
+    if (cpu_type == CPU_ARM7 || cpu_type == CPU_ARM8) {
+        USER_PANIC("don't know how to stop core on this architecture!");
+    }
+
     err = sys_debug_send_ipi(target_hwid, 0, APIC_INTER_HALT_VECTOR);
     if (err_is_fail(err)) {
         USER_PANIC_ERR(err, "debug_send_ipi to power it down failed.");