diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-04-11 20:08:54 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-04-12 22:00:42 +0200 |
commit | 9631fa0fd191adaa5521ee78369f62e975c57a06 (patch) | |
tree | e879ff40b9306448c399c46c1e6ffeddee09c604 /lib/efi_loader | |
parent | 74f5baa28bebf243b372d63a673ddf214cbc50b6 (diff) | |
download | u-boot-9631fa0fd191adaa5521ee78369f62e975c57a06.tar.gz |
efi_loader: update virtual address in efi_mem_carve_out
Handle virtual address in efi_mem_carve_out() function
when a new region is created to avoid issue in EFI memory map.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
At boottime physical and virtual addressed have to be the same.
This allowed to simplify the proposed logic.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r-- | lib/efi_loader/efi_memory.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index dbe29b8960..46681dc208 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -193,6 +193,7 @@ static s64 efi_mem_carve_out(struct efi_mem_list *map, free(map); } else { map->desc.physical_start = carve_end; + map->desc.virtual_start = carve_end; map->desc.num_pages = (map_end - carve_end) >> EFI_PAGE_SHIFT; } @@ -211,6 +212,7 @@ static s64 efi_mem_carve_out(struct efi_mem_list *map, newmap = calloc(1, sizeof(*newmap)); newmap->desc = map->desc; newmap->desc.physical_start = carve_start; + newmap->desc.virtual_start = carve_start; newmap->desc.num_pages = (map_end - carve_start) >> EFI_PAGE_SHIFT; /* Insert before current entry (descending address order) */ list_add_tail(&newmap->link, &map->link); |