
Hi Ilias,
On Wed, 11 Dec 2024 at 08:15, Ilias Apalodimas ilias.apalodimas@linaro.org wrote:
On Wed, 11 Dec 2024 at 15:54, Simon Glass sjg@chromium.org wrote:
Rather than assigning desc and then changing two fields, assign all four fields, for clarity.
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
lib/efi_loader/efi_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 4c0fd0c5dca..f3aaa0e9288 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -268,9 +268,10 @@ static s64 efi_mem_carve_out(struct efi_mem_list *map, newmap = calloc(1, sizeof(*newmap)); if (!newmap) return EFI_CARVE_OUT_OF_RESOURCES;
newmap->desc = map->desc;
newmap->desc.type = map->desc.type; newmap->desc.physical_start = carve_start;
virtual start needs to be assigned if you want to do that as well. But what we have is fine really
At this point in the series, there is no virtual_start - see: efi_loader: Drop virtual_start from priv_mem_desc
Thanks /Ilias
newmap->desc.num_pages = (map_end - carve_start) >> EFI_PAGE_SHIFT;
newmap->desc.attribute = map->desc.attribute; /* Insert before current entry (descending address order) */ list_add_tail(&newmap->link, &map->link);
-- 2.34.1
Regards, SImon