1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

Kernel/riscv64: Make the kernel compile

This commits inserts TODOs into all necessary places to make the kernel
compile on riscv64!
This commit is contained in:
Sönke Holz 2023-11-02 23:21:09 +01:00 committed by Andrew Kaster
parent b6ac2ed34d
commit da88d766b2
37 changed files with 633 additions and 5 deletions

View file

@ -18,6 +18,7 @@
# include <Kernel/Arch/x86_64/Time/RTC.h>
#elif ARCH(AARCH64)
# include <Kernel/Arch/aarch64/RPi/Timer.h>
#elif ARCH(RISCV64)
#else
# error Unknown architecture
#endif
@ -135,6 +136,8 @@ MonotonicTime TimeManagement::monotonic_time(TimePrecision precision) const
#elif ARCH(AARCH64)
// FIXME: Get rid of these horrible casts
const_cast<RPi::Timer*>(static_cast<RPi::Timer const*>(m_system_timer.ptr()))->update_time(seconds, ticks, true);
#elif ARCH(RISCV64)
TODO_RISCV64();
#else
# error Unknown architecture
#endif
@ -203,6 +206,8 @@ UNMAP_AFTER_INIT void TimeManagement::initialize([[maybe_unused]] u32 cpu)
VERIFY(!s_the.is_initialized());
s_the.ensure_instance();
}
#elif ARCH(RISCV64)
TODO_RISCV64();
#else
# error Unknown architecture
#endif
@ -231,7 +236,7 @@ UnixDateTime TimeManagement::boot_time()
{
#if ARCH(X86_64)
return RTC::boot_time();
#elif ARCH(AARCH64)
#elif ARCH(AARCH64) || ARCH(RISCV64)
// FIXME: Return correct boot time
return UnixDateTime::epoch();
#else
@ -271,6 +276,8 @@ UNMAP_AFTER_INIT TimeManagement::TimeManagement()
}
#elif ARCH(AARCH64)
probe_and_set_aarch64_hardware_timers();
#elif ARCH(RISCV64)
probe_and_set_riscv64_hardware_timers();
#else
# error Unknown architecture
#endif
@ -474,6 +481,11 @@ UNMAP_AFTER_INIT bool TimeManagement::probe_and_set_aarch64_hardware_timers()
return true;
}
#elif ARCH(RISCV64)
UNMAP_AFTER_INIT bool TimeManagement::probe_and_set_riscv64_hardware_timers()
{
TODO_RISCV64();
}
#else
# error Unknown architecture
#endif