1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Kernel: Fix the variable declaration for some linker script symbols

Despite what the declaration would have us believe these are not "u8*".
If they were we wouldn't have to use the & operator to get the address
of them and then cast them to "u8*"/FlatPtr afterwards.
This commit is contained in:
Gunnar Beutner 2021-07-22 22:11:17 +02:00 committed by Andreas Kling
parent 40580696a6
commit f2be1f9326
4 changed files with 75 additions and 75 deletions

View file

@ -13,7 +13,7 @@
#include <Kernel/VM/MemoryManager.h>
#include <Kernel/VM/PageDirectory.h>
extern u8* end_of_kernel_image;
extern u8 end_of_kernel_image[];
namespace Kernel {
@ -34,7 +34,7 @@ RefPtr<PageDirectory> PageDirectory::find_by_cr3(FlatPtr cr3)
UNMAP_AFTER_INIT PageDirectory::PageDirectory()
{
// make sure this starts in a new page directory to make MemoryManager::initialize_physical_pages() happy
FlatPtr start_of_range = ((FlatPtr)&end_of_kernel_image & ~(FlatPtr)0x1fffff) + 0x200000;
FlatPtr start_of_range = ((FlatPtr)end_of_kernel_image & ~(FlatPtr)0x1fffff) + 0x200000;
m_range_allocator.initialize_with_range(VirtualAddress(start_of_range), KERNEL_PD_END - start_of_range);
m_identity_range_allocator.initialize_with_range(VirtualAddress(FlatPtr(0x00000000)), 0x00200000);
}