mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
Kernel: Verify we are running on hart 0
This is already an implicit assumption when we initialize our CPU id.
This commit is contained in:
parent
d3e285c253
commit
7102d90b2b
1 changed files with 5 additions and 0 deletions
|
@ -243,6 +243,11 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT NO_SANITIZE_COVERAGE void init([[maybe_
|
|||
new (&bsp_processor()) Processor();
|
||||
bsp_processor().early_initialize(0);
|
||||
|
||||
#if ARCH(RISCV64)
|
||||
// We implicitly assume the boot hart is hart 0 above and below
|
||||
VERIFY(boot_info.mhartid == 0);
|
||||
#endif
|
||||
|
||||
// Invoke the constructors needed for the kernel heap
|
||||
for (ctor_func_t* ctor = start_heap_ctors; ctor < end_heap_ctors; ctor++)
|
||||
(*ctor)();
|
||||
|
|
Loading…
Reference in a new issue