Commit c00baeec authored by Venkatesh Yadav Abbarapu's avatar Venkatesh Yadav Abbarapu
Browse files

plat:xilinx:zynqmp: 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: I62cfbb57ae7e454fbc91d1c54aafa6e99f9a35c8
parent e5936205
...@@ -22,6 +22,12 @@ To build bl32 TSP you have to rebuild bl31 too: ...@@ -22,6 +22,12 @@ To build bl32 TSP you have to rebuild bl31 too:
make CROSS_COMPILE=aarch64-none-elf- PLAT=zynqmp SPD=tspd bl31 bl32 make CROSS_COMPILE=aarch64-none-elf- PLAT=zynqmp SPD=tspd bl31 bl32
To build TF-A for JTAG DCC console:
.. code:: bash
make CROSS_COMPILE=aarch64-none-elf- PLAT=zynqmp RESET_TO_BL31=1 bl31 ZYNQMP_CONSOLE=dcc
ZynqMP platform specific build options ZynqMP platform specific build options
-------------------------------------- --------------------------------------
......
/* /*
* Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,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/console.h> #include <drivers/console.h>
#include <plat/arm/common/plat_arm.h> #include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h> #include <plat/common/platform.h>
...@@ -62,15 +63,23 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, ...@@ -62,15 +63,23 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
uint64_t atf_handoff_addr; uint64_t atf_handoff_addr;
/* Register the console to provide early debug support */
static console_t bl31_boot_console;
(void)console_cdns_register(ZYNQMP_UART_BASE,
zynqmp_get_uart_clk(),
ZYNQMP_UART_BAUDRATE,
&bl31_boot_console);
console_set_scope(&bl31_boot_console,
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT);
if (ZYNQMP_CONSOLE_IS(cadence)) {
/* Register the console to provide early debug support */
static console_t bl31_boot_console;
(void)console_cdns_register(ZYNQMP_UART_BASE,
zynqmp_get_uart_clk(),
ZYNQMP_UART_BAUDRATE,
&bl31_boot_console);
console_set_scope(&bl31_boot_console,
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT);
} else if (ZYNQMP_CONSOLE_IS(dcc)) {
/* Initialize the dcc console for debug */
int rc = console_dcc_register();
if (rc == 0) {
panic();
}
}
/* Initialize the platform config for future decision making */ /* Initialize the platform config for future decision making */
zynqmp_config_setup(); zynqmp_config_setup();
......
# #
# Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
...@@ -41,8 +41,6 @@ ifdef ZYNQMP_BL32_MEM_BASE ...@@ -41,8 +41,6 @@ ifdef ZYNQMP_BL32_MEM_BASE
$(eval $(call add_define,ZYNQMP_BL32_MEM_SIZE)) $(eval $(call add_define,ZYNQMP_BL32_MEM_SIZE))
endif endif
ZYNQMP_CONSOLE ?= cadence
$(eval $(call add_define_val,ZYNQMP_CONSOLE,ZYNQMP_CONSOLE_ID_${ZYNQMP_CONSOLE}))
ifdef ZYNQMP_WDT_RESTART ifdef ZYNQMP_WDT_RESTART
$(eval $(call add_define,ZYNQMP_WDT_RESTART)) $(eval $(call add_define,ZYNQMP_WDT_RESTART))
...@@ -64,6 +62,7 @@ include drivers/arm/gic/v2/gicv2.mk ...@@ -64,6 +62,7 @@ include drivers/arm/gic/v2/gicv2.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 \
${GICV2_SOURCES} \ ${GICV2_SOURCES} \
...@@ -78,6 +77,13 @@ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ ...@@ -78,6 +77,13 @@ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \
plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S \ plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S \
plat/xilinx/zynqmp/aarch64/zynqmp_common.c plat/xilinx/zynqmp/aarch64/zynqmp_common.c
ZYNQMP_CONSOLE ?= cadence
ifeq (${ZYNQMP_CONSOLE}, $(filter ${ZYNQMP_CONSOLE},cadence cadence0 cadence1 dcc))
else
$(error "Please define ZYNQMP_CONSOLE")
endif
$(eval $(call add_define_val,ZYNQMP_CONSOLE,ZYNQMP_CONSOLE_ID_${ZYNQMP_CONSOLE}))
BL31_SOURCES += drivers/arm/cci/cci.c \ BL31_SOURCES += drivers/arm/cci/cci.c \
lib/cpus/aarch64/aem_generic.S \ lib/cpus/aarch64/aem_generic.S \
lib/cpus/aarch64/cortex_a53.S \ lib/cpus/aarch64/cortex_a53.S \
......
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