blob: 0d6047da17d8f2ab9185349570d7be875d3e21a8 [file] [log] [blame]
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +02001#
2# Copyright (c) 2019, Linaro Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7CRASH_REPORTING := 1
8
9include lib/libfdt/libfdt.mk
10
11# Enable new version of image loading on QEMU platforms
12LOAD_IMAGE_V2 := 1
13
14ifeq ($(NEED_BL32),yes)
15$(eval $(call add_define,QEMU_LOAD_BL32))
16endif
17
18PLAT_QEMU_PATH := plat/qemu/qemu_sbsa
19PLAT_QEMU_COMMON_PATH := plat/qemu/common
20PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
21 -I${PLAT_QEMU_COMMON_PATH}/include \
22 -I${PLAT_QEMU_PATH}/include \
23 -Iinclude/common/tbbr
24
25PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH}
26
27PLAT_BL_COMMON_SOURCES := ${PLAT_QEMU_COMMON_PATH}/qemu_common.c \
28 ${PLAT_QEMU_COMMON_PATH}/qemu_console.c \
29 drivers/arm/pl011/${ARCH}/pl011_console.S
30
31include lib/xlat_tables_v2/xlat_tables.mk
32PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}
33
34BL1_SOURCES += drivers/io/io_semihosting.c \
35 drivers/io/io_storage.c \
36 drivers/io/io_fip.c \
37 drivers/io/io_memmap.c \
38 lib/semihosting/semihosting.c \
39 lib/semihosting/${ARCH}/semihosting_call.S \
40 ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \
41 ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \
42 ${PLAT_QEMU_COMMON_PATH}/qemu_bl1_setup.c
43
44BL1_SOURCES += lib/cpus/aarch64/aem_generic.S \
45 lib/cpus/aarch64/cortex_a53.S \
46 lib/cpus/aarch64/cortex_a57.S
47
48BL2_SOURCES += drivers/io/io_semihosting.c \
49 drivers/io/io_storage.c \
50 drivers/io/io_fip.c \
51 drivers/io/io_memmap.c \
52 lib/semihosting/semihosting.c \
53 lib/semihosting/${ARCH}/semihosting_call.S \
54 ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \
55 ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \
56 ${PLAT_QEMU_COMMON_PATH}/qemu_bl2_setup.c \
57 common/fdt_fixup.c \
58 $(LIBFDT_SRCS)
59ifeq (${LOAD_IMAGE_V2},1)
60BL2_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_bl2_mem_params_desc.c \
61 ${PLAT_QEMU_COMMON_PATH}/qemu_image_load.c \
62 common/desc_image_load.c
63endif
64
65QEMU_GIC_SOURCES := drivers/arm/gic/v3/gicv3_helpers.c \
66 drivers/arm/gic/v3/gicv3_main.c \
67 drivers/arm/gic/common/gic_common.c \
68 plat/common/plat_gicv3.c \
69 ${PLAT_QEMU_COMMON_PATH}/qemu_gicv3.c
70
71BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \
72 lib/cpus/aarch64/cortex_a53.S \
73 lib/cpus/aarch64/cortex_a57.S \
74 plat/common/plat_psci_common.c \
75 ${PLAT_QEMU_COMMON_PATH}/qemu_pm.c \
76 ${PLAT_QEMU_COMMON_PATH}/topology.c \
77 ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \
78 ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \
79 ${QEMU_GIC_SOURCES}
80
81SEPARATE_CODE_AND_RODATA := 1
82ENABLE_STACK_PROTECTOR := 0
83ifneq ($(ENABLE_STACK_PROTECTOR), 0)
84 PLAT_BL_COMMON_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_stack_protector.c
85endif
86
87MULTI_CONSOLE_API := 1
88
89# Disable the PSCI platform compatibility layer
90ENABLE_PLAT_COMPAT := 0
91
92# Use known base for UEFI if not given from command line
93# By default BL33 is at FLASH1 base
94PRELOADED_BL33_BASE ?= 0x10000000
95
96# Qemu SBSA plafrom only support SEC_SRAM
97BL32_RAM_LOCATION_ID = SEC_SRAM_ID
98$(eval $(call add_define,BL32_RAM_LOCATION_ID))
99
100# Do not enable SVE
101ENABLE_SVE_FOR_NS := 0