1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

Kernel: Add support for kernel addresses other than 3-4GB

This commit is contained in:
Gunnar Beutner 2021-07-17 02:42:59 +02:00 committed by Andreas Kling
parent 6c6b778e2e
commit b708b23b13
5 changed files with 28 additions and 29 deletions

View file

@ -141,10 +141,11 @@ class PageDirectoryPointerTable {
public:
PageDirectoryEntry* directory(size_t index)
{
VERIFY(index <= (NumericLimits<size_t>::max() << 30));
return (PageDirectoryEntry*)(PhysicalAddress::physical_page_base(raw[index]));
}
u64 raw[4];
u64 raw[512];
};
}

View file

@ -390,10 +390,10 @@ pae_supported:
movl $(boot_pdpt - KERNEL_BASE), %edi
#if ARCH(X86_64)
movl $((boot_pd0 - KERNEL_BASE) + 3), 0(%edi)
movl $((boot_pd3 - KERNEL_BASE) + 3), 24(%edi)
movl $((boot_pd3 - KERNEL_BASE) + 3), (8 * (KERNEL_BASE >> 30 & 0x1ff))(%edi)
#else
movl $((boot_pd0 - KERNEL_BASE) + 1), 0(%edi)
movl $((boot_pd3 - KERNEL_BASE) + 1), 24(%edi)
movl $((boot_pd3 - KERNEL_BASE) + 1), (8 * (KERNEL_BASE >> 30 & 0x1ff))(%edi)
#endif
/* clear pd0 */