platform.mk 3.67 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
8
9
# Enable version2 of image loading
LOAD_IMAGE_V2	:=	1

Haojian Zhuang's avatar
Haojian Zhuang committed
10
11
12
# Non-TF Boot ROM
BL2_AT_EL3	:=	1

13
# On Hikey960, the TSP can execute from TZC secure area in DRAM.
14
HIKEY960_TSP_RAM_LOCATION	?=	dram
15
16
17
ifeq (${HIKEY960_TSP_RAM_LOCATION}, dram)
  HIKEY960_TSP_RAM_LOCATION_ID = HIKEY960_DRAM_ID
else ifeq (${HIKEY960_TSP_RAM_LOCATION}, sram)
18
  HIKEY960_TSP_RAM_LOCATION_ID = HIKEY960_SRAM_ID
19
20
21
22
else
  $(error "Currently unsupported HIKEY960_TSP_RAM_LOCATION value")
endif

23
24
CRASH_CONSOLE_BASE		:=	PL011_UART6_BASE
COLD_BOOT_SINGLE_CPU		:=	1
25
PLAT_PL061_MAX_GPIOS		:=	176
26
PROGRAMMABLE_RESET_ADDRESS	:=	1
27
ENABLE_SVE_FOR_NS		:=	0
28
29

# Process flags
30
$(eval $(call add_define,HIKEY960_TSP_RAM_LOCATION_ID))
31
$(eval $(call add_define,CRASH_CONSOLE_BASE))
32
$(eval $(call add_define,PLAT_PL061_MAX_GPIOS))
33

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

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ENABLE_PLAT_COMPAT	:=	0

USE_COHERENT_MEM	:=	1

PLAT_INCLUDES		:=	-Iinclude/common/tbbr			\
				-Iplat/hisilicon/hikey960/include

PLAT_BL_COMMON_SOURCES	:=	drivers/arm/pl011/pl011_console.S	\
				drivers/delay_timer/delay_timer.c	\
				drivers/delay_timer/generic_delay_timer.c \
				lib/aarch64/xlat_tables.c		\
				plat/hisilicon/hikey960/aarch64/hikey960_common.c \
				plat/hisilicon/hikey960/hikey960_boardid.c

HIKEY960_GIC_SOURCES	:=	drivers/arm/gic/common/gic_common.c	\
				drivers/arm/gic/v2/gicv2_main.c		\
				drivers/arm/gic/v2/gicv2_helpers.c	\
				plat/common/plat_gicv2.c

BL1_SOURCES		+=	bl1/tbbr/tbbr_img_desc.c		\
63
64
				drivers/arm/pl061/pl061_gpio.c		\
				drivers/gpio/gpio.c			\
65
66
67
68
69
70
71
				drivers/io/io_block.c			\
				drivers/io/io_fip.c			\
				drivers/io/io_storage.c			\
				drivers/synopsys/ufs/dw_ufs.c		\
				drivers/ufs/ufs.c 			\
				lib/cpus/aarch64/cortex_a53.S		\
				plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \
72
73
				plat/hisilicon/hikey960/hikey960_bl1_setup.c \
				plat/hisilicon/hikey960/hikey960_bl_common.c \
74
75
				plat/hisilicon/hikey960/hikey960_io_storage.c \
				${HIKEY960_GIC_SOURCES}
Haojian Zhuang's avatar
Haojian Zhuang committed
76

Haojian Zhuang's avatar
Haojian Zhuang committed
77
BL2_SOURCES		+=	common/desc_image_load.c		\
78
79
				drivers/arm/pl061/pl061_gpio.c		\
				drivers/gpio/gpio.c			\
Haojian Zhuang's avatar
Haojian Zhuang committed
80
				drivers/io/io_block.c			\
Haojian Zhuang's avatar
Haojian Zhuang committed
81
82
				drivers/io/io_fip.c			\
				drivers/io/io_storage.c			\
Haojian Zhuang's avatar
Haojian Zhuang committed
83
				drivers/synopsys/ufs/dw_ufs.c		\
Haojian Zhuang's avatar
Haojian Zhuang committed
84
				drivers/ufs/ufs.c			\
Haojian Zhuang's avatar
Haojian Zhuang committed
85
86
				lib/cpus/aarch64/cortex_a53.S		\
				plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \
Haojian Zhuang's avatar
Haojian Zhuang committed
87
				plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c \
Haojian Zhuang's avatar
Haojian Zhuang committed
88
				plat/hisilicon/hikey960/hikey960_bl2_setup.c \
89
				plat/hisilicon/hikey960/hikey960_bl_common.c \
Haojian Zhuang's avatar
Haojian Zhuang committed
90
				plat/hisilicon/hikey960/hikey960_image_load.c \
Haojian Zhuang's avatar
Haojian Zhuang committed
91
92
				plat/hisilicon/hikey960/hikey960_io_storage.c \
				plat/hisilicon/hikey960/hikey960_mcu_load.c
Haojian Zhuang's avatar
Haojian Zhuang committed
93

94
95
96
ifeq (${SPD},opteed)
BL2_SOURCES		+=	lib/optee/optee_utils.c
endif
97

Haojian Zhuang's avatar
Haojian Zhuang committed
98
99
100
101
102
103
104
105
106
107
108
109
BL31_SOURCES		+=	drivers/arm/cci/cci.c			\
				lib/cpus/aarch64/cortex_a53.S           \
				lib/cpus/aarch64/cortex_a72.S		\
				lib/cpus/aarch64/cortex_a73.S		\
				plat/common/aarch64/plat_psci_common.c  \
				plat/hisilicon/hikey960/aarch64/hikey960_helpers.S \
				plat/hisilicon/hikey960/hikey960_bl31_setup.c \
				plat/hisilicon/hikey960/hikey960_pm.c	\
				plat/hisilicon/hikey960/hikey960_topology.c \
				plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c \
				plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c \
				${HIKEY960_GIC_SOURCES}
110
111
112
113
114

# Enable workarounds for selected Cortex-A53 errata.
ERRATA_A53_836870		:=	1
ERRATA_A53_843419		:=	1
ERRATA_A53_855873		:=	1
115
116

FIP_ALIGN			:=	512