diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-16 06:38:46 +0300 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-07-17 12:12:03 +0300 |
commit | b279f5170a807a87a5726bcbeb0bc98937102eee (patch) | |
tree | 7cced0108fed34ef7cc7f7b85ef44b2c393f5b04 /test | |
parent | 297184143ab788b7e591604475760c1794532c99 (diff) | |
download | u-boot-b279f5170a807a87a5726bcbeb0bc98937102eee.tar.xz |
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 'test')
-rw-r--r-- | test/cmd/bdinfo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 6480393fd5..8c09281cac 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -205,6 +205,13 @@ static int bdinfo_test_move(struct unit_test_state *uts) ut_assertok(test_num_l(uts, " clock", info.clock)); } + if (IS_ENABLED(CONFIG_CMD_BDINFO_EXTRA)) { + ut_assert_nextlinen("stack ptr"); + ut_assertok(test_num_ll(uts, "ram_top ptr", + (unsigned long long)gd->ram_top)); + ut_assertok(test_num_l(uts, "malloc base", gd_malloc_start())); + } + ut_assertok(ut_check_console_end(uts)); return 0; |