blob: de6192926a3cd21ed36fd36d1deae70e0b13e97e [file] [log] [blame]
Antonio Nino Diaz7298c1f2018-12-05 00:09:30 +00001#
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/ \
Remi Pommarel199d6e32019-03-28 23:34:18 +010010 -Iinclude/drivers/meson/gxl \
Antonio Nino Diaz7298c1f2018-12-05 00:09:30 +000011 -Iplat/meson/gxl/include
12
13GXBB_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
14 drivers/arm/gic/v2/gicv2_main.c \
15 drivers/arm/gic/v2/gicv2_helpers.c \
16 plat/common/plat_gicv2.c
17
18PLAT_BL_COMMON_SOURCES := drivers/meson/console/aarch64/meson_console.S \
19 plat/meson/gxl/gxl_common.c \
20 plat/meson/gxl/gxl_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/gxl/aarch64/gxl_helpers.S \
Remi Pommarel199d6e32019-03-28 23:34:18 +010026 plat/meson/gxl/gxl_bl31_setup.c \
Antonio Nino Diaz7298c1f2018-12-05 00:09:30 +000027 plat/meson/gxl/gxl_efuse.c \
28 plat/meson/gxl/gxl_mhu.c \
Remi Pommarel199d6e32019-03-28 23:34:18 +010029 plat/meson/gxl/gxl_pm.c \
Antonio Nino Diaz7298c1f2018-12-05 00:09:30 +000030 plat/meson/gxl/gxl_scpi.c \
31 plat/meson/gxl/gxl_sip_svc.c \
32 plat/meson/gxl/gxl_thermal.c \
Remi Pommarel199d6e32019-03-28 23:34:18 +010033 drivers/meson/gxl/crypto/sha_dma.c \
Antonio Nino Diaz7298c1f2018-12-05 00:09:30 +000034 ${GXBB_GIC_SOURCES}
35
36# Tune compiler for Cortex-A53
37ifeq ($(notdir $(CC)),armclang)
38 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
39else ifneq ($(findstring clang,$(notdir $(CC))),)
40 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
41else
42 TF_CFLAGS_aarch64 += -mtune=cortex-a53
43endif
44
45# Build config flags
46# ------------------
47
48# Enable all errata workarounds for Cortex-A53
49ERRATA_A53_855873 := 1
50ERRATA_A53_819472 := 1
51ERRATA_A53_824069 := 1
52ERRATA_A53_827319 := 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: gxl needs MULTI_CONSOLE_API=1)
70endif
71
72ifneq (${RESET_TO_BL31}, 0)
73 $(error Error: gxl needs RESET_TO_BL31=0)
74endif
75
76ifeq (${ARCH},aarch32)
77 $(error Error: AArch32 not supported on gxl)
78endif