Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Victor Chong | 175dd8a | 2018-02-01 00:35:22 +0900 | [diff] [blame] | 7 | # Enable version2 of image loading |
| 8 | LOAD_IMAGE_V2 := 1 |
| 9 | |
Victor Chong | 662556a | 2017-10-28 01:59:41 +0900 | [diff] [blame] | 10 | # On Poplar, the TSP can execute from TZC secure area in DRAM. |
Victor Chong | 4d64c2b | 2018-02-01 00:37:49 +0900 | [diff] [blame] | 11 | POPLAR_TSP_RAM_LOCATION ?= dram |
Victor Chong | 662556a | 2017-10-28 01:59:41 +0900 | [diff] [blame] | 12 | ifeq (${POPLAR_TSP_RAM_LOCATION}, dram) |
| 13 | POPLAR_TSP_RAM_LOCATION_ID = POPLAR_DRAM_ID |
Victor Chong | f87b436 | 2018-01-29 18:08:34 +0900 | [diff] [blame] | 14 | else ifeq (${POPLAR_TSP_RAM_LOCATION}, sram) |
Victor Chong | 4d64c2b | 2018-02-01 00:37:49 +0900 | [diff] [blame] | 15 | POPLAR_TSP_RAM_LOCATION_ID = POPLAR_SRAM_ID |
Victor Chong | 662556a | 2017-10-28 01:59:41 +0900 | [diff] [blame] | 16 | else |
| 17 | $(error "Currently unsupported POPLAR_TSP_RAM_LOCATION value") |
| 18 | endif |
| 19 | $(eval $(call add_define,POPLAR_TSP_RAM_LOCATION_ID)) |
| 20 | |
Victor Chong | 50d695d | 2018-01-29 18:11:02 +0900 | [diff] [blame] | 21 | POPLAR_DRAM_SIZE ?= two_gig |
| 22 | ifeq (${POPLAR_DRAM_SIZE}, two_gig) |
| 23 | POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_2G |
| 24 | else ifeq (${POPLAR_DRAM_SIZE}, one_gig) |
| 25 | POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_1G |
| 26 | else |
| 27 | $(error "Currently unsupported POPLAR_DRAM_SIZE value") |
| 28 | endif |
| 29 | $(eval $(call add_define,POPLAR_DRAM_SIZE_ID)) |
| 30 | |
Victor Chong | f0c7c61 | 2018-01-16 00:29:47 +0900 | [diff] [blame] | 31 | POPLAR_RECOVERY := 0 |
| 32 | $(eval $(call add_define,POPLAR_RECOVERY)) |
| 33 | |
Victor Chong | aa03347 | 2018-02-01 00:35:39 +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),) |
Victor Chong | 2708343 | 2018-04-23 15:52:51 +0100 | [diff] [blame] | 37 | $(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1)) |
Victor Chong | aa03347 | 2018-02-01 00:35:39 +0900 | [diff] [blame] | 38 | endif |
| 39 | ifneq ($(BL32_EXTRA2),) |
Victor Chong | 2708343 | 2018-04-23 15:52:51 +0100 | [diff] [blame] | 40 | $(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2)) |
Victor Chong | aa03347 | 2018-02-01 00:35:39 +0900 | [diff] [blame] | 41 | endif |
| 42 | |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 43 | NEED_BL33 := yes |
| 44 | |
| 45 | COLD_BOOT_SINGLE_CPU := 1 |
| 46 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 47 | CTX_INCLUDE_FPREGS := 1 |
| 48 | ENABLE_PLAT_COMPAT := 0 |
| 49 | ERRATA_A53_855873 := 1 |
| 50 | ERRATA_A53_835769 := 1 |
| 51 | ERRATA_A53_843419 := 1 |
David Cunado | c5b0c0f | 2017-10-31 23:19:21 +0000 | [diff] [blame] | 52 | ENABLE_SVE_FOR_NS := 0 |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 53 | |
Dimitris Papastamos | 8e5bd5e | 2018-01-24 16:41:14 +0000 | [diff] [blame] | 54 | WORKAROUND_CVE_2017_5715 := 0 |
| 55 | |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 56 | ARM_GIC_ARCH := 2 |
| 57 | $(eval $(call add_define,ARM_GIC_ARCH)) |
| 58 | |
| 59 | PLAT_PL061_MAX_GPIOS := 104 |
| 60 | $(eval $(call add_define,PLAT_PL061_MAX_GPIOS)) |
| 61 | |
| 62 | PLAT_INCLUDES := -Iplat/hisilicon/poplar/include \ |
| 63 | -Iinclude/plat/arm/common/ \ |
| 64 | -Iplat/hisilicon/poplar \ |
| 65 | -Iinclude/common/tbbr \ |
Victor Chong | 539408d | 2018-01-03 01:53:08 +0900 | [diff] [blame] | 66 | -Iinclude/drivers/synopsys \ |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 67 | -Iinclude/drivers/io |
| 68 | |
| 69 | PLAT_BL_COMMON_SOURCES := \ |
| 70 | lib/aarch64/xlat_tables.c \ |
| 71 | drivers/delay_timer/generic_delay_timer.c \ |
| 72 | drivers/arm/gic/common/gic_common.c \ |
| 73 | drivers/arm/gic/v2/gicv2_helpers.c \ |
| 74 | drivers/delay_timer/delay_timer.c \ |
| 75 | drivers/arm/pl011/pl011_console.S \ |
| 76 | drivers/arm/gic/v2/gicv2_main.c \ |
| 77 | plat/arm/common/aarch64/arm_helpers.S \ |
| 78 | plat/arm/common/arm_gicv2.c \ |
| 79 | plat/common/plat_gicv2.c \ |
| 80 | plat/hisilicon/poplar/aarch64/platform_common.c |
| 81 | |
| 82 | BL1_SOURCES += \ |
| 83 | lib/cpus/aarch64/cortex_a53.S \ |
| 84 | drivers/arm/pl061/pl061_gpio.c \ |
Haojian Zhuang | 3eff409 | 2018-08-04 18:07:26 +0800 | [diff] [blame] | 85 | drivers/mmc/mmc.c \ |
Victor Chong | 539408d | 2018-01-03 01:53:08 +0900 | [diff] [blame] | 86 | drivers/synopsys/emmc/dw_mmc.c \ |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 87 | drivers/io/io_storage.c \ |
| 88 | drivers/io/io_block.c \ |
| 89 | drivers/gpio/gpio.c \ |
| 90 | drivers/io/io_fip.c \ |
| 91 | drivers/io/io_memmap.c \ |
| 92 | plat/hisilicon/poplar/bl1_plat_setup.c \ |
Victor Chong | f87b436 | 2018-01-29 18:08:34 +0900 | [diff] [blame] | 93 | plat/hisilicon/poplar/plat_storage.c |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 94 | |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 95 | BL2_SOURCES += \ |
| 96 | drivers/arm/pl061/pl061_gpio.c \ |
Haojian Zhuang | 3eff409 | 2018-08-04 18:07:26 +0800 | [diff] [blame] | 97 | drivers/mmc/mmc.c \ |
Victor Chong | 539408d | 2018-01-03 01:53:08 +0900 | [diff] [blame] | 98 | drivers/synopsys/emmc/dw_mmc.c \ |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 99 | drivers/io/io_storage.c \ |
| 100 | drivers/io/io_block.c \ |
| 101 | drivers/io/io_fip.c \ |
| 102 | drivers/gpio/gpio.c \ |
| 103 | drivers/io/io_memmap.c \ |
| 104 | plat/hisilicon/poplar/bl2_plat_setup.c \ |
| 105 | plat/hisilicon/poplar/plat_storage.c |
| 106 | |
Victor Chong | 175dd8a | 2018-02-01 00:35:22 +0900 | [diff] [blame] | 107 | ifeq (${LOAD_IMAGE_V2},1) |
| 108 | BL2_SOURCES += \ |
| 109 | plat/hisilicon/poplar/bl2_plat_mem_params_desc.c \ |
| 110 | plat/hisilicon/poplar/poplar_image_load.c \ |
| 111 | common/desc_image_load.c |
Victor Chong | aa03347 | 2018-02-01 00:35:39 +0900 | [diff] [blame] | 112 | |
| 113 | ifeq (${SPD},opteed) |
| 114 | BL2_SOURCES += \ |
| 115 | lib/optee/optee_utils.c |
| 116 | endif |
Victor Chong | 175dd8a | 2018-02-01 00:35:22 +0900 | [diff] [blame] | 117 | endif |
Jorge Ramirez-Ortiz | a29d9a6 | 2017-06-28 10:11:31 +0200 | [diff] [blame] | 118 | |
| 119 | BL31_SOURCES += \ |
| 120 | lib/cpus/aarch64/aem_generic.S \ |
| 121 | lib/cpus/aarch64/cortex_a53.S \ |
| 122 | plat/common/aarch64/plat_psci_common.c \ |
| 123 | plat/hisilicon/poplar/bl31_plat_setup.c \ |
| 124 | plat/hisilicon/poplar/plat_topology.c \ |
| 125 | plat/hisilicon/poplar/plat_pm.c |