UEFI Memory Allocation Page Flags
UEFI Memory Allocation Page Flags
When using UEFI to make a bootloader, the AllocatePages function can be used to allocate a certain set of pages of a specific memory type. Before memory can be used in long mode, it must be mapped. Is there a way to set/know which page table entry flags are used for when the memory for these allocations is mapped?
-
- Member
- Posts: 5655
- Joined: Mon Mar 25, 2013 7:01 pm
Re: UEFI Memory Allocation Page Flags
I don't think there's any way to know what will be used before you allocate it, but afterwards you should see the page attributes reflected in the memory map.
If you're worried about it, use EfiLoaderData for everything and switch to your own set of page tables between calling ExitBootServices and jumping to your kernel's entry point. (Or use a bootloader that handles it for you, like Limine.)
If you're worried about it, use EfiLoaderData for everything and switch to your own set of page tables between calling ExitBootServices and jumping to your kernel's entry point. (Or use a bootloader that handles it for you, like Limine.)