mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37: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
|
@ -457,6 +457,20 @@ void signal_trampoline_dummy()
|
|||
".global asm_signal_trampoline_end\n"
|
||||
"asm_signal_trampoline_end: \n" ::[sigreturn_syscall_number] "i"(Syscall::SC_sigreturn),
|
||||
[offset_to_first_register_slot] "i"(offset_to_first_register_slot));
|
||||
#elif ARCH(RISCV64)
|
||||
constexpr static auto offset_to_a0_slot = align_up_to(sizeof(__ucontext) + sizeof(siginfo) + sizeof(FPUState) + 3 * sizeof(FlatPtr), 16);
|
||||
asm(
|
||||
".global asm_signal_trampoline\n"
|
||||
"asm_signal_trampoline:\n"
|
||||
// stack state: 0, ucontext, signal_info (alignment = 16), fpu_state (alignment = 16), ucontext*, siginfo*, signal, handler
|
||||
|
||||
// FIXME: Implement this
|
||||
"unimp\n"
|
||||
|
||||
"\n"
|
||||
".global asm_signal_trampoline_end\n"
|
||||
"asm_signal_trampoline_end: \n" ::[sigreturn_syscall_number] "i"(Syscall::SC_sigreturn),
|
||||
[offset_to_first_register_slot] "i"(offset_to_a0_slot));
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
@ -500,6 +514,8 @@ void Process::crash(int signal, Optional<RegisterState const&> regs, bool out_of
|
|||
constexpr bool userspace_backtrace = false;
|
||||
#elif ARCH(AARCH64)
|
||||
constexpr bool userspace_backtrace = true;
|
||||
#elif ARCH(RISCV64)
|
||||
constexpr bool userspace_backtrace = true;
|
||||
#else
|
||||
# error "Unknown architecture"
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue