platform.mk 3.31 KB
Newer Older
1
#
2
# Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3
4
5
6
#
# SPDX-License-Identifier: BSD-3-Clause
#

7
# On Poplar, the TSP can execute from TZC secure area in DRAM.
8
POPLAR_TSP_RAM_LOCATION	?=	dram
9
10
ifeq (${POPLAR_TSP_RAM_LOCATION}, dram)
  POPLAR_TSP_RAM_LOCATION_ID = POPLAR_DRAM_ID
Victor Chong's avatar
Victor Chong committed
11
else ifeq (${POPLAR_TSP_RAM_LOCATION}, sram)
12
  POPLAR_TSP_RAM_LOCATION_ID = POPLAR_SRAM_ID
13
14
15
16
17
else
  $(error "Currently unsupported POPLAR_TSP_RAM_LOCATION value")
endif
$(eval $(call add_define,POPLAR_TSP_RAM_LOCATION_ID))

18
19
20
21
22
23
24
25
26
27
POPLAR_DRAM_SIZE ?= two_gig
ifeq (${POPLAR_DRAM_SIZE}, two_gig)
  POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_2G
else ifeq (${POPLAR_DRAM_SIZE}, one_gig)
  POPLAR_DRAM_SIZE_ID = POPLAR_DRAM_SIZE_1G
else
  $(error "Currently unsupported POPLAR_DRAM_SIZE value")
endif
$(eval $(call add_define,POPLAR_DRAM_SIZE_ID))

28
29
30
POPLAR_RECOVERY		:= 0
$(eval $(call add_define,POPLAR_RECOVERY))

31
32
33
# Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
# in the FIP if the platform requires.
ifneq ($(BL32_EXTRA1),)
34
$(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1))
35
36
endif
ifneq ($(BL32_EXTRA2),)
37
$(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2))
38
39
endif

40
41
42
43
44
45
46
47
NEED_BL33			:= yes

COLD_BOOT_SINGLE_CPU		:= 1
PROGRAMMABLE_RESET_ADDRESS	:= 1
CTX_INCLUDE_FPREGS		:= 1
ERRATA_A53_855873		:= 1
ERRATA_A53_835769		:= 1
ERRATA_A53_843419		:= 1
48
ENABLE_SVE_FOR_NS		:= 0
49
50
WORKAROUND_CVE_2017_5715	:= 0

51
52
53
54
PLAT_PL061_MAX_GPIOS 		:= 104
$(eval $(call add_define,PLAT_PL061_MAX_GPIOS))

PLAT_INCLUDES	:=	-Iplat/hisilicon/poplar/include		\
55
			-Iplat/hisilicon/poplar
56
57

PLAT_BL_COMMON_SOURCES	:=						\
58
59
		lib/xlat_tables/aarch64/xlat_tables.c			\
		lib/xlat_tables/xlat_tables_common.c			\
60
61
62
63
		drivers/delay_timer/generic_delay_timer.c		\
		drivers/arm/gic/common/gic_common.c			\
		drivers/arm/gic/v2/gicv2_helpers.c			\
		drivers/delay_timer/delay_timer.c			\
64
		drivers/arm/pl011/aarch64/pl011_console.S		\
65
66
		drivers/arm/gic/v2/gicv2_main.c				\
		plat/common/plat_gicv2.c				\
67
68
69
		plat/hisilicon/poplar/aarch64/platform_common.c		\
		plat/hisilicon/poplar/aarch64/poplar_helpers.S		\
		plat/hisilicon/poplar/poplar_gicv2.c
70
71
72
73

BL1_SOURCES	+=							\
		lib/cpus/aarch64/cortex_a53.S				\
		drivers/arm/pl061/pl061_gpio.c				\
74
		drivers/mmc/mmc.c					\
Victor Chong's avatar
Victor Chong committed
75
		drivers/synopsys/emmc/dw_mmc.c				\
76
77
78
79
80
81
		drivers/io/io_storage.c					\
		drivers/io/io_block.c					\
		drivers/gpio/gpio.c					\
		drivers/io/io_fip.c					\
		drivers/io/io_memmap.c					\
		plat/hisilicon/poplar/bl1_plat_setup.c			\
Victor Chong's avatar
Victor Chong committed
82
		plat/hisilicon/poplar/plat_storage.c
83
84
85

BL2_SOURCES	+=      						\
		drivers/arm/pl061/pl061_gpio.c				\
86
		drivers/mmc/mmc.c					\
Victor Chong's avatar
Victor Chong committed
87
		drivers/synopsys/emmc/dw_mmc.c				\
88
89
90
91
92
93
94
95
		drivers/io/io_storage.c					\
		drivers/io/io_block.c					\
		drivers/io/io_fip.c					\
		drivers/gpio/gpio.c					\
		drivers/io/io_memmap.c					\
		plat/hisilicon/poplar/bl2_plat_setup.c			\
		plat/hisilicon/poplar/plat_storage.c

96
97
98
99
BL2_SOURCES	+=							\
		plat/hisilicon/poplar/bl2_plat_mem_params_desc.c	\
		plat/hisilicon/poplar/poplar_image_load.c		\
		common/desc_image_load.c
100
101
102
103
104

ifeq (${SPD},opteed)
BL2_SOURCES	+=							\
		lib/optee/optee_utils.c
endif
105
106
107
108

BL31_SOURCES	+=							\
		lib/cpus/aarch64/aem_generic.S				\
		lib/cpus/aarch64/cortex_a53.S				\
109
		plat/common/plat_psci_common.c			\
110
111
112
		plat/hisilicon/poplar/bl31_plat_setup.c			\
		plat/hisilicon/poplar/plat_topology.c			\
		plat/hisilicon/poplar/plat_pm.c