diff options
author | Simon Glass | 2023-07-15 21:38:46 -0600 |
---|---|---|
committer | Bin Meng | 2023-07-17 17:12:03 +0800 |
commit | b279f5170a807a87a5726bcbeb0bc98937102eee (patch) | |
tree | 7cced0108fed34ef7cc7f7b85ef44b2c393f5b04 /cmd/bdinfo.c | |
parent | 297184143ab788b7e591604475760c1794532c99 (diff) |
bdinfo: Show the RAM top and approximate stack pointer
These are useful pieces of information when debugging. The RAM top shows
where U-Boot started allocating memory from, before it relocated. The
stack pointer can be checked to ensure it is in the correct region.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Nikhil M Jain <n-jain1@ti.com>
Diffstat (limited to 'cmd/bdinfo.c')
-rw-r--r-- | cmd/bdinfo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index dab73f1d93c..44e6d6a972e 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -173,6 +173,11 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } print_serial(gd->cur_serial_dev); + if (IS_ENABLED(CONFIG_CMD_BDINFO_EXTRA)) { + bdinfo_print_num_ll("stack ptr", (ulong)&bd); + bdinfo_print_num_ll("ram_top ptr", (ulong)gd->ram_top); + } + arch_print_bdinfo(); return 0; |