blob: 63720f4fe6c09d65d22ae2c4369123ac6921c0e3 [file] [log] [blame]
Jens Wiklander52c798e2015-12-07 14:37:10 +01001#
dp-arm230011c2017-03-07 11:02:47 +00002# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
Jens Wiklander52c798e2015-12-07 14:37:10 +01003#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are met:
6#
7# Redistributions of source code must retain the above copyright notice, this
8# list of conditions and the following disclaimer.
9#
10# Redistributions in binary form must reproduce the above copyright notice,
11# this list of conditions and the following disclaimer in the documentation
12# and/or other materials provided with the distribution.
13#
14# Neither the name of ARM nor the names of its contributors may be used
15# to endorse or promote products derived from this software without specific
16# prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28# POSSIBILITY OF SUCH DAMAGE.
29#
30
31include lib/libfdt/libfdt.mk
32
33PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
34 -Iinclude/plat/arm/common/aarch64/ \
35 -Iplat/qemu/include \
36 -Iinclude/common/tbbr
37
38
39PLAT_BL_COMMON_SOURCES := plat/qemu/qemu_common.c \
Soby Mathew17231132016-08-08 12:33:06 +010040 drivers/arm/pl011/aarch64/pl011_console.S \
Jens Wiklander52c798e2015-12-07 14:37:10 +010041 lib/xlat_tables/xlat_tables_common.c \
42 lib/xlat_tables/aarch64/xlat_tables.c
43
44BL1_SOURCES += drivers/io/io_semihosting.c \
45 drivers/io/io_storage.c \
46 drivers/io/io_fip.c \
47 drivers/io/io_memmap.c \
48 lib/semihosting/semihosting.c \
49 lib/semihosting/aarch64/semihosting_call.S \
50 plat/qemu/qemu_io_storage.c \
51 lib/cpus/aarch64/aem_generic.S \
52 lib/cpus/aarch64/cortex_a53.S \
53 lib/cpus/aarch64/cortex_a57.S \
Jens Wiklander52c798e2015-12-07 14:37:10 +010054 plat/qemu/aarch64/plat_helpers.S \
55 plat/qemu/qemu_bl1_setup.c
56
57BL2_SOURCES += drivers/io/io_semihosting.c \
58 drivers/io/io_storage.c \
59 drivers/io/io_fip.c \
60 drivers/io/io_memmap.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010061 lib/semihosting/semihosting.c \
62 lib/semihosting/aarch64/semihosting_call.S\
63 plat/qemu/qemu_io_storage.c \
64 plat/qemu/aarch64/plat_helpers.S \
65 plat/qemu/qemu_bl2_setup.c \
66 plat/qemu/dt.c \
67 $(LIBFDT_SRCS)
68
69BL31_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 Wiklander52c798e2015-12-07 14:37:10 +010075 plat/common/aarch64/plat_psci_common.c \
Jens Wiklander52c798e2015-12-07 14:37:10 +010076 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
83ENABLE_PLAT_COMPAT := 0
84
85BL32_RAM_LOCATION := tdram
86ifeq (${BL32_RAM_LOCATION}, tsram)
87 BL32_RAM_LOCATION_ID = SEC_SRAM_ID
88else ifeq (${BL32_RAM_LOCATION}, tdram)
89 BL32_RAM_LOCATION_ID = SEC_DRAM_ID
90else
91 $(error "Unsupported BL32_RAM_LOCATION value")
92endif
93
94# Process flags
95$(eval $(call add_define,BL32_RAM_LOCATION_ID))