summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/bootmem.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/include/bootmem.h b/src/include/bootmem.h
index 6e7d127f62..df2233f202 100644
--- a/src/include/bootmem.h
+++ b/src/include/bootmem.h
@@ -20,6 +20,22 @@
#include <stdint.h>
#include <boot/coreboot_tables.h>
+/**
+ * Bootmem types match to LB_MEM tags.
+ * Start at 0x10000 to make sure that the caller doesn't provide LB_MEM tags.
+ */
+enum bootmem_type {
+ BM_MEM_FIRST = 0x10000, /* First entry in this list */
+ BM_MEM_RAM, /* Memory anyone can use */
+ BM_MEM_RESERVED, /* Don't use this memory region */
+ BM_MEM_ACPI, /* ACPI Tables */
+ BM_MEM_NVS, /* ACPI NVS Memory */
+ BM_MEM_UNUSABLE, /* Unusable address space */
+ BM_MEM_VENDOR_RSVD, /* Vendor Reserved */
+ BM_MEM_TABLE, /* Ram configuration tables are kept in */
+ BM_MEM_LAST, /* Last entry in this list */
+};
+
/* Write memory coreboot table. Current resource map is serialized into
* memtable (LB_MEM_* types). bootmem library is unusable until this function
* is called first in the write tables path before payload is loaded. */
@@ -30,7 +46,8 @@ void bootmem_write_memory_table(struct lb_memory *mem);
void bootmem_arch_add_ranges(void);
/* Add a range of a given type to the bootmem address space. */
-void bootmem_add_range(uint64_t start, uint64_t size, uint32_t type);
+void bootmem_add_range(uint64_t start, uint64_t size,
+ const enum bootmem_type tag);
/* Print current range map of boot memory. */
void bootmem_dump_ranges(void);