1a80490c5SAndre Przywara# 2*b23ab8ebSAndre Przywara# Copyright (c) 2017-2021, ARM Limited and Contributors. All rights reserved. 3a80490c5SAndre Przywara# 4a80490c5SAndre Przywara# SPDX-License-Identifier: BSD-3-Clause 5a80490c5SAndre Przywara# 6a80490c5SAndre Przywara 7a80490c5SAndre Przywarainclude lib/xlat_tables_v2/xlat_tables.mk 89bc28a5eSAndre Przywarainclude lib/libfdt/libfdt.mk 99bc28a5eSAndre Przywarainclude drivers/arm/gic/v2/gicv2.mk 10a80490c5SAndre Przywara 11a80490c5SAndre PrzywaraAW_PLAT := plat/allwinner 12a80490c5SAndre Przywara 13252c1d1dSSamuel HollandPLAT_INCLUDES := -Iinclude/plat/arm/common/aarch64 \ 14a80490c5SAndre Przywara -I${AW_PLAT}/common/include \ 15a80490c5SAndre Przywara -I${AW_PLAT}/${PLAT}/include 16a80490c5SAndre Przywara 17985ee0b7SJulius WernerPLAT_BL_COMMON_SOURCES := drivers/ti/uart/${ARCH}/16550_console.S \ 18a80490c5SAndre Przywara ${XLAT_TABLES_LIB_SRCS} \ 19a80490c5SAndre Przywara ${AW_PLAT}/common/plat_helpers.S \ 20a80490c5SAndre Przywara ${AW_PLAT}/common/sunxi_common.c 21a80490c5SAndre Przywara 22fb23b104SSamuel HollandBL31_SOURCES += drivers/allwinner/axp/common.c \ 239bc28a5eSAndre Przywara ${GICV2_SOURCES} \ 24a80490c5SAndre Przywara drivers/delay_timer/delay_timer.c \ 25a80490c5SAndre Przywara drivers/delay_timer/generic_delay_timer.c \ 26a80490c5SAndre Przywara lib/cpus/${ARCH}/cortex_a53.S \ 27a80490c5SAndre Przywara plat/common/plat_gicv2.c \ 28a80490c5SAndre Przywara plat/common/plat_psci_common.c \ 29a80490c5SAndre Przywara ${AW_PLAT}/common/sunxi_bl31_setup.c \ 30a80490c5SAndre Przywara ${AW_PLAT}/common/sunxi_pm.c \ 31a80490c5SAndre Przywara ${AW_PLAT}/${PLAT}/sunxi_power.c \ 32a80490c5SAndre Przywara ${AW_PLAT}/common/sunxi_security.c \ 33a80490c5SAndre Przywara ${AW_PLAT}/common/sunxi_topology.c 34a80490c5SAndre Przywara 35*b23ab8ebSAndre Przywara# By default, attempt to use SCPI to the ARISC management processor. If SCPI 36*b23ab8ebSAndre Przywara# is not enabled or SCP firmware is not loaded, fall back to a simpler native 37*b23ab8ebSAndre Przywara# implementation that does not support CPU or system suspend. 38*b23ab8ebSAndre Przywara# 39*b23ab8ebSAndre Przywara# If SCP firmware will always be present (or absent), the unused implementation 40*b23ab8ebSAndre Przywara# can be compiled out. 41*b23ab8ebSAndre PrzywaraSUNXI_PSCI_USE_NATIVE ?= 1 42*b23ab8ebSAndre PrzywaraSUNXI_PSCI_USE_SCPI ?= 1 43*b23ab8ebSAndre Przywara 44*b23ab8ebSAndre Przywara$(eval $(call assert_boolean,SUNXI_PSCI_USE_NATIVE)) 45*b23ab8ebSAndre Przywara$(eval $(call assert_boolean,SUNXI_PSCI_USE_SCPI)) 46*b23ab8ebSAndre Przywara$(eval $(call add_define,SUNXI_PSCI_USE_NATIVE)) 47*b23ab8ebSAndre Przywara$(eval $(call add_define,SUNXI_PSCI_USE_SCPI)) 48*b23ab8ebSAndre Przywara 49*b23ab8ebSAndre Przywaraifeq (${SUNXI_PSCI_USE_NATIVE}${SUNXI_PSCI_USE_SCPI},00) 50*b23ab8ebSAndre Przywara$(error "At least one of SCPI or native PSCI ops must be enabled") 51*b23ab8ebSAndre Przywaraendif 52*b23ab8ebSAndre Przywara 53*b23ab8ebSAndre Przywaraifeq (${SUNXI_PSCI_USE_NATIVE},1) 54*b23ab8ebSAndre PrzywaraBL31_SOURCES += ${AW_PLAT}/common/sunxi_cpu_ops.c \ 55*b23ab8ebSAndre Przywara ${AW_PLAT}/common/sunxi_native_pm.c 56*b23ab8ebSAndre Przywaraendif 57*b23ab8ebSAndre Przywara 58*b23ab8ebSAndre Przywaraifeq (${SUNXI_PSCI_USE_SCPI},1) 59*b23ab8ebSAndre PrzywaraBL31_SOURCES += drivers/allwinner/sunxi_msgbox.c \ 60*b23ab8ebSAndre Przywara drivers/arm/css/scpi/css_scpi.c \ 61*b23ab8ebSAndre Przywara ${AW_PLAT}/common/sunxi_scpi_pm.c 62*b23ab8ebSAndre Przywaraendif 63*b23ab8ebSAndre Przywara 64a80490c5SAndre Przywara# The bootloader is guaranteed to only run on CPU 0 by the boot ROM. 65a80490c5SAndre PrzywaraCOLD_BOOT_SINGLE_CPU := 1 66a80490c5SAndre Przywara 678f31853bSSamuel Holland# Do not enable SPE (not supported on ARM v8.0). 688f31853bSSamuel HollandENABLE_SPE_FOR_LOWER_ELS := 0 698f31853bSSamuel Holland 708f31853bSSamuel Holland# Do not enable SVE (not supported on ARM v8.0). 718f31853bSSamuel HollandENABLE_SVE_FOR_NS := 0 728f31853bSSamuel Holland 73a80490c5SAndre Przywara# Enable workarounds for Cortex-A53 errata. Allwinner uses at least r0p4. 74a80490c5SAndre PrzywaraERRATA_A53_835769 := 1 75a80490c5SAndre PrzywaraERRATA_A53_843419 := 1 76a80490c5SAndre PrzywaraERRATA_A53_855873 := 1 7774665119SSamuel HollandERRATA_A53_1530924 := 1 78a80490c5SAndre Przywara 793d36d8e6SSamuel Holland# The traditional U-Boot load address is 160MB into DRAM. 803d36d8e6SSamuel HollandPRELOADED_BL33_BASE ?= 0x4a000000 813d36d8e6SSamuel Holland 82a80490c5SAndre Przywara# The reset vector can be changed for each CPU. 83a80490c5SAndre PrzywaraPROGRAMMABLE_RESET_ADDRESS := 1 84a80490c5SAndre Przywara 85a80490c5SAndre Przywara# Allow mapping read-only data as execute-never. 86a80490c5SAndre PrzywaraSEPARATE_CODE_AND_RODATA := 1 87a80490c5SAndre Przywara 88ed306a86SSamuel Holland# Put NOBITS memory in SRAM A1, overwriting U-Boot's SPL. 89ed306a86SSamuel HollandSEPARATE_NOBITS_REGION := 1 90ed306a86SSamuel Holland 91a80490c5SAndre Przywara# BL31 gets loaded alongside BL33 (U-Boot) by U-Boot's SPL 92a80490c5SAndre PrzywaraRESET_TO_BL31 := 1 9343060513SAndre Przywara 948f31853bSSamuel Holland# This platform is single-cluster and does not require coherency setup. 958f31853bSSamuel HollandWARMBOOT_ENABLE_DCACHE_EARLY := 1 96