Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 1 | # |
Marcin Juszkiewicz | b6839fb | 2023-05-10 10:03:01 +0200 | [diff] [blame] | 2 | # Copyright (c) 2019-2023, Linaro Limited and Contributors. All rights reserved. |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Marcin Juszkiewicz | a70ef5e | 2023-07-24 21:08:16 +0200 | [diff] [blame] | 7 | PLAT_QEMU_PATH := plat/qemu/qemu_sbsa |
| 8 | PLAT_QEMU_COMMON_PATH := plat/qemu/common |
| 9 | |
Marcin Juszkiewicz | e6dea09 | 2023-07-24 22:22:42 +0200 | [diff] [blame] | 10 | CRASH_REPORTING := 1 |
| 11 | |
| 12 | # Disable the PSCI platform compatibility layer |
| 13 | ENABLE_PLAT_COMPAT := 0 |
| 14 | |
| 15 | SEPARATE_CODE_AND_RODATA := 1 |
| 16 | ENABLE_STACK_PROTECTOR := 0 |
| 17 | |
Masahisa Kojima | 099064b | 2020-06-11 21:46:44 +0900 | [diff] [blame] | 18 | ifeq (${SPM_MM},1) |
| 19 | NEED_BL32 := yes |
| 20 | EL3_EXCEPTION_HANDLING := 1 |
| 21 | GICV2_G0_FOR_EL3 := 1 |
| 22 | endif |
| 23 | |
Marcin Juszkiewicz | 5aece71 | 2023-07-24 22:07:49 +0200 | [diff] [blame] | 24 | include plat/qemu/common/common.mk |
| 25 | |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 26 | # Enable new version of image loading on QEMU platforms |
| 27 | LOAD_IMAGE_V2 := 1 |
| 28 | |
| 29 | ifeq ($(NEED_BL32),yes) |
| 30 | $(eval $(call add_define,QEMU_LOAD_BL32)) |
| 31 | endif |
| 32 | |
Marcin Juszkiewicz | 424e3a8 | 2023-07-24 21:18:51 +0200 | [diff] [blame] | 33 | BL2_SOURCES += $(LIBFDT_SRCS) |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 34 | |
Alexei Fedorov | 84f1b5d | 2020-03-23 18:45:17 +0000 | [diff] [blame] | 35 | # Include GICv3 driver files |
| 36 | include drivers/arm/gic/v3/gicv3.mk |
| 37 | |
| 38 | QEMU_GIC_SOURCES := ${GICV3_SOURCES} \ |
Marcin Juszkiewicz | 79ee1c4 | 2023-05-15 11:07:54 +0200 | [diff] [blame] | 39 | plat/common/plat_gicv3.c |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 40 | |
Marcin Juszkiewicz | 61c9903 | 2023-07-24 21:37:00 +0200 | [diff] [blame] | 41 | BL31_SOURCES += ${PLAT_QEMU_PATH}/sbsa_gic.c \ |
Graeme Gregory | 1a73223 | 2020-08-28 18:03:35 +0100 | [diff] [blame] | 42 | ${PLAT_QEMU_PATH}/sbsa_pm.c \ |
Marcin Juszkiewicz | b6839fb | 2023-05-10 10:03:01 +0200 | [diff] [blame] | 43 | ${PLAT_QEMU_PATH}/sbsa_sip_svc.c \ |
Marcin Juszkiewicz | 61c9903 | 2023-07-24 21:37:00 +0200 | [diff] [blame] | 44 | ${PLAT_QEMU_PATH}/sbsa_topology.c |
Chris Kay | e927215 | 2021-09-28 15:52:14 +0100 | [diff] [blame] | 45 | |
| 46 | BL31_SOURCES += ${FDT_WRAPPERS_SOURCES} |
| 47 | |
Masahisa Kojima | 099064b | 2020-06-11 21:46:44 +0900 | [diff] [blame] | 48 | ifeq (${SPM_MM},1) |
| 49 | BL31_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_spm.c |
| 50 | endif |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 51 | |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 52 | # Use known base for UEFI if not given from command line |
| 53 | # By default BL33 is at FLASH1 base |
| 54 | PRELOADED_BL33_BASE ?= 0x10000000 |
| 55 | |
| 56 | # Qemu SBSA plafrom only support SEC_SRAM |
| 57 | BL32_RAM_LOCATION_ID = SEC_SRAM_ID |
| 58 | $(eval $(call add_define,BL32_RAM_LOCATION_ID)) |
| 59 | |
Andrew Walbran | 9c4d069 | 2020-01-15 14:11:31 +0000 | [diff] [blame] | 60 | # Don't have the Linux kernel as a BL33 image by default |
| 61 | ARM_LINUX_KERNEL_AS_BL33 := 0 |
| 62 | $(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33)) |
| 63 | $(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33)) |
| 64 | |
| 65 | ARM_PRELOADED_DTB_BASE := PLAT_QEMU_DT_BASE |
| 66 | $(eval $(call add_define,ARM_PRELOADED_DTB_BASE)) |