From ad56eb28f0614db4b7656ade390f1c79b446cbc9 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 10 Jul 2021 15:51:54 +0200 Subject: A20, E820h, Real Mode Emulation --- src/loader/inc/mem.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/loader/inc/mem.h (limited to 'src/loader/inc/mem.h') 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 + +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 -- cgit v1.2.3