blob: 528e09354dd0f0d885e27d2c30bf15b438d4c23b [file] [log] [blame]
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +02001#
Marcin Juszkiewiczb6839fb2023-05-10 10:03:01 +02002# Copyright (c) 2019-2023, Linaro Limited and Contributors. All rights reserved.
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +02003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Marcin Juszkiewicza70ef5e2023-07-24 21:08:16 +02007PLAT_QEMU_PATH := plat/qemu/qemu_sbsa
8PLAT_QEMU_COMMON_PATH := plat/qemu/common
9
Marcin Juszkiewicze6dea092023-07-24 22:22:42 +020010CRASH_REPORTING := 1
11
12# Disable the PSCI platform compatibility layer
13ENABLE_PLAT_COMPAT := 0
14
15SEPARATE_CODE_AND_RODATA := 1
16ENABLE_STACK_PROTECTOR := 0
17
Masahisa Kojima099064b2020-06-11 21:46:44 +090018ifeq (${SPM_MM},1)
19NEED_BL32 := yes
20EL3_EXCEPTION_HANDLING := 1
Masahisa Kojima099064b2020-06-11 21:46:44 +090021endif
22
Marcin Juszkiewicz5aece712023-07-24 22:07:49 +020023include plat/qemu/common/common.mk
24
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +020025# Enable new version of image loading on QEMU platforms
26LOAD_IMAGE_V2 := 1
27
28ifeq ($(NEED_BL32),yes)
29$(eval $(call add_define,QEMU_LOAD_BL32))
30endif
31
Marcin Juszkiewicz424e3a82023-07-24 21:18:51 +020032BL2_SOURCES += $(LIBFDT_SRCS)
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +020033
Alexei Fedorov84f1b5d2020-03-23 18:45:17 +000034# Include GICv3 driver files
35include drivers/arm/gic/v3/gicv3.mk
36
37QEMU_GIC_SOURCES := ${GICV3_SOURCES} \
Marcin Juszkiewicz79ee1c42023-05-15 11:07:54 +020038 plat/common/plat_gicv3.c
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +020039
Marcin Juszkiewicz61c99032023-07-24 21:37:00 +020040BL31_SOURCES += ${PLAT_QEMU_PATH}/sbsa_gic.c \
Graeme Gregory1a732232020-08-28 18:03:35 +010041 ${PLAT_QEMU_PATH}/sbsa_pm.c \
Marcin Juszkiewiczb6839fb2023-05-10 10:03:01 +020042 ${PLAT_QEMU_PATH}/sbsa_sip_svc.c \
Marcin Juszkiewicz61c99032023-07-24 21:37:00 +020043 ${PLAT_QEMU_PATH}/sbsa_topology.c
Chris Kaye9272152021-09-28 15:52:14 +010044
45BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
46
Masahisa Kojima099064b2020-06-11 21:46:44 +090047ifeq (${SPM_MM},1)
48 BL31_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_spm.c
49endif
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +020050
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +020051# Use known base for UEFI if not given from command line
52# By default BL33 is at FLASH1 base
53PRELOADED_BL33_BASE ?= 0x10000000
54
55# Qemu SBSA plafrom only support SEC_SRAM
56BL32_RAM_LOCATION_ID = SEC_SRAM_ID
57$(eval $(call add_define,BL32_RAM_LOCATION_ID))
58
Andrew Walbran9c4d0692020-01-15 14:11:31 +000059# Don't have the Linux kernel as a BL33 image by default
60ARM_LINUX_KERNEL_AS_BL33 := 0
61$(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33))
62$(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33))
63
64ARM_PRELOADED_DTB_BASE := PLAT_QEMU_DT_BASE
65$(eval $(call add_define,ARM_PRELOADED_DTB_BASE))