blob: eca14125e15588d12a0150b507327617291503b5 [file] [log] [blame]
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +02001#
Antonio Nino Diaz6766bb12018-10-26 11:12:31 +01002# Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +02003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Victor Chong662556a2017-10-28 01:59:41 +09007# On Poplar, the TSP can execute from TZC secure area in DRAM.
Victor Chong4d64c2b2018-02-01 00:37:49 +09008POPLAR_TSP_RAM_LOCATION ?= dram
Victor Chong662556a2017-10-28 01:59:41 +09009ifeq (${POPLAR_TSP_RAM_LOCATION}, dram)
10 POPLAR_TSP_RAM_LOCATION_ID = POPLAR_DRAM_ID
Victor Chongf87b4362018-01-29 18:08:34 +090011else ifeq (${POPLAR_TSP_RAM_LOCATION}, sram)
Victor Chong4d64c2b2018-02-01 00:37:49 +090012 POPLAR_TSP_RAM_LOCATION_ID = POPLAR_SRAM_ID
Victor Chong662556a2017-10-28 01:59:41 +090013else
14 $(error "Currently unsupported POPLAR_TSP_RAM_LOCATION value")
15endif
16$(eval $(call add_define,POPLAR_TSP_RAM_LOCATION_ID))
17
Victor Chong50d695d2018-01-29 18:11:02 +090018POPLAR_DRAM_SIZE ?= two_gig
19ifeq (${POPLAR_DRAM_SIZE}, two_gig)
20 POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_2G
21else ifeq (${POPLAR_DRAM_SIZE}, one_gig)
22 POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_1G
23else
24 $(error "Currently unsupported POPLAR_DRAM_SIZE value")
25endif
26$(eval $(call add_define,POPLAR_DRAM_SIZE_ID))
27
Victor Chongf0c7c612018-01-16 00:29:47 +090028POPLAR_RECOVERY := 0
29$(eval $(call add_define,POPLAR_RECOVERY))
30
Victor Chongaa033472018-02-01 00:35:39 +090031# Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
32# in the FIP if the platform requires.
33ifneq ($(BL32_EXTRA1),)
Victor Chong27083432018-04-23 15:52:51 +010034$(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1))
Victor Chongaa033472018-02-01 00:35:39 +090035endif
36ifneq ($(BL32_EXTRA2),)
Victor Chong27083432018-04-23 15:52:51 +010037$(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2))
Victor Chongaa033472018-02-01 00:35:39 +090038endif
39
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020040NEED_BL33 := yes
41
42COLD_BOOT_SINGLE_CPU := 1
43PROGRAMMABLE_RESET_ADDRESS := 1
44CTX_INCLUDE_FPREGS := 1
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020045ERRATA_A53_855873 := 1
46ERRATA_A53_835769 := 1
47ERRATA_A53_843419 := 1
David Cunadoc5b0c0f2017-10-31 23:19:21 +000048ENABLE_SVE_FOR_NS := 0
Jerome Forissier74a19f22018-11-08 11:57:30 +000049MULTI_CONSOLE_API := 1
Dimitris Papastamos8e5bd5e2018-01-24 16:41:14 +000050WORKAROUND_CVE_2017_5715 := 0
51
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020052PLAT_PL061_MAX_GPIOS := 104
53$(eval $(call add_define,PLAT_PL061_MAX_GPIOS))
54
55PLAT_INCLUDES := -Iplat/hisilicon/poplar/include \
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020056 -Iplat/hisilicon/poplar \
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000057 -Iinclude/common/tbbr
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020058
59PLAT_BL_COMMON_SOURCES := \
Antonio Nino Diaze93cde12018-09-24 17:15:15 +010060 lib/xlat_tables/aarch64/xlat_tables.c \
61 lib/xlat_tables/xlat_tables_common.c \
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020062 drivers/delay_timer/generic_delay_timer.c \
63 drivers/arm/gic/common/gic_common.c \
64 drivers/arm/gic/v2/gicv2_helpers.c \
65 drivers/delay_timer/delay_timer.c \
Antonio Nino Diaze93cde12018-09-24 17:15:15 +010066 drivers/arm/pl011/aarch64/pl011_console.S \
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020067 drivers/arm/gic/v2/gicv2_main.c \
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020068 plat/common/plat_gicv2.c \
Antonio Nino Diaz6766bb12018-10-26 11:12:31 +010069 plat/hisilicon/poplar/aarch64/platform_common.c \
70 plat/hisilicon/poplar/aarch64/poplar_helpers.S \
71 plat/hisilicon/poplar/poplar_gicv2.c
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020072
73BL1_SOURCES += \
74 lib/cpus/aarch64/cortex_a53.S \
75 drivers/arm/pl061/pl061_gpio.c \
Haojian Zhuang3eff4092018-08-04 18:07:26 +080076 drivers/mmc/mmc.c \
Victor Chong539408d2018-01-03 01:53:08 +090077 drivers/synopsys/emmc/dw_mmc.c \
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020078 drivers/io/io_storage.c \
79 drivers/io/io_block.c \
80 drivers/gpio/gpio.c \
81 drivers/io/io_fip.c \
82 drivers/io/io_memmap.c \
83 plat/hisilicon/poplar/bl1_plat_setup.c \
Victor Chongf87b4362018-01-29 18:08:34 +090084 plat/hisilicon/poplar/plat_storage.c
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020085
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020086BL2_SOURCES += \
87 drivers/arm/pl061/pl061_gpio.c \
Haojian Zhuang3eff4092018-08-04 18:07:26 +080088 drivers/mmc/mmc.c \
Victor Chong539408d2018-01-03 01:53:08 +090089 drivers/synopsys/emmc/dw_mmc.c \
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +020090 drivers/io/io_storage.c \
91 drivers/io/io_block.c \
92 drivers/io/io_fip.c \
93 drivers/gpio/gpio.c \
94 drivers/io/io_memmap.c \
95 plat/hisilicon/poplar/bl2_plat_setup.c \
96 plat/hisilicon/poplar/plat_storage.c
97
Victor Chong175dd8a2018-02-01 00:35:22 +090098BL2_SOURCES += \
99 plat/hisilicon/poplar/bl2_plat_mem_params_desc.c \
100 plat/hisilicon/poplar/poplar_image_load.c \
101 common/desc_image_load.c
Victor Chongaa033472018-02-01 00:35:39 +0900102
103ifeq (${SPD},opteed)
104BL2_SOURCES += \
105 lib/optee/optee_utils.c
106endif
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +0200107
108BL31_SOURCES += \
109 lib/cpus/aarch64/aem_generic.S \
110 lib/cpus/aarch64/cortex_a53.S \
Antonio Nino Diaze93cde12018-09-24 17:15:15 +0100111 plat/common/plat_psci_common.c \
Jorge Ramirez-Ortiza29d9a62017-06-28 10:11:31 +0200112 plat/hisilicon/poplar/bl31_plat_setup.c \
113 plat/hisilicon/poplar/plat_topology.c \
114 plat/hisilicon/poplar/plat_pm.c