@@ -48,6 +48,10 @@ const char *const type_name[] = {
/* main loop events */
"main_loop",
+
+ "lmb_map_update",
+
+ "efi_map_update",
};
_Static_assert(ARRAY_SIZE(type_name) == EVT_COUNT, "event type_name size");
@@ -153,6 +153,22 @@ enum event_t {
*/
EVT_MAIN_LOOP,
+ /**
+ * @EVT_LMB_MAP_UPDATE:
+ * This event is triggered on an update to the LMB reserved memory
+ * region. This can be used to notify about any LMB memory allocation
+ * or freeing of memory having occurred.
+ */
+ EVT_LMB_MAP_UPDATE,
+
+ /**
+ * @EVT_EFI_MEM_MAP_UPDATE:
+ * This event is triggered on an update to the EFI memory map.
+ * This can be used to notify about any EFI memory allocation
+ * or freeing of memory having occurred.
+ */
+ EVT_EFI_MEM_MAP_UPDATE,
+
/**
* @EVT_COUNT:
* This constants holds the maximum event number + 1 and is used when
@@ -203,6 +219,18 @@ union event_data {
oftree tree;
struct bootm_headers *images;
} ft_fixup;
+
+ struct event_lmb_map_update {
+ u64 base;
+ u64 size;
+ u8 op;
+ } lmb_map;
+
+ struct event_efi_mem_map_update {
+ u64 base;
+ u64 size;
+ u8 op;
+ } efi_mem_map;
};
/**
Add events which would be used for notifying changes in the respective modules' memory map. This is to be used for having a synchronous view of the memory that is currently in use, and that is available for allocations. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> --- common/event.c | 4 ++++ include/event.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+)