lmb: notify of any changes to the LMB memory map
In U-Boot, LMB and EFI are two primary modules who provide memory allocation and reservation API's. Both these modules operate with the same regions of memory for allocations. Use the LMB memory map update event to notify other interested listeners about a change in it's memory map. This can then be used by the other module to keep track of available and used memory. There is no need to send these notifications when the LMB module is being unit-tested. Add a flag to the lmb structure to indicate if the memory map is being used for tests, and suppress sending any notifications when running these unit tests. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
This commit is contained in:
@@ -46,10 +46,12 @@ struct lmb_region {
|
||||
*
|
||||
* @free_mem: List of free memory regions
|
||||
* @used_mem: List of used/reserved memory regions
|
||||
* @test: Is structure being used for LMB tests
|
||||
*/
|
||||
struct lmb {
|
||||
struct alist free_mem;
|
||||
struct alist used_mem;
|
||||
bool test;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user