mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-21 03:52:04 +03:00
stivale: Deprecate low memory area
This commit is contained in:
parent
f3aee7feb5
commit
738095c451
@ -302,8 +302,12 @@ void stivale_load(char *config, char *cmdline) {
|
||||
if (bits == 64)
|
||||
pagemap = stivale_build_pagemap(want_5lv, false, NULL, 0, false, 0, 0);
|
||||
|
||||
// Reserve 32K at 0x70000
|
||||
memmap_alloc_range(0x70000, 0x8000, MEMMAP_USABLE, true, true, false, false);
|
||||
// Reserve 32K at 0x70000 if possible
|
||||
if (!memmap_alloc_range(0x70000, 0x8000, MEMMAP_USABLE, true, false, false, false)) {
|
||||
if ((stivale_hdr.flags & (1 << 4)) == 0) {
|
||||
panic("stivale: Could not allocate low memory area");
|
||||
}
|
||||
}
|
||||
|
||||
struct e820_entry_t *mmap_copy = ext_mem_alloc(256 * sizeof(struct e820_entry_t));
|
||||
|
||||
|
@ -682,8 +682,12 @@ have_tm_tag:;
|
||||
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);
|
||||
// Reserve 32K at 0x70000, if possible
|
||||
if (!memmap_alloc_range(0x70000, 0x8000, MEMMAP_USABLE, true, false, false, false)) {
|
||||
if ((stivale2_hdr.flags & (1 << 4)) == 0) {
|
||||
panic("stivale2: Could not allocate low memory area");
|
||||
}
|
||||
}
|
||||
|
||||
size_t mmap_entries;
|
||||
struct e820_entry_t *mmap = get_memmap(&mmap_entries);
|
||||
|
Loading…
Reference in New Issue
Block a user