diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/cbmem.h | 2 | ||||
-rw-r--r-- | src/include/imd.h | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h index 38f9d0320b..615510b1fb 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -58,6 +58,7 @@ #define CBMEM_ID_HOB_POINTER 0x484f4221 #define CBMEM_ID_IGD_OPREGION 0x4f444749 #define CBMEM_ID_IMD_ROOT 0xff4017ff +#define CBMEM_ID_IMD_SMALL 0x53a11439 #define CBMEM_ID_MEMINFO 0x494D454D #define CBMEM_ID_MPTABLE 0x534d5054 #define CBMEM_ID_MRCDATA 0x4d524344 @@ -105,6 +106,7 @@ struct cbmem_id_to_name { { CBMEM_ID_FREESPACE, "FREE SPACE " }, \ { CBMEM_ID_GDT, "GDT " }, \ { CBMEM_ID_IMD_ROOT, "IMD ROOT " }, \ + { CBMEM_ID_IMD_SMALL, "IMD SMALL " }, \ { CBMEM_ID_MEMINFO, "MEM INFO " }, \ { CBMEM_ID_MPTABLE, "SMP TABLE " }, \ { CBMEM_ID_MRCDATA, "MRC DATA " }, \ diff --git a/src/include/imd.h b/src/include/imd.h index 8d5c4522b7..a444b4fbb1 100644 --- a/src/include/imd.h +++ b/src/include/imd.h @@ -82,6 +82,18 @@ void imd_handle_init_partial_recovery(struct imd *imd); int imd_create_empty(struct imd *imd, size_t root_size, size_t entry_align); /* + * Create an empty imd with both large and small allocations. The small + * allocations come from a fixed imd stored internally within the large + * imd. The region allocated for tracking the smaller allocations is dependent + * on the small root_size and the large entry alignment by calculating the + * number of entries within the small imd and multiplying that by the small + * entry alignment. + */ +int imd_create_tiered_empty(struct imd *imd, + size_t lg_root_size, size_t lg_entry_align, + size_t sm_root_size, size_t sm_entry_align); + +/* * Recover a previously created imd. */ int imd_recover(struct imd *imd); @@ -131,9 +143,13 @@ int imd_print_entries(const struct imd *imd, const struct imd_lookup *lookup, * NOTE: Do not directly touch any fields within this structure. An imd pointer * is meant to be opaque, but the fields are exposed for stack allocation. */ -struct imd { +struct imdr { uintptr_t limit; void *r; }; +struct imd { + struct imdr lg; + struct imdr sm; +}; #endif /* _IMD_H_ */ |