score: Set boot CPU properties before others

This allows other CPUs to figure out the boot CPU.
This commit is contained in:
Sebastian Huber
2024-09-23 02:17:45 +02:00
parent 7bd4725942
commit 296d7150f0

View File

@@ -94,6 +94,8 @@ static void _SMP_Start_processors( uint32_t cpu_max )
uint32_t cpu_index;
cpu_self = _Per_CPU_Get();
cpu_self->boot = true;
cpu_self->online = true;
for ( cpu_index = 0 ; cpu_index < cpu_max; ++cpu_index ) {
const Scheduler_Assignment *assignment;
@@ -113,17 +115,15 @@ static void _SMP_Start_processors( uint32_t cpu_max )
} else {
started = false;
}
cpu->online = started;
} else {
started = true;
cpu->boot = true;
if ( !_Scheduler_Should_start_processor( assignment ) ) {
_SMP_Fatal( SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER );
}
}
cpu->online = started;
started = true;
}
if ( started ) {
const Scheduler_Control *scheduler;