summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-06-18 01:24:10 -0700
committerYe Li <ye.li@nxp.com>2020-04-26 23:26:40 -0700
commit09d565c4ab499940ccf60607d1af54afaf410440 (patch)
treeabf3173cbff9ad8d11b9029ec004809cdbd7961f /common
parent2876d2923afe42ccdfb65a8bb286271fce78b626 (diff)
MLK-22035-1 lmb: Add lmb_reserve_overlap for fdt reserved memory
Previous patch "MLK-21885 lmb: Handle the overlap case for lmb reserve" adds the overlap support to lmb reserve. However, u-boot has some places to use the lmb_reserve when allocating memory in loading images. If we allowed overlap in this function, it means images loading address can overlap each other and cause the address check mechanism not work. So add another function to allow overlap and only use it for fdt reserved-memory nodes. The FDT reserved-memory is ok to merge with other reserved memory, since this won't break image loading address check. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 2109dc2a4da592003ec62820f5bdfb6bd0899805)
Diffstat (limited to 'common')
-rw-r--r--common/image-fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 3002948b6b..1a5aa8bea0 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -76,7 +76,7 @@ static void boot_fdt_reserve_region(struct lmb *lmb, uint64_t addr,
{
long ret;
- ret = lmb_reserve(lmb, addr, size);
+ ret = lmb_reserve_overlap(lmb, addr, size);
if (ret >= 0) {
debug(" reserving fdt memory region: addr=%llx size=%llx\n",
(unsigned long long)addr, (unsigned long long)size);