blob: dc3b5d9330d10df3e18829503dd640a914b09b9f [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
Fu Weic2f78442017-05-27 21:21:42 +08009# Enable new version of image loading on QEMU platforms
10LOAD_IMAGE_V2 := 1
11
12ifeq ($(NEED_BL32),yes)
13$(eval $(call add_define,QEMU_LOAD_BL32))
14endif
15
Jens Wiklander52c798e2015-12-07 14:37:10 +010016PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
17 -Iinclude/plat/arm/common/aarch64/ \
18 -Iplat/qemu/include \
19 -Iinclude/common/tbbr
20
Fu Wei77ecd462017-07-31 18:28:32 +080021# Use translation tables library v2 by default
22ARM_XLAT_TABLES_LIB_V1 := 0
23$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
24$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
25
Jens Wiklander52c798e2015-12-07 14:37:10 +010026
27PLAT_BL_COMMON_SOURCES := plat/qemu/qemu_common.c \
Fu Wei77ecd462017-07-31 18:28:32 +080028 drivers/arm/pl011/aarch64/pl011_console.S
29
30ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1)
31PLAT_BL_COMMON_SOURCES += lib/xlat_tables/xlat_tables_common.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010032 lib/xlat_tables/aarch64/xlat_tables.c
Fu Wei77ecd462017-07-31 18:28:32 +080033else
34include lib/xlat_tables_v2/xlat_tables.mk
35
36PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}
37endif
Jens Wiklander52c798e2015-12-07 14:37:10 +010038
39BL1_SOURCES += drivers/io/io_semihosting.c \
40 drivers/io/io_storage.c \
41 drivers/io/io_fip.c \
42 drivers/io/io_memmap.c \
43 lib/semihosting/semihosting.c \
44 lib/semihosting/aarch64/semihosting_call.S \
45 plat/qemu/qemu_io_storage.c \
46 lib/cpus/aarch64/aem_generic.S \
47 lib/cpus/aarch64/cortex_a53.S \
48 lib/cpus/aarch64/cortex_a57.S \
Jens Wiklander52c798e2015-12-07 14:37:10 +010049 plat/qemu/aarch64/plat_helpers.S \
50 plat/qemu/qemu_bl1_setup.c
51
52BL2_SOURCES += drivers/io/io_semihosting.c \
53 drivers/io/io_storage.c \
54 drivers/io/io_fip.c \
55 drivers/io/io_memmap.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010056 lib/semihosting/semihosting.c \
57 lib/semihosting/aarch64/semihosting_call.S\
58 plat/qemu/qemu_io_storage.c \
59 plat/qemu/aarch64/plat_helpers.S \
60 plat/qemu/qemu_bl2_setup.c \
61 plat/qemu/dt.c \
62 $(LIBFDT_SRCS)
Fu Weic2f78442017-05-27 21:21:42 +080063ifeq (${LOAD_IMAGE_V2},1)
64BL2_SOURCES += plat/qemu/qemu_bl2_mem_params_desc.c \
65 plat/qemu/qemu_image_load.c \
66 common/desc_image_load.c
67endif
Jens Wiklander52c798e2015-12-07 14:37:10 +010068
69BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \
70 lib/cpus/aarch64/cortex_a53.S \
71 lib/cpus/aarch64/cortex_a57.S \
72 drivers/arm/gic/v2/gicv2_helpers.c \
73 drivers/arm/gic/v2/gicv2_main.c \
74 drivers/arm/gic/common/gic_common.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010075 plat/common/aarch64/plat_psci_common.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010076 plat/qemu/qemu_pm.c \
77 plat/qemu/topology.c \
78 plat/qemu/aarch64/plat_helpers.S \
79 plat/qemu/qemu_bl31_setup.c \
80 plat/qemu/qemu_gic.c
81
82# Disable the PSCI platform compatibility layer
83ENABLE_PLAT_COMPAT := 0
84
85BL32_RAM_LOCATION := tdram
86ifeq (${BL32_RAM_LOCATION}, tsram)
87 BL32_RAM_LOCATION_ID = SEC_SRAM_ID
88else ifeq (${BL32_RAM_LOCATION}, tdram)
89 BL32_RAM_LOCATION_ID = SEC_DRAM_ID
90else
91 $(error "Unsupported BL32_RAM_LOCATION value")
92endif
93
94# Process flags
95$(eval $(call add_define,BL32_RAM_LOCATION_ID))