Antonio Nino Diaz | 7298c1f | 2018-12-05 00:09:30 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | include lib/xlat_tables_v2/xlat_tables.mk |
| 8 | |
| 9 | PLAT_INCLUDES := -Iinclude/drivers/meson/ \ |
Remi Pommarel | 199d6e3 | 2019-03-28 23:34:18 +0100 | [diff] [blame^] | 10 | -Iinclude/drivers/meson/gxl \ |
Antonio Nino Diaz | 7298c1f | 2018-12-05 00:09:30 +0000 | [diff] [blame] | 11 | -Iplat/meson/gxl/include |
| 12 | |
| 13 | GXBB_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 | |
| 18 | PLAT_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 | |
| 23 | BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \ |
| 24 | plat/common/plat_psci_common.c \ |
| 25 | plat/meson/gxl/aarch64/gxl_helpers.S \ |
Remi Pommarel | 199d6e3 | 2019-03-28 23:34:18 +0100 | [diff] [blame^] | 26 | plat/meson/gxl/gxl_bl31_setup.c \ |
Antonio Nino Diaz | 7298c1f | 2018-12-05 00:09:30 +0000 | [diff] [blame] | 27 | plat/meson/gxl/gxl_efuse.c \ |
| 28 | plat/meson/gxl/gxl_mhu.c \ |
Remi Pommarel | 199d6e3 | 2019-03-28 23:34:18 +0100 | [diff] [blame^] | 29 | plat/meson/gxl/gxl_pm.c \ |
Antonio Nino Diaz | 7298c1f | 2018-12-05 00:09:30 +0000 | [diff] [blame] | 30 | plat/meson/gxl/gxl_scpi.c \ |
| 31 | plat/meson/gxl/gxl_sip_svc.c \ |
| 32 | plat/meson/gxl/gxl_thermal.c \ |
Remi Pommarel | 199d6e3 | 2019-03-28 23:34:18 +0100 | [diff] [blame^] | 33 | drivers/meson/gxl/crypto/sha_dma.c \ |
Antonio Nino Diaz | 7298c1f | 2018-12-05 00:09:30 +0000 | [diff] [blame] | 34 | ${GXBB_GIC_SOURCES} |
| 35 | |
| 36 | # Tune compiler for Cortex-A53 |
| 37 | ifeq ($(notdir $(CC)),armclang) |
| 38 | TF_CFLAGS_aarch64 += -mcpu=cortex-a53 |
| 39 | else ifneq ($(findstring clang,$(notdir $(CC))),) |
| 40 | TF_CFLAGS_aarch64 += -mcpu=cortex-a53 |
| 41 | else |
| 42 | TF_CFLAGS_aarch64 += -mtune=cortex-a53 |
| 43 | endif |
| 44 | |
| 45 | # Build config flags |
| 46 | # ------------------ |
| 47 | |
| 48 | # Enable all errata workarounds for Cortex-A53 |
| 49 | ERRATA_A53_855873 := 1 |
| 50 | ERRATA_A53_819472 := 1 |
| 51 | ERRATA_A53_824069 := 1 |
| 52 | ERRATA_A53_827319 := 1 |
| 53 | |
| 54 | WORKAROUND_CVE_2017_5715 := 0 |
| 55 | |
| 56 | # Have different sections for code and rodata |
| 57 | SEPARATE_CODE_AND_RODATA := 1 |
| 58 | |
| 59 | # Use Coherent memory |
| 60 | USE_COHERENT_MEM := 1 |
| 61 | |
| 62 | # Use multi console API |
| 63 | MULTI_CONSOLE_API := 1 |
| 64 | |
| 65 | # Verify build config |
| 66 | # ------------------- |
| 67 | |
| 68 | ifneq (${MULTI_CONSOLE_API}, 1) |
| 69 | $(error Error: gxl needs MULTI_CONSOLE_API=1) |
| 70 | endif |
| 71 | |
| 72 | ifneq (${RESET_TO_BL31}, 0) |
| 73 | $(error Error: gxl needs RESET_TO_BL31=0) |
| 74 | endif |
| 75 | |
| 76 | ifeq (${ARCH},aarch32) |
| 77 | $(error Error: AArch32 not supported on gxl) |
| 78 | endif |