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 | |
| 9 | PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ |
| 10 | -Iinclude/plat/arm/common/aarch64/ \ |
| 11 | -Iplat/qemu/include \ |
| 12 | -Iinclude/common/tbbr |
| 13 | |
Fu Wei | 77ecd46 | 2017-07-31 18:28:32 +0800 | [diff] [blame] | 14 | # Use translation tables library v2 by default |
| 15 | ARM_XLAT_TABLES_LIB_V1 := 0 |
| 16 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 17 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 18 | |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 19 | |
| 20 | PLAT_BL_COMMON_SOURCES := plat/qemu/qemu_common.c \ |
Fu Wei | 77ecd46 | 2017-07-31 18:28:32 +0800 | [diff] [blame] | 21 | drivers/arm/pl011/aarch64/pl011_console.S |
| 22 | |
| 23 | ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1) |
| 24 | PLAT_BL_COMMON_SOURCES += lib/xlat_tables/xlat_tables_common.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 25 | lib/xlat_tables/aarch64/xlat_tables.c |
Fu Wei | 77ecd46 | 2017-07-31 18:28:32 +0800 | [diff] [blame] | 26 | else |
| 27 | include lib/xlat_tables_v2/xlat_tables.mk |
| 28 | |
| 29 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} |
| 30 | endif |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 31 | |
| 32 | BL1_SOURCES += drivers/io/io_semihosting.c \ |
| 33 | drivers/io/io_storage.c \ |
| 34 | drivers/io/io_fip.c \ |
| 35 | drivers/io/io_memmap.c \ |
| 36 | lib/semihosting/semihosting.c \ |
| 37 | lib/semihosting/aarch64/semihosting_call.S \ |
| 38 | plat/qemu/qemu_io_storage.c \ |
| 39 | lib/cpus/aarch64/aem_generic.S \ |
| 40 | lib/cpus/aarch64/cortex_a53.S \ |
| 41 | lib/cpus/aarch64/cortex_a57.S \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 42 | plat/qemu/aarch64/plat_helpers.S \ |
| 43 | plat/qemu/qemu_bl1_setup.c |
| 44 | |
| 45 | BL2_SOURCES += drivers/io/io_semihosting.c \ |
| 46 | drivers/io/io_storage.c \ |
| 47 | drivers/io/io_fip.c \ |
| 48 | drivers/io/io_memmap.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 49 | lib/semihosting/semihosting.c \ |
| 50 | lib/semihosting/aarch64/semihosting_call.S\ |
| 51 | plat/qemu/qemu_io_storage.c \ |
| 52 | plat/qemu/aarch64/plat_helpers.S \ |
| 53 | plat/qemu/qemu_bl2_setup.c \ |
| 54 | plat/qemu/dt.c \ |
| 55 | $(LIBFDT_SRCS) |
| 56 | |
| 57 | BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \ |
| 58 | lib/cpus/aarch64/cortex_a53.S \ |
| 59 | lib/cpus/aarch64/cortex_a57.S \ |
| 60 | drivers/arm/gic/v2/gicv2_helpers.c \ |
| 61 | drivers/arm/gic/v2/gicv2_main.c \ |
| 62 | drivers/arm/gic/common/gic_common.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 63 | plat/common/aarch64/plat_psci_common.c \ |
Jens Wiklander | 52c798e | 2015-12-07 14:37:10 +0100 | [diff] [blame] | 64 | plat/qemu/qemu_pm.c \ |
| 65 | plat/qemu/topology.c \ |
| 66 | plat/qemu/aarch64/plat_helpers.S \ |
| 67 | plat/qemu/qemu_bl31_setup.c \ |
| 68 | plat/qemu/qemu_gic.c |
| 69 | |
| 70 | # Disable the PSCI platform compatibility layer |
| 71 | ENABLE_PLAT_COMPAT := 0 |
| 72 | |
| 73 | BL32_RAM_LOCATION := tdram |
| 74 | ifeq (${BL32_RAM_LOCATION}, tsram) |
| 75 | BL32_RAM_LOCATION_ID = SEC_SRAM_ID |
| 76 | else ifeq (${BL32_RAM_LOCATION}, tdram) |
| 77 | BL32_RAM_LOCATION_ID = SEC_DRAM_ID |
| 78 | else |
| 79 | $(error "Unsupported BL32_RAM_LOCATION value") |
| 80 | endif |
| 81 | |
| 82 | # Process flags |
| 83 | $(eval $(call add_define,BL32_RAM_LOCATION_ID)) |