Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 1 | # |
Masahisa Kojima | 099064b | 2020-06-11 21:46:44 +0900 | [diff] [blame] | 2 | # Copyright (c) 2019-2020, 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 | |
| 7 | CRASH_REPORTING := 1 |
| 8 | |
| 9 | include lib/libfdt/libfdt.mk |
| 10 | |
Masahisa Kojima | 099064b | 2020-06-11 21:46:44 +0900 | [diff] [blame] | 11 | ifeq (${SPM_MM},1) |
| 12 | NEED_BL32 := yes |
| 13 | EL3_EXCEPTION_HANDLING := 1 |
| 14 | GICV2_G0_FOR_EL3 := 1 |
| 15 | endif |
| 16 | |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 17 | # Enable new version of image loading on QEMU platforms |
| 18 | LOAD_IMAGE_V2 := 1 |
| 19 | |
| 20 | ifeq ($(NEED_BL32),yes) |
| 21 | $(eval $(call add_define,QEMU_LOAD_BL32)) |
| 22 | endif |
| 23 | |
| 24 | PLAT_QEMU_PATH := plat/qemu/qemu_sbsa |
| 25 | PLAT_QEMU_COMMON_PATH := plat/qemu/common |
| 26 | PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ |
| 27 | -I${PLAT_QEMU_COMMON_PATH}/include \ |
| 28 | -I${PLAT_QEMU_PATH}/include \ |
| 29 | -Iinclude/common/tbbr |
| 30 | |
| 31 | PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH} |
| 32 | |
| 33 | PLAT_BL_COMMON_SOURCES := ${PLAT_QEMU_COMMON_PATH}/qemu_common.c \ |
| 34 | ${PLAT_QEMU_COMMON_PATH}/qemu_console.c \ |
| 35 | drivers/arm/pl011/${ARCH}/pl011_console.S |
| 36 | |
| 37 | include lib/xlat_tables_v2/xlat_tables.mk |
| 38 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} |
| 39 | |
| 40 | BL1_SOURCES += drivers/io/io_semihosting.c \ |
| 41 | drivers/io/io_storage.c \ |
| 42 | drivers/io/io_fip.c \ |
| 43 | drivers/io/io_memmap.c \ |
| 44 | lib/semihosting/semihosting.c \ |
| 45 | lib/semihosting/${ARCH}/semihosting_call.S \ |
| 46 | ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \ |
| 47 | ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \ |
| 48 | ${PLAT_QEMU_COMMON_PATH}/qemu_bl1_setup.c |
| 49 | |
Tanmay Jagdale | 8abcf34 | 2020-11-20 16:36:50 +0530 | [diff] [blame] | 50 | BL1_SOURCES += lib/cpus/aarch64/cortex_a57.S \ |
| 51 | lib/cpus/aarch64/cortex_a72.S |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 52 | |
| 53 | BL2_SOURCES += drivers/io/io_semihosting.c \ |
| 54 | drivers/io/io_storage.c \ |
| 55 | drivers/io/io_fip.c \ |
| 56 | drivers/io/io_memmap.c \ |
| 57 | lib/semihosting/semihosting.c \ |
| 58 | lib/semihosting/${ARCH}/semihosting_call.S \ |
| 59 | ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \ |
| 60 | ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \ |
| 61 | ${PLAT_QEMU_COMMON_PATH}/qemu_bl2_setup.c \ |
| 62 | common/fdt_fixup.c \ |
| 63 | $(LIBFDT_SRCS) |
| 64 | ifeq (${LOAD_IMAGE_V2},1) |
| 65 | BL2_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_bl2_mem_params_desc.c \ |
| 66 | ${PLAT_QEMU_COMMON_PATH}/qemu_image_load.c \ |
| 67 | common/desc_image_load.c |
| 68 | endif |
| 69 | |
Alexei Fedorov | 84f1b5d | 2020-03-23 18:45:17 +0000 | [diff] [blame] | 70 | # Include GICv3 driver files |
| 71 | include drivers/arm/gic/v3/gicv3.mk |
| 72 | |
| 73 | QEMU_GIC_SOURCES := ${GICV3_SOURCES} \ |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 74 | plat/common/plat_gicv3.c \ |
| 75 | ${PLAT_QEMU_COMMON_PATH}/qemu_gicv3.c |
| 76 | |
Tomas Pilar | fa9f4fe | 2020-08-11 15:06:16 +0100 | [diff] [blame] | 77 | BL31_SOURCES += lib/cpus/aarch64/cortex_a57.S \ |
Tanmay Jagdale | 8abcf34 | 2020-11-20 16:36:50 +0530 | [diff] [blame] | 78 | lib/cpus/aarch64/cortex_a72.S \ |
Andrew Walbran | f3a6839 | 2020-01-15 14:18:04 +0000 | [diff] [blame] | 79 | lib/semihosting/semihosting.c \ |
| 80 | lib/semihosting/${ARCH}/semihosting_call.S \ |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 81 | plat/common/plat_psci_common.c \ |
Graeme Gregory | 1a73223 | 2020-08-28 18:03:35 +0100 | [diff] [blame] | 82 | ${PLAT_QEMU_PATH}/sbsa_pm.c \ |
Graeme Gregory | 10e9223 | 2020-08-28 16:37:02 +0100 | [diff] [blame] | 83 | ${PLAT_QEMU_PATH}/sbsa_topology.c \ |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 84 | ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \ |
| 85 | ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \ |
Masahisa Kojima | 7e917dc | 2020-09-23 16:52:59 +0900 | [diff] [blame] | 86 | common/fdt_fixup.c \ |
| 87 | common/fdt_wrappers.c \ |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 88 | ${QEMU_GIC_SOURCES} |
Masahisa Kojima | 099064b | 2020-06-11 21:46:44 +0900 | [diff] [blame] | 89 | ifeq (${SPM_MM},1) |
| 90 | BL31_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_spm.c |
| 91 | endif |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 92 | |
| 93 | SEPARATE_CODE_AND_RODATA := 1 |
| 94 | ENABLE_STACK_PROTECTOR := 0 |
| 95 | ifneq ($(ENABLE_STACK_PROTECTOR), 0) |
| 96 | PLAT_BL_COMMON_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_stack_protector.c |
| 97 | endif |
| 98 | |
| 99 | MULTI_CONSOLE_API := 1 |
| 100 | |
| 101 | # Disable the PSCI platform compatibility layer |
| 102 | ENABLE_PLAT_COMPAT := 0 |
| 103 | |
| 104 | # Use known base for UEFI if not given from command line |
| 105 | # By default BL33 is at FLASH1 base |
| 106 | PRELOADED_BL33_BASE ?= 0x10000000 |
| 107 | |
| 108 | # Qemu SBSA plafrom only support SEC_SRAM |
| 109 | BL32_RAM_LOCATION_ID = SEC_SRAM_ID |
| 110 | $(eval $(call add_define,BL32_RAM_LOCATION_ID)) |
| 111 | |
Andrew Walbran | 9c4d069 | 2020-01-15 14:11:31 +0000 | [diff] [blame] | 112 | # Don't have the Linux kernel as a BL33 image by default |
| 113 | ARM_LINUX_KERNEL_AS_BL33 := 0 |
| 114 | $(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33)) |
| 115 | $(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33)) |
| 116 | |
| 117 | ARM_PRELOADED_DTB_BASE := PLAT_QEMU_DT_BASE |
| 118 | $(eval $(call add_define,ARM_PRELOADED_DTB_BASE)) |
| 119 | |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 120 | # Do not enable SVE |
| 121 | ENABLE_SVE_FOR_NS := 0 |