1# 2# Copyright (c) 2019-2023, Linaro Limited and Contributors. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7PLAT_QEMU_PATH := plat/qemu/qemu_sbsa 8PLAT_QEMU_COMMON_PATH := plat/qemu/common 9 10MULTI_CONSOLE_API := 1 11CRASH_REPORTING := 1 12 13# Disable the PSCI platform compatibility layer 14ENABLE_PLAT_COMPAT := 0 15 16SEPARATE_CODE_AND_RODATA := 1 17ENABLE_STACK_PROTECTOR := 0 18 19ifeq (${SPM_MM},1) 20NEED_BL32 := yes 21EL3_EXCEPTION_HANDLING := 1 22GICV2_G0_FOR_EL3 := 1 23endif 24 25include plat/qemu/common/common.mk 26 27# Enable new version of image loading on QEMU platforms 28LOAD_IMAGE_V2 := 1 29 30ifeq ($(NEED_BL32),yes) 31$(eval $(call add_define,QEMU_LOAD_BL32)) 32endif 33 34BL2_SOURCES += $(LIBFDT_SRCS) 35 36# Include GICv3 driver files 37include drivers/arm/gic/v3/gicv3.mk 38 39QEMU_GIC_SOURCES := ${GICV3_SOURCES} \ 40 plat/common/plat_gicv3.c 41 42BL31_SOURCES += ${PLAT_QEMU_PATH}/sbsa_gic.c \ 43 ${PLAT_QEMU_PATH}/sbsa_pm.c \ 44 ${PLAT_QEMU_PATH}/sbsa_sip_svc.c \ 45 ${PLAT_QEMU_PATH}/sbsa_topology.c 46 47BL31_SOURCES += ${FDT_WRAPPERS_SOURCES} 48 49ifeq (${SPM_MM},1) 50 BL31_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_spm.c 51endif 52 53# Use known base for UEFI if not given from command line 54# By default BL33 is at FLASH1 base 55PRELOADED_BL33_BASE ?= 0x10000000 56 57# Qemu SBSA plafrom only support SEC_SRAM 58BL32_RAM_LOCATION_ID = SEC_SRAM_ID 59$(eval $(call add_define,BL32_RAM_LOCATION_ID)) 60 61# Don't have the Linux kernel as a BL33 image by default 62ARM_LINUX_KERNEL_AS_BL33 := 0 63$(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33)) 64$(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33)) 65 66ARM_PRELOADED_DTB_BASE := PLAT_QEMU_DT_BASE 67$(eval $(call add_define,ARM_PRELOADED_DTB_BASE)) 68