mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
Kernel: Put x86_64 specific VERIFY in PageDirectory.cpp behind ifdef
This makes it possible to run this code on aarch64.
This commit is contained in:
parent
5a5fa10046
commit
0d2dffb95b
Notes:
sideshowbarker
2024-07-17 09:49:33 +09:00
Author: https://github.com/FireFox317
Commit: 0d2dffb95b
Pull-request: https://github.com/SerenityOS/serenity/pull/16690
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/nico ✅
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,7 @@ ErrorOr<NonnullLockRefPtr<PageDirectory>> 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<NonnullLockRefPtr<PageDirectory>> 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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue