MLK-22035-1 lmb: Add lmb_reserve_overlap for fdt reserved memory
authorYe Li <ye.li@nxp.com>
Tue, 18 Jun 2019 08:24:10 +0000 (01:24 -0700)
committerYe Li <ye.li@nxp.com>
Tue, 18 Jun 2019 08:30:32 +0000 (01:30 -0700)
commit2109dc2a4da592003ec62820f5bdfb6bd0899805
treec7cabe3ce03468de9850488ce425dc9ffe78b519
parentcea64dd5f1e1cd80f50fe4c6283980ccf8991cbf
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>
common/image-fdt.c
include/lmb.h
lib/lmb.c