From 51564354c96b887f3684201a127e98a068d6c1f6 Mon Sep 17 00:00:00 2001 From: Prasad Kummari Date: Thu, 26 Oct 2023 16:32:26 +0530 Subject: [PATCH 1/7] refactor(xilinx): rename platform function to generic name Refactor two platform specific functions, plat_versal_get_mmap() and plat_versal_net_get_mmap(), to use a more generic function name plat_get_mmap(). The function can be used in the common code to obtain memory region. Change-Id: I3eeb24aff217eef30af60a7742cbebe9d3b2edce Signed-off-by: Prasad Kummari --- plat/xilinx/versal/aarch64/versal_common.c | 2 +- plat/xilinx/versal/bl31_versal_setup.c | 2 +- plat/xilinx/versal/include/plat_private.h | 2 +- plat/xilinx/versal_net/aarch64/versal_net_common.c | 2 +- plat/xilinx/versal_net/bl31_versal_net_setup.c | 2 +- plat/xilinx/versal_net/include/plat_private.h | 2 +- plat/xilinx/zynqmp/aarch64/zynqmp_common.c | 7 ++++++- plat/xilinx/zynqmp/bl31_zynqmp_setup.c | 2 +- plat/xilinx/zynqmp/include/plat_private.h | 3 +++ plat/xilinx/zynqmp/tsp/tsp_plat_setup.c | 2 +- 10 files changed, 17 insertions(+), 9 deletions(-) diff --git a/plat/xilinx/versal/aarch64/versal_common.c b/plat/xilinx/versal/aarch64/versal_common.c index 6541f2734..aba190de8 100644 --- a/plat/xilinx/versal/aarch64/versal_common.c +++ b/plat/xilinx/versal/aarch64/versal_common.c @@ -33,7 +33,7 @@ const mmap_region_t plat_versal_mmap[] = { { 0 } }; -const mmap_region_t *plat_versal_get_mmap(void) +const mmap_region_t *plat_get_mmap(void) { return plat_versal_mmap; } diff --git a/plat/xilinx/versal/bl31_versal_setup.c b/plat/xilinx/versal/bl31_versal_setup.c index 48f774dfe..ee45f4eb7 100644 --- a/plat/xilinx/versal/bl31_versal_setup.c +++ b/plat/xilinx/versal/bl31_versal_setup.c @@ -218,6 +218,6 @@ void bl31_plat_arch_setup(void) {0} }; - setup_page_tables(bl_regions, plat_versal_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu(0); } diff --git a/plat/xilinx/versal/include/plat_private.h b/plat/xilinx/versal/include/plat_private.h index 26545ba0f..a4210cd1a 100644 --- a/plat/xilinx/versal/include/plat_private.h +++ b/plat/xilinx/versal/include/plat_private.h @@ -20,7 +20,7 @@ typedef struct versal_intr_info_type_el3 { uint32_t get_uart_clk(void); void versal_config_setup(void); -const mmap_region_t *plat_versal_get_mmap(void); +const mmap_region_t *plat_get_mmap(void); extern uint32_t platform_id, platform_version; diff --git a/plat/xilinx/versal_net/aarch64/versal_net_common.c b/plat/xilinx/versal_net/aarch64/versal_net_common.c index df18814fb..69c5c87dd 100644 --- a/plat/xilinx/versal_net/aarch64/versal_net_common.c +++ b/plat/xilinx/versal_net/aarch64/versal_net_common.c @@ -34,7 +34,7 @@ const mmap_region_t plat_versal_net_mmap[] = { { 0 } }; -const mmap_region_t *plat_versal_net_get_mmap(void) +const mmap_region_t *plat_get_mmap(void) { return plat_versal_net_mmap; } diff --git a/plat/xilinx/versal_net/bl31_versal_net_setup.c b/plat/xilinx/versal_net/bl31_versal_net_setup.c index 08f79deae..ad6d1ef55 100644 --- a/plat/xilinx/versal_net/bl31_versal_net_setup.c +++ b/plat/xilinx/versal_net/bl31_versal_net_setup.c @@ -234,6 +234,6 @@ void bl31_plat_arch_setup(void) {0} }; - setup_page_tables(bl_regions, plat_versal_net_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu(0); } diff --git a/plat/xilinx/versal_net/include/plat_private.h b/plat/xilinx/versal_net/include/plat_private.h index 3eb80525e..9cd86361f 100644 --- a/plat/xilinx/versal_net/include/plat_private.h +++ b/plat/xilinx/versal_net/include/plat_private.h @@ -20,7 +20,7 @@ typedef struct versal_intr_info_type_el3 { void versal_net_config_setup(void); uint32_t get_uart_clk(void); -const mmap_region_t *plat_versal_net_get_mmap(void); +const mmap_region_t *plat_get_mmap(void); void plat_versal_net_gic_driver_init(void); void plat_versal_net_gic_init(void); diff --git a/plat/xilinx/zynqmp/aarch64/zynqmp_common.c b/plat/xilinx/zynqmp/aarch64/zynqmp_common.c index e1c8ee8a3..dba1734c0 100644 --- a/plat/xilinx/zynqmp/aarch64/zynqmp_common.c +++ b/plat/xilinx/zynqmp/aarch64/zynqmp_common.c @@ -27,13 +27,18 @@ * This doesn't include TZRAM as the 'mem_layout' argument passed to * configure_mmu_elx() will give the available subset of that, */ -const mmap_region_t plat_arm_mmap[] = { +const mmap_region_t plat_zynqmp_mmap[] = { { DEVICE0_BASE, DEVICE0_BASE, DEVICE0_SIZE, MT_DEVICE | MT_RW | MT_SECURE }, { DEVICE1_BASE, DEVICE1_BASE, DEVICE1_SIZE, MT_DEVICE | MT_RW | MT_SECURE }, { CRF_APB_BASE, CRF_APB_BASE, CRF_APB_SIZE, MT_DEVICE | MT_RW | MT_SECURE }, {0} }; +const mmap_region_t *plat_get_mmap(void) +{ + return plat_zynqmp_mmap; +} + static uint32_t zynqmp_get_silicon_ver(void) { static unsigned int ver; diff --git a/plat/xilinx/zynqmp/bl31_zynqmp_setup.c b/plat/xilinx/zynqmp/bl31_zynqmp_setup.c index 801853591..aed1519ad 100644 --- a/plat/xilinx/zynqmp/bl31_zynqmp_setup.c +++ b/plat/xilinx/zynqmp/bl31_zynqmp_setup.c @@ -219,6 +219,6 @@ void bl31_plat_arch_setup(void) custom_mmap_add(); - setup_page_tables(bl_regions, plat_arm_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu_el3(0); } diff --git a/plat/xilinx/zynqmp/include/plat_private.h b/plat/xilinx/zynqmp/include/plat_private.h index dda005a45..afa102d87 100644 --- a/plat/xilinx/zynqmp/include/plat_private.h +++ b/plat/xilinx/zynqmp/include/plat_private.h @@ -13,9 +13,12 @@ #include #include #include +#include void zynqmp_config_setup(void); +const mmap_region_t *plat_get_mmap(void); + uint32_t zynqmp_calc_core_pos(u_register_t mpidr); /* ZynqMP specific functions */ diff --git a/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c b/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c index a9f2dbd73..516396bc5 100644 --- a/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c +++ b/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c @@ -58,6 +58,6 @@ void tsp_plat_arch_setup(void) {0} }; - setup_page_tables(bl_regions, plat_arm_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu_el1(0); } From 4c7abf85dfe1f5bb33b98f680143ea3cda539702 Mon Sep 17 00:00:00 2001 From: Prasad Kummari Date: Tue, 31 Oct 2023 15:05:29 +0530 Subject: [PATCH 2/7] chore(zynqmp): reorganize tsp code into common path Reorganized TSP code into common folder, updated paths in tsp-zynqmp.mk. Handling the return value of a console registration function. Change-Id: I848f17c3417b3e8c8cbd2058e9642ed13d121325 Signed-off-by: Prasad Kummari --- .../{zynqmp => common}/tsp/tsp_plat_setup.c | 15 +++++++++++---- plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) rename plat/xilinx/{zynqmp => common}/tsp/tsp_plat_setup.c (88%) diff --git a/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c b/plat/xilinx/common/tsp/tsp_plat_setup.c similarity index 88% rename from plat/xilinx/zynqmp/tsp/tsp_plat_setup.c rename to plat/xilinx/common/tsp/tsp_plat_setup.c index 516396bc5..4d4121512 100644 --- a/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c +++ b/plat/xilinx/common/tsp/tsp_plat_setup.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2014-2019, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2023, Advanced Micro Devices. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -22,10 +23,16 @@ void tsp_early_platform_setup(void) * messages from TSP */ static console_t tsp_boot_console; - (void)console_cdns_register(UART_BASE, - get_uart_clk(), - UART_BAUDRATE, - &tsp_boot_console); + int32_t rc; + + rc = console_cdns_register((uintptr_t)UART_BASE, + (uint32_t)get_uart_clk(), + (uint32_t)UART_BAUDRATE, + &tsp_boot_console); + if (rc == 0) { + panic(); + } + console_set_scope(&tsp_boot_console, CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT); } diff --git a/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk b/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk index f91a04c5f..928c8e88a 100644 --- a/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk +++ b/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk @@ -5,4 +5,4 @@ # TSP source files specific to ZynqMP platform BL32_SOURCES += plat/common/aarch64/platform_mp_stack.S \ - plat/xilinx/zynqmp/tsp/tsp_plat_setup.c + plat/xilinx/common/tsp/tsp_plat_setup.c From 0561070ebf0f15bccb7be94be18db6501143e4c0 Mon Sep 17 00:00:00 2001 From: Prasad Kummari Date: Wed, 1 Nov 2023 14:31:51 +0530 Subject: [PATCH 3/7] refactor(xilinx): add generic TSP makefile Updated the generic TSP makefile in the common path for reuse in different platforms. Change-Id: Idd14675bc547e0a4a95132653a181e7ff39a547a Signed-off-by: Prasad Kummari --- plat/xilinx/common/tsp/tsp.mk | 8 ++++++++ plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 plat/xilinx/common/tsp/tsp.mk diff --git a/plat/xilinx/common/tsp/tsp.mk b/plat/xilinx/common/tsp/tsp.mk new file mode 100644 index 000000000..b80f53115 --- /dev/null +++ b/plat/xilinx/common/tsp/tsp.mk @@ -0,0 +1,8 @@ +# +# Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +# TSP source files for AMD-Xilinx platforms +BL32_SOURCES += plat/common/aarch64/platform_mp_stack.S \ + plat/xilinx/common/tsp/tsp_plat_setup.c diff --git a/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk b/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk index 928c8e88a..1d6366f46 100644 --- a/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk +++ b/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk @@ -4,5 +4,7 @@ # SPDX-License-Identifier: BSD-3-Clause # TSP source files specific to ZynqMP platform -BL32_SOURCES += plat/common/aarch64/platform_mp_stack.S \ - plat/xilinx/common/tsp/tsp_plat_setup.c + +PLAT_XILINX_COMMON := plat/xilinx/common/ + +include ${PLAT_XILINX_COMMON}/tsp/tsp.mk From 7ff4d4fbe58273541da86fa72786d4bd4604be9a Mon Sep 17 00:00:00 2001 From: Prasad Kummari Date: Tue, 31 Oct 2023 15:20:00 +0530 Subject: [PATCH 4/7] feat(versal): add tsp support Introduces support for the Test Secure Payload (TSP) for AMD-Xilinx Versal platform. TSP is a component for testing and validating secure OS and trusted execution environments. If a BL32 image is present, then there must be a matching Secure- EL1 Payload Dispatcher (SPD) service called TSPD, this service is responsible for Initializing the TSP. During initialization that service must register a function to carry out initialization of BL32 once the runtime services are fully initialized. BL31 invokes such a registered function to initialize BL32 before running BL33. The GICv3 driver is initialized in EL3 and does not need to be initialized again in SEL1 GICv3 driver is initialized in EL3 This is because the S-EL1 can use GIC system registers to manage interrupts and does not need GIC interface base addresses to be configured. The secure code load address is initially being pointed to 0x0 in the handoff parameters, which is different from the default or user-provided load address of 0x60000000. In this case, set up the PC to the requested BL32_BASE address to ensure that the secure code is loaded and executed from the correct location. Change-Id: Ida0fc6467a10bfde8927ff9b3755a83f3e16f068 Signed-off-by: Prasad Kummari --- plat/xilinx/common/tsp/tsp_plat_setup.c | 17 +++++++++++++++++ plat/xilinx/versal/bl31_versal_setup.c | 13 +++++++++++++ plat/xilinx/versal/include/versal_def.h | 1 + plat/xilinx/versal/tsp/tsp-versal.mk | 10 ++++++++++ 4 files changed, 41 insertions(+) create mode 100644 plat/xilinx/versal/tsp/tsp-versal.mk diff --git a/plat/xilinx/common/tsp/tsp_plat_setup.c b/plat/xilinx/common/tsp/tsp_plat_setup.c index 4d4121512..fa44a5068 100644 --- a/plat/xilinx/common/tsp/tsp_plat_setup.c +++ b/plat/xilinx/common/tsp/tsp_plat_setup.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -25,10 +26,18 @@ void tsp_early_platform_setup(void) static console_t tsp_boot_console; int32_t rc; +#if defined(PLAT_zynqmp) rc = console_cdns_register((uintptr_t)UART_BASE, (uint32_t)get_uart_clk(), (uint32_t)UART_BAUDRATE, &tsp_boot_console); +#else + rc = console_pl011_register((uintptr_t)UART_BASE, + (uint32_t)get_uart_clk(), + (uint32_t)UART_BAUDRATE, + &tsp_boot_console); +#endif + if (rc == 0) { panic(); } @@ -42,8 +51,16 @@ void tsp_early_platform_setup(void) ******************************************************************************/ void tsp_platform_setup(void) { +/* + * For ZynqMP, the GICv2 driver needs to be initialized in S-EL1, + * and for other platforms, the GICv3 driver is initialized in EL3. + * This is because S-EL1 can use GIC system registers to manage + * interrupts and does not need to be initialized again in SEL1. + */ +#if defined(PLAT_zynqmp) plat_arm_gic_driver_init(); plat_arm_gic_init(); +#endif } /******************************************************************************* diff --git a/plat/xilinx/versal/bl31_versal_setup.c b/plat/xilinx/versal/bl31_versal_setup.c index ee45f4eb7..96a8e3c34 100644 --- a/plat/xilinx/versal/bl31_versal_setup.c +++ b/plat/xilinx/versal/bl31_versal_setup.c @@ -115,6 +115,19 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, panic(); } else { INFO("BL31: PLM to TF-A handover success %u\n", ret); + + /* + * The BL32 load address is indicated as 0x0 in the handoff + * parameters, which is different from the default/user-provided + * load address of 0x60000000 but the flags are correctly + * configured. Consequently, in this scenario, set the PC + * to the requested BL32_BASE address. + */ + + /* TODO: Remove the following check once this is fixed from PLM */ + if (bl32_image_ep_info.pc == 0 && bl32_image_ep_info.spsr != 0) { + bl32_image_ep_info.pc = (uintptr_t)BL32_BASE; + } } NOTICE("BL31: Secure code at 0x%lx\n", bl32_image_ep_info.pc); diff --git a/plat/xilinx/versal/include/versal_def.h b/plat/xilinx/versal/include/versal_def.h index 0ac76b523..92c0ba6c6 100644 --- a/plat/xilinx/versal/include/versal_def.h +++ b/plat/xilinx/versal/include/versal_def.h @@ -48,6 +48,7 @@ * IRQ constants ******************************************************************************/ #define VERSAL_IRQ_SEC_PHY_TIMER U(29) +#define ARM_IRQ_SEC_PHY_TIMER 29 /******************************************************************************* * CCI-400 related constants diff --git a/plat/xilinx/versal/tsp/tsp-versal.mk b/plat/xilinx/versal/tsp/tsp-versal.mk new file mode 100644 index 000000000..bf32de3f5 --- /dev/null +++ b/plat/xilinx/versal/tsp/tsp-versal.mk @@ -0,0 +1,10 @@ +# +# Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +# TSP source files specific to Versal platform + +PLAT_XILINX_COMMON := plat/xilinx/common/ + +include ${PLAT_XILINX_COMMON}/tsp/tsp.mk From 639b3676cc30dcf3e3e4d478906e7f7f37a7f1e4 Mon Sep 17 00:00:00 2001 From: Prasad Kummari Date: Fri, 27 Oct 2023 13:54:20 +0530 Subject: [PATCH 5/7] feat(versal-net): add tsp support Introduces support for the Test Secure Payload (TSP) for AMD-Xilinx Versal NET platform. TSP is a component for testing and validating secure OS and trusted execution environments. If a BL32 image is present, then there must be a matching Secure-EL1 Payload Dispatcher (SPD) service called TSPD, this service is responsible for Initializing the TSP. During initialization that service must register a function to carry out initialization of BL32 once the runtime services are fully initialized. BL31 invokes such a registered function to initialize BL32 before running BL33. The GICv3 driver is initialized in EL3 and does not need to be initialized again in SEL1 GICv3 driver is initialized in EL3 This is because the S-EL1 can use GIC system registers to manage interrupts and does not need GIC interface base addresses to be configured. The secure code load address is initially being pointed to 0x0 in the handoff parameters, which is different from the default or user-provided load address of 0x60000000. In this case, set up the PC to the requested BL32_BASE address to ensure that the secure code is loaded and executed from the correct location. Change-Id: I58fe256dc9d6be5cee384c5ebb9baca2737c02a6 Signed-off-by: Prasad Kummari --- plat/xilinx/common/tsp/tsp_plat_setup.c | 2 ++ plat/xilinx/versal_net/bl31_versal_net_setup.c | 13 +++++++++++++ plat/xilinx/versal_net/include/versal_net_def.h | 1 + plat/xilinx/versal_net/tsp/tsp-versal_net.mk | 13 +++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 plat/xilinx/versal_net/tsp/tsp-versal_net.mk diff --git a/plat/xilinx/common/tsp/tsp_plat_setup.c b/plat/xilinx/common/tsp/tsp_plat_setup.c index fa44a5068..21c29c391 100644 --- a/plat/xilinx/common/tsp/tsp_plat_setup.c +++ b/plat/xilinx/common/tsp/tsp_plat_setup.c @@ -76,9 +76,11 @@ void tsp_plat_arch_setup(void) MT_CODE | MT_SECURE), MAP_REGION_FLAT(BL_RO_DATA_BASE, BL_RO_DATA_END - BL_RO_DATA_BASE, MT_RO_DATA | MT_SECURE), +#if defined(PLAT_zynqmp) || defined(PLAT_versal) MAP_REGION_FLAT(BL_COHERENT_RAM_BASE, BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE, MT_DEVICE | MT_RW | MT_SECURE), +#endif {0} }; diff --git a/plat/xilinx/versal_net/bl31_versal_net_setup.c b/plat/xilinx/versal_net/bl31_versal_net_setup.c index ad6d1ef55..5c5c697b5 100644 --- a/plat/xilinx/versal_net/bl31_versal_net_setup.c +++ b/plat/xilinx/versal_net/bl31_versal_net_setup.c @@ -131,6 +131,19 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, } INFO("BL31: PLM to TF-A handover success\n"); + + /* + * The BL32 load address is indicated as 0x0 in the handoff + * parameters, which is different from the default/user-provided + * load address of 0x60000000 but the flags are correctly + * configured. Consequently, in this scenario, set the PC + * to the requested BL32_BASE address. + */ + + /* TODO: Remove the following check once this is fixed from PLM */ + if (bl32_image_ep_info.pc == 0 && bl32_image_ep_info.spsr != 0) { + bl32_image_ep_info.pc = (uintptr_t)BL32_BASE; + } } else { INFO("BL31: setting up default configs\n"); diff --git a/plat/xilinx/versal_net/include/versal_net_def.h b/plat/xilinx/versal_net/include/versal_net_def.h index a53cad955..dd20faa4b 100644 --- a/plat/xilinx/versal_net/include/versal_net_def.h +++ b/plat/xilinx/versal_net/include/versal_net_def.h @@ -128,6 +128,7 @@ * IRQ constants ******************************************************************************/ #define VERSAL_NET_IRQ_SEC_PHY_TIMER U(29) +#define ARM_IRQ_SEC_PHY_TIMER 29 /******************************************************************************* * UART related constants diff --git a/plat/xilinx/versal_net/tsp/tsp-versal_net.mk b/plat/xilinx/versal_net/tsp/tsp-versal_net.mk new file mode 100644 index 000000000..87638ab4d --- /dev/null +++ b/plat/xilinx/versal_net/tsp/tsp-versal_net.mk @@ -0,0 +1,13 @@ +# +# Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +# TSP source files specific to Versal NET platform + +PLAT_XILINX_COMMON := plat/xilinx/common/ + +include ${PLAT_XILINX_COMMON}/tsp/tsp.mk + +BL32_SOURCES += plat/xilinx/versal_net/plat_topology.c \ + ${XLAT_TABLES_LIB_SRCS} From 7b7c5350647e15d84a20d80ab3047c21f64f8f80 Mon Sep 17 00:00:00 2001 From: Prasad Kummari Date: Sun, 29 Oct 2023 13:41:37 +0530 Subject: [PATCH 6/7] docs(versal): add TSP build documentation Add information about Versal platform for TSP and provide the build commands. Change-Id: I7106ab477a881c58e1c45863bd6854d188982282 Signed-off-by: Prasad Kummari --- docs/plat/xilinx-versal.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/plat/xilinx-versal.rst b/docs/plat/xilinx-versal.rst index 09a6ee27a..b71776d2f 100644 --- a/docs/plat/xilinx-versal.rst +++ b/docs/plat/xilinx-versal.rst @@ -19,6 +19,11 @@ To build ATF for different platform (supported are "silicon"(default) and "versa make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal VERSAL_PLATFORM=versal_virt bl31 ``` +To build bl32 TSP you have to rebuild bl31 too +```bash +make CROSS_COMPILE=aarch64-none-elf- PLAT=versal SPD=tspd RESET_TO_BL31=1 bl31 bl32 +``` + To build TF-A for JTAG DCC console ```bash make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 VERSAL_CONSOLE=dcc From 41b5a23c8fbf5ad4212d79def1f4bcf6e119dd7f Mon Sep 17 00:00:00 2001 From: Prasad Kummari Date: Sun, 29 Oct 2023 13:47:02 +0530 Subject: [PATCH 7/7] docs(versal-net): add TSP build documentation Add information about Versal NET platform for TSP and provide the build commands. Change-Id: Id7c9d75f8a42813ca2bfd18494bfc6b73df0af52 Signed-off-by: Prasad Kummari --- docs/plat/xilinx-versal-net.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/plat/xilinx-versal-net.rst b/docs/plat/xilinx-versal-net.rst index 5d0463943..1db7695b1 100644 --- a/docs/plat/xilinx-versal-net.rst +++ b/docs/plat/xilinx-versal-net.rst @@ -14,6 +14,11 @@ To build: make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal_net bl31 ``` +To build bl32 TSP you have to rebuild bl31 too +```bash +make CROSS_COMPILE=aarch64-none-elf- PLAT=versal_net SPD=tspd RESET_TO_BL31=1 bl31 bl32 +``` + To build TF-A for JTAG DCC console: ```bash make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal_net VERSAL_NET_CONSOLE=dcc bl31