mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-24 01:19:38 +03:00
pmm: Mark Limine image wholly as bootloader reclaimable in memory map when using UEFI
This commit is contained in:
parent
30fd281860
commit
3fe82174f7
@ -276,6 +276,9 @@ void init_memmap(void) {
|
||||
#endif
|
||||
|
||||
#if uefi == 1
|
||||
extern symbol ImageBase;
|
||||
extern symbol _edata;
|
||||
|
||||
void init_memmap(void) {
|
||||
EFI_STATUS status;
|
||||
|
||||
@ -382,6 +385,12 @@ void init_memmap(void) {
|
||||
memcpy(untouched_memmap, memmap, memmap_entries * sizeof(struct e820_entry_t));
|
||||
untouched_memmap_entries = memmap_entries;
|
||||
|
||||
// Allocate bootloader itself
|
||||
memmap_alloc_range((uintptr_t)ImageBase, (uintptr_t)_edata - (uintptr_t)ImageBase,
|
||||
MEMMAP_BOOTLOADER_RECLAIMABLE, false, true, false, true);
|
||||
|
||||
sanitise_entries(memmap, &memmap_entries, false);
|
||||
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
Loading…
Reference in New Issue
Block a user