platform_def.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef PLATFORM_DEF_H
  7. #define PLATFORM_DEF_H
  8. #include <common/tbbr/tbbr_img_def.h>
  9. #include <lib/utils_def.h>
  10. #include <plat/common/common_def.h>
  11. #define PLATFORM_STACK_SIZE 0x1000
  12. #define CACHE_WRITEBACK_SHIFT 6
  13. #define CACHE_WRITEBACK_GRANULE (1 << (CACHE_WRITEBACK_SHIFT))
  14. /* topology */
  15. #define UNIPHIER_MAX_CPUS_PER_CLUSTER U(4)
  16. #define UNIPHIER_CLUSTER_COUNT U(2)
  17. #define PLATFORM_CORE_COUNT \
  18. ((UNIPHIER_MAX_CPUS_PER_CLUSTER) * (UNIPHIER_CLUSTER_COUNT))
  19. #define PLAT_MAX_PWR_LVL U(1)
  20. #define PLAT_MAX_OFF_STATE U(2)
  21. #define PLAT_MAX_RET_STATE U(1)
  22. #define UNIPHIER_BL2_OFFSET UL(0x00000000)
  23. #define UNIPHIER_BL2_MAX_SIZE UL(0x00080000)
  24. /* 0x00080000-0x01000000: reserved for DSP */
  25. #define UNIPHIER_BL31_OFFSET UL(0x01000000)
  26. #define UNIPHIER_BL31_MAX_SIZE UL(0x00080000)
  27. #define UNIPHIER_BL32_OFFSET UL(0x01080000)
  28. #define UNIPHIER_BL32_MAX_SIZE UL(0x00100000)
  29. /*
  30. * The link addresses are determined by UNIPHIER_MEM_BASE + offset.
  31. * When ENABLE_PIE is set, all the TF images can be loaded anywhere, so
  32. * UNIPHIER_MEM_BASE is arbitrary.
  33. *
  34. * When ENABLE_PIE is unset, UNIPHIER_MEM_BASE should be chosen so that
  35. * BL2_BASE matches to the physical address where BL2 is loaded, that is,
  36. * UNIPHIER_MEM_BASE should be the base address of the DRAM region.
  37. */
  38. #define UNIPHIER_MEM_BASE UL(0x00000000)
  39. #define BL2_BASE (UNIPHIER_MEM_BASE + UNIPHIER_BL2_OFFSET)
  40. #define BL2_LIMIT (BL2_BASE + UNIPHIER_BL2_MAX_SIZE)
  41. #define BL31_BASE (UNIPHIER_MEM_BASE + UNIPHIER_BL31_OFFSET)
  42. #define BL31_LIMIT (BL31_BASE + UNIPHIER_BL31_MAX_SIZE)
  43. #define BL32_BASE (UNIPHIER_MEM_BASE + UNIPHIER_BL32_OFFSET)
  44. #define BL32_LIMIT (BL32_BASE + UNIPHIER_BL32_MAX_SIZE)
  45. #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32)
  46. #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32)
  47. #define MAX_XLAT_TABLES 9
  48. #define MAX_MMAP_REGIONS 13
  49. #define MAX_IO_HANDLES 2
  50. #define MAX_IO_DEVICES 2
  51. #define MAX_IO_BLOCK_DEVICES U(1)
  52. #define TSP_SEC_MEM_BASE (BL32_BASE)
  53. #define TSP_SEC_MEM_SIZE ((BL32_LIMIT) - (BL32_BASE))
  54. #define TSP_IRQ_SEC_PHY_TIMER 29
  55. #endif /* PLATFORM_DEF_H */