blob: 06aaaba3fbec58113f316d110509ded3bece4296 [file] [log] [blame]
Antonio Nino Diaz272e8712018-09-18 01:36:00 +01001#
Carlo Caione189494a2019-08-23 18:28:36 +01002# Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
Antonio Nino Diaz272e8712018-09-18 01:36:00 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include lib/xlat_tables_v2/xlat_tables.mk
8
Carlo Caione189494a2019-08-23 18:28:36 +01009PLAT_INCLUDES := -Iplat/amlogic/gxbb/include
Antonio Nino Diaz272e8712018-09-18 01:36:00 +010010
11GXBB_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
12 drivers/arm/gic/v2/gicv2_main.c \
13 drivers/arm/gic/v2/gicv2_helpers.c \
14 plat/common/plat_gicv2.c
15
Carlo Caione189494a2019-08-23 18:28:36 +010016PLAT_BL_COMMON_SOURCES := drivers/amlogic/console/aarch64/meson_console.S \
17 plat/amlogic/gxbb/gxbb_common.c \
18 plat/amlogic/gxbb/gxbb_topology.c \
Antonio Nino Diaz272e8712018-09-18 01:36:00 +010019 ${XLAT_TABLES_LIB_SRCS}
20
21BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
22 plat/common/plat_psci_common.c \
Carlo Caione189494a2019-08-23 18:28:36 +010023 plat/amlogic/gxbb/aarch64/gxbb_helpers.S \
24 plat/amlogic/gxbb/gxbb_bl31_setup.c \
25 plat/amlogic/gxbb/gxbb_efuse.c \
26 plat/amlogic/gxbb/gxbb_mhu.c \
27 plat/amlogic/gxbb/gxbb_pm.c \
28 plat/amlogic/gxbb/gxbb_scpi.c \
29 plat/amlogic/gxbb/gxbb_sip_svc.c \
30 plat/amlogic/gxbb/gxbb_thermal.c \
Antonio Nino Diaz272e8712018-09-18 01:36:00 +010031 ${GXBB_GIC_SOURCES}
32
33# Tune compiler for Cortex-A53
34ifeq ($(notdir $(CC)),armclang)
35 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
36else ifneq ($(findstring clang,$(notdir $(CC))),)
37 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
38else
39 TF_CFLAGS_aarch64 += -mtune=cortex-a53
40endif
41
42# Build config flags
43# ------------------
44
45# Enable all errata workarounds for Cortex-A53
46ERRATA_A53_826319 := 1
47ERRATA_A53_835769 := 1
48ERRATA_A53_836870 := 1
49ERRATA_A53_843419 := 1
50ERRATA_A53_855873 := 1
51
52WORKAROUND_CVE_2017_5715 := 0
53
54# Have different sections for code and rodata
55SEPARATE_CODE_AND_RODATA := 1
56
57# Use Coherent memory
58USE_COHERENT_MEM := 1
59
Antonio Nino Diaz272e8712018-09-18 01:36:00 +010060# Verify build config
61# -------------------
62
Antonio Nino Diaz272e8712018-09-18 01:36:00 +010063ifneq (${RESET_TO_BL31}, 0)
64 $(error Error: gxbb needs RESET_TO_BL31=0)
65endif
66
67ifeq (${ARCH},aarch32)
68 $(error Error: AArch32 not supported on gxbb)
69endif