mirror of
https://github.com/RGBCube/serenity
synced 2025-09-13 08:57:35 +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:
parent
b6ac2ed34d
commit
da88d766b2
37 changed files with 633 additions and 5 deletions
|
@ -107,6 +107,8 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
|
|||
clac();
|
||||
#elif ARCH(AARCH64)
|
||||
// FIXME: Implement the security mechanism for aarch64
|
||||
#elif ARCH(RISCV64)
|
||||
// FIXME: Implement the security mechanism for riscv64
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
@ -148,6 +150,8 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
|
|||
}
|
||||
#elif ARCH(AARCH64)
|
||||
// FIXME: Implement the security mechanism for aarch64
|
||||
#elif ARCH(RISCV64)
|
||||
// FIXME: Implement the security mechanism for riscv64
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
|
|
@ -156,6 +156,10 @@ static ErrorOr<FlatPtr> make_userspace_context_for_main_thread([[maybe_unused]]
|
|||
regs.x[0] = argv_entries.size();
|
||||
regs.x[1] = argv;
|
||||
regs.x[2] = envp;
|
||||
#elif ARCH(RISCV64)
|
||||
(void)argv;
|
||||
(void)envp;
|
||||
TODO_RISCV64();
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
@ -737,6 +741,8 @@ static Array<ELF::AuxiliaryValue, auxiliary_vector_size> generate_auxiliary_vect
|
|||
{ ELF::AuxiliaryValue::HwCap, (long)CPUID(1).edx() },
|
||||
#elif ARCH(AARCH64)
|
||||
{ ELF::AuxiliaryValue::HwCap, (long)0 },
|
||||
#elif ARCH(RISCV64)
|
||||
{ ELF::AuxiliaryValue::HwCap, (long)0 }, // TODO
|
||||
#else
|
||||
# error "Unknown architecture"
|
||||
#endif
|
||||
|
|
|
@ -150,6 +150,10 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
|
|||
child_regs.spsr_el1 = regs.spsr_el1;
|
||||
child_regs.elr_el1 = regs.elr_el1;
|
||||
child_regs.sp_el0 = regs.sp_el0;
|
||||
#elif ARCH(RISCV64)
|
||||
(void)child_regs;
|
||||
(void)regs;
|
||||
TODO_RISCV64();
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
|
|
@ -258,6 +258,9 @@ ErrorOr<FlatPtr> Thread::peek_debug_register(u32 register_index)
|
|||
#elif ARCH(AARCH64)
|
||||
(void)register_index;
|
||||
TODO_AARCH64();
|
||||
#elif ARCH(RISCV64)
|
||||
(void)register_index;
|
||||
TODO_RISCV64();
|
||||
#else
|
||||
# error "Unknown architecture"
|
||||
#endif
|
||||
|
@ -290,6 +293,10 @@ ErrorOr<void> Thread::poke_debug_register(u32 register_index, FlatPtr data)
|
|||
(void)register_index;
|
||||
(void)data;
|
||||
TODO_AARCH64();
|
||||
#elif ARCH(RISCV64)
|
||||
(void)register_index;
|
||||
(void)data;
|
||||
TODO_RISCV64();
|
||||
#else
|
||||
# error "Unknown architecture"
|
||||
#endif
|
||||
|
|
|
@ -76,6 +76,8 @@ ErrorOr<FlatPtr> Process::sys$create_thread(void* (*entry)(void*), Userspace<Sys
|
|||
regs.x[1] = (FlatPtr)params.entry_argument;
|
||||
regs.x[2] = (FlatPtr)params.stack_location;
|
||||
regs.x[3] = (FlatPtr)params.stack_size;
|
||||
#elif ARCH(RISCV64)
|
||||
TODO_RISCV64();
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,8 @@ namespace Kernel {
|
|||
# define UNAME_MACHINE "x86_64"
|
||||
#elif ARCH(AARCH64)
|
||||
# define UNAME_MACHINE "AArch64"
|
||||
#elif ARCH(RISCV64)
|
||||
# define UNAME_MACHINE "riscv64"
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue