Soby Mathew | ec8ac1c | 2016-05-05 14:32:05 +0100 | [diff] [blame] | 1 | # |
Dimitris Papastamos | 0a4cded | 2018-01-02 11:37:02 +0000 | [diff] [blame] | 2 | # Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. |
Soby Mathew | ec8ac1c | 2016-05-05 14:32:05 +0100 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Soby Mathew | ec8ac1c | 2016-05-05 14:32:05 +0100 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | ifneq (${ARCH}, aarch32) |
| 8 | $(error SP_MIN is only supported on AArch32 platforms) |
| 9 | endif |
| 10 | |
| 11 | include lib/psci/psci_lib.mk |
| 12 | |
| 13 | INCLUDES += -Iinclude/bl32/sp_min |
| 14 | |
| 15 | BL32_SOURCES += bl32/sp_min/sp_min_main.c \ |
| 16 | bl32/sp_min/aarch32/entrypoint.S \ |
| 17 | common/runtime_svc.c \ |
Soby Mathew | 6d07e67 | 2018-03-01 10:53:33 +0000 | [diff] [blame] | 18 | plat/common/aarch32/plat_sp_min_common.c\ |
Soby Mathew | ec8ac1c | 2016-05-05 14:32:05 +0100 | [diff] [blame] | 19 | services/std_svc/std_svc_setup.c \ |
| 20 | ${PSCI_LIB_SOURCES} |
| 21 | |
| 22 | ifeq (${ENABLE_PMF}, 1) |
| 23 | BL32_SOURCES += lib/pmf/pmf_main.c |
| 24 | endif |
| 25 | |
Dimitris Papastamos | dda48b0 | 2017-10-17 14:03:14 +0100 | [diff] [blame] | 26 | ifeq (${ENABLE_AMU}, 1) |
Joel Hutton | 2691bc6 | 2017-12-12 15:47:55 +0000 | [diff] [blame] | 27 | BL32_SOURCES += lib/extensions/amu/aarch32/amu.c\ |
| 28 | lib/extensions/amu/aarch32/amu_helpers.S |
Dimitris Papastamos | dda48b0 | 2017-10-17 14:03:14 +0100 | [diff] [blame] | 29 | endif |
| 30 | |
Dimitris Papastamos | 0a4cded | 2018-01-02 11:37:02 +0000 | [diff] [blame] | 31 | ifeq (${WORKAROUND_CVE_2017_5715},1) |
| 32 | BL32_SOURCES += bl32/sp_min/workaround_cve_2017_5715_bpiall.S \ |
| 33 | bl32/sp_min/workaround_cve_2017_5715_icache_inv.S |
| 34 | endif |
| 35 | |
Soby Mathew | ec8ac1c | 2016-05-05 14:32:05 +0100 | [diff] [blame] | 36 | BL32_LINKERFILE := bl32/sp_min/sp_min.ld.S |
| 37 | |
| 38 | # Include the platform-specific SP_MIN Makefile |
| 39 | # If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported |
| 40 | # on this platform. |
| 41 | SP_MIN_PLAT_MAKEFILE := $(wildcard ${PLAT_DIR}/sp_min/sp_min-${PLAT}.mk) |
| 42 | ifeq (,${SP_MIN_PLAT_MAKEFILE}) |
| 43 | $(error SP_MIN is not supported on platform ${PLAT}) |
| 44 | else |
| 45 | include ${SP_MIN_PLAT_MAKEFILE} |
| 46 | endif |
| 47 | |
Yatharth Kochar | 1c16a4c | 2016-06-30 14:50:58 +0100 | [diff] [blame] | 48 | RESET_TO_SP_MIN := 0 |
Soby Mathew | ec8ac1c | 2016-05-05 14:32:05 +0100 | [diff] [blame] | 49 | $(eval $(call add_define,RESET_TO_SP_MIN)) |
| 50 | $(eval $(call assert_boolean,RESET_TO_SP_MIN)) |
Etienne Carriere | dc0fea7 | 2017-08-09 15:48:53 +0200 | [diff] [blame] | 51 | |
| 52 | # Flag to allow SP_MIN to handle FIQ interrupts in monitor mode. The platform |
| 53 | # port is free to override this value. It is default disabled. |
| 54 | SP_MIN_WITH_SECURE_FIQ ?= 0 |
| 55 | $(eval $(call add_define,SP_MIN_WITH_SECURE_FIQ)) |
| 56 | $(eval $(call assert_boolean,SP_MIN_WITH_SECURE_FIQ)) |