Skip to content

Commit

Permalink
Kernel: Add more AARCH64 stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarbeutner authored and linusg committed Oct 18, 2022
1 parent bf3c99e commit 63a91d6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Kernel/Arch/aarch64/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <AK/Format.h>
#include <AK/Vector.h>

#include <Kernel/Arch/Processor.h>
#include <Kernel/Arch/aarch64/ASM_wrapper.h>
Expand Down Expand Up @@ -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> {};
}

}
6 changes: 6 additions & 0 deletions Kernel/Arch/aarch64/Processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ class Processor {
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()
{
Expand All @@ -182,8 +184,12 @@ class Processor {
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 };

Expand Down
10 changes: 10 additions & 0 deletions Kernel/Arch/aarch64/RegisterState.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions Kernel/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63a91d6

Please sign in to comment.