| 1 |
# |
| 2 |
# Copyright (c) 2021-2024 Arm Limited and Contributors. All rights reserved. |
| 3 |
# |
| 4 |
# SPDX-License-Identifier: BSD-3-Clause |
| 5 |
# |
| 6 |
|
| 7 |
# Making sure the corstone1000 platform type is specified |
| 8 |
ifeq ($(filter ${TARGET_PLATFORM}, fpga fvp),) |
| 9 |
$(error TARGET_PLATFORM must be fpga or fvp) |
| 10 |
endif |
| 11 |
|
| 12 |
CORSTONE1000_CPU_LIBS +=lib/cpus/aarch64/cortex_a35.S |
| 13 |
|
| 14 |
PLAT_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 |
|
| 20 |
CORSTONE1000_FW_NVCTR_VAL := 255 |
| 21 |
TFW_NVCTR_VAL := ${CORSTONE1000_FW_NVCTR_VAL} |
| 22 |
NTFW_NVCTR_VAL := ${CORSTONE1000_FW_NVCTR_VAL} |
| 23 |
|
| 24 |
override NEED_BL1 := no |
| 25 |
|
| 26 |
override NEED_BL2 := yes |
| 27 |
FIP_BL2_ARGS := tb-fw |
| 28 |
|
| 29 |
override NEED_BL2U := no |
| 30 |
override NEED_BL31 := yes |
| 31 |
NEED_BL32 ?= yes |
| 32 |
override NEED_BL33 := yes |
| 33 |
|
| 34 |
# Add CORSTONE1000_WITH_BL32 as a preprocessor define (-D option) |
| 35 |
ifeq (${NEED_BL32},yes) |
| 36 |
$(eval $(call add_define,CORSTONE1000_WITH_BL32)) |
| 37 |
endif |
| 38 |
|
| 39 |
ENABLE_MULTICORE := 0 |
| 40 |
ifneq ($(filter ${TARGET_PLATFORM}, fvp),) |
| 41 |
ifeq (${ENABLE_MULTICORE},1) |
| 42 |
$(eval $(call add_define,CORSTONE1000_FVP_MULTICORE)) |
| 43 |
endif |
| 44 |
endif |
| 45 |
|
| 46 |
# Include GICv2 driver files |
| 47 |
include drivers/arm/gic/v2/gicv2.mk |
| 48 |
|
| 49 |
CORSTONE1000_GIC_SOURCES := ${GICV2_SOURCES} \ |
| 50 |
plat/common/plat_gicv2.c \ |
| 51 |
plat/arm/common/arm_gicv2.c |
| 52 |
|
| 53 |
|
| 54 |
BL2_SOURCES += plat/arm/board/corstone1000/common/corstone1000_security.c \ |
| 55 |
plat/arm/board/corstone1000/common/corstone1000_err.c \ |
| 56 |
plat/arm/board/corstone1000/common/corstone1000_trusted_boot.c \ |
| 57 |
lib/utils/mem_region.c \ |
| 58 |
lib/cpus/aarch64/cpu_helpers.S \ |
| 59 |
plat/arm/board/corstone1000/common/corstone1000_helpers.S \ |
| 60 |
plat/arm/board/corstone1000/common/corstone1000_plat.c \ |
| 61 |
plat/arm/board/corstone1000/common/corstone1000_bl2_mem_params_desc.c \ |
| 62 |
${CORSTONE1000_CPU_LIBS} \ |
| 63 |
|
| 64 |
|
| 65 |
BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \ |
| 66 |
lib/utils/mem_region.c \ |
| 67 |
plat/arm/board/corstone1000/common/corstone1000_helpers.S \ |
| 68 |
plat/arm/board/corstone1000/common/corstone1000_topology.c \ |
| 69 |
plat/arm/board/corstone1000/common/corstone1000_security.c \ |
| 70 |
plat/arm/board/corstone1000/common/corstone1000_plat.c \ |
| 71 |
plat/arm/board/corstone1000/common/corstone1000_pm.c \ |
| 72 |
plat/arm/board/corstone1000/common/corstone1000_bl31_setup.c \ |
| 73 |
${CORSTONE1000_CPU_LIBS} \ |
| 74 |
${CORSTONE1000_GIC_SOURCES} |
| 75 |
|
| 76 |
ifneq (${ENABLE_STACK_PROTECTOR},0) |
| 77 |
ifneq (${ENABLE_STACK_PROTECTOR},none) |
| 78 |
CORSTONE1000_SECURITY_SOURCES := plat/arm/board/corstone1000/common/corstone1000_stack_protector.c |
| 79 |
BL2_SOURCES += ${CORSTONE1000_SECURITY_SOURCES} |
| 80 |
BL31_SOURCES += ${CORSTONE1000_SECURITY_SOURCES} |
| 81 |
endif |
| 82 |
endif |
| 83 |
|
| 84 |
FDT_SOURCES += plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts |
| 85 |
CORSTONE1000_TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/corstone1000_spmc_manifest.dtb |
| 86 |
|
| 87 |
# Add the SPMC manifest to FIP and specify the same to certtool |
| 88 |
$(eval $(call TOOL_ADD_PAYLOAD,${CORSTONE1000_TOS_FW_CONFIG},--tos-fw-config,${CORSTONE1000_TOS_FW_CONFIG})) |
| 89 |
|
| 90 |
# Adding TARGET_PLATFORM as a GCC define (-D option) |
| 91 |
$(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM}))) |
| 92 |
|
| 93 |
# Adding CORSTONE1000_FW_NVCTR_VAL as a GCC define (-D option) |
| 94 |
$(eval $(call add_define,CORSTONE1000_FW_NVCTR_VAL)) |
| 95 |
|
| 96 |
include plat/arm/common/arm_common.mk |
| 97 |
include plat/arm/board/common/board_common.mk |