Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 1 | # |
dp-arm | 230011c | 2017-03-07 11:02:47 +0000 | [diff] [blame] | 2 | # Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | include lib/libfdt/libfdt.mk |
| 8 | |
Fu Wei | c2f7844 | 2017-05-27 21:21:42 +0800 | [diff] [blame] | 9 | # Enable new version of image loading on QEMU platforms |
| 10 | LOAD_IMAGE_V2 := 1 |
| 11 | |
| 12 | ifeq ($(NEED_BL32),yes) |
| 13 | $(eval $(call add_define,QEMU_LOAD_BL32)) |
| 14 | endif |
| 15 | |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 16 | PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ |
| 17 | -Iinclude/plat/arm/common/aarch64/ \ |
| 18 | -Iplat/qemu/include \ |
| 19 | -Iinclude/common/tbbr |
| 20 | |
Fu Wei | 77ecd46 | 2017-07-31 18:28:32 +0800 | [diff] [blame] | 21 | # Use translation tables library v2 by default |
| 22 | ARM_XLAT_TABLES_LIB_V1 := 0 |
| 23 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 24 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 25 | |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 26 | |
| 27 | PLAT_BL_COMMON_SOURCES := plat/qemu/qemu_common.c \ |
Fu Wei | 77ecd46 | 2017-07-31 18:28:32 +0800 | [diff] [blame] | 28 | drivers/arm/pl011/aarch64/pl011_console.S |
| 29 | |
| 30 | ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1) |
| 31 | PLAT_BL_COMMON_SOURCES += lib/xlat_tables/xlat_tables_common.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 32 | lib/xlat_tables/aarch64/xlat_tables.c |
Fu Wei | 77ecd46 | 2017-07-31 18:28:32 +0800 | [diff] [blame] | 33 | else |
| 34 | include lib/xlat_tables_v2/xlat_tables.mk |
| 35 | |
| 36 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} |
| 37 | endif |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 38 | |
| 39 | BL1_SOURCES += drivers/io/io_semihosting.c \ |
| 40 | drivers/io/io_storage.c \ |
| 41 | drivers/io/io_fip.c \ |
| 42 | drivers/io/io_memmap.c \ |
| 43 | lib/semihosting/semihosting.c \ |
| 44 | lib/semihosting/aarch64/semihosting_call.S \ |
| 45 | plat/qemu/qemu_io_storage.c \ |
| 46 | lib/cpus/aarch64/aem_generic.S \ |
| 47 | lib/cpus/aarch64/cortex_a53.S \ |
| 48 | lib/cpus/aarch64/cortex_a57.S \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 49 | plat/qemu/aarch64/plat_helpers.S \ |
| 50 | plat/qemu/qemu_bl1_setup.c |
| 51 | |
| 52 | BL2_SOURCES += drivers/io/io_semihosting.c \ |
| 53 | drivers/io/io_storage.c \ |
| 54 | drivers/io/io_fip.c \ |
| 55 | drivers/io/io_memmap.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 56 | lib/semihosting/semihosting.c \ |
| 57 | lib/semihosting/aarch64/semihosting_call.S\ |
| 58 | plat/qemu/qemu_io_storage.c \ |
| 59 | plat/qemu/aarch64/plat_helpers.S \ |
| 60 | plat/qemu/qemu_bl2_setup.c \ |
| 61 | plat/qemu/dt.c \ |
| 62 | $(LIBFDT_SRCS) |
Fu Wei | c2f7844 | 2017-05-27 21:21:42 +0800 | [diff] [blame] | 63 | ifeq (${LOAD_IMAGE_V2},1) |
| 64 | BL2_SOURCES += plat/qemu/qemu_bl2_mem_params_desc.c \ |
| 65 | plat/qemu/qemu_image_load.c \ |
| 66 | common/desc_image_load.c |
| 67 | endif |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 68 | |
| 69 | BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \ |
| 70 | lib/cpus/aarch64/cortex_a53.S \ |
| 71 | lib/cpus/aarch64/cortex_a57.S \ |
| 72 | drivers/arm/gic/v2/gicv2_helpers.c \ |
| 73 | drivers/arm/gic/v2/gicv2_main.c \ |
| 74 | drivers/arm/gic/common/gic_common.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 75 | plat/common/aarch64/plat_psci_common.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 76 | plat/qemu/qemu_pm.c \ |
| 77 | plat/qemu/topology.c \ |
| 78 | plat/qemu/aarch64/plat_helpers.S \ |
| 79 | plat/qemu/qemu_bl31_setup.c \ |
| 80 | plat/qemu/qemu_gic.c |
| 81 | |
| 82 | # Disable the PSCI platform compatibility layer |
| 83 | ENABLE_PLAT_COMPAT := 0 |
| 84 | |
| 85 | BL32_RAM_LOCATION := tdram |
| 86 | ifeq (${BL32_RAM_LOCATION}, tsram) |
| 87 | BL32_RAM_LOCATION_ID = SEC_SRAM_ID |
| 88 | else ifeq (${BL32_RAM_LOCATION}, tdram) |
| 89 | BL32_RAM_LOCATION_ID = SEC_DRAM_ID |
| 90 | else |
| 91 | $(error "Unsupported BL32_RAM_LOCATION value") |
| 92 | endif |
| 93 | |
| 94 | # Process flags |
| 95 | $(eval $(call add_define,BL32_RAM_LOCATION_ID)) |