]> git.dujemihanovic.xyz Git - u-boot.git/commit
lmb: make LMB memory map persistent and global
authorSughosh Ganu <sughosh.ganu@linaro.org>
Mon, 26 Aug 2024 11:59:18 +0000 (17:29 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 3 Sep 2024 20:08:50 +0000 (14:08 -0600)
commited17a33fed296a87219b0ff702045ce488bc3771
treee1ac01002f7dcd0e1c1adbf5139234038ea58f8f
parenta368850ae2551a4fcc5f9a2e9e8e90c056d4fe73
lmb: make LMB memory map persistent and global

The current LMB API's for allocating and reserving memory use a
per-caller based memory view. Memory allocated by a caller can then be
overwritten by another caller. Make these allocations and reservations
persistent using the alloced list data structure.

Two alloced lists are declared -- one for the available(free) memory,
and one for the used memory. Once full, the list can then be extended
at runtime.

[sjg: Use a stack to store pointer of lmb struct when running lmb tests]

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
[sjg: Optimise the logic to add a region in lmb_add_region_flags()]
39 files changed:
arch/arc/lib/cache.c
arch/arm/lib/stack.c
arch/arm/mach-apple/board.c
arch/arm/mach-snapdragon/board.c
arch/arm/mach-stm32mp/dram_init.c
arch/arm/mach-stm32mp/stm32mp1/cpu.c
arch/m68k/lib/bootm.c
arch/microblaze/lib/bootm.c
arch/mips/lib/bootm.c
arch/nios2/lib/bootm.c
arch/powerpc/cpu/mpc85xx/mp.c
arch/powerpc/include/asm/mp.h
arch/powerpc/lib/bootm.c
arch/riscv/lib/bootm.c
arch/sh/lib/bootm.c
arch/x86/lib/bootm.c
arch/xtensa/lib/bootm.c
board/xilinx/common/board.c
boot/bootm.c
boot/bootm_os.c
boot/image-board.c
boot/image-fdt.c
cmd/bdinfo.c
cmd/booti.c
cmd/bootz.c
cmd/elf.c
cmd/load.c
drivers/iommu/apple_dart.c
drivers/iommu/sandbox_iommu.c
fs/fs.c
include/image.h
include/lmb.h
lib/efi_loader/efi_dt_fixup.c
lib/efi_loader/efi_helper.c
lib/lmb.c
net/tftp.c
net/wget.c
test/cmd/bdinfo.c
test/lib/lmb.c