diff options
author | Filiph Sandström <filiph.sandstrom@filfatstudios.com> | 2022-08-17 12:38:58 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-09-12 00:56:44 +0100 |
commit | 7e1e208d089cb873931b4180be9227cb46b47235 (patch) | |
tree | 489162c70ba025035ec277e5551ce403b75c2677 /Kernel/Arch/aarch64/Processor.h | |
parent | 14fe03569a02caeb2b9bcc21c65caa5abb67139e (diff) | |
download | serenity-7e1e208d089cb873931b4180be9227cb46b47235.zip |
Kernel: Add basic aarch64 support to `MemoryManager`
FIXME: There's still a lot to do like for example, port `quickmap_page`.
This does however get us further into the boot process than before.
Diffstat (limited to 'Kernel/Arch/aarch64/Processor.h')
-rw-r--r-- | Kernel/Arch/aarch64/Processor.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h index 4dd878e15a..a6e93d8dbd 100644 --- a/Kernel/Arch/aarch64/Processor.h +++ b/Kernel/Arch/aarch64/Processor.h @@ -13,8 +13,7 @@ #include <Kernel/Arch/ProcessorSpecificDataID.h> #include <Kernel/Arch/aarch64/Registers.h> - -class VirtualAddress; +#include <Kernel/VirtualAddress.h> namespace Kernel { @@ -36,18 +35,19 @@ struct [[gnu::aligned(16)]] FPUState extern Processor* g_current_processor; class Processor { + void* m_processor_specific_data[static_cast<size_t>(ProcessorSpecificDataID::__Count)]; + public: void initialize(u32 cpu); - void set_specific(ProcessorSpecificDataID /*specific_id*/, void* /*ptr*/) - { - VERIFY_NOT_REACHED(); - } template<typename T> T* get_specific() { - VERIFY_NOT_REACHED(); - return 0; + return static_cast<T*>(m_processor_specific_data[static_cast<size_t>(T::processor_specific_data_id())]); + } + void set_specific(ProcessorSpecificDataID specific_id, void* ptr) + { + m_processor_specific_data[static_cast<size_t>(specific_id)] = ptr; } ALWAYS_INLINE static void pause() @@ -76,11 +76,7 @@ public: return false; } - ALWAYS_INLINE static void flush_tlb_local(VirtualAddress&, size_t&) - { - VERIFY_NOT_REACHED(); - } - + static void flush_tlb_local(VirtualAddress vaddr, size_t page_count); ALWAYS_INLINE static void flush_tlb(Memory::PageDirectory const*, VirtualAddress const&, size_t) { VERIFY_NOT_REACHED(); |