Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [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 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 9 | PLAT_INCLUDES := -Iplat/meson/gxbb/include |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 10 | |
| 11 | GXBB_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 | |
Julius Werner | 6b88b65 | 2018-11-27 17:50:28 -0800 | [diff] [blame] | 16 | PLAT_BL_COMMON_SOURCES := drivers/meson/console/aarch64/meson_console.S \ |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 17 | plat/meson/gxbb/gxbb_common.c \ |
| 18 | plat/meson/gxbb/gxbb_topology.c \ |
| 19 | ${XLAT_TABLES_LIB_SRCS} |
| 20 | |
| 21 | BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \ |
| 22 | plat/common/plat_psci_common.c \ |
| 23 | plat/meson/gxbb/aarch64/gxbb_helpers.S \ |
| 24 | plat/meson/gxbb/gxbb_bl31_setup.c \ |
| 25 | plat/meson/gxbb/gxbb_efuse.c \ |
| 26 | plat/meson/gxbb/gxbb_mhu.c \ |
| 27 | plat/meson/gxbb/gxbb_pm.c \ |
| 28 | plat/meson/gxbb/gxbb_scpi.c \ |
| 29 | plat/meson/gxbb/gxbb_sip_svc.c \ |
| 30 | plat/meson/gxbb/gxbb_thermal.c \ |
| 31 | ${GXBB_GIC_SOURCES} |
| 32 | |
| 33 | # Tune compiler for Cortex-A53 |
| 34 | ifeq ($(notdir $(CC)),armclang) |
| 35 | TF_CFLAGS_aarch64 += -mcpu=cortex-a53 |
| 36 | else ifneq ($(findstring clang,$(notdir $(CC))),) |
| 37 | TF_CFLAGS_aarch64 += -mcpu=cortex-a53 |
| 38 | else |
| 39 | TF_CFLAGS_aarch64 += -mtune=cortex-a53 |
| 40 | endif |
| 41 | |
| 42 | # Build config flags |
| 43 | # ------------------ |
| 44 | |
| 45 | # Enable all errata workarounds for Cortex-A53 |
| 46 | ERRATA_A53_826319 := 1 |
| 47 | ERRATA_A53_835769 := 1 |
| 48 | ERRATA_A53_836870 := 1 |
| 49 | ERRATA_A53_843419 := 1 |
| 50 | ERRATA_A53_855873 := 1 |
| 51 | |
| 52 | WORKAROUND_CVE_2017_5715 := 0 |
| 53 | |
| 54 | # Have different sections for code and rodata |
| 55 | SEPARATE_CODE_AND_RODATA := 1 |
| 56 | |
| 57 | # Use Coherent memory |
| 58 | USE_COHERENT_MEM := 1 |
| 59 | |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 60 | # Verify build config |
| 61 | # ------------------- |
| 62 | |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 63 | ifneq (${RESET_TO_BL31}, 0) |
| 64 | $(error Error: gxbb needs RESET_TO_BL31=0) |
| 65 | endif |
| 66 | |
| 67 | ifeq (${ARCH},aarch32) |
| 68 | $(error Error: AArch32 not supported on gxbb) |
| 69 | endif |