From 20686d851ce450750039f5f871160d49118a2210 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 5 Mar 2015 14:11:27 -0600 Subject: coreboot: add imd library The imd (internal memory database) library provides a way to track memory regions by assigning ids to each region. The implementation is a direct descendant of dynamic cbmem. The intent is to replace the existing mechanisms which do similar things: dynamic cbmem, stage cache, etc. Differences between dynamic cbmem and imd: - All structures/objects are relative to one another. There are no absolute pointers serialized to memory. - Allow limiting the size of the idm. i.e. provide a maximum memory usage. - Allow setting the size of the root structure which allows control of the number of allocations to track. Change-Id: Id7438cff80d396a594d6a7330d09b45bb4fedf2e Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/8621 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones --- src/include/cbmem.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/cbmem.h') diff --git a/src/include/cbmem.h b/src/include/cbmem.h index fdcb829b83..38f9d0320b 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -57,6 +57,7 @@ #define CBMEM_ID_GDT 0x4c474454 #define CBMEM_ID_HOB_POINTER 0x484f4221 #define CBMEM_ID_IGD_OPREGION 0x4f444749 +#define CBMEM_ID_IMD_ROOT 0xff4017ff #define CBMEM_ID_MEMINFO 0x494D454D #define CBMEM_ID_MPTABLE 0x534d5054 #define CBMEM_ID_MRCDATA 0x4d524344 @@ -103,6 +104,7 @@ struct cbmem_id_to_name { { CBMEM_ID_ELOG, "ELOG " }, \ { CBMEM_ID_FREESPACE, "FREE SPACE " }, \ { CBMEM_ID_GDT, "GDT " }, \ + { CBMEM_ID_IMD_ROOT, "IMD ROOT " }, \ { CBMEM_ID_MEMINFO, "MEM INFO " }, \ { CBMEM_ID_MPTABLE, "SMP TABLE " }, \ { CBMEM_ID_MRCDATA, "MRC DATA " }, \ -- cgit v1.2.3