platform_def.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (c) 2023, Aspeed Technology Inc.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef PLATFORM_DEF_H
  7. #define PLATFORM_DEF_H
  8. #include <arch.h>
  9. #include <plat/common/common_def.h>
  10. #include <platform_reg.h>
  11. #define PLATFORM_STACK_SIZE UL(0x1000)
  12. /* cpu topology */
  13. #define PLATFORM_SYSTEM_COUNT U(1)
  14. #define PLATFORM_CLUSTER_COUNT U(1)
  15. #define PLATFORM_CORE_PRIMARY U(0)
  16. #define PLATFORM_CORE_COUNT_PER_CLUSTER U(4)
  17. #define PLATFORM_CORE_COUNT (PLATFORM_CLUSTER_COUNT * \
  18. PLATFORM_CORE_COUNT_PER_CLUSTER)
  19. /* power domain */
  20. #define PLAT_MAX_PWR_LVL U(1)
  21. #define PLAT_NUM_PWR_DOMAINS U(5)
  22. #define PLAT_MAX_RET_STATE U(1)
  23. #define PLAT_MAX_OFF_STATE U(2)
  24. /* cache line size */
  25. #define CACHE_WRITEBACK_SHIFT U(6)
  26. #define CACHE_WRITEBACK_GRANULE (U(1) << CACHE_WRITEBACK_SHIFT)
  27. /* translation tables */
  28. #define PLAT_PHY_ADDR_SPACE_SIZE (ULL(1) << 36)
  29. #define PLAT_VIRT_ADDR_SPACE_SIZE (ULL(1) << 40)
  30. #define MAX_XLAT_TABLES U(8)
  31. #define MAX_MMAP_REGIONS U(32)
  32. /* BL31 region */
  33. #define BL31_BASE ULL(0x430000000)
  34. #define BL31_SIZE SZ_512K
  35. #define BL31_LIMIT (BL31_BASE + BL31_SIZE)
  36. /* BL32 region */
  37. #define BL32_BASE BL31_LIMIT
  38. #define BL32_SIZE SZ_16M
  39. #define BL32_LIMIT (BL32_BASE + BL32_SIZE)
  40. /* console */
  41. #define CONSOLE_UART_BASE UART12_BASE
  42. #define CONSOLE_UART_CLKIN_HZ U(1846153)
  43. #define CONSOLE_UART_BAUDRATE U(115200)
  44. /* CLK information */
  45. #define CLKIN_25M UL(25000000)
  46. #define PLAT_CLK_GATE_NUM U(29)
  47. #define PLAT_CLK_HPLL (PLAT_CLK_GATE_NUM + 5)
  48. #define PLAT_CLK_DPLL (PLAT_CLK_GATE_NUM + 6)
  49. #define PLAT_CLK_MPLL (PLAT_CLK_GATE_NUM + 7)
  50. #endif /* PLATFORM_DEF_H */