diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-20 13:06:14 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-20 13:13:03 +0100 |
commit | a246e9cd7ea88613387ed6fb87dd5651b3d2ccac (patch) | |
tree | edd41b63a392c1b51daab4543c7487426b924004 /Kernel/VM/PageDirectory.cpp | |
parent | e07b34b9b839395da7e9f11de8faf85c74888291 (diff) | |
download | serenity-a246e9cd7ea88613387ed6fb87dd5651b3d2ccac.zip |
Use uintptr_t instead of u32 when storing pointers as integers
uintptr_t is 32-bit or 64-bit depending on the target platform.
This will help us write pointer size agnostic code so that when the day
comes that we want to do a 64-bit port, we'll be in better shape.
Diffstat (limited to 'Kernel/VM/PageDirectory.cpp')
-rw-r--r-- | Kernel/VM/PageDirectory.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/VM/PageDirectory.cpp b/Kernel/VM/PageDirectory.cpp index 38994152a4..9bb56d7b79 100644 --- a/Kernel/VM/PageDirectory.cpp +++ b/Kernel/VM/PageDirectory.cpp @@ -30,9 +30,9 @@ #include <Kernel/VM/MemoryManager.h> #include <Kernel/VM/PageDirectory.h> -static const u32 userspace_range_base = 0x00800000; -static const u32 userspace_range_ceiling = 0xbe000000; -static const u32 kernelspace_range_base = 0xc0800000; +static const uintptr_t userspace_range_base = 0x00800000; +static const uintptr_t userspace_range_ceiling = 0xbe000000; +static const uintptr_t kernelspace_range_base = 0xc0800000; static HashMap<u32, PageDirectory*>& cr3_map() { @@ -58,9 +58,9 @@ PageDirectory::PageDirectory() m_range_allocator.initialize_with_range(VirtualAddress(0xc0800000), 0x3f000000); // Adopt the page tables already set up by boot.S - PhysicalAddress boot_pdpt_paddr(virtual_to_low_physical((u32)boot_pdpt)); - PhysicalAddress boot_pd0_paddr(virtual_to_low_physical((u32)boot_pd0)); - PhysicalAddress boot_pd3_paddr(virtual_to_low_physical((u32)boot_pd3)); + PhysicalAddress boot_pdpt_paddr(virtual_to_low_physical((uintptr_t)boot_pdpt)); + PhysicalAddress boot_pd0_paddr(virtual_to_low_physical((uintptr_t)boot_pd0)); + PhysicalAddress boot_pd3_paddr(virtual_to_low_physical((uintptr_t)boot_pd3)); kprintf("MM: boot_pdpt @ P%p\n", boot_pdpt_paddr.get()); kprintf("MM: boot_pd0 @ P%p\n", boot_pd0_paddr.get()); kprintf("MM: boot_pd3 @ P%p\n", boot_pd3_paddr.get()); |