coreboot: add imd library

Hardware / Coreboot - Aaron Durbin [chromium.org] - 22 April 2015 10:54 UTC

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

20686d8 coreboot: add imd library
src/include/cbmem.h | 2 +
src/include/imd.h | 139 +++++++++++++++
src/lib/Makefile.inc | 3 +
src/lib/imd.c | 481 ++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 625 insertions(+)

Upstream: review.coreboot.org


  • Share