Debian Codegraph @

plat/arm/board/corstone700/platform.mk

raw
1 #
2 # Copyright (c) 2019-2023, Arm Limited and Contributors. All rights reserved.
3 #
4 # SPDX-License-Identifier: BSD-3-Clause
5 #
6
7 # Making sure the corstone700 platform type is specified
8 ifeq ($(filter ${TARGET_PLATFORM}, fpga fvp),)
9 $(error TARGET_PLATFORM must be fpga or fvp)
10 endif
11
12 CORSTONE700_CPU_LIBS += lib/cpus/aarch32/cortex_a32.S
13
14 BL32_SOURCES += plat/arm/common/aarch32/arm_helpers.S \
15 plat/arm/common/arm_console.c \
16 plat/arm/common/arm_common.c \
17 lib/xlat_tables/aarch32/xlat_tables.c \
18 lib/xlat_tables/xlat_tables_common.c \
19 ${CORSTONE700_CPU_LIBS} \
20 plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.c
21
22 PLAT_INCLUDES := -Iplat/arm/board/corstone700/common/include \
23 -Iinclude/plat/arm/common \
24 -Iplat/arm/board/corstone700/common/drivers/mhu
25
26 NEED_BL32 := yes
27
28 ifeq (${AARCH32_SP},none)
29 $(error Variable AARCH32_SP has to be set for AArch32)
30 endif
31
32 # Include GICv2 driver files
33 include drivers/arm/gic/v2/gicv2.mk
34
35 CORSTONE700_GIC_SOURCES := ${GICV2_SOURCES} \
36 plat/common/plat_gicv2.c \
37 plat/arm/common/arm_gicv2.c
38
39 # BL1/BL2 Image not a part of the capsule Image for Corstone700
40 override NEED_BL1 := no
41 override NEED_BL2 := no
42 override NEED_BL2U := no
43 override NEED_BL33 := yes
44
45 #TFA for Corstone700 starts from BL32
46 override RESET_TO_SP_MIN := 1
47
48 #Device tree
49 CORSTONE700_HW_CONFIG_DTS := fdts/corstone700_${TARGET_PLATFORM}.dts
50 CORSTONE700_HW_CONFIG := ${BUILD_PLAT}/fdts/corstone700_${TARGET_PLATFORM}.dtb
51 FDT_SOURCES += ${CORSTONE700_HW_CONFIG_DTS}
52 $(eval CORSTONE700_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb,$(CORSTONE700_HW_CONFIG_DTS)))
53
54 # Add the HW_CONFIG to FIP and specify the same to certtool
55 $(eval $(call TOOL_ADD_PAYLOAD,${CORSTONE700_HW_CONFIG},--hw-config,${CORSTONE700_HW_CONFIG}))
56
57 # Check for Linux kernel as a BL33 image by default
58 $(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33))
59 ifndef ARM_PRELOADED_DTB_BASE
60 $(error "ARM_PRELOADED_DTB_BASE must be set if ARM_LINUX_KERNEL_AS_BL33 is used.")
61 endif
62 $(eval $(call add_define,ARM_PRELOADED_DTB_BASE))
63
64 # Adding TARGET_PLATFORM as a GCC define (-D option)
65 $(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM})))
66
67 include plat/arm/board/common/board_common.mk