1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-23 08:17:34 +00:00

Kernel: Add more AARCH64 stubs

This commit is contained in:
Gunnar Beutner 2022-10-16 21:51:08 +02:00 committed by Linus Groh
parent bf3c99ef23
commit 63a91d6971
4 changed files with 34 additions and 0 deletions

View file

@ -5,6 +5,7 @@
*/
#include <AK/Format.h>
#include <AK/Vector.h>
#include <Kernel/Arch/Processor.h>
#include <Kernel/Arch/aarch64/ASM_wrapper.h>
@ -58,4 +59,18 @@ u32 Processor::clear_critical()
TODO_AARCH64();
}
u32 Processor::smp_wake_n_idle_processors(u32 wake_count)
{
(void)wake_count;
TODO_AARCH64();
}
ErrorOr<Vector<FlatPtr, 32>> Processor::capture_stack_trace(Thread& thread, size_t max_frames)
{
(void)thread;
(void)max_frames;
TODO_AARCH64();
return Vector<FlatPtr, 32> {};
}
}

View file

@ -160,6 +160,8 @@ public:
VERIFY(!Processor::in_critical());
}
ALWAYS_INLINE static FPUState const& clean_fpu_state() { TODO_AARCH64(); }
// FIXME: Actually return the idle thread once aarch64 supports threading.
ALWAYS_INLINE static Thread* idle_thread()
{
@ -182,8 +184,12 @@ public:
TODO_AARCH64();
}
static u32 smp_wake_n_idle_processors(u32 wake_count);
[[noreturn]] static void halt();
static ErrorOr<Vector<FlatPtr, 32>> capture_stack_trace(Thread& thread, size_t max_frames = 0);
private:
u32 m_in_critical { 0 };

View file

@ -15,7 +15,17 @@ namespace Kernel {
struct RegisterState {
FlatPtr userspace_sp() const { return 0; }
void set_userspace_sp(FlatPtr value)
{
(void)value;
TODO_AARCH64();
}
FlatPtr ip() const { return 0; }
void set_ip(FlatPtr value)
{
(void)value;
TODO_AARCH64();
}
};
inline void copy_kernel_registers_into_ptrace_registers(PtraceRegisters& ptrace_regs, RegisterState const& kernel_regs)

View file

@ -189,6 +189,9 @@ LockRefPtr<Process> Process::create_kernel_process(LockRefPtr<Thread>& first_thr
first_thread->regs().esp = FlatPtr(entry_data); // entry function argument is expected to be in regs.esp
#elif ARCH(X86_64)
first_thread->regs().rdi = FlatPtr(entry_data); // entry function argument is expected to be in regs.rdi
#elif ARCH(AARCH64)
(void)entry_data;
TODO_AARCH64();
#else
# error Unknown architecture
#endif