diff options
| author | Sughosh Ganu <[email protected]> | 2024-08-26 17:29:18 +0530 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-09-03 14:08:50 -0600 |
| commit | ed17a33fed296a87219b0ff702045ce488bc3771 (patch) | |
| tree | e1ac01002f7dcd0e1c1adbf5139234038ea58f8f /cmd/bdinfo.c | |
| parent | a368850ae2551a4fcc5f9a2e9e8e90c056d4fe73 (diff) | |
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 <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
[sjg: Optimise the logic to add a region in lmb_add_region_flags()]
Diffstat (limited to 'cmd/bdinfo.c')
| -rw-r--r-- | cmd/bdinfo.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 437ac4e8630..b31e0208df7 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -162,10 +162,8 @@ static int bdinfo_print_all(struct bd_info *bd) bdinfo_print_num_l("multi_dtb_fit", (ulong)gd->multi_dtb_fit); #endif if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) { - struct lmb lmb; - - lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob); - lmb_dump_all_force(&lmb); + lmb_init_and_reserve(gd->bd, (void *)gd->fdt_blob); + lmb_dump_all_force(); if (IS_ENABLED(CONFIG_OF_REAL)) printf("devicetree = %s\n", fdtdec_get_srcname()); } |
