Kernel: Initialize TimeManagement before using KernelRNG

We should initialize the timers before KernelRNG as the RNG may want
to utilize system time as an entropy source.

Fixes #8710
This commit is contained in:
Tom 2021-07-16 14:57:44 -06:00 committed by Andreas Kling
commit 3cca9e6704
Notes: sideshowbarker 2024-07-18 08:54:13 +09:00

View file

@ -144,14 +144,15 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init()
InterruptManagement::initialize();
ACPI::initialize();
// Initialize TimeManagement before using randomness!
TimeManagement::initialize(0);
__stack_chk_guard = get_fast_random<u32>();
ProcFSComponentRegistry::initialize();
Thread::initialize();
Process::initialize();
TimeManagement::initialize(0);
Scheduler::initialize();
dmesgln("Starting SerenityOS...");