This is basically a no-op but ensures we are doing smp
bringup correctly.

---
 i386/i386/mp_desc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c
index 7595eb1e..295fccc7 100644
--- a/i386/i386/mp_desc.c
+++ b/i386/i386/mp_desc.c
@@ -323,7 +323,9 @@ start_other_cpus(void)
        memcpy((void*) phystokv(apboot_addr), (void*) &apboot,
               (uint32_t)&apbootend - (uint32_t)&apboot);
 
-       unsigned cpu;
+       unsigned cpu = cpu_number_slow();
+
+       assert (cpu == 0);
 
        asm volatile ("cli");
 
-- 
2.45.2



Reply via email to