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