blob: 513e8ef96284a0bf4462524fe6aa5b31b88abceb [file] [log] [blame]
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +00001#
Jayanth Dodderi Chidanand605419a2023-03-06 23:56:14 +00002# Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved.
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +00003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7ifneq (${SPD},none)
Paul Beesley72f9ec62019-10-15 14:20:34 +00008 $(error "Error: SPD and SPM_MM are incompatible build options.")
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +00009endif
10ifneq (${ARCH},aarch64)
Paul Beesley72f9ec62019-10-15 14:20:34 +000011 $(error "Error: SPM_MM is only supported on aarch64.")
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +000012endif
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000013ifneq (${ENABLE_SVE_FOR_NS},0)
Manish Pandey247e5c32021-11-15 15:29:08 +000014 $(error "Error: SPM_MM is not compatible with ENABLE_SVE_FOR_NS")
15endif
Jayanth Dodderi Chidanand605419a2023-03-06 23:56:14 +000016ifneq (${ENABLE_SME_FOR_NS},0)
Manish Pandey247e5c32021-11-15 15:29:08 +000017 $(error "Error: SPM_MM is not compatible with ENABLE_SME_FOR_NS")
18endif
Nishant Sharma9c393522022-04-19 10:16:48 +010019ifeq (${CTX_INCLUDE_FPREGS},0)
20 $(warning "Warning: SPM_MM: CTX_INCLUDE_FPREGS is set to 0")
21endif
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +000022
Marc Bonnici758bd242021-12-19 21:37:50 +000023SPM_MM_SOURCES := $(addprefix services/std_svc/spm/spm_mm/, \
Paul Beesley49cabec2019-10-15 16:14:14 +000024 ${ARCH}/spm_mm_shim_exceptions.S \
Marc Bonnici758bd242021-12-19 21:37:50 +000025 spm_mm_main.c \
26 spm_mm_setup.c \
Paul Beesleye449d6a2019-10-15 16:13:10 +000027 spm_mm_xlat.c)
Antonio Nino Diaz8cd7ea32018-10-30 11:08:08 +000028
29
30# Let the top-level Makefile know that we intend to include a BL32 image
31NEED_BL32 := yes
Ard Biesheuvel923cd772019-01-01 11:01:41 +010032
33# required so that SPM code executing at S-EL0 can access the timer registers
34NS_TIMER_SWITCH := 1