blob: e6d7014f21153648b42461a1fb7748add3e14280 [file] [log] [blame]
Jens Wiklander52c798e2015-12-07 14:37:10 +01001#
dp-arm230011c2017-03-07 11:02:47 +00002# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
Jens Wiklander52c798e2015-12-07 14:37:10 +01003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Jens Wiklander52c798e2015-12-07 14:37:10 +01005#
6
7include lib/libfdt/libfdt.mk
8
9PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
10 -Iinclude/plat/arm/common/aarch64/ \
11 -Iplat/qemu/include \
12 -Iinclude/common/tbbr
13
Fu Wei77ecd462017-07-31 18:28:32 +080014# Use translation tables library v2 by default
15ARM_XLAT_TABLES_LIB_V1 := 0
16$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
17$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
18
Jens Wiklander52c798e2015-12-07 14:37:10 +010019
20PLAT_BL_COMMON_SOURCES := plat/qemu/qemu_common.c \
Fu Wei77ecd462017-07-31 18:28:32 +080021 drivers/arm/pl011/aarch64/pl011_console.S
22
23ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1)
24PLAT_BL_COMMON_SOURCES += lib/xlat_tables/xlat_tables_common.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010025 lib/xlat_tables/aarch64/xlat_tables.c
Fu Wei77ecd462017-07-31 18:28:32 +080026else
27include lib/xlat_tables_v2/xlat_tables.mk
28
29PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}
30endif
Jens Wiklander52c798e2015-12-07 14:37:10 +010031
32BL1_SOURCES += drivers/io/io_semihosting.c \
33 drivers/io/io_storage.c \
34 drivers/io/io_fip.c \
35 drivers/io/io_memmap.c \
36 lib/semihosting/semihosting.c \
37 lib/semihosting/aarch64/semihosting_call.S \
38 plat/qemu/qemu_io_storage.c \
39 lib/cpus/aarch64/aem_generic.S \
40 lib/cpus/aarch64/cortex_a53.S \
41 lib/cpus/aarch64/cortex_a57.S \
Jens Wiklander52c798e2015-12-07 14:37:10 +010042 plat/qemu/aarch64/plat_helpers.S \
43 plat/qemu/qemu_bl1_setup.c
44
45BL2_SOURCES += drivers/io/io_semihosting.c \
46 drivers/io/io_storage.c \
47 drivers/io/io_fip.c \
48 drivers/io/io_memmap.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010049 lib/semihosting/semihosting.c \
50 lib/semihosting/aarch64/semihosting_call.S\
51 plat/qemu/qemu_io_storage.c \
52 plat/qemu/aarch64/plat_helpers.S \
53 plat/qemu/qemu_bl2_setup.c \
54 plat/qemu/dt.c \
55 $(LIBFDT_SRCS)
56
57BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \
58 lib/cpus/aarch64/cortex_a53.S \
59 lib/cpus/aarch64/cortex_a57.S \
60 drivers/arm/gic/v2/gicv2_helpers.c \
61 drivers/arm/gic/v2/gicv2_main.c \
62 drivers/arm/gic/common/gic_common.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010063 plat/common/aarch64/plat_psci_common.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010064 plat/qemu/qemu_pm.c \
65 plat/qemu/topology.c \
66 plat/qemu/aarch64/plat_helpers.S \
67 plat/qemu/qemu_bl31_setup.c \
68 plat/qemu/qemu_gic.c
69
70# Disable the PSCI platform compatibility layer
71ENABLE_PLAT_COMPAT := 0
72
73BL32_RAM_LOCATION := tdram
74ifeq (${BL32_RAM_LOCATION}, tsram)
75 BL32_RAM_LOCATION_ID = SEC_SRAM_ID
76else ifeq (${BL32_RAM_LOCATION}, tdram)
77 BL32_RAM_LOCATION_ID = SEC_DRAM_ID
78else
79 $(error "Unsupported BL32_RAM_LOCATION value")
80endif
81
82# Process flags
83$(eval $(call add_define,BL32_RAM_LOCATION_ID))