diff options
| author | Sughosh Ganu <sughosh.ganu@linaro.org> | 2025-06-17 16:13:41 +0530 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2025-06-25 09:50:37 -0600 |
| commit | 6e4675b8e5d8d52d871042d6ac3429d6d1daf875 (patch) | |
| tree | 87a1997ba60d2b3aa87432a30029f90efcae6798 /boot/bootm.c | |
| parent | 9d37a3d6e8b862071edfcb9ee95a0fbe45606918 (diff) | |
lmb: replace the lmb_alloc() and lmb_alloc_base() API's
There currently are two API's for requesting memory from the LMB
module, lmb_alloc() and lmb_alloc_base(). The function which does the
actual allocation is the same. Use the earlier introduced API
lmb_alloc_mem() for both types of allocation requests.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'boot/bootm.c')
| -rw-r--r-- | boot/bootm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/boot/bootm.c b/boot/bootm.c index 3282bfc0b4b..4bdca22ea8c 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -623,12 +623,16 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) */ if (os.type == IH_TYPE_KERNEL_NOLOAD && os.comp != IH_COMP_NONE) { ulong req_size = ALIGN(image_len * 4, SZ_1M); + phys_addr_t addr; - load = lmb_alloc(req_size, SZ_2M); - if (!load) + err = lmb_alloc_mem(LMB_MEM_ALLOC_ANY, SZ_2M, &addr, + req_size, LMB_NONE); + if (err) return 1; - os.load = load; - images->ep = load; + + load = (ulong)addr; + os.load = (ulong)addr; + images->ep = (ulong)addr; debug("Allocated %lx bytes at %lx for kernel (size %lx) decompression\n", req_size, load, image_len); } |
