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 \ |
| 66 | drivers/arm/gic/v3/gicv3_main.c \ |
| 67 | drivers/arm/gic/common/gic_common.c \ |
| 68 | plat/common/plat_gicv3.c \ |
| 69 | ${PLAT_QEMU_COMMON_PATH}/qemu_gicv3.c |
| 70 | |
| 71 | BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \ |
| 72 | lib/cpus/aarch64/cortex_a53.S \ |
| 73 | lib/cpus/aarch64/cortex_a57.S \ |
| 74 | plat/common/plat_psci_common.c \ |
| 75 | ${PLAT_QEMU_COMMON_PATH}/qemu_pm.c \ |
| 76 | ${PLAT_QEMU_COMMON_PATH}/topology.c \ |
| 77 | ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \ |
| 78 | ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \ |
| 79 | ${QEMU_GIC_SOURCES} |
| 80 | |
| 81 | SEPARATE_CODE_AND_RODATA := 1 |
| 82 | ENABLE_STACK_PROTECTOR := 0 |
| 83 | ifneq ($(ENABLE_STACK_PROTECTOR), 0) |
| 84 | PLAT_BL_COMMON_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_stack_protector.c |
| 85 | endif |
| 86 | |
| 87 | MULTI_CONSOLE_API := 1 |
| 88 | |
| 89 | # Disable the PSCI platform compatibility layer |
| 90 | ENABLE_PLAT_COMPAT := 0 |
| 91 | |
| 92 | # Use known base for UEFI if not given from command line |
| 93 | # By default BL33 is at FLASH1 base |
| 94 | PRELOADED_BL33_BASE ?= 0x10000000 |
| 95 | |
| 96 | # Qemu SBSA plafrom only support SEC_SRAM |
| 97 | BL32_RAM_LOCATION_ID = SEC_SRAM_ID |
| 98 | $(eval $(call add_define,BL32_RAM_LOCATION_ID)) |
| 99 | |
| 100 | # Do not enable SVE |
| 101 | ENABLE_SVE_FOR_NS := 0 |