Merge pull request #29 from sleepy-monax/master

Added stivale mmap struct and enum.
This commit is contained in:
mint 2020-09-18 14:53:43 +02:00 committed by GitHub
commit 845889d7e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;