Debian Codegraph @

plat/xilinx/versal_net/platform.mk

raw
1 # Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
2 # Copyright (c) 2021-2022, Xilinx, Inc. All rights reserved.
3 # Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
4 #
5 # SPDX-License-Identifier: BSD-3-Clause
6
7 PLAT_PATH := plat/xilinx/versal_net
8
9 # A78 Erratum for SoC
10 ERRATA_A78_AE_1941500 := 1
11 ERRATA_A78_AE_1951502 := 1
12 ERRATA_A78_AE_2376748 := 1
13 ERRATA_A78_AE_2395408 := 1
14
15 override PROGRAMMABLE_RESET_ADDRESS := 1
16 PSCI_EXTENDED_STATE_ID := 1
17 SEPARATE_CODE_AND_RODATA := 1
18 override RESET_TO_BL31 := 1
19 PL011_GENERIC_UART := 1
20 IPI_CRC_CHECK := 0
21 GIC_ENABLE_V4_EXTN := 0
22 GICV3_SUPPORT_GIC600 := 1
23 TFA_NO_PM := 0
24 CPU_PWRDWN_SGI ?= 6
25 $(eval $(call add_define_val,CPU_PWR_DOWN_REQ_INTR,ARM_IRQ_SEC_SGI_${CPU_PWRDWN_SGI}))
26
27 override CTX_INCLUDE_AARCH32_REGS := 0
28
29 ifdef TFA_NO_PM
30 $(eval $(call add_define,TFA_NO_PM))
31 endif
32
33 ifdef VERSAL_NET_ATF_MEM_BASE
34 $(eval $(call add_define,VERSAL_NET_ATF_MEM_BASE))
35
36 ifndef VERSAL_NET_ATF_MEM_SIZE
37 $(error "VERSAL_NET_ATF_MEM_BASE defined without VERSAL_NET_ATF_MEM_SIZE")
38 endif
39 $(eval $(call add_define,VERSAL_NET_ATF_MEM_SIZE))
40
41 ifdef VERSAL_NET_ATF_MEM_PROGBITS_SIZE
42 $(eval $(call add_define,VERSAL_NET_ATF_MEM_PROGBITS_SIZE))
43 endif
44 endif
45
46 ifdef VERSAL_NET_BL32_MEM_BASE
47 $(eval $(call add_define,VERSAL_NET_BL32_MEM_BASE))
48
49 ifndef VERSAL_NET_BL32_MEM_SIZE
50 $(error "VERSAL_NET_BL32_MEM_BASE defined without VERSAL_NET_BL32_MEM_SIZE")
51 endif
52 $(eval $(call add_define,VERSAL_NET_BL32_MEM_SIZE))
53 endif
54
55 ifdef IPI_CRC_CHECK
56 $(eval $(call add_define,IPI_CRC_CHECK))
57 endif
58
59 USE_COHERENT_MEM := 0
60 HW_ASSISTED_COHERENCY := 1
61
62 VERSAL_NET_CONSOLE ?= pl011
63 ifeq (${VERSAL_NET_CONSOLE}, $(filter ${VERSAL_NET_CONSOLE},pl011 pl011_0 pl011_1 dcc dtb none))
64 else
65 $(error Please define VERSAL_NET_CONSOLE)
66 endif
67
68 $(eval $(call add_define_val,VERSAL_NET_CONSOLE,VERSAL_NET_CONSOLE_ID_${VERSAL_NET_CONSOLE}))
69
70 ifdef XILINX_OF_BOARD_DTB_ADDR
71 $(eval $(call add_define,XILINX_OF_BOARD_DTB_ADDR))
72 endif
73
74 # Runtime console in default console in DEBUG build
75 ifeq ($(DEBUG), 1)
76 CONSOLE_RUNTIME ?= pl011
77 endif
78
79 # Runtime console
80 ifdef CONSOLE_RUNTIME
81 ifeq (${CONSOLE_RUNTIME}, $(filter ${CONSOLE_RUNTIME},pl011 pl011_0 pl011_1 dcc dtb))
82 $(eval $(call add_define_val,CONSOLE_RUNTIME,RT_CONSOLE_ID_${CONSOLE_RUNTIME}))
83 else
84 $(error "Please define CONSOLE_RUNTIME")
85 endif
86 endif
87
88 # enable assert() for release/debug builds
89 ENABLE_ASSERTIONS := 1
90
91 PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
92 -Iplat/xilinx/common/include/ \
93 -Iplat/xilinx/common/ipi_mailbox_service/ \
94 -I${PLAT_PATH}/include/ \
95 -Iplat/xilinx/versal/pm_service/
96
97 # Include GICv3 driver files
98 include drivers/arm/gic/v3/gicv3.mk
99 include lib/xlat_tables_v2/xlat_tables.mk
100 include lib/libfdt/libfdt.mk
101
102 PLAT_BL_COMMON_SOURCES := \
103 drivers/arm/dcc/dcc_console.c \
104 drivers/delay_timer/delay_timer.c \
105 drivers/delay_timer/generic_delay_timer.c \
106 ${GICV3_SOURCES} \
107 drivers/arm/pl011/aarch64/pl011_console.S \
108 plat/common/aarch64/crash_console_helpers.S \
109 plat/arm/common/arm_common.c \
110 plat/common/plat_gicv3.c \
111 ${PLAT_PATH}/aarch64/versal_net_helpers.S \
112 ${PLAT_PATH}/aarch64/versal_net_common.c \
113 ${PLAT_PATH}/plat_topology.c \
114 ${XLAT_TABLES_LIB_SRCS}
115
116 BL31_SOURCES += drivers/arm/cci/cci.c \
117 lib/cpus/aarch64/cortex_a78_ae.S \
118 lib/cpus/aarch64/cortex_a78.S \
119 plat/common/plat_psci_common.c
120 ifeq ($(TFA_NO_PM), 0)
121 BL31_SOURCES += plat/xilinx/common/pm_service/pm_api_sys.c \
122 plat/xilinx/common/pm_service/pm_ipi.c \
123 ${PLAT_PATH}/plat_psci_pm.c \
124 plat/xilinx/common/pm_service/pm_svc_main.c \
125 ${PLAT_PATH}/pm_service/pm_client.c \
126 ${PLAT_PATH}/versal_net_ipi.c
127 else
128 BL31_SOURCES += ${PLAT_PATH}/plat_psci.c
129 endif
130 BL31_SOURCES += plat/xilinx/common/plat_fdt.c \
131 plat/xilinx/common/plat_startup.c \
132 plat/xilinx/common/plat_console.c \
133 plat/xilinx/common/plat_clkfunc.c \
134 plat/xilinx/common/ipi.c \
135 plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
136 plat/xilinx/common/versal.c \
137 ${PLAT_PATH}/bl31_versal_net_setup.c \
138 common/fdt_fixup.c \
139 common/fdt_wrappers.c \
140 plat/arm/common/arm_gicv3.c \
141 ${LIBFDT_SRCS} \
142 ${PLAT_PATH}/sip_svc_setup.c \
143 ${XLAT_TABLES_LIB_SRCS}