diff options
author | Marvin Borner | 2021-07-10 15:51:54 +0200 |
---|---|---|
committer | Marvin Borner | 2021-07-10 15:51:54 +0200 |
commit | ad56eb28f0614db4b7656ade390f1c79b446cbc9 (patch) | |
tree | 7d42ab3c9f36c188dbf54a25b1db1c3db5acb1bd /src/loader/inc/mem.h | |
parent | 176b6eb808f4d02d871c30f6ec19daa179f374d1 (diff) |
A20, E820h, Real Mode Emulation
Diffstat (limited to 'src/loader/inc/mem.h')
-rw-r--r-- | src/loader/inc/mem.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/loader/inc/mem.h b/src/loader/inc/mem.h new file mode 100644 index 0000000..7153465 --- /dev/null +++ b/src/loader/inc/mem.h @@ -0,0 +1,32 @@ +// MIT License, Copyright (c) 2021 Marvin Borner + +#ifndef MEM_H +#define MEM_H + +#include <def.h> + +enum mem_entry_type { + MEM_NONE, + MEM_USABLE, + MEM_RESERVED, + MEM_RECLAIMABLE, + MEM_ACPI_NVS, + MEM_UNUSABLE, +}; + +// Generalised memory map entry struct +struct mem_entry { + u32 base; + u32 length; + u32 type; +}; + +struct mem_map { + struct mem_entry *entry; + u32 count; +}; + +void mem_map(void); +struct mem_map *mem_map_get(void); + +#endif |