1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

Kernel: Use the Multiboot memory map info to inform our paging setup.

This makes it possible to run Serenity with more than 64 MB of RAM.
Because each physical page is represented by a PhysicalPage object, and such
objects are allocated using kmalloc_eternal(), more RAM means more pressure
on kmalloc_eternal(), so we're gonna need a better strategy for this.

But for now, let's just celebrate that we can use the 128 MB of RAM we've
been telling QEMU to run with. :^)
This commit is contained in:
Andreas Kling 2019-06-09 11:48:58 +02:00
parent 8258b699db
commit 9da62f52a1
4 changed files with 63 additions and 30 deletions

View file

@ -18,6 +18,20 @@ struct multiboot_elf_section_header_table {
};
typedef struct multiboot_elf_section_header_table multiboot_elf_section_header_table_t;
#define MULTIBOOT_MEMORY_AVAILABLE 1
#define MULTIBOOT_MEMORY_RESERVED 2
#define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE 3
#define MULTIBOOT_MEMORY_NVS 4
#define MULTIBOOT_MEMORY_BADRAM 5
struct multiboot_mmap_entry {
dword size;
qword addr;
qword len;
dword type;
} __attribute__((packed));
typedef struct multiboot_mmap_entry multiboot_memory_map_t;
struct multiboot_info {
// Multiboot info version number.
dword flags;