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 |
Kaihua Zhong | 39ff2ee | 2018-07-16 17:33:48 +0800 | [diff] [blame] | 25 | PLAT_PL061_MAX_GPIOS := 176 |
Haojian Zhuang | 602362d | 2017-06-01 12:15:14 +0800 | [diff] [blame] | 26 | PROGRAMMABLE_RESET_ADDRESS := 1 |
David Cunado | c5b0c0f | 2017-10-31 23:19:21 +0000 | [diff] [blame] | 27 | ENABLE_SVE_FOR_NS := 0 |
Haojian Zhuang | 602362d | 2017-06-01 12:15:14 +0800 | [diff] [blame] | 28 | |
| 29 | # Process flags |
Victor Chong | 9128768 | 2017-05-28 00:14:37 +0900 | [diff] [blame] | 30 | $(eval $(call add_define,HIKEY960_TSP_RAM_LOCATION_ID)) |
Haojian Zhuang | 602362d | 2017-06-01 12:15:14 +0800 | [diff] [blame] | 31 | $(eval $(call add_define,CRASH_CONSOLE_BASE)) |
Kaihua Zhong | 39ff2ee | 2018-07-16 17:33:48 +0800 | [diff] [blame] | 32 | $(eval $(call add_define,PLAT_PL061_MAX_GPIOS)) |
Haojian Zhuang | 602362d | 2017-06-01 12:15:14 +0800 | [diff] [blame] | 33 | |
Victor Chong | 7d787f5 | 2017-08-16 13:53:56 +0900 | [diff] [blame] | 34 | # Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images |
| 35 | # in the FIP if the platform requires. |
| 36 | ifneq ($(BL32_EXTRA1),) |
Masahiro Yamada | 9c5ca52 | 2018-01-26 11:42:01 +0900 | [diff] [blame] | 37 | $(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1)) |
Victor Chong | 7d787f5 | 2017-08-16 13:53:56 +0900 | [diff] [blame] | 38 | endif |
| 39 | ifneq ($(BL32_EXTRA2),) |
Masahiro Yamada | 9c5ca52 | 2018-01-26 11:42:01 +0900 | [diff] [blame] | 40 | $(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2)) |
Victor Chong | 7d787f5 | 2017-08-16 13:53:56 +0900 | [diff] [blame] | 41 | endif |
| 42 | |
Haojian Zhuang | 602362d | 2017-06-01 12:15:14 +0800 | [diff] [blame] | 43 | ENABLE_PLAT_COMPAT := 0 |
| 44 | |
| 45 | USE_COHERENT_MEM := 1 |
| 46 | |
| 47 | PLAT_INCLUDES := -Iinclude/common/tbbr \ |
| 48 | -Iplat/hisilicon/hikey960/include |
| 49 | |
| 50 | PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/pl011_console.S \ |
| 51 | drivers/delay_timer/delay_timer.c \ |
| 52 | drivers/delay_timer/generic_delay_timer.c \ |
| 53 | lib/aarch64/xlat_tables.c \ |
| 54 | plat/hisilicon/hikey960/aarch64/hikey960_common.c \ |
| 55 | plat/hisilicon/hikey960/hikey960_boardid.c |
| 56 | |
| 57 | HIKEY960_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ |
| 58 | drivers/arm/gic/v2/gicv2_main.c \ |
| 59 | drivers/arm/gic/v2/gicv2_helpers.c \ |
| 60 | plat/common/plat_gicv2.c |
| 61 | |
| 62 | BL1_SOURCES += bl1/tbbr/tbbr_img_desc.c \ |
Kaihua Zhong | 39ff2ee | 2018-07-16 17:33:48 +0800 | [diff] [blame] | 63 | drivers/arm/pl061/pl061_gpio.c \ |
| 64 | drivers/gpio/gpio.c \ |
Haojian Zhuang | 602362d | 2017-06-01 12:15:14 +0800 | [diff] [blame] | 65 | drivers/io/io_block.c \ |
| 66 | drivers/io/io_fip.c \ |
| 67 | drivers/io/io_storage.c \ |
| 68 | drivers/synopsys/ufs/dw_ufs.c \ |
| 69 | drivers/ufs/ufs.c \ |
| 70 | lib/cpus/aarch64/cortex_a53.S \ |
| 71 | plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \ |
Haojian Zhuang | d82e29d | 2018-03-05 13:20:33 +0800 | [diff] [blame] | 72 | plat/hisilicon/hikey960/hikey960_bl1_setup.c \ |
| 73 | plat/hisilicon/hikey960/hikey960_bl_common.c \ |
Haojian Zhuang | 602362d | 2017-06-01 12:15:14 +0800 | [diff] [blame] | 74 | plat/hisilicon/hikey960/hikey960_io_storage.c \ |
| 75 | ${HIKEY960_GIC_SOURCES} |
Haojian Zhuang | 1f73c0c | 2017-06-01 14:03:22 +0800 | [diff] [blame] | 76 | |
Haojian Zhuang | a94d75d | 2018-01-29 12:45:28 +0800 | [diff] [blame] | 77 | BL2_SOURCES += common/desc_image_load.c \ |
Kaihua Zhong | 39ff2ee | 2018-07-16 17:33:48 +0800 | [diff] [blame] | 78 | drivers/arm/pl061/pl061_gpio.c \ |
| 79 | drivers/gpio/gpio.c \ |
Haojian Zhuang | a94d75d | 2018-01-29 12:45:28 +0800 | [diff] [blame] | 80 | drivers/io/io_block.c \ |
Haojian Zhuang | 1f73c0c | 2017-06-01 14:03:22 +0800 | [diff] [blame] | 81 | drivers/io/io_fip.c \ |
| 82 | drivers/io/io_storage.c \ |
Haojian Zhuang | 1b4b412 | 2018-01-25 16:13:05 +0800 | [diff] [blame] | 83 | drivers/synopsys/ufs/dw_ufs.c \ |
Haojian Zhuang | 1f73c0c | 2017-06-01 14:03:22 +0800 | [diff] [blame] | 84 | drivers/ufs/ufs.c \ |
Haojian Zhuang | 1b4b412 | 2018-01-25 16:13:05 +0800 | [diff] [blame] | 85 | lib/cpus/aarch64/cortex_a53.S \ |
| 86 | plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \ |
Haojian Zhuang | a94d75d | 2018-01-29 12:45:28 +0800 | [diff] [blame] | 87 | plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c \ |
Haojian Zhuang | 1f73c0c | 2017-06-01 14:03:22 +0800 | [diff] [blame] | 88 | plat/hisilicon/hikey960/hikey960_bl2_setup.c \ |
Haojian Zhuang | d82e29d | 2018-03-05 13:20:33 +0800 | [diff] [blame] | 89 | plat/hisilicon/hikey960/hikey960_bl_common.c \ |
Haojian Zhuang | a94d75d | 2018-01-29 12:45:28 +0800 | [diff] [blame] | 90 | plat/hisilicon/hikey960/hikey960_image_load.c \ |
Haojian Zhuang | 1f73c0c | 2017-06-01 14:03:22 +0800 | [diff] [blame] | 91 | plat/hisilicon/hikey960/hikey960_io_storage.c \ |
| 92 | plat/hisilicon/hikey960/hikey960_mcu_load.c |
Haojian Zhuang | 1b5c225 | 2017-06-01 15:20:46 +0800 | [diff] [blame] | 93 | |
Victor Chong | 7d787f5 | 2017-08-16 13:53:56 +0900 | [diff] [blame] | 94 | ifeq (${SPD},opteed) |
| 95 | BL2_SOURCES += lib/optee/optee_utils.c |
| 96 | endif |
Victor Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 97 | |
Haojian Zhuang | 1b5c225 | 2017-06-01 15:20:46 +0800 | [diff] [blame] | 98 | BL31_SOURCES += drivers/arm/cci/cci.c \ |
| 99 | lib/cpus/aarch64/cortex_a53.S \ |
| 100 | lib/cpus/aarch64/cortex_a72.S \ |
| 101 | lib/cpus/aarch64/cortex_a73.S \ |
| 102 | plat/common/aarch64/plat_psci_common.c \ |
| 103 | plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \ |
| 104 | plat/hisilicon/hikey960/hikey960_bl31_setup.c \ |
| 105 | plat/hisilicon/hikey960/hikey960_pm.c \ |
| 106 | plat/hisilicon/hikey960/hikey960_topology.c \ |
| 107 | plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c \ |
| 108 | plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c \ |
| 109 | ${HIKEY960_GIC_SOURCES} |
Victor Chong | cb27a35 | 2017-07-12 01:07:29 +0900 | [diff] [blame] | 110 | |
| 111 | # Enable workarounds for selected Cortex-A53 errata. |
| 112 | ERRATA_A53_836870 := 1 |
| 113 | ERRATA_A53_843419 := 1 |
| 114 | ERRATA_A53_855873 := 1 |
Leo Yan | 453940d | 2017-11-22 17:10:39 +0800 | [diff] [blame] | 115 | |
| 116 | FIP_ALIGN := 512 |