xilinx-versal.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Xilinx Versal
  2. =============
  3. Trusted Firmware-A implements the EL3 firmware layer for Xilinx Versal.
  4. The platform only uses the runtime part of TF-A as Xilinx Versal already has a
  5. BootROM (BL1) and PMC FW (BL2).
  6. BL31 is TF-A.
  7. BL32 is an optional Secure Payload.
  8. BL33 is the non-secure world software (U-Boot, Linux etc).
  9. To build:
  10. ```bash
  11. make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31
  12. ```
  13. To build bl32 TSP you have to rebuild bl31 too
  14. ```bash
  15. make CROSS_COMPILE=aarch64-none-elf- PLAT=versal SPD=tspd RESET_TO_BL31=1 bl31 bl32
  16. ```
  17. To build TF-A for JTAG DCC console
  18. ```bash
  19. make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 VERSAL_CONSOLE=dcc
  20. ```
  21. To build TF-A with Errata management interface
  22. ```bash
  23. make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 ERRATA_ABI_SUPPORT=1
  24. ```
  25. To build TF-A with Straight-Line Speculation(SLS)
  26. ```bash
  27. make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 HARDEN_SLS_ALL=1
  28. ```
  29. Xilinx Versal platform specific build options
  30. ---------------------------------------------
  31. * `VERSAL_ATF_MEM_BASE`: Specifies the base address of the bl31 binary.
  32. * `VERSAL_ATF_MEM_SIZE`: Specifies the size of the memory region of the bl31 binary.
  33. * `VERSAL_BL32_MEM_BASE`: Specifies the base address of the bl32 binary.
  34. * `VERSAL_BL32_MEM_SIZE`: Specifies the size of the memory region of the bl32 binary.
  35. * `VERSAL_CONSOLE`: Select the console driver. Options:
  36. - `pl011`, `pl011_0`: ARM pl011 UART 0
  37. - `pl011_1` : ARM pl011 UART 1
  38. * `CPU_PWRDWN_SGI`: Select the SGI for triggering CPU power down request to
  39. secondary cores on receiving power down callback from
  40. firmware. Options:
  41. - `0` : SGI 0
  42. - `1` : SGI 1
  43. - `2` : SGI 2
  44. - `3` : SGI 3
  45. - `4` : SGI 4
  46. - `5` : SGI 5
  47. - `6` : SGI 6 (Default)
  48. - `7` : SGI 7
  49. # PLM->TF-A Parameter Passing
  50. ------------------------------
  51. The PLM populates a data structure with image information for the TF-A. The TF-A
  52. uses that data to hand off to the loaded images. The address of the handoff
  53. data structure is passed in the ```PMC_GLOBAL_GLOB_GEN_STORAGE4``` register.
  54. The register is free to be used by other software once the TF-A is bringing up
  55. further firmware images.
  56. Reference DEN0028E SMC calling convention
  57. ------------------------------------------
  58. Allocated subranges of Function Identifier to SIP services
  59. ----------------------------------------------------------
  60. +-----------------------+-------------------------------------------------------+
  61. | SMC Function | Identifier Service type |
  62. +-----------------------+-------------------------------------------------------+
  63. | 0xC2000000-0xC200FFFF | Fast SMC64 SiP Service Calls as per SMCCC Section 6.1 |
  64. +-----------------------+-------------------------------------------------------+
  65. IPI SMC call ranges
  66. -------------------
  67. +---------------------------+-----------------------------------------------------------+
  68. | SMC Function Identifier | Service type |
  69. +---------------------------+-----------------------------------------------------------+
  70. | 0xc2001000-0xc2001FFF | Fast SMC64 SiP Service call range used for AMD-Xilinx IPI |
  71. +---------------------------+-----------------------------------------------------------+
  72. PM SMC call ranges for SiP SVC version 0.1
  73. --------------------------------------------------------
  74. +---------------------------+---------------------------------------------------------------------------+
  75. | SMC Function Identifier | Service type |
  76. +---------------------------+---------------------------------------------------------------------------+
  77. | 0xc2000000-0xc2000FFF | Fast SMC64 SiP Service call range used for AMD-Xilinx Platform Management |
  78. +---------------------------+---------------------------------------------------------------------------+
  79. PM SMC call ranges for SiP SVC version 0.2
  80. --------------------------------------------------------
  81. +---------------------------+---------------------------------------------------------------------------+
  82. | SMC Function Identifier | Service type |
  83. +---------------------------+---------------------------------------------------------------------------+
  84. | 0xc2000FFF | Fast SMC64 SiP Service call used for pass-through of AMD-Xilinx Platform |
  85. | | Management APIs to firmware |
  86. +---------------------------+---------------------------------------------------------------------------+
  87. | 0xc2000A00-0xc2000AFF | Fast SMC64 SiP Service call range used for AMD-Xilinx Platform Management |
  88. | | specific TF-A APIs |
  89. +---------------------------+---------------------------------------------------------------------------+
  90. SMC function IDs for SiP Service queries
  91. ----------------------------------------
  92. +--------------+--------------+--------------+
  93. | Service | Call UID | Revision |
  94. +--------------+--------------+--------------+
  95. | SiP Service | 0x8200_FF01 | 0x8200_FF03 |
  96. +--------------+--------------+--------------+
  97. Call UID Query – Returns a unique identifier of the service provider.
  98. Revision Query – Returns revision details of the service implementor.