platform.mk 2.78 KB
Newer Older
1
# Copyright (c) 2018-2021, ARM Limited and Contributors. All rights reserved.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# SPDX-License-Identifier: BSD-3-Clause

override PROGRAMMABLE_RESET_ADDRESS := 1
PSCI_EXTENDED_STATE_ID := 1
A53_DISABLE_NON_TEMPORAL_HINT := 0
SEPARATE_CODE_AND_RODATA := 1
override RESET_TO_BL31 := 1
PL011_GENERIC_UART := 1

ifdef VERSAL_ATF_MEM_BASE
    $(eval $(call add_define,VERSAL_ATF_MEM_BASE))

    ifndef VERSAL_ATF_MEM_SIZE
        $(error "VERSAL_ATF_BASE defined without VERSAL_ATF_SIZE")
    endif
    $(eval $(call add_define,VERSAL_ATF_MEM_SIZE))

    ifdef VERSAL_ATF_MEM_PROGBITS_SIZE
        $(eval $(call add_define,VERSAL_ATF_MEM_PROGBITS_SIZE))
    endif
endif

ifdef VERSAL_BL32_MEM_BASE
    $(eval $(call add_define,VERSAL_BL32_MEM_BASE))

    ifndef VERSAL_BL32_MEM_SIZE
        $(error "VERSAL_BL32_BASE defined without VERSAL_BL32_SIZE")
    endif
    $(eval $(call add_define,VERSAL_BL32_MEM_SIZE))
endif

34
VERSAL_PLATFORM ?= silicon
35
36
$(eval $(call add_define_val,VERSAL_PLATFORM,VERSAL_PLATFORM_ID_${VERSAL_PLATFORM}))

37
38
PLAT_INCLUDES		:=	-Iinclude/plat/arm/common/			\
				-Iplat/xilinx/common/include/			\
39
				-Iplat/xilinx/common/ipi_mailbox_service/	\
40
41
				-Iplat/xilinx/versal/include/			\
				-Iplat/xilinx/versal/pm_service/
42

43
44
45
# Include GICv3 driver files
include drivers/arm/gic/v3/gicv3.mk

46
47
PLAT_BL_COMMON_SOURCES	:=	lib/xlat_tables/xlat_tables_common.c		\
				lib/xlat_tables/aarch64/xlat_tables.c		\
48
				drivers/arm/dcc/dcc_console.c			\
49
50
				drivers/delay_timer/delay_timer.c		\
				drivers/delay_timer/generic_delay_timer.c	\
51
				${GICV3_SOURCES}				\
52
				drivers/arm/pl011/aarch64/pl011_console.S	\
53
				plat/common/aarch64/crash_console_helpers.S	\
54
				plat/arm/common/arm_cci.c			\
55
				plat/arm/common/arm_common.c			\
56
57
58
59
				plat/common/plat_gicv3.c			\
				plat/xilinx/versal/aarch64/versal_helpers.S	\
				plat/xilinx/versal/aarch64/versal_common.c

60
61
62
63
64
65
66
67
VERSAL_CONSOLE	?=	pl011
ifeq (${VERSAL_CONSOLE}, $(filter ${VERSAL_CONSOLE},pl011 pl011_0 pl011_1 dcc))
else
  $(error "Please define VERSAL_CONSOLE")
endif

$(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE}))

68
BL31_SOURCES		+=	drivers/arm/cci/cci.c				\
69
70
				lib/cpus/aarch64/cortex_a72.S			\
				plat/common/plat_psci_common.c			\
71
				plat/xilinx/common/ipi.c			\
72
				plat/xilinx/common/plat_startup.c		\
73
				plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
74
				plat/xilinx/common/pm_service/pm_ipi.c		\
75
76
77
78
79
				plat/xilinx/versal/bl31_versal_setup.c		\
				plat/xilinx/versal/plat_psci.c			\
				plat/xilinx/versal/plat_versal.c		\
				plat/xilinx/versal/plat_topology.c		\
				plat/xilinx/versal/sip_svc_setup.c		\
80
81
82
				plat/xilinx/versal/versal_gicv3.c		\
				plat/xilinx/versal/versal_ipi.c			\
				plat/xilinx/versal/pm_service/pm_svc_main.c	\
83
				plat/xilinx/versal/pm_service/pm_api_sys.c	\
84
				plat/xilinx/versal/pm_service/pm_client.c