xref: /rk3399_ARM-atf/plat/xilinx/versal/platform.mk (revision 3dbbbca29e3c42a6f9976878f27e1f1fd75b5c8e)
1# Copyright (c) 2018-2021, ARM Limited and Contributors. All rights reserved.
2#
3# SPDX-License-Identifier: BSD-3-Clause
4
5override PROGRAMMABLE_RESET_ADDRESS := 1
6PSCI_EXTENDED_STATE_ID := 1
7A53_DISABLE_NON_TEMPORAL_HINT := 0
8SEPARATE_CODE_AND_RODATA := 1
9override RESET_TO_BL31 := 1
10PL011_GENERIC_UART := 1
11IPI_CRC_CHECK := 0
12
13ifdef VERSAL_ATF_MEM_BASE
14    $(eval $(call add_define,VERSAL_ATF_MEM_BASE))
15
16    ifndef VERSAL_ATF_MEM_SIZE
17        $(error "VERSAL_ATF_BASE defined without VERSAL_ATF_SIZE")
18    endif
19    $(eval $(call add_define,VERSAL_ATF_MEM_SIZE))
20
21    ifdef VERSAL_ATF_MEM_PROGBITS_SIZE
22        $(eval $(call add_define,VERSAL_ATF_MEM_PROGBITS_SIZE))
23    endif
24endif
25
26ifdef VERSAL_BL32_MEM_BASE
27    $(eval $(call add_define,VERSAL_BL32_MEM_BASE))
28
29    ifndef VERSAL_BL32_MEM_SIZE
30        $(error "VERSAL_BL32_BASE defined without VERSAL_BL32_SIZE")
31    endif
32    $(eval $(call add_define,VERSAL_BL32_MEM_SIZE))
33endif
34
35ifdef IPI_CRC_CHECK
36    $(eval $(call add_define,IPI_CRC_CHECK))
37endif
38
39VERSAL_PLATFORM ?= silicon
40$(eval $(call add_define_val,VERSAL_PLATFORM,VERSAL_PLATFORM_ID_${VERSAL_PLATFORM}))
41
42PLAT_INCLUDES		:=	-Iinclude/plat/arm/common/			\
43				-Iplat/xilinx/common/include/			\
44				-Iplat/xilinx/common/ipi_mailbox_service/	\
45				-Iplat/xilinx/versal/include/			\
46				-Iplat/xilinx/versal/pm_service/
47
48# Include GICv3 driver files
49include drivers/arm/gic/v3/gicv3.mk
50
51PLAT_BL_COMMON_SOURCES	:=	lib/xlat_tables/xlat_tables_common.c		\
52				lib/xlat_tables/aarch64/xlat_tables.c		\
53				drivers/arm/dcc/dcc_console.c			\
54				drivers/delay_timer/delay_timer.c		\
55				drivers/delay_timer/generic_delay_timer.c	\
56				${GICV3_SOURCES}				\
57				drivers/arm/pl011/aarch64/pl011_console.S	\
58				plat/common/aarch64/crash_console_helpers.S	\
59				plat/arm/common/arm_cci.c			\
60				plat/arm/common/arm_common.c			\
61				plat/common/plat_gicv3.c			\
62				plat/xilinx/versal/aarch64/versal_helpers.S	\
63				plat/xilinx/versal/aarch64/versal_common.c
64
65VERSAL_CONSOLE	?=	pl011
66ifeq (${VERSAL_CONSOLE}, $(filter ${VERSAL_CONSOLE},pl011 pl011_0 pl011_1 dcc))
67else
68  $(error "Please define VERSAL_CONSOLE")
69endif
70
71$(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE}))
72
73BL31_SOURCES		+=	drivers/arm/cci/cci.c				\
74				lib/cpus/aarch64/cortex_a72.S			\
75				plat/common/plat_psci_common.c			\
76				plat/xilinx/common/ipi.c			\
77				plat/xilinx/common/plat_startup.c		\
78				plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
79				plat/xilinx/common/pm_service/pm_ipi.c		\
80				plat/xilinx/versal/bl31_versal_setup.c		\
81				plat/xilinx/versal/plat_psci.c			\
82				plat/xilinx/versal/plat_versal.c		\
83				plat/xilinx/versal/plat_topology.c		\
84				plat/xilinx/versal/sip_svc_setup.c		\
85				plat/xilinx/versal/versal_gicv3.c		\
86				plat/xilinx/versal/versal_ipi.c			\
87				plat/xilinx/versal/pm_service/pm_svc_main.c	\
88				plat/xilinx/versal/pm_service/pm_api_sys.c	\
89				plat/xilinx/versal/pm_service/pm_client.c
90