xref: /rk3399_ARM-atf/docs/plat/xilinx-versal.rst (revision 96c031c7fe2d82c5ebcce71770f4919134adf18c)
124dba2b3SPaul BeesleyXilinx Versal
224dba2b3SPaul Beesley=============
324dba2b3SPaul Beesley
424dba2b3SPaul BeesleyTrusted Firmware-A implements the EL3 firmware layer for Xilinx Versal.
524dba2b3SPaul BeesleyThe platform only uses the runtime part of TF-A as Xilinx Versal already has a
624dba2b3SPaul BeesleyBootROM (BL1) and PMC FW (BL2).
724dba2b3SPaul Beesley
824dba2b3SPaul BeesleyBL31 is TF-A.
924dba2b3SPaul BeesleyBL32 is an optional Secure Payload.
1024dba2b3SPaul BeesleyBL33 is the non-secure world software (U-Boot, Linux etc).
1124dba2b3SPaul Beesley
1224dba2b3SPaul BeesleyTo build:
1324dba2b3SPaul Beesley```bash
1424dba2b3SPaul Beesleymake RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31
1524dba2b3SPaul Beesley```
1624dba2b3SPaul Beesley
177b9f0cfdSSiva Durga Prasad PaladuguTo build ATF for different platform (supported are "silicon"(default) and "versal_virt")
1824dba2b3SPaul Beesley```bash
1924dba2b3SPaul Beesleymake RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal VERSAL_PLATFORM=versal_virt bl31
2024dba2b3SPaul Beesley```
2124dba2b3SPaul Beesley
227b7c5350SPrasad KummariTo build bl32 TSP you have to rebuild bl31 too
237b7c5350SPrasad Kummari```bash
247b7c5350SPrasad Kummarimake CROSS_COMPILE=aarch64-none-elf- PLAT=versal SPD=tspd RESET_TO_BL31=1 bl31 bl32
257b7c5350SPrasad Kummari```
267b7c5350SPrasad Kummari
270b25f404SVenkatesh Yadav AbbarapuTo build TF-A for JTAG DCC console
280b25f404SVenkatesh Yadav Abbarapu```bash
290b25f404SVenkatesh Yadav Abbarapumake RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 VERSAL_CONSOLE=dcc
300b25f404SVenkatesh Yadav Abbarapu```
310b25f404SVenkatesh Yadav Abbarapu
32*96c031c7SPrasad KummariTo build TF-A with Errata management interface
33*96c031c7SPrasad Kummari```bash
34*96c031c7SPrasad Kummarimake RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 ERRATA_ABI_SUPPORT=1
35*96c031c7SPrasad Kummari```
36*96c031c7SPrasad Kummari
37302b4dfbSVenkatesh Yadav AbbarapuTo build TF-A with Straight-Line Speculation(SLS)
38302b4dfbSVenkatesh Yadav Abbarapu```bash
39302b4dfbSVenkatesh Yadav Abbarapumake RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 HARDEN_SLS_ALL=1
40302b4dfbSVenkatesh Yadav Abbarapu```
41302b4dfbSVenkatesh Yadav Abbarapu
4224dba2b3SPaul BeesleyXilinx Versal platform specific build options
4324dba2b3SPaul Beesley---------------------------------------------
4424dba2b3SPaul Beesley
4524dba2b3SPaul Beesley*   `VERSAL_ATF_MEM_BASE`: Specifies the base address of the bl31 binary.
4624dba2b3SPaul Beesley*   `VERSAL_ATF_MEM_SIZE`: Specifies the size of the memory region of the bl31 binary.
4724dba2b3SPaul Beesley*   `VERSAL_BL32_MEM_BASE`: Specifies the base address of the bl32 binary.
4824dba2b3SPaul Beesley*   `VERSAL_BL32_MEM_SIZE`: Specifies the size of the memory region of the bl32 binary.
4924dba2b3SPaul Beesley
5024dba2b3SPaul Beesley*   `VERSAL_CONSOLE`: Select the console driver. Options:
5124dba2b3SPaul Beesley    -   `pl011`, `pl011_0`: ARM pl011 UART 0
5224dba2b3SPaul Beesley    -   `pl011_1`         : ARM pl011 UART 1
5324dba2b3SPaul Beesley
5424dba2b3SPaul Beesley*   `VERSAL_PLATFORM`: Select the platform. Options:
5524dba2b3SPaul Beesley    -   `versal_virt`	: Versal Virtual platform
56be73459aSVenkatesh Yadav Abbarapu    -   `spp_itr6`	: SPP ITR6
57103bbd56SVenkatesh Yadav Abbarapu    -   `emu_itr6`	: EMU ITR6
5831ce893eSVenkatesh Yadav Abbarapu
5931ce893eSVenkatesh Yadav Abbarapu# PLM->TF-A Parameter Passing
6031ce893eSVenkatesh Yadav Abbarapu------------------------------
6131ce893eSVenkatesh Yadav AbbarapuThe PLM populates a data structure with image information for the TF-A. The TF-A
6231ce893eSVenkatesh Yadav Abbarapuuses that data to hand off to the loaded images. The address of the handoff
6331ce893eSVenkatesh Yadav Abbarapudata structure is passed in the ```PMC_GLOBAL_GLOB_GEN_STORAGE4``` register.
6431ce893eSVenkatesh Yadav AbbarapuThe register is free to be used by other software once the TF-A is bringing up
6531ce893eSVenkatesh Yadav Abbarapufurther firmware images.
66