Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2019, Linaro Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | CRASH_REPORTING := 1 |
| 8 | |
| 9 | include lib/libfdt/libfdt.mk |
| 10 | |
| 11 | # Enable new version of image loading on QEMU platforms |
| 12 | LOAD_IMAGE_V2 := 1 |
| 13 | |
| 14 | ifeq ($(NEED_BL32),yes) |
| 15 | $(eval $(call add_define,QEMU_LOAD_BL32)) |
| 16 | endif |
| 17 | |
| 18 | PLAT_QEMU_PATH := plat/qemu/qemu_sbsa |
| 19 | PLAT_QEMU_COMMON_PATH := plat/qemu/common |
| 20 | PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ |
| 21 | -I${PLAT_QEMU_COMMON_PATH}/include \ |
| 22 | -I${PLAT_QEMU_PATH}/include \ |
| 23 | -Iinclude/common/tbbr |
| 24 | |
| 25 | PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH} |
| 26 | |
| 27 | PLAT_BL_COMMON_SOURCES := ${PLAT_QEMU_COMMON_PATH}/qemu_common.c \ |
| 28 | ${PLAT_QEMU_COMMON_PATH}/qemu_console.c \ |
| 29 | drivers/arm/pl011/${ARCH}/pl011_console.S |
| 30 | |
| 31 | include lib/xlat_tables_v2/xlat_tables.mk |
| 32 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} |
| 33 | |
| 34 | BL1_SOURCES += drivers/io/io_semihosting.c \ |
| 35 | drivers/io/io_storage.c \ |
| 36 | drivers/io/io_fip.c \ |
| 37 | drivers/io/io_memmap.c \ |
| 38 | lib/semihosting/semihosting.c \ |
| 39 | lib/semihosting/${ARCH}/semihosting_call.S \ |
| 40 | ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \ |
| 41 | ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \ |
| 42 | ${PLAT_QEMU_COMMON_PATH}/qemu_bl1_setup.c |
| 43 | |
| 44 | BL1_SOURCES += lib/cpus/aarch64/aem_generic.S \ |
| 45 | lib/cpus/aarch64/cortex_a53.S \ |
| 46 | lib/cpus/aarch64/cortex_a57.S |
| 47 | |
| 48 | BL2_SOURCES += drivers/io/io_semihosting.c \ |
| 49 | drivers/io/io_storage.c \ |
| 50 | drivers/io/io_fip.c \ |
| 51 | drivers/io/io_memmap.c \ |
| 52 | lib/semihosting/semihosting.c \ |
| 53 | lib/semihosting/${ARCH}/semihosting_call.S \ |
| 54 | ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \ |
| 55 | ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \ |
| 56 | ${PLAT_QEMU_COMMON_PATH}/qemu_bl2_setup.c \ |
| 57 | common/fdt_fixup.c \ |
| 58 | $(LIBFDT_SRCS) |
| 59 | ifeq (${LOAD_IMAGE_V2},1) |
| 60 | BL2_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_bl2_mem_params_desc.c \ |
| 61 | ${PLAT_QEMU_COMMON_PATH}/qemu_image_load.c \ |
| 62 | common/desc_image_load.c |
| 63 | endif |
| 64 | |
| 65 | QEMU_GIC_SOURCES := drivers/arm/gic/v3/gicv3_helpers.c \ |
Alexei Fedorov | 2f13d6c | 2020-02-21 10:17:26 +0000 | [diff] [blame] | 66 | drivers/arm/gic/v3/gicdv3_helpers.c \ |
| 67 | drivers/arm/gic/v3/gicrv3_helpers.c \ |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 68 | drivers/arm/gic/v3/gicv3_main.c \ |
| 69 | drivers/arm/gic/common/gic_common.c \ |
| 70 | plat/common/plat_gicv3.c \ |
| 71 | ${PLAT_QEMU_COMMON_PATH}/qemu_gicv3.c |
| 72 | |
| 73 | BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \ |
| 74 | lib/cpus/aarch64/cortex_a53.S \ |
| 75 | lib/cpus/aarch64/cortex_a57.S \ |
Andrew Walbran | f3a6839 | 2020-01-15 14:18:04 +0000 | [diff] [blame] | 76 | lib/semihosting/semihosting.c \ |
| 77 | lib/semihosting/${ARCH}/semihosting_call.S \ |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 78 | plat/common/plat_psci_common.c \ |
| 79 | ${PLAT_QEMU_COMMON_PATH}/qemu_pm.c \ |
| 80 | ${PLAT_QEMU_COMMON_PATH}/topology.c \ |
| 81 | ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \ |
| 82 | ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \ |
| 83 | ${QEMU_GIC_SOURCES} |
| 84 | |
| 85 | SEPARATE_CODE_AND_RODATA := 1 |
| 86 | ENABLE_STACK_PROTECTOR := 0 |
| 87 | ifneq ($(ENABLE_STACK_PROTECTOR), 0) |
| 88 | PLAT_BL_COMMON_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_stack_protector.c |
| 89 | endif |
| 90 | |
| 91 | MULTI_CONSOLE_API := 1 |
| 92 | |
| 93 | # Disable the PSCI platform compatibility layer |
| 94 | ENABLE_PLAT_COMPAT := 0 |
| 95 | |
| 96 | # Use known base for UEFI if not given from command line |
| 97 | # By default BL33 is at FLASH1 base |
| 98 | PRELOADED_BL33_BASE ?= 0x10000000 |
| 99 | |
| 100 | # Qemu SBSA plafrom only support SEC_SRAM |
| 101 | BL32_RAM_LOCATION_ID = SEC_SRAM_ID |
| 102 | $(eval $(call add_define,BL32_RAM_LOCATION_ID)) |
| 103 | |
Andrew Walbran | 9c4d069 | 2020-01-15 14:11:31 +0000 | [diff] [blame] | 104 | # Don't have the Linux kernel as a BL33 image by default |
| 105 | ARM_LINUX_KERNEL_AS_BL33 := 0 |
| 106 | $(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33)) |
| 107 | $(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33)) |
| 108 | |
| 109 | ARM_PRELOADED_DTB_BASE := PLAT_QEMU_DT_BASE |
| 110 | $(eval $(call add_define,ARM_PRELOADED_DTB_BASE)) |
| 111 | |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 112 | # Do not enable SVE |
| 113 | ENABLE_SVE_FOR_NS := 0 |