Переглянути джерело

Kernel: Add more AARCH64 stubs

Gunnar Beutner 2 роки тому
батько
коміт
63a91d6971

+ 15 - 0
Kernel/Arch/aarch64/Processor.cpp

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

+ 6 - 0
Kernel/Arch/aarch64/Processor.h

@@ -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 };
 

+ 10 - 0
Kernel/Arch/aarch64/RegisterState.h

@@ -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)

+ 3 - 0
Kernel/Process.cpp

@@ -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