[boot] Build the kernel mem map from the UEFI one
Created kernel args memory map structure, looping through UEFI's memory map to copy and condense. Tags: boot memory
This commit is contained in:
@@ -32,14 +32,38 @@ enum class mode : uint8_t {
|
||||
debug
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct module {
|
||||
void *location;
|
||||
size_t size;
|
||||
mod_type type;
|
||||
mod_flags flags;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
|
||||
enum class mem_type : uint32_t {
|
||||
free,
|
||||
args,
|
||||
kernel,
|
||||
module,
|
||||
table,
|
||||
acpi,
|
||||
uefi_runtime,
|
||||
mmio,
|
||||
persistent
|
||||
};
|
||||
|
||||
/// Structure to hold an entry in the memory map.
|
||||
struct mem_entry
|
||||
{
|
||||
uintptr_t start;
|
||||
size_t pages;
|
||||
mem_type type;
|
||||
uint32_t attr;
|
||||
}
|
||||
__attribute__((packed));
|
||||
|
||||
|
||||
struct header {
|
||||
uint32_t magic;
|
||||
uint16_t version;
|
||||
|
||||
Reference in New Issue
Block a user