system-constants.h 928 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. #ifndef __SYSTEM_CONSTANTS_H__
  3. #define __SYSTEM_CONSTANTS_H__
  4. /*
  5. * The most common case for our initial stack pointer address is to
  6. * say that we have defined a static intiial ram address location and
  7. * size and from that we subtract the generated global data size.
  8. */
  9. #ifdef CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR
  10. #define SYS_INIT_SP_ADDR CONFIG_CUSTOM_SYS_INIT_SP_ADDR
  11. #else
  12. #ifdef CONFIG_MIPS
  13. #define SYS_INIT_SP_ADDR (CFG_SYS_SDRAM_BASE + CFG_SYS_INIT_SP_OFFSET)
  14. #else
  15. #define SYS_INIT_SP_ADDR \
  16. (CFG_SYS_INIT_RAM_ADDR + CFG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  17. #endif
  18. #endif
  19. /*
  20. * Typically, we have the SPL malloc pool at the end of the BSS area.
  21. */
  22. #ifdef CONFIG_HAS_CUSTOM_SPL_MALLOC_START
  23. #define SYS_SPL_MALLOC_START CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR
  24. #else
  25. #define SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \
  26. CONFIG_SPL_BSS_MAX_SIZE)
  27. #endif
  28. #endif