stivale2: Make sure memory at 0x70000 is actually free as per spec

This commit is contained in:
mintsuki 2021-04-15 04:08:20 +02:00
parent 06315dd809
commit 3c0fd2b56b
2 changed files with 6 additions and 0 deletions

View File

@ -203,6 +203,9 @@ void stivale_load(char *config, char *cmdline) {
bool want_5lv = level5pg && (stivale_hdr.flags & (1 << 1));
pagemap_t pagemap = stivale_build_pagemap(want_5lv, false);
// Reserve 32K at 0x70000
memmap_alloc_range(0x70000, 0x8000, MEMMAP_USABLE, true, true, false, false);
size_t memmap_entries;
struct e820_entry_t *memmap = get_memmap(&memmap_entries);

View File

@ -444,6 +444,9 @@ skip_modeset:;
ext_mem_alloc(sizeof(struct stivale2_struct_tag_memmap) +
sizeof(struct e820_entry_t) * 256);
// Reserve 32K at 0x70000
memmap_alloc_range(0x70000, 0x8000, MEMMAP_USABLE, true, true, false, false);
size_t memmap_entries;
struct e820_entry_t *memmap = get_memmap(&memmap_entries);