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