Kernel: Add more stubs needed for Thread.cpp

This commit is contained in:
Gunnar Beutner 2022-10-16 16:58:44 +02:00 committed by Linus Groh
parent 1e3edb3b76
commit 69efded562
4 changed files with 27 additions and 0 deletions

View file

@ -53,4 +53,9 @@ void Processor::flush_tlb(Memory::PageDirectory const*, VirtualAddress vaddr, si
flush_tlb_local(vaddr, page_count);
}
u32 Processor::clear_critical()
{
TODO_AARCH64();
}
}

View file

@ -142,6 +142,14 @@ public:
current_processor.m_in_critical = current_processor.in_critical() - 1;
}
static u32 clear_critical();
ALWAYS_INLINE static void restore_critical(u32 prev_critical)
{
(void)prev_critical;
TODO_AARCH64();
}
ALWAYS_INLINE static u32 in_critical()
{
return current().m_in_critical;

View file

@ -6,6 +6,8 @@
#pragma once
#include <LibC/sys/arch/i386/regs.h>
#include <AK/Platform.h>
VALIDATE_IS_AARCH64()
@ -16,6 +18,13 @@ struct RegisterState {
FlatPtr ip() const { return 0; }
};
inline void copy_kernel_registers_into_ptrace_registers(PtraceRegisters& ptrace_regs, RegisterState const& kernel_regs)
{
(void)ptrace_regs;
(void)kernel_regs;
TODO_AARCH64();
}
struct DebugRegisterState {
};

View file

@ -101,6 +101,8 @@ Thread::Thread(NonnullLockRefPtr<Process> process, NonnullOwnPtr<Memory::Region>
m_regs.cs = GDT_SELECTOR_CODE0;
else
m_regs.cs = GDT_SELECTOR_CODE3 | 3;
#elif ARCH(AARCH64)
TODO_AARCH64();
#else
# error Unknown architecture
#endif
@ -1153,6 +1155,9 @@ DispatchSignalResult Thread::dispatch_signal(u8 signal)
constexpr static FlatPtr thread_red_zone_size = 0;
#elif ARCH(X86_64)
constexpr static FlatPtr thread_red_zone_size = 128;
#elif ARCH(AARCH64)
constexpr static FlatPtr thread_red_zone_size = 0; // FIXME
TODO_AARCH64();
#else
# error Unknown architecture in dispatch_signal
#endif