blob: 7437dfdfd959211e3ba690933c156dd5568f2299 [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/ \
10 -Iplat/meson/gxl/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/meson/console/aarch64/meson_console.S \
18 plat/meson/gxl/gxl_common.c \
19 plat/meson/gxl/gxl_topology.c \
20 ${XLAT_TABLES_LIB_SRCS}
21
22BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
23 plat/common/plat_psci_common.c \
24 plat/meson/gxl/aarch64/gxl_helpers.S \
25 plat/meson/gxl/gxl_bl31_setup.c \
26 plat/meson/gxl/gxl_efuse.c \
27 plat/meson/gxl/gxl_mhu.c \
28 plat/meson/gxl/gxl_pm.c \
29 plat/meson/gxl/gxl_scpi.c \
30 plat/meson/gxl/gxl_sip_svc.c \
31 plat/meson/gxl/gxl_thermal.c \
32 ${GXBB_GIC_SOURCES}
33
34# Tune compiler for Cortex-A53
35ifeq ($(notdir $(CC)),armclang)
36 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
37else ifneq ($(findstring clang,$(notdir $(CC))),)
38 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
39else
40 TF_CFLAGS_aarch64 += -mtune=cortex-a53
41endif
42
43# Build config flags
44# ------------------
45
46# Enable all errata workarounds for Cortex-A53
47ERRATA_A53_855873 := 1
48ERRATA_A53_819472 := 1
49ERRATA_A53_824069 := 1
50ERRATA_A53_827319 := 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
60# Use multi console API
61MULTI_CONSOLE_API := 1
62
63# Verify build config
64# -------------------
65
66ifneq (${MULTI_CONSOLE_API}, 1)
67 $(error Error: gxl needs MULTI_CONSOLE_API=1)
68endif
69
70ifneq (${RESET_TO_BL31}, 0)
71 $(error Error: gxl needs RESET_TO_BL31=0)
72endif
73
74ifeq (${ARCH},aarch32)
75 $(error Error: AArch32 not supported on gxl)
76endif