blob: dcd0df84445f14f6f10000f257a35958067a9dbb [file] [log] [blame]
Vishnu Banavath2b651ea2022-01-19 18:43:12 +00001#
Gauri Sahnan49a890e2023-08-08 17:16:51 +01002# Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
Vishnu Banavath2b651ea2022-01-19 18:43:12 +00003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# Making sure the corstone1000 platform type is specified
8ifeq ($(filter ${TARGET_PLATFORM}, fpga fvp),)
9 $(error TARGET_PLATFORM must be fpga or fvp)
10endif
11
12CORSTONE1000_CPU_LIBS +=lib/cpus/aarch64/cortex_a35.S
13
14PLAT_INCLUDES := -Iplat/arm/board/corstone1000/common/include \
15 -Iplat/arm/board/corstone1000/include \
16 -Iinclude/plat/arm/common \
17 -Iinclude/plat/arm/css/common/aarch64
18
19
20CORSTONE1000_FW_NVCTR_VAL := 255
21TFW_NVCTR_VAL := ${CORSTONE1000_FW_NVCTR_VAL}
22NTFW_NVCTR_VAL := ${CORSTONE1000_FW_NVCTR_VAL}
23
24override NEED_BL1 := no
25
26override NEED_BL2 := yes
27FIP_BL2_ARGS := tb-fw
28
29override NEED_BL2U := no
30override NEED_BL31 := yes
31NEED_BL32 := yes
32override NEED_BL33 := yes
33
34# Include GICv2 driver files
35include drivers/arm/gic/v2/gicv2.mk
36
37CORSTONE1000_GIC_SOURCES := ${GICV2_SOURCES} \
38 plat/common/plat_gicv2.c \
39 plat/arm/common/arm_gicv2.c
40
41
42BL2_SOURCES += plat/arm/board/corstone1000/common/corstone1000_security.c \
43 plat/arm/board/corstone1000/common/corstone1000_err.c \
44 plat/arm/board/corstone1000/common/corstone1000_trusted_boot.c \
45 lib/utils/mem_region.c \
Gauri Sahnan49a890e2023-08-08 17:16:51 +010046 lib/cpus/aarch64/cpu_helpers.S \
Vishnu Banavath2b651ea2022-01-19 18:43:12 +000047 plat/arm/board/corstone1000/common/corstone1000_helpers.S \
48 plat/arm/board/corstone1000/common/corstone1000_plat.c \
49 plat/arm/board/corstone1000/common/corstone1000_bl2_mem_params_desc.c \
50 ${CORSTONE1000_CPU_LIBS} \
51
52
53BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \
54 lib/utils/mem_region.c \
55 plat/arm/board/corstone1000/common/corstone1000_helpers.S \
56 plat/arm/board/corstone1000/common/corstone1000_topology.c \
57 plat/arm/board/corstone1000/common/corstone1000_security.c \
58 plat/arm/board/corstone1000/common/corstone1000_plat.c \
59 plat/arm/board/corstone1000/common/corstone1000_pm.c \
Madhukar Pappireddy042043b2023-03-02 16:33:25 -060060 plat/arm/board/corstone1000/common/corstone1000_bl31_setup.c \
Vishnu Banavath2b651ea2022-01-19 18:43:12 +000061 ${CORSTONE1000_CPU_LIBS} \
62 ${CORSTONE1000_GIC_SOURCES}
63
64ifneq (${ENABLE_STACK_PROTECTOR},0)
65 ifneq (${ENABLE_STACK_PROTECTOR},none)
66 CORSTONE1000_SECURITY_SOURCES := plat/arm/board/corstone1000/common/corstone1000_stack_protector.c
67 BL2_SOURCES += ${CORSTONE1000_SECURITY_SOURCES}
68 BL31_SOURCES += ${CORSTONE1000_SECURITY_SOURCES}
69 endif
70endif
71
72FDT_SOURCES += plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts
73CORSTONE1000_TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/corstone1000_spmc_manifest.dtb
74
75# Add the SPMC manifest to FIP and specify the same to certtool
76$(eval $(call TOOL_ADD_PAYLOAD,${CORSTONE1000_TOS_FW_CONFIG},--tos-fw-config,${CORSTONE1000_TOS_FW_CONFIG}))
77
78# Adding TARGET_PLATFORM as a GCC define (-D option)
79$(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM})))
80
81# Adding CORSTONE1000_FW_NVCTR_VAL as a GCC define (-D option)
82$(eval $(call add_define,CORSTONE1000_FW_NVCTR_VAL))
83
84include plat/arm/common/arm_common.mk
85include plat/arm/board/common/board_common.mk