diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-01 19:54:55 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-01 19:54:55 -0400 |
commit | cf1bddb5a9d7a484044cb74e6580c739f254e115 (patch) | |
tree | 01b63d233481956442677edf9eb256ff8d3b815a /sys/arch | |
parent | 9cfd49d1f39c0a32e13e405efc3903f1f0e4ff19 (diff) |
kernel/amd64: mp: Add BSP to `ci_list'
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/mp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/mp.c b/sys/arch/amd64/amd64/mp.c index fe0dd9f..1e6d8d9 100644 --- a/sys/arch/amd64/amd64/mp.c +++ b/sys/arch/amd64/amd64/mp.c @@ -46,7 +46,7 @@ static volatile struct limine_smp_request g_smp_req = { .revision = 0 }; -static volatile uint32_t ncpu_up = 0; +static volatile uint32_t ncpu_up = 1; static struct cpu_info *ci_list[CPU_MAX]; static struct spinlock ci_list_lock = {0}; @@ -97,6 +97,7 @@ mp_bootstrap_aps(struct cpu_info *ci) cpus = resp->cpus; cpu_init_counter = resp->cpu_count - 1; + ci_list[0] = ci; if (resp->cpu_count == 1) { pr_trace("CPU has 1 core, no APs to bootstrap...\n"); @@ -114,5 +115,5 @@ mp_bootstrap_aps(struct cpu_info *ci) } /* Wait for all cores to be ready */ - while (ncpu_up < cpu_init_counter); + while ((ncpu_up - 1) < cpu_init_counter); } |