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