diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-06-22 01:38:31 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2018-06-24 08:56:33 +0800 |
commit | dd099ec44b5d0a5d2dff537fc5b3b3441a49eec6 (patch) | |
tree | a7a80923c54aca218d30980a8ed8f607acf489a0 /cmd | |
parent | 598374729e6b3f3070e06bdf2990dd8d10cddbda (diff) | |
download | u-boot-dd099ec44b5d0a5d2dff537fc5b3b3441a49eec6.zip u-boot-dd099ec44b5d0a5d2dff537fc5b3b3441a49eec6.tar.gz u-boot-dd099ec44b5d0a5d2dff537fc5b3b3441a49eec6.tar.bz2 |
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>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/efi.c | 2 |
1 files changed, 1 insertions, 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; |