sys.h 734 B

1234567891011121314151617181920212223242526
  1. #ifndef SYS_H
  2. #define SYS_H
  3. /*
  4. * Various constants that need to match the hardware configuration.
  5. * This file must be includable from assembly and from a linker script.
  6. *
  7. * The base constants should be defined in iodevs.conf; this file contains
  8. * derived constants.
  9. */
  10. #include "iodevs.h"
  11. #define SRAM_SIZE (0x1 << SRAM_BITS)
  12. #define SRAM_MASK (SRAM_SIZE - 1)
  13. #define SRAM_END (SRAM_ADDR + SRAM_SIZE)
  14. #define STACK_SIZE 2048 /* Minimum stack size */
  15. #define STACK_TOP SRAM_END /* Initial stack pointer */
  16. #define STACK_BOTTOM (STACK_TOP - STACK_SIZE)
  17. #define SDRAM_SIZE (0x1 << SDRAM_BITS)
  18. #define SDRAM_MASK (SDRAM_SIZE - 1)
  19. #define SDRAM_END (SDRAM_ADDR + SDRAM_SIZE)
  20. #endif /* SYS_H */