mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2024-12-13 13:15:39 +00:00
1a853370ff
This patch adds a new build option, ENABLE_SVE_FOR_NS, which when set to one EL3 will check to see if the Scalable Vector Extension (SVE) is implemented when entering and exiting the Non-secure world. If SVE is implemented, EL3 will do the following: - Entry to Non-secure world: SIMD, FP and SVE functionality is enabled. - Exit from Non-secure world: SIMD, FP and SVE functionality is disabled. As SIMD and FP registers are part of the SVE Z-registers then any use of SIMD / FP functionality would corrupt the SVE registers. The build option default is 1. The SVE functionality is only supported on AArch64 and so the build option is set to zero when the target archiecture is AArch32. This build option is not compatible with the CTX_INCLUDE_FPREGS - an assert will be raised on platforms where SVE is implemented and both ENABLE_SVE_FOR_NS and CTX_INCLUDE_FPREGS are set to 1. Also note this change prevents secure world use of FP&SIMD registers on SVE-enabled platforms. Existing Secure-EL1 Payloads will not work on such platforms unless ENABLE_SVE_FOR_NS is set to 0. Additionally, on the first entry into the Non-secure world the SVE functionality is enabled and the SVE Z-register length is set to the maximum size allowed by the architecture. This includes the use case where EL2 is implemented but not used. Change-Id: Ie2d733ddaba0b9bef1d7c9765503155188fe7dae Signed-off-by: David Cunado <david.cunado@arm.com>
76 lines
2.0 KiB
Makefile
76 lines
2.0 KiB
Makefile
#
|
|
# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
################################################################################
|
|
# Include SPM Makefile
|
|
################################################################################
|
|
ifeq (${ENABLE_SPM},1)
|
|
$(info Including SPM makefile)
|
|
include services/std_svc/spm/spm.mk
|
|
endif
|
|
|
|
|
|
include lib/psci/psci_lib.mk
|
|
|
|
BL31_SOURCES += bl31/bl31_main.c \
|
|
bl31/interrupt_mgmt.c \
|
|
bl31/aarch64/bl31_entrypoint.S \
|
|
bl31/aarch64/runtime_exceptions.S \
|
|
bl31/aarch64/crash_reporting.S \
|
|
bl31/bl31_context_mgmt.c \
|
|
common/runtime_svc.c \
|
|
plat/common/aarch64/platform_mp_stack.S \
|
|
services/std_svc/std_svc_setup.c \
|
|
${PSCI_LIB_SOURCES} \
|
|
${SPM_SOURCES} \
|
|
|
|
|
|
ifeq (${ENABLE_PMF}, 1)
|
|
BL31_SOURCES += lib/pmf/pmf_main.c
|
|
endif
|
|
|
|
ifeq (${EL3_EXCEPTION_HANDLING},1)
|
|
BL31_SOURCES += bl31/ehf.c
|
|
endif
|
|
|
|
ifeq (${SDEI_SUPPORT},1)
|
|
ifeq (${EL3_EXCEPTION_HANDLING},0)
|
|
$(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support)
|
|
endif
|
|
BL31_SOURCES += services/std_svc/sdei/sdei_event.c \
|
|
services/std_svc/sdei/sdei_intr_mgmt.c \
|
|
services/std_svc/sdei/sdei_main.c \
|
|
services/std_svc/sdei/sdei_state.c
|
|
endif
|
|
|
|
ifeq (${ENABLE_SPE_FOR_LOWER_ELS},1)
|
|
BL31_SOURCES += lib/extensions/spe/spe.c
|
|
endif
|
|
|
|
ifeq (${ENABLE_AMU},1)
|
|
BL31_SOURCES += lib/extensions/amu/aarch64/amu.c
|
|
endif
|
|
|
|
ifeq (${ENABLE_SVE_FOR_NS},1)
|
|
BL31_SOURCES += lib/extensions/sve/sve.c
|
|
endif
|
|
|
|
BL31_LINKERFILE := bl31/bl31.ld.S
|
|
|
|
# Flag used to indicate if Crash reporting via console should be included
|
|
# in BL31. This defaults to being present in DEBUG builds only
|
|
ifndef CRASH_REPORTING
|
|
CRASH_REPORTING := $(DEBUG)
|
|
endif
|
|
|
|
$(eval $(call assert_boolean,CRASH_REPORTING))
|
|
$(eval $(call assert_boolean,EL3_EXCEPTION_HANDLING))
|
|
$(eval $(call assert_boolean,SDEI_SUPPORT))
|
|
|
|
$(eval $(call add_define,CRASH_REPORTING))
|
|
$(eval $(call add_define,EL3_EXCEPTION_HANDLING))
|
|
$(eval $(call add_define,SDEI_SUPPORT))
|