u-boot-brain/common/init
Simon Goldschmidt d8c0332031 spl: implement stack usage check
This implements a stack usage check in SPL.

Many boards start up SPL to run code + data from one common, rather small
SRAM. To implement a sophisticated SPL binary size limit on such boards,
the stack size (as well as malloc size and global data size) must be
subtracted from this SRAM size.

However, to do that properly, the stack size first needs to be known.

This patch adds a new Kconfig option:
- SPL_SYS_REPORT_STACK_F_USAGE: memset(0xaa) the whole area of the stack
  very early and check stack usage based on this constant later before the
  stack is switched to DRAM

Initializing the stack and checking it is implemented in weak functions,
in case a board does not use the stack as saved in gd->start_addr_sp.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-08-11 16:43:41 -04:00
..
board_init.c spl: implement stack usage check 2019-08-11 16:43:41 -04:00
handoff.c spl: Add support for passing handoff info to U-Boot proper 2018-11-26 08:25:37 -05:00
Makefile spl: Add support for passing handoff info to U-Boot proper 2018-11-26 08:25:37 -05:00