fvp_r_def.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef FVP_R_DEF_H
  7. #define FVP_R_DEF_H
  8. #include <lib/utils_def.h>
  9. /******************************************************************************
  10. * FVP-R topology constants
  11. *****************************************************************************/
  12. #define FVP_R_CLUSTER_COUNT 2
  13. #define FVP_R_MAX_CPUS_PER_CLUSTER 4
  14. #define FVP_R_MAX_PE_PER_CPU 1
  15. #define FVP_R_PRIMARY_CPU 0x0
  16. /******************************************************************************
  17. * Definition of platform soc id
  18. *****************************************************************************/
  19. #define FVP_R_SOC_ID 0
  20. /*******************************************************************************
  21. * FVP_R memory map related constants
  22. ******************************************************************************/
  23. #define FLASH1_BASE UL(0x8c000000)
  24. #define FLASH1_SIZE UL(0x04000000)
  25. #define PSRAM_BASE UL(0x94000000)
  26. #define PSRAM_SIZE UL(0x04000000)
  27. #define VRAM_BASE UL(0x98000000)
  28. #define VRAM_SIZE UL(0x02000000)
  29. /* Aggregate of all devices in the first GB */
  30. #define DEVICE0_BASE UL(0xa0000000)
  31. #define DEVICE0_SIZE UL(0x0c200000)
  32. /*
  33. * In case of FVP_R models with CCN, the CCN register space overlaps into
  34. * the NSRAM area.
  35. */
  36. #define DEVICE1_BASE UL(0xae000000)
  37. #define DEVICE1_SIZE UL(0x1A00000)
  38. #define NSRAM_BASE UL(0xae000000)
  39. #define NSRAM_SIZE UL(0x10000)
  40. /* Devices in the second GB */
  41. #define DEVICE2_BASE UL(0xffe00000)
  42. #define DEVICE2_SIZE UL(0x00200000)
  43. #define PCIE_EXP_BASE UL(0xc0000000)
  44. #define TZRNG_BASE UL(0x7fe60000)
  45. /* Non-volatile counters */
  46. #define TRUSTED_NVCTR_BASE UL(0xffe70000)
  47. #define TFW_NVCTR_BASE (TRUSTED_NVCTR_BASE + UL(0x0000))
  48. #define TFW_NVCTR_SIZE UL(4)
  49. #define NTFW_CTR_BASE (TRUSTED_NVCTR_BASE + UL(0x0004))
  50. #define NTFW_CTR_SIZE UL(4)
  51. /* Keys */
  52. #define SOC_KEYS_BASE UL(0xffe80000)
  53. #define TZ_PUB_KEY_HASH_BASE (SOC_KEYS_BASE + UL(0x0000))
  54. #define TZ_PUB_KEY_HASH_SIZE UL(32)
  55. #define HU_KEY_BASE (SOC_KEYS_BASE + UL(0x0020))
  56. #define HU_KEY_SIZE UL(16)
  57. #define END_KEY_BASE (SOC_KEYS_BASE + UL(0x0044))
  58. #define END_KEY_SIZE UL(32)
  59. /* Constants to distinguish FVP_R type */
  60. #define HBI_BASE_FVP_R U(0x020)
  61. #define REV_BASE_FVP_R_V0 U(0x0)
  62. #define REV_BASE_FVP_R_REVC U(0x2)
  63. #define HBI_FOUNDATION_FVP_R U(0x010)
  64. #define REV_FOUNDATION_FVP_R_V2_0 U(0x0)
  65. #define REV_FOUNDATION_FVP_R_V2_1 U(0x1)
  66. #define REV_FOUNDATION_FVP_R_v9_1 U(0x2)
  67. #define REV_FOUNDATION_FVP_R_v9_6 U(0x3)
  68. #define BLD_GIC_VE_MMAP U(0x0)
  69. #define BLD_GIC_A53A57_MMAP U(0x1)
  70. #define ARCH_MODEL U(0x1)
  71. /* FVP_R Power controller base address*/
  72. #define PWRC_BASE UL(0x1c100000)
  73. /* FVP_R SP804 timer frequency is 35 MHz*/
  74. #define SP804_TIMER_CLKMULT 1
  75. #define SP804_TIMER_CLKDIV 35
  76. /* SP810 controller. FVP_R specific flags */
  77. #define FVP_R_SP810_CTRL_TIM0_OV BIT_32(16)
  78. #define FVP_R_SP810_CTRL_TIM1_OV BIT_32(18)
  79. #define FVP_R_SP810_CTRL_TIM2_OV BIT_32(20)
  80. #define FVP_R_SP810_CTRL_TIM3_OV BIT_32(22)
  81. #endif /* FVP_R_DEF_H */