diff options
Diffstat (limited to 'Kernel/Arch/aarch64/Processor.h')
-rw-r--r-- | Kernel/Arch/aarch64/Processor.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h index ed2e6bfdd8..17393471cf 100644 --- a/Kernel/Arch/aarch64/Processor.h +++ b/Kernel/Arch/aarch64/Processor.h @@ -22,6 +22,7 @@ class PageDirectory; }; class Thread; +class Processor; // FIXME This needs to go behind some sort of platform abstraction // it is used between Thread and Processor. @@ -30,8 +31,13 @@ struct [[gnu::aligned(16)]] FPUState u8 buffer[512]; }; +// FIXME: Remove this once we support SMP in aarch64 +extern Processor* g_current_processor; + class Processor { public: + void initialize(u32 cpu); + void set_specific(ProcessorSpecificDataID /*specific_id*/, void* /*ptr*/) { VERIFY_NOT_REACHED(); @@ -79,9 +85,9 @@ public: VERIFY_NOT_REACHED(); } + // FIXME: When aarch64 supports multiple cores, return the correct core id here. ALWAYS_INLINE static u32 current_id() { - VERIFY_NOT_REACHED(); return 0; } @@ -127,7 +133,10 @@ public: return nullptr; } - ALWAYS_INLINE static Processor& current() { VERIFY_NOT_REACHED(); } + ALWAYS_INLINE static Processor& current() + { + return *g_current_processor; + } static void deferred_call_queue(Function<void()> /* callback */) { |