Debian Codegraph @

plat/amlogic/gxbb/platform.mk

raw
1 #
2 # Copyright (c) 2018-2024, 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 AML_PLAT := plat/amlogic
10 AML_PLAT_SOC := ${AML_PLAT}/${PLAT}
11 AML_PLAT_COMMON := ${AML_PLAT}/common
12
13 PLAT_INCLUDES := -Iinclude/drivers/amlogic/ \
14 -I${AML_PLAT_SOC}/include \
15 -I${AML_PLAT_COMMON}/include
16
17 GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
18 drivers/arm/gic/v2/gicv2_main.c \
19 drivers/arm/gic/v2/gicv2_helpers.c \
20 plat/common/plat_gicv2.c
21
22 BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
23 plat/common/plat_psci_common.c \
24 drivers/amlogic/console/aarch64/meson_console.S \
25 ${AML_PLAT_SOC}/${PLAT}_bl31_setup.c \
26 ${AML_PLAT_SOC}/${PLAT}_pm.c \
27 ${AML_PLAT_SOC}/${PLAT}_common.c \
28 ${AML_PLAT_COMMON}/aarch64/aml_helpers.S \
29 ${AML_PLAT_COMMON}/aml_efuse.c \
30 ${AML_PLAT_COMMON}/aml_mhu.c \
31 ${AML_PLAT_COMMON}/aml_scpi.c \
32 ${AML_PLAT_COMMON}/aml_sip_svc.c \
33 ${AML_PLAT_COMMON}/aml_thermal.c \
34 ${AML_PLAT_COMMON}/aml_topology.c \
35 ${AML_PLAT_COMMON}/aml_console.c \
36 ${XLAT_TABLES_LIB_SRCS} \
37 ${GIC_SOURCES}
38
39 # Tune compiler for Cortex-A53
40 ifeq ($($(ARCH)-cc-id),arm-clang)
41 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
42 else ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
43 TF_CFLAGS_aarch64 += -mcpu=cortex-a53
44 else
45 TF_CFLAGS_aarch64 += -mtune=cortex-a53
46 endif
47
48 # Build config flags
49 # ------------------
50
51 # Enable all errata workarounds for Cortex-A53
52 ERRATA_A53_826319 := 1
53 ERRATA_A53_835769 := 1
54 ERRATA_A53_836870 := 1
55 ERRATA_A53_843419 := 1
56 ERRATA_A53_855873 := 1
57
58 WORKAROUND_CVE_2017_5715 := 0
59
60 # Have different sections for code and rodata
61 SEPARATE_CODE_AND_RODATA := 1
62
63 # Use Coherent memory
64 USE_COHERENT_MEM := 1
65
66 # Verify build config
67 # -------------------
68
69 ifneq (${RESET_TO_BL31}, 0)
70 $(error Error: ${PLAT} needs RESET_TO_BL31=0)
71 endif
72
73 ifeq (${ARCH},aarch32)
74 $(error Error: AArch32 not supported on ${PLAT})
75 endif