mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 18:55:07 +00:00
AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
Use this instead of uintptr_t throughout the codebase. This makes it possible to pass a FlatPtr to something that has u32 and u64 overloads.
This commit is contained in:
parent
b98d8ad5b0
commit
b1058b33fb
36 changed files with 164 additions and 161 deletions
|
@ -32,9 +32,9 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
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 const FlatPtr userspace_range_base = 0x00800000;
|
||||
static const FlatPtr userspace_range_ceiling = 0xbe000000;
|
||||
static const FlatPtr kernelspace_range_base = 0xc0800000;
|
||||
|
||||
static HashMap<u32, PageDirectory*>& cr3_map()
|
||||
{
|
||||
|
@ -60,9 +60,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((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));
|
||||
PhysicalAddress boot_pdpt_paddr(virtual_to_low_physical((FlatPtr)boot_pdpt));
|
||||
PhysicalAddress boot_pd0_paddr(virtual_to_low_physical((FlatPtr)boot_pd0));
|
||||
PhysicalAddress boot_pd3_paddr(virtual_to_low_physical((FlatPtr)boot_pd3));
|
||||
klog() << "MM: boot_pdpt @ " << boot_pdpt_paddr;
|
||||
klog() << "MM: boot_pd0 @ " << boot_pd0_paddr;
|
||||
klog() << "MM: boot_pd3 @ " << boot_pd3_paddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue