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