diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-04 20:55:12 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-04 22:09:38 +0200 |
commit | e80474ad39d1f348cda3837bef1b7baf600fae47 (patch) | |
tree | 0c0d2fd115b6f9f68135af4d185f3b512996c527 /lib/efi_loader/efi_memory.c | |
parent | 8190b4a3e01c80fed782e206e49696d64fedd8a6 (diff) | |
download | u-boot-e80474ad39d1f348cda3837bef1b7baf600fae47.tar.gz |
efi_loader: notify memory map changes
When the memory map is changed signal events of the
EFI_EVENT_GROUP_MEMORY_MAP_CHANGE event group.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
-rw-r--r-- | lib/efi_loader/efi_memory.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 76dcaa48f4..386cf924fe 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -230,6 +230,7 @@ uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type, struct efi_mem_list *newlist; bool carve_again; uint64_t carved_pages = 0; + struct efi_event *evt; EFI_PRINT("%s: 0x%llx 0x%llx %d %s\n", __func__, start, pages, memory_type, overlap_only_ram ? "yes" : "no"); @@ -315,6 +316,16 @@ uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type, /* And make sure memory is listed in descending order */ efi_mem_sort(); + /* Notify that the memory map was changed */ + list_for_each_entry(evt, &efi_events, link) { + if (evt->group && + !guidcmp(evt->group, + &efi_guid_event_group_memory_map_change)) { + efi_signal_event(evt, false); + break; + } + } + return start; } |