Skip to content

Commit

Permalink
Kernel: Add more stubs needed for Thread.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarbeutner authored and linusg committed Oct 16, 2022
1 parent 1e3edb3 commit 69efded
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Kernel/Arch/aarch64/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
8 changes: 8 additions & 0 deletions Kernel/Arch/aarch64/Processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ class Processor {
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;
Expand Down
9 changes: 9 additions & 0 deletions Kernel/Arch/aarch64/RegisterState.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#pragma once

#include <LibC/sys/arch/i386/regs.h>

#include <AK/Platform.h>
VALIDATE_IS_AARCH64()

Expand All @@ -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 {
};

Expand Down
5 changes: 5 additions & 0 deletions Kernel/Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 69efded

Please sign in to comment.