Debian Codegraph @

plat/amd/versal2/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-2024, Advanced Micro Devices, Inc. All rights reserved.
4 #
5 # SPDX-License-Identifier: BSD-3-Clause
6
7 PLAT_PATH := plat/amd/versal2
8
9 override NEED_BL1 := no
10 override NEED_BL2 := no
11
12 # A78 Erratum for SoC
13 ERRATA_A78_AE_1941500 := 1
14 ERRATA_A78_AE_1951502 := 1
15 ERRATA_A78_AE_2376748 := 1
16 ERRATA_A78_AE_2395408 := 1
17 ERRATA_ABI_SUPPORT := 1
18
19 # Platform Supports Armv8.2 extensions
20 ARM_ARCH_MAJOR := 8
21 ARM_ARCH_MINOR := 2
22
23 override PROGRAMMABLE_RESET_ADDRESS := 1
24 PSCI_EXTENDED_STATE_ID := 1
25 SEPARATE_CODE_AND_RODATA := 1
26 override RESET_TO_BL31 := 1
27 PL011_GENERIC_UART := 1
28 IPI_CRC_CHECK := 0
29 GIC_ENABLE_V4_EXTN := 0
30 GICV3_SUPPORT_GIC600 := 1
31
32 override CTX_INCLUDE_AARCH32_REGS := 0
33
34 # Platform to support Dynamic XLAT Table by default
35 override PLAT_XLAT_TABLES_DYNAMIC := 1
36 $(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
37
38 ifdef MEM_BASE
39 $(eval $(call add_define,MEM_BASE))
40
41 ifndef MEM_SIZE
42 $(error "MEM_BASE defined without MEM_SIZE")
43 endif
44 $(eval $(call add_define,MEM_SIZE))
45
46 ifdef MEM_PROGBITS_SIZE
47 $(eval $(call add_define,MEM_PROGBITS_SIZE))
48 endif
49 endif
50
51 ifdef BL32_MEM_BASE
52 $(eval $(call add_define,BL32_MEM_BASE))
53
54 ifndef BL32_MEM_SIZE
55 $(error "BL32_MEM_BASE defined without BL32_MEM_SIZE")
56 endif
57 $(eval $(call add_define,BL32_MEM_SIZE))
58 endif
59
60 ifdef IPI_CRC_CHECK
61 $(eval $(call add_define,IPI_CRC_CHECK))
62 endif
63
64 USE_COHERENT_MEM := 0
65 HW_ASSISTED_COHERENCY := 1
66
67 VERSAL2_CONSOLE ?= pl011
68 ifeq (${VERSAL2_CONSOLE}, $(filter ${VERSAL2_CONSOLE},pl011 pl011_0 pl011_1 dcc dtb none))
69 else
70 $(error "Please define VERSAL2_CONSOLE")
71 endif
72
73 $(eval $(call add_define_val,VERSAL2_CONSOLE,VERSAL2_CONSOLE_ID_${VERSAL2_CONSOLE}))
74
75 # Runtime console in default console in DEBUG build
76 ifeq ($(DEBUG), 1)
77 CONSOLE_RUNTIME ?= pl011
78 endif
79
80 # Runtime console
81 ifdef CONSOLE_RUNTIME
82 ifeq (${CONSOLE_RUNTIME}, $(filter ${CONSOLE_RUNTIME},pl011 pl011_0 pl011_1 dcc dtb))
83 $(eval $(call add_define_val,CONSOLE_RUNTIME,RT_CONSOLE_ID_${CONSOLE_RUNTIME}))
84 else
85 $(error "Please define CONSOLE_RUNTIME")
86 endif
87 endif
88
89
90 ifdef XILINX_OF_BOARD_DTB_ADDR
91 $(eval $(call add_define,XILINX_OF_BOARD_DTB_ADDR))
92 endif
93
94 PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
95 -Iplat/xilinx/common/include/ \
96 -Iplat/xilinx/common/ipi_mailbox_service/ \
97 -I${PLAT_PATH}/include/ \
98 -Iplat/xilinx/versal/pm_service/
99
100 # Include GICv3 driver files
101 include drivers/arm/gic/v3/gicv3.mk
102 include lib/xlat_tables_v2/xlat_tables.mk
103 include lib/libfdt/libfdt.mk
104
105 PLAT_BL_COMMON_SOURCES := \
106 drivers/arm/dcc/dcc_console.c \
107 drivers/delay_timer/delay_timer.c \
108 drivers/delay_timer/generic_delay_timer.c \
109 ${GICV3_SOURCES} \
110 drivers/arm/pl011/aarch64/pl011_console.S \
111 plat/common/aarch64/crash_console_helpers.S \
112 plat/arm/common/arm_common.c \
113 plat/common/plat_gicv3.c \
114 ${PLAT_PATH}/aarch64/helpers.S \
115 ${PLAT_PATH}/aarch64/common.c \
116 ${PLAT_PATH}/plat_topology.c \
117 ${XLAT_TABLES_LIB_SRCS}
118
119 BL31_SOURCES += drivers/arm/cci/cci.c \
120 lib/cpus/aarch64/cortex_a78_ae.S \
121 lib/cpus/aarch64/cortex_a78.S \
122 plat/common/plat_psci_common.c \
123 drivers/scmi-msg/base.c \
124 drivers/scmi-msg/entry.c \
125 drivers/scmi-msg/smt.c \
126 drivers/scmi-msg/clock.c \
127 drivers/scmi-msg/power_domain.c \
128 drivers/scmi-msg/reset_domain.c \
129 ${PLAT_PATH}/scmi.c
130
131 BL31_SOURCES += ${PLAT_PATH}/plat_psci.c
132
133 BL31_SOURCES += plat/xilinx/common/plat_fdt.c \
134 common/fdt_wrappers.c \
135 plat/xilinx/common/plat_fdt.c \
136 plat/xilinx/common/plat_console.c \
137 plat/xilinx/common/plat_startup.c \
138 plat/xilinx/common/ipi.c \
139 plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
140 ${PLAT_PATH}/soc_ipi.c \
141 plat/xilinx/common/versal.c \
142 ${PLAT_PATH}/bl31_setup.c \
143 common/fdt_fixup.c \
144 common/fdt_wrappers.c \
145 ${LIBFDT_SRCS} \
146 ${PLAT_PATH}/sip_svc_setup.c \
147 ${PLAT_PATH}/gicv3.c
148
149 ifeq (${ERRATA_ABI_SUPPORT}, 1)
150 # enable the cpu macros for errata abi interface
151 CORTEX_A78_AE_H_INC := 1
152 $(eval $(call add_define, CORTEX_A78_AE_H_INC))
153 endif
154
155 # Enable Handoff protocol using transfer lists
156 TRANSFER_LIST := 1
157
158 include lib/transfer_list/transfer_list.mk
159 BL31_SOURCES += plat/xilinx/common/plat_xfer_list.c