diff options
author | James Mintram <me@jamesrm.com> | 2022-04-02 23:48:04 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-04-02 19:34:20 -0700 |
commit | d3b6201b405fb7a041b5e12001c2dee4de072ef5 (patch) | |
tree | b3c587801514f68e797c814b3fdd3764e28d7404 /Kernel | |
parent | 783a44b18ed837ac1aa8891acc47cf06d629817f (diff) | |
download | serenity-d3b6201b405fb7a041b5e12001c2dee4de072ef5.zip |
Kernel: Make PageDirectory.cpp compile on aarch64
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Arch/PageDirectory.h (renamed from Kernel/Arch/x86/PageDirectory.h) | 2 | ||||
-rw-r--r-- | Kernel/Arch/PageFault.h (renamed from Kernel/Arch/x86/PageFault.h) | 4 | ||||
-rw-r--r-- | Kernel/Arch/aarch64/Processor.h | 3 | ||||
-rw-r--r-- | Kernel/Arch/x86/Processor.h | 2 | ||||
-rw-r--r-- | Kernel/Arch/x86/common/Interrupts.cpp | 2 | ||||
-rw-r--r-- | Kernel/Memory/MemoryManager.cpp | 2 | ||||
-rw-r--r-- | Kernel/Memory/PageDirectory.cpp | 2 |
7 files changed, 10 insertions, 7 deletions
diff --git a/Kernel/Arch/x86/PageDirectory.h b/Kernel/Arch/PageDirectory.h index 7c8e7e2cf9..1fddb0ad4f 100644 --- a/Kernel/Arch/x86/PageDirectory.h +++ b/Kernel/Arch/PageDirectory.h @@ -12,7 +12,6 @@ #include <Kernel/PhysicalAddress.h> #include <AK/Platform.h> -VALIDATE_IS_X86() namespace Kernel { @@ -83,6 +82,7 @@ public: PhysicalPtr physical_page_base() const { return PhysicalAddress::physical_page_base(m_raw); } void set_physical_page_base(PhysicalPtr value) { + // FIXME: IS THIS PLATFORM SPECIFIC? m_raw &= 0x8000000000000fffULL; m_raw |= PhysicalAddress::physical_page_base(value); } diff --git a/Kernel/Arch/x86/PageFault.h b/Kernel/Arch/PageFault.h index a51c3e3874..1d939d8ea2 100644 --- a/Kernel/Arch/x86/PageFault.h +++ b/Kernel/Arch/PageFault.h @@ -6,12 +6,10 @@ #pragma once +#include <AK/Platform.h> #include <AK/Types.h> #include <Kernel/VirtualAddress.h> -#include <AK/Platform.h> -VALIDATE_IS_X86() - namespace Kernel { struct PageFaultFlags { diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h index 512c13da45..76d1e30788 100644 --- a/Kernel/Arch/aarch64/Processor.h +++ b/Kernel/Arch/aarch64/Processor.h @@ -33,6 +33,9 @@ public: ALWAYS_INLINE static void pause() { } ALWAYS_INLINE static void wait_check() { } + ALWAYS_INLINE u8 physical_address_bit_width() const { return 0; } + ALWAYS_INLINE u8 virtual_address_bit_width() const { return 0; } + ALWAYS_INLINE static bool is_initialized() { return false; diff --git a/Kernel/Arch/x86/Processor.h b/Kernel/Arch/x86/Processor.h index cd93b2bf37..05493f82e0 100644 --- a/Kernel/Arch/x86/Processor.h +++ b/Kernel/Arch/x86/Processor.h @@ -12,11 +12,11 @@ #include <AK/Types.h> #include <Kernel/Arch/DeferredCallEntry.h> +#include <Kernel/Arch/PageDirectory.h> #include <Kernel/Arch/ProcessorSpecificDataID.h> #include <Kernel/Arch/x86/ASM_wrapper.h> #include <Kernel/Arch/x86/CPUID.h> #include <Kernel/Arch/x86/DescriptorTable.h> -#include <Kernel/Arch/x86/PageDirectory.h> #include <Kernel/Arch/x86/TSS.h> #include <Kernel/Forward.h> #include <Kernel/KString.h> diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp index e87601130d..a29c6ecdb4 100644 --- a/Kernel/Arch/x86/common/Interrupts.cpp +++ b/Kernel/Arch/x86/common/Interrupts.cpp @@ -23,10 +23,10 @@ #include <LibC/mallocdefs.h> +#include <Kernel/Arch/PageFault.h> #include <Kernel/Arch/Processor.h> #include <Kernel/Arch/RegisterState.h> #include <Kernel/Arch/x86/ISRStubs.h> -#include <Kernel/Arch/x86/PageFault.h> #include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/Arch/x86/TrapFrame.h> diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp index f5cdfbe825..b00fcbda91 100644 --- a/Kernel/Memory/MemoryManager.cpp +++ b/Kernel/Memory/MemoryManager.cpp @@ -7,7 +7,7 @@ #include <AK/Assertions.h> #include <AK/Memory.h> #include <AK/StringView.h> -#include <Kernel/Arch/x86/PageFault.h> +#include <Kernel/Arch/PageFault.h> #include <Kernel/BootInfo.h> #include <Kernel/CMOS.h> #include <Kernel/FileSystem/Inode.h> diff --git a/Kernel/Memory/PageDirectory.cpp b/Kernel/Memory/PageDirectory.cpp index dc0a652860..b6030ee9bb 100644 --- a/Kernel/Memory/PageDirectory.cpp +++ b/Kernel/Memory/PageDirectory.cpp @@ -6,6 +6,8 @@ #include <AK/Memory.h> #include <AK/Singleton.h> +#include <Kernel/Arch/CPU.h> +#include <Kernel/Arch/PageDirectory.h> #include <Kernel/Memory/MemoryManager.h> #include <Kernel/Memory/PageDirectory.h> #include <Kernel/Prekernel/Prekernel.h> |