Added stivale mmap struct.

This commit is contained in:
VAN BOSSUYT Nicolas 2020-09-18 14:44:30 +02:00
parent 41c68e5e43
commit 066aa1511c
2 changed files with 26 additions and 0 deletions

View File

@ -25,6 +25,22 @@ struct stivale_module {
uint64_t next;
} __attribute__((packed));
enum {
STIVALE_MMAP_USABLE = 1,
STIVALE_MMAP_RESERVED = 2,
STIVALE_MMAP_ACPI_RECLAIMABLE = 3,
STIVALE_MMAP_ACPI_NVS = 4,
STIVALE_MMAP_BAD_MEMORY = 5,
STIVALE_MMAP_KERNEL_AND_MODULES = 10, // Kernel/Modules
};
struct stivale_mmap_entry {
uint64_t base;
uint64_t length;
uint32_t type;
uint32_t unused;
} __attribute__((packed));
struct stivale_struct {
uint64_t cmdline;
uint64_t memory_map_addr;

View File

@ -58,6 +58,16 @@ struct stivale2_struct_tag_cmdline {
#define STIVALE2_STRUCT_TAG_MEMMAP_ID 0x2187f79e8612de07
enum {
STIVALE2_MMAP_USABLE = 1,
STIVALE2_MMAP_RESERVED = 2,
STIVALE2_MMAP_ACPI_RECLAIMABLE = 3,
STIVALE2_MMAP_ACPI_NVS = 4,
STIVALE2_MMAP_BAD_MEMORY = 5,
STIVALE2_MMAP_BOOTLOADER_RECLAIMABLE = 0x1000,
STIVALE2_MMAP_KERNEL_AND_MODULES = 0x1001
};
struct stivale2_mmap_entry {
uint64_t base;
uint64_t length;