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