mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
cmd: efi: Fix wrong memory descriptor end address
Each entry of the EFI memory descriptors occupies map->desc_size, not sizeof(struct efi_mem_desc). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
598374729e
commit
dd099ec44b
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ void *efi_build_mem_table(struct efi_entry_memmap *map, int size, bool skip_bs)
|
|||
prev = NULL;
|
||||
addr = 0;
|
||||
dest = base;
|
||||
end = base + count;
|
||||
end = (struct efi_mem_desc *)((ulong)base + count * map->desc_size);
|
||||
for (desc = base; desc < end; desc = efi_get_next_mem_desc(map, desc)) {
|
||||
bool merge = true;
|
||||
int type = desc->type;
|
||||
|
|
Loading…
Add table
Reference in a new issue