2 # Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
4 # SPDX-License-Identifier: BSD-3-Clause
7 include lib
/xlat_tables_v2
/xlat_tables.mk
9 AML_PLAT
:= plat
/amlogic
10 AML_PLAT_SOC
:= ${AML_PLAT}/${PLAT}
11 AML_PLAT_COMMON
:= ${AML_PLAT}/common
13 DOIMAGEPATH ?
= tools
/amlogic
14 DOIMAGETOOL ?
= ${DOIMAGEPATH}/doimage
16 PLAT_INCLUDES
:= -Iinclude
/drivers
/amlogic
/ \
17 -I
${AML_PLAT_SOC}/include \
18 -I
${AML_PLAT_COMMON}/include
20 GIC_SOURCES
:= drivers
/arm
/gic
/common
/gic_common.c \
21 drivers
/arm
/gic
/v2
/gicv2_main.c \
22 drivers
/arm
/gic
/v2
/gicv2_helpers.c \
23 plat
/common
/plat_gicv2.c
25 BL31_SOURCES
+= lib
/cpus
/aarch64
/cortex_a53.S \
26 plat
/common
/plat_psci_common.c \
27 drivers
/amlogic
/console
/aarch64
/meson_console.S \
28 ${AML_PLAT_SOC}/${PLAT}_bl31_setup.c \
29 ${AML_PLAT_SOC}/${PLAT}_pm.c \
30 ${AML_PLAT_SOC}/${PLAT}_common.c \
31 ${AML_PLAT_COMMON}/aarch64
/aml_helpers.S \
32 ${AML_PLAT_COMMON}/aml_efuse.c \
33 ${AML_PLAT_COMMON}/aml_mhu.c \
34 ${AML_PLAT_COMMON}/aml_scpi.c \
35 ${AML_PLAT_COMMON}/aml_sip_svc.c \
36 ${AML_PLAT_COMMON}/aml_thermal.c \
37 ${AML_PLAT_COMMON}/aml_topology.c \
38 ${AML_PLAT_COMMON}/aml_console.c \
39 drivers
/amlogic
/crypto
/sha_dma.c \
40 ${XLAT_TABLES_LIB_SRCS} \
43 # Tune compiler for Cortex-A53
44 ifeq ($(notdir $(CC
)),armclang
)
45 TF_CFLAGS_aarch64
+= -mcpu
=cortex-a53
46 else ifneq ($(findstring clang
,$(notdir $(CC
))),)
47 TF_CFLAGS_aarch64
+= -mcpu
=cortex-a53
49 TF_CFLAGS_aarch64
+= -mtune
=cortex-a53
55 # Enable all errata workarounds for Cortex-A53
56 ERRATA_A53_855873
:= 1
57 ERRATA_A53_819472
:= 1
58 ERRATA_A53_824069
:= 1
59 ERRATA_A53_827319
:= 1
61 WORKAROUND_CVE_2017_5715
:= 0
63 # Have different sections for code and rodata
64 SEPARATE_CODE_AND_RODATA
:= 1
72 ifneq (${RESET_TO_BL31}, 0)
73 $(error Error
: ${PLAT} needs RESET_TO_BL31
=0)
76 ifeq (${ARCH},aarch32
)
77 $(error Error
: AArch32 not supported on
${PLAT})
80 all: ${BUILD_PLAT}/bl31.img
81 distclean realclean clean: cleanimage
84 ${Q}${MAKE} -C
${DOIMAGEPATH} clean
87 ${Q}${MAKE} -C
${DOIMAGEPATH}
89 ${BUILD_PLAT}/bl31.img
: ${BUILD_PLAT}/bl31.bin
${DOIMAGETOOL}
90 ${DOIMAGETOOL} ${BUILD_PLAT}/bl31.bin
${BUILD_PLAT}/bl31.img