kernel: Ignore all non-bootstrap processors
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
60694f651f
commit
5d56638851
@ -26,6 +26,8 @@ namespace CPU
|
||||
void get_stack_trace_at(Registers* regs, void (*callback)(u64, void*), void* arg);
|
||||
void print_stack_trace_at(Registers* regs);
|
||||
|
||||
u16 get_processor_id();
|
||||
|
||||
[[noreturn]] void bootstrap_switch_stack(u64 stack, void* function);
|
||||
|
||||
void pause();
|
||||
|
@ -335,6 +335,14 @@ namespace CPU
|
||||
{
|
||||
asm volatile("pause");
|
||||
}
|
||||
|
||||
u16 get_processor_id()
|
||||
{
|
||||
unsigned int unused;
|
||||
unsigned int ebx = 0;
|
||||
__get_cpuid(1, &unused, &ebx, &unused, &unused);
|
||||
return (u16)(ebx >> 24);
|
||||
}
|
||||
}
|
||||
|
||||
// called by kernel_yield
|
||||
|
@ -17,6 +17,9 @@ void Init::check_magic()
|
||||
kerrorln("ERROR: Invalid magic value from bootloader");
|
||||
CPU::efficient_halt();
|
||||
}
|
||||
|
||||
// Stop all secondary processors for now
|
||||
if (CPU::get_processor_id() != bootboot.bspid) { CPU::efficient_halt(); }
|
||||
}
|
||||
|
||||
void Init::early_init()
|
||||
|
Loading…
Reference in New Issue
Block a user