Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 1 | # |
Antonio Nino Diaz | 2ac9a44 | 2018-05-23 11:40:46 +0100 | [diff] [blame] | 2 | # Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | ifneq (${SPD},none) |
| 8 | $(error "Error: SPD and SPM are incompatible build options.") |
| 9 | endif |
| 10 | ifneq (${ARCH},aarch64) |
| 11 | $(error "Error: SPM is only supported on aarch64.") |
| 12 | endif |
| 13 | |
Antonio Nino Diaz | 9bf1d23 | 2018-11-08 09:21:48 +0000 | [diff] [blame] | 14 | include lib/sprt/sprt_host.mk |
| 15 | |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 16 | SPM_SOURCES := $(addprefix services/std_svc/spm/, \ |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 17 | ${ARCH}/spm_helpers.S \ |
Antonio Nino Diaz | 2ac9a44 | 2018-05-23 11:40:46 +0100 | [diff] [blame] | 18 | ${ARCH}/spm_shim_exceptions.S \ |
Antonio Nino Diaz | 7b28b54 | 2018-05-22 16:45:35 +0100 | [diff] [blame] | 19 | sp_setup.c \ |
Antonio Nino Diaz | f939a6a | 2018-11-08 14:12:40 +0000 | [diff] [blame] | 20 | sp_xlat.c \ |
| 21 | spci.c \ |
Antonio Nino Diaz | 8903641 | 2018-10-18 14:54:57 +0100 | [diff] [blame^] | 22 | spm_buffers.c \ |
Antonio Nino Diaz | f939a6a | 2018-11-08 14:12:40 +0000 | [diff] [blame] | 23 | spm_main.c \ |
Antonio Nino Diaz | 9bf1d23 | 2018-11-08 09:21:48 +0000 | [diff] [blame] | 24 | sprt.c) \ |
| 25 | ${SPRT_LIB_SOURCES} |
Antonio Nino Diaz | f939a6a | 2018-11-08 14:12:40 +0000 | [diff] [blame] | 26 | |
Antonio Nino Diaz | 9bf1d23 | 2018-11-08 09:21:48 +0000 | [diff] [blame] | 27 | INCLUDES += ${SPRT_LIB_INCLUDES} |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 28 | |
Antonio Nino Diaz | f939a6a | 2018-11-08 14:12:40 +0000 | [diff] [blame] | 29 | # Force SMC Calling Convention 2 when using SPM |
| 30 | SMCCC_MAJOR_VERSION := 2 |
Antonio Nino Diaz | c41f206 | 2017-10-24 10:07:35 +0100 | [diff] [blame] | 31 | |
| 32 | # Let the top-level Makefile know that we intend to include a BL32 image |
| 33 | NEED_BL32 := yes |