summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@outlook.com>2025-07-27 15:42:01 +0800
committerTom Rini <trini@konsulko.com>2025-08-07 11:15:41 -0600
commitc60898c9c6988e34d33a7c5d5b79c0bcc14da719 (patch)
treedefe8a37ea846b5eda2ca5724d5460555fdfee08
parenta0526d44daebeb39d058d8b274370c3070457727 (diff)
meminfo: correct "free" memory region size
The size of free memory should be $lmb_base - $ram_base. Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
-rw-r--r--cmd/meminfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/meminfo.c b/cmd/meminfo.c
index acdb38dcba0..aa3b5bafe17 100644
--- a/cmd/meminfo.c
+++ b/cmd/meminfo.c
@@ -93,7 +93,7 @@ static int do_meminfo(struct cmd_tbl *cmdtp, int flag, int argc,
print_region("stack", stk_bot, CONFIG_STACK_SIZE, &upto);
if (IS_ENABLED(CONFIG_LMB))
show_lmb(lmb_get(), &upto);
- print_region("free", gd->ram_base, upto, &upto);
+ print_region("free", gd->ram_base, upto - gd->ram_base, &upto);
return 0;
}