Skip to content

Commit

Permalink
limine: Fix up junk introduced by 303592f
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Sep 16, 2023
1 parent f7368f8 commit 14037f4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions common/protos/limine.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,16 @@ static pagemap_t build_pagemap(int paging_mode, bool nx, struct elf_range *range
}
}

size_t _memmap_entries = memmap_entries;
struct memmap_entry *_memmap =
ext_mem_alloc(_memmap_entries * sizeof(struct memmap_entry));
for (size_t i = 0; i < _memmap_entries; i++)
_memmap[i] = memmap[i];

// Map 0->4GiB range to HHDM
for (uint64_t i = 0; i < 0x100000000; i += 0x40000000) {
map_page(pagemap, direct_map_offset + i, i, VMM_FLAG_WRITE, Size1GiB);
}

print_memmap(memmap, memmap_entries);
size_t _memmap_entries = memmap_entries;
struct memmap_entry *_memmap =
ext_mem_alloc(_memmap_entries * sizeof(struct memmap_entry));
for (size_t i = 0; i < _memmap_entries; i++)
_memmap[i] = memmap[i];

// Map all free memory regions to the higher half direct map offset
for (size_t i = 0; i < _memmap_entries; i++) {
Expand Down

0 comments on commit 14037f4

Please sign in to comment.