From 0d2dffb95b2f5b898e352af251b73e7cdcb2fcb1 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Wed, 28 Dec 2022 23:30:21 +0100 Subject: [PATCH] Kernel: Put x86_64 specific VERIFY in PageDirectory.cpp behind ifdef This makes it possible to run this code on aarch64. --- Kernel/Memory/PageDirectory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/Memory/PageDirectory.cpp b/Kernel/Memory/PageDirectory.cpp index ed8878e5ce..af7018d8ef 100644 --- a/Kernel/Memory/PageDirectory.cpp +++ b/Kernel/Memory/PageDirectory.cpp @@ -61,6 +61,7 @@ ErrorOr> PageDirectory::try_create_for_userspac } } +#if ARCH(X86_64) // 2 ** MAXPHYADDR - 1 // Where MAXPHYADDR = physical_address_bit_width u64 max_physical_address = (1ULL << Processor::current().physical_address_bit_width()) - 1; @@ -83,6 +84,7 @@ ErrorOr> PageDirectory::try_create_for_userspac // we're checking for sign extension when putting it into a PDPTE. See issue #4584. for (auto table_entry : table.raw) VERIFY((table_entry & ~pdpte_bit_flags) <= max_physical_address); +#endif MM.unquickmap_page(); }