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