blob: aa08bd33ef145dc217ea18bb12985a5ad9f6b45c [file] [log] [blame]
Jens Wiklander52c798e2015-12-07 14:37:10 +01001#
2# Copyright (c) 2013-2015, ARM Limited and Contributors. All rights reserved.
3#
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 \
54 plat/common/aarch64/platform_mp_stack.S \
55 plat/qemu/aarch64/plat_helpers.S \
56 plat/qemu/qemu_bl1_setup.c
57
58BL2_SOURCES += drivers/io/io_semihosting.c \
59 drivers/io/io_storage.c \
60 drivers/io/io_fip.c \
61 drivers/io/io_memmap.c \
62 plat/common/aarch64/platform_mp_stack.S \
63 lib/semihosting/semihosting.c \
64 lib/semihosting/aarch64/semihosting_call.S\
65 plat/qemu/qemu_io_storage.c \
66 plat/qemu/aarch64/plat_helpers.S \
67 plat/qemu/qemu_bl2_setup.c \
68 plat/qemu/dt.c \
69 $(LIBFDT_SRCS)
70
71BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \
72 lib/cpus/aarch64/cortex_a53.S \
73 lib/cpus/aarch64/cortex_a57.S \
74 drivers/arm/gic/v2/gicv2_helpers.c \
75 drivers/arm/gic/v2/gicv2_main.c \
76 drivers/arm/gic/common/gic_common.c \
77 plat/common/aarch64/platform_mp_stack.S \
78 plat/common/aarch64/plat_psci_common.c \
79 plat/common/aarch64/plat_common.c \
80 plat/qemu/qemu_pm.c \
81 plat/qemu/topology.c \
82 plat/qemu/aarch64/plat_helpers.S \
83 plat/qemu/qemu_bl31_setup.c \
84 plat/qemu/qemu_gic.c
85
86# Disable the PSCI platform compatibility layer
87ENABLE_PLAT_COMPAT := 0
88
89BL32_RAM_LOCATION := tdram
90ifeq (${BL32_RAM_LOCATION}, tsram)
91 BL32_RAM_LOCATION_ID = SEC_SRAM_ID
92else ifeq (${BL32_RAM_LOCATION}, tdram)
93 BL32_RAM_LOCATION_ID = SEC_DRAM_ID
94else
95 $(error "Unsupported BL32_RAM_LOCATION value")
96endif
97
98# Process flags
99$(eval $(call add_define,BL32_RAM_LOCATION_ID))