1 # 2 # Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. 3 # 4 # SPDX-License-Identifier: BSD-3-Clause 5 # 6 7 # Enable version2 of image loading 8 LOAD_IMAGE_V2 := 1 9 10 # On Hikey960, the TSP can execute from TZC secure area in DRAM. 11 HIKEY960_TSP_RAM_LOCATION := dram 12 ifeq (${HIKEY960_TSP_RAM_LOCATION}, dram) 13 HIKEY960_TSP_RAM_LOCATION_ID = HIKEY960_DRAM_ID 14 else ifeq (${HIKEY960_TSP_RAM_LOCATION}, sram) 15 HIKEY960_TSP_RAM_LOCATION_ID := HIKEY960_SRAM_ID 16 else 17 $(error "Currently unsupported HIKEY960_TSP_RAM_LOCATION value") 18 endif 19 20 CRASH_CONSOLE_BASE := PL011_UART6_BASE 21 COLD_BOOT_SINGLE_CPU := 1 22 PROGRAMMABLE_RESET_ADDRESS := 1 23 24 # Process flags 25 $(eval $(call add_define,HIKEY960_TSP_RAM_LOCATION_ID)) 26 $(eval $(call add_define,CRASH_CONSOLE_BASE)) 27 28 # Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images 29 # in the FIP if the platform requires. 30 ifneq ($(BL32_EXTRA1),) 31 $(eval $(call FIP_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1)) 32 endif 33 ifneq ($(BL32_EXTRA2),) 34 $(eval $(call FIP_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2)) 35 endif 36 37 ENABLE_PLAT_COMPAT := 0 38 39 USE_COHERENT_MEM := 1 40 41 PLAT_INCLUDES := -Iinclude/common/tbbr \ 42 -Iplat/hisilicon/hikey960/include 43 44 PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/pl011_console.S \ 45 drivers/delay_timer/delay_timer.c \ 46 drivers/delay_timer/generic_delay_timer.c \ 47 lib/aarch64/xlat_tables.c \ 48 plat/hisilicon/hikey960/aarch64/hikey960_common.c \ 49 plat/hisilicon/hikey960/hikey960_boardid.c 50 51 HIKEY960_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ 52 drivers/arm/gic/v2/gicv2_main.c \ 53 drivers/arm/gic/v2/gicv2_helpers.c \ 54 plat/common/plat_gicv2.c 55 56 BL1_SOURCES += bl1/tbbr/tbbr_img_desc.c \ 57 drivers/io/io_block.c \ 58 drivers/io/io_fip.c \ 59 drivers/io/io_storage.c \ 60 drivers/synopsys/ufs/dw_ufs.c \ 61 drivers/ufs/ufs.c \ 62 lib/cpus/aarch64/cortex_a53.S \ 63 plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \ 64 plat/hisilicon/hikey960/hikey960_bl1_setup.c \ 65 plat/hisilicon/hikey960/hikey960_io_storage.c \ 66 ${HIKEY960_GIC_SOURCES} 67 68 BL2_SOURCES += drivers/io/io_block.c \ 69 drivers/io/io_fip.c \ 70 drivers/io/io_storage.c \ 71 drivers/ufs/ufs.c \ 72 plat/hisilicon/hikey960/hikey960_bl2_setup.c \ 73 plat/hisilicon/hikey960/hikey960_io_storage.c \ 74 plat/hisilicon/hikey960/hikey960_mcu_load.c 75 76 ifeq (${LOAD_IMAGE_V2},1) 77 BL2_SOURCES += plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c \ 78 plat/hisilicon/hikey960/hikey960_image_load.c \ 79 common/desc_image_load.c 80 81 ifeq (${SPD},opteed) 82 BL2_SOURCES += lib/optee/optee_utils.c 83 endif 84 endif 85 86 BL31_SOURCES += drivers/arm/cci/cci.c \ 87 lib/cpus/aarch64/cortex_a53.S \ 88 lib/cpus/aarch64/cortex_a72.S \ 89 lib/cpus/aarch64/cortex_a73.S \ 90 plat/common/aarch64/plat_psci_common.c \ 91 plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \ 92 plat/hisilicon/hikey960/hikey960_bl31_setup.c \ 93 plat/hisilicon/hikey960/hikey960_pm.c \ 94 plat/hisilicon/hikey960/hikey960_topology.c \ 95 plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c \ 96 plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c \ 97 ${HIKEY960_GIC_SOURCES} 98 99 # Enable workarounds for selected Cortex-A53 errata. 100 ERRATA_A53_836870 := 1 101 ERRATA_A53_843419 := 1 102 ERRATA_A53_855873 := 1 103