From 69a5179ceab731892d4912bcfba80ff91058ac0c Mon Sep 17 00:00:00 2001 From: Damien Zammit via Bug reports for the GNU Hurd <bug-hurd@gnu.org> Date: Tue, 10 Dec 2024 07:30:04 +0000 Subject: smp: Make sure BSP is cpu 0 when starting other cpus This is basically a no-op but ensures we are doing smp bringup correctly. Message-ID: <20241210072926.911061-5-damien@zamaudio.com> --- 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 f13a391a..3802cdc6 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); splhigh(); -- cgit v1.2.3