diff --git a/AK/Format.cpp b/AK/Format.cpp index e88f516c09..5233096b28 100644 --- a/AK/Format.cpp +++ b/AK/Format.cpp @@ -933,10 +933,8 @@ void vdmesgln(StringView fmtstr, TypeErasedFormatParams& params) # ifdef AK_OS_SERENITY struct timespec ts = {}; -# if !ARCH(AARCH64) if (TimeManagement::is_initialized()) ts = TimeManagement::the().monotonic_time(TimePrecision::Coarse).to_timespec(); -# endif if (Kernel::Processor::is_initialized() && Kernel::Thread::current()) { auto& thread = *Kernel::Thread::current(); diff --git a/Kernel/Arch/aarch64/init.cpp b/Kernel/Arch/aarch64/init.cpp index 10057e612f..ef6caf9163 100644 --- a/Kernel/Arch/aarch64/init.cpp +++ b/Kernel/Arch/aarch64/init.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -144,20 +143,23 @@ extern "C" [[noreturn]] void init() InterruptManagement::initialize(); Processor::enable_interrupts(); + TimeManagement::initialize(0); + auto firmware_version = query_firmware_version(); dmesgln("Firmware version: {}", firmware_version); - auto& timer = RPi::Timer::the(); - timer.set_interrupt_interval_usec(1'000'000); - timer.enable_interrupt_mode(); - dmesgln("Enter loop"); // This will not disable interrupts, so the timer will still fire and show that // interrupts are working! - for (;;) + for (u32 i = 0;; i++) { asm volatile("wfi"); + // NOTE: This shows that dmesgln now outputs the time since boot! + if (i % 250 == 0) + dmesgln("Timer fired!"); + } + TODO_AARCH64(); }