Commit 0b25f404 authored by Venkatesh Yadav Abbarapu's avatar Venkatesh Yadav Abbarapu
Browse files

plat:xilinx:versal: Add JTAG DCC support



As per the new multi-console framework, updating the JTAG DCC support.
Signed-off-by: default avatarVenkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Acked-by: default avatarMichal Simek <michal.simek@xilinx.com>
Change-Id: I77994ce387caf0d695986df3d01d414a920978d0
parent c00baeec
...@@ -19,6 +19,11 @@ To build ATF for different platform (supported are "silicon"(default) and "versa ...@@ -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 make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal VERSAL_PLATFORM=versal_virt bl31
``` ```
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
```
Xilinx Versal platform specific build options Xilinx Versal platform specific build options
--------------------------------------------- ---------------------------------------------
......
/* /*
* Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2021, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <bl31/bl31.h> #include <bl31/bl31.h>
#include <common/bl_common.h> #include <common/bl_common.h>
#include <common/debug.h> #include <common/debug.h>
#include <drivers/arm/dcc.h>
#include <drivers/arm/pl011.h> #include <drivers/arm/pl011.h>
#include <drivers/console.h> #include <drivers/console.h>
#include <lib/mmio.h> #include <lib/mmio.h>
...@@ -22,7 +23,6 @@ ...@@ -22,7 +23,6 @@
static entry_point_info_t bl32_image_ep_info; static entry_point_info_t bl32_image_ep_info;
static entry_point_info_t bl33_image_ep_info; static entry_point_info_t bl33_image_ep_info;
static console_t versal_runtime_console;
/* /*
* Return a pointer to the 'entry_point_info' structure of the next image for * Return a pointer to the 'entry_point_info' structure of the next image for
...@@ -64,18 +64,26 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, ...@@ -64,18 +64,26 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
{ {
uint64_t atf_handoff_addr; uint64_t atf_handoff_addr;
/* Initialize the console to provide early debug support */ if (VERSAL_CONSOLE_IS(pl011)) {
int rc = console_pl011_register(VERSAL_UART_BASE, static console_t versal_runtime_console;
VERSAL_UART_CLOCK, /* Initialize the console to provide early debug support */
VERSAL_UART_BAUDRATE, int rc = console_pl011_register(VERSAL_UART_BASE,
&versal_runtime_console); VERSAL_UART_CLOCK,
if (rc == 0) { VERSAL_UART_BAUDRATE,
panic(); &versal_runtime_console);
if (rc == 0) {
panic();
}
console_set_scope(&versal_runtime_console, CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME);
} else if (VERSAL_CONSOLE_IS(dcc)) {
/* Initialize the dcc console for debug */
int rc = console_dcc_register();
if (rc == 0) {
panic();
}
} }
console_set_scope(&versal_runtime_console, CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME);
/* Initialize the platform config for future decision making */ /* Initialize the platform config for future decision making */
versal_config_setup(); versal_config_setup();
/* There are no parameters from BL2 if BL31 is a reset vector */ /* There are no parameters from BL2 if BL31 is a reset vector */
......
/* /*
* Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2021, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#define VERSAL_UART0_BASE 0xFF000000 #define VERSAL_UART0_BASE 0xFF000000
#define VERSAL_UART1_BASE 0xFF010000 #define VERSAL_UART1_BASE 0xFF010000
#if VERSAL_CONSOLE_IS(pl011) #if VERSAL_CONSOLE_IS(pl011) || VERSAL_CONSOLE_IS(dcc)
# define VERSAL_UART_BASE VERSAL_UART0_BASE # define VERSAL_UART_BASE VERSAL_UART0_BASE
#elif VERSAL_CONSOLE_IS(pl011_1) #elif VERSAL_CONSOLE_IS(pl011_1)
# define VERSAL_UART_BASE VERSAL_UART1_BASE # define VERSAL_UART_BASE VERSAL_UART1_BASE
......
# Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2018-2021, ARM Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
...@@ -34,9 +34,6 @@ endif ...@@ -34,9 +34,6 @@ endif
VERSAL_PLATFORM ?= silicon VERSAL_PLATFORM ?= silicon
$(eval $(call add_define_val,VERSAL_PLATFORM,VERSAL_PLATFORM_ID_${VERSAL_PLATFORM})) $(eval $(call add_define_val,VERSAL_PLATFORM,VERSAL_PLATFORM_ID_${VERSAL_PLATFORM}))
VERSAL_CONSOLE ?= pl011
$(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE}))
PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
-Iplat/xilinx/common/include/ \ -Iplat/xilinx/common/include/ \
-Iplat/xilinx/common/ipi_mailbox_service/ \ -Iplat/xilinx/common/ipi_mailbox_service/ \
...@@ -48,6 +45,7 @@ include drivers/arm/gic/v3/gicv3.mk ...@@ -48,6 +45,7 @@ include drivers/arm/gic/v3/gicv3.mk
PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \
lib/xlat_tables/aarch64/xlat_tables.c \ lib/xlat_tables/aarch64/xlat_tables.c \
drivers/arm/dcc/dcc_console.c \
drivers/delay_timer/delay_timer.c \ drivers/delay_timer/delay_timer.c \
drivers/delay_timer/generic_delay_timer.c \ drivers/delay_timer/generic_delay_timer.c \
${GICV3_SOURCES} \ ${GICV3_SOURCES} \
...@@ -59,6 +57,14 @@ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ ...@@ -59,6 +57,14 @@ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \
plat/xilinx/versal/aarch64/versal_helpers.S \ plat/xilinx/versal/aarch64/versal_helpers.S \
plat/xilinx/versal/aarch64/versal_common.c plat/xilinx/versal/aarch64/versal_common.c
VERSAL_CONSOLE ?= pl011
ifeq (${VERSAL_CONSOLE}, $(filter ${VERSAL_CONSOLE},pl011 pl011_0 pl011_1 dcc))
else
$(error "Please define VERSAL_CONSOLE")
endif
$(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE}))
BL31_SOURCES += drivers/arm/cci/cci.c \ BL31_SOURCES += drivers/arm/cci/cci.c \
lib/cpus/aarch64/cortex_a72.S \ lib/cpus/aarch64/cortex_a72.S \
plat/common/plat_psci_common.c \ plat/common/plat_psci_common.c \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment