board.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2017-5-30 Bernard the first version
  9. * 2021-07-31 GuEe-GUI add ARM GIC definitions
  10. */
  11. #ifndef BOARD_H__
  12. #define BOARD_H__
  13. #include <rthw.h>
  14. extern unsigned char __bss_start;
  15. extern unsigned char __bss_end;
  16. #define RT_HW_HEAP_BEGIN (void*)&__bss_end
  17. #define RT_HW_HEAP_END (void*)(RT_HW_HEAP_BEGIN + 1 * 1024 * 1024)
  18. /* UART */
  19. #define PL011_UARTDR 0x000
  20. #define PL011_UARTFR 0x018
  21. #define PL011_UARTFR_TXFF_BIT 5
  22. #define PL011_UART0_BASE 0x09000000
  23. #define PL011_UART0_SIZE 0x00001000
  24. /* DIST and CPU */
  25. #define GIC_PL390_DISTRIBUTOR_PPTR 0x08000000
  26. #define GIC_PL390_CONTROLLER_PPTR 0x08010000
  27. /* the basic constants and interfaces needed by gic */
  28. rt_inline rt_uint32_t platform_get_gic_dist_base(void)
  29. {
  30. return GIC_PL390_DISTRIBUTOR_PPTR;
  31. }
  32. rt_inline rt_uint32_t platform_get_gic_cpu_base(void)
  33. {
  34. return GIC_PL390_CONTROLLER_PPTR;
  35. }
  36. void rt_hw_board_init(void);
  37. #endif