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