diff options
author | Nishant Sharma <nishant.sharma@arm.com> | 2022-03-25 23:03:31 +0000 |
---|---|---|
committer | Nishant Sharma <nishant.sharma@arm.com> | 2023-10-12 10:34:50 +0100 |
commit | 1132f0688515efc017d7fcf702a164ddf1ed46a6 (patch) | |
tree | 66780889d7a8d1d07682c0c2a4757aabd00663a4 | |
parent | 3312fe8387b9379f6aefe8e075baa28802108244 (diff) |
refactor(spm-mm): reorganize secure partition manager shim code
In preparation for adding the support for SEL0 SP in EL3 SPMC,
restructure the existing SPM_MM shim code in a way that allows reuse
of the code for both SPM_MM interface and FF-A EL3 SPMC interface. The
code for changing exception levels is identical for both.
With this restructuring of the code, the shim exception code is moved to
the common sub-directory.
Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: Iadda9cf73f12b56e6a1d31fc21b5ba5dc355867f
-rw-r--r-- | services/std_svc/spm/common/aarch64/spm_shim_exceptions.S (renamed from services/std_svc/spm/spm_mm/aarch64/spm_mm_shim_exceptions.S) | 0 | ||||
-rw-r--r-- | services/std_svc/spm/common/include/spm_shim_private.h (renamed from services/std_svc/spm/spm_mm/spm_mm_shim_private.h) | 8 | ||||
-rw-r--r-- | services/std_svc/spm/common/spm.mk | 7 | ||||
-rw-r--r-- | services/std_svc/spm/spm_mm/spm_mm.mk | 1 | ||||
-rw-r--r-- | services/std_svc/spm/spm_mm/spm_mm_setup.c | 4 | ||||
-rw-r--r-- | services/std_svc/spm/spm_mm/spm_mm_xlat.c | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/services/std_svc/spm/spm_mm/aarch64/spm_mm_shim_exceptions.S b/services/std_svc/spm/common/aarch64/spm_shim_exceptions.S index 836f75c8d..836f75c8d 100644 --- a/services/std_svc/spm/spm_mm/aarch64/spm_mm_shim_exceptions.S +++ b/services/std_svc/spm/common/aarch64/spm_shim_exceptions.S diff --git a/services/std_svc/spm/spm_mm/spm_mm_shim_private.h b/services/std_svc/spm/common/include/spm_shim_private.h index f69c748ad..bcb11476e 100644 --- a/services/std_svc/spm/spm_mm/spm_mm_shim_private.h +++ b/services/std_svc/spm/common/include/spm_shim_private.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef SPM_MM_SHIM_PRIVATE_H -#define SPM_MM_SHIM_PRIVATE_H +#ifndef SPM_SHIM_PRIVATE_H +#define SPM_SHIM_PRIVATE_H #include <stdint.h> @@ -23,4 +23,4 @@ IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_END__, SPM_SHIM_EXCEPTIONS_END); #define SPM_SHIM_EXCEPTIONS_SIZE \ (SPM_SHIM_EXCEPTIONS_END - SPM_SHIM_EXCEPTIONS_START) -#endif /* SPM_MM_SHIM_PRIVATE_H */ +#endif /* SPM_SHIM_PRIVATE_H */ diff --git a/services/std_svc/spm/common/spm.mk b/services/std_svc/spm/common/spm.mk index 9aa96be3f..94912407e 100644 --- a/services/std_svc/spm/common/spm.mk +++ b/services/std_svc/spm/common/spm.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2022-2023, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -10,8 +10,9 @@ endif INCLUDES += -Iservices/std_svc/spm/common/include -SPM_SOURCES := $(addprefix services/std_svc/spm/common/,\ - ${ARCH}/spm_helpers.S) +SPM_SOURCES := $(addprefix services/std_svc/spm/common/, \ + ${ARCH}/spm_helpers.S \ + ${ARCH}/spm_shim_exceptions.S) # Let the top-level Makefile know that we intend to include a BL32 image NEED_BL32 := yes diff --git a/services/std_svc/spm/spm_mm/spm_mm.mk b/services/std_svc/spm/spm_mm/spm_mm.mk index 513e8ef96..cbc794020 100644 --- a/services/std_svc/spm/spm_mm/spm_mm.mk +++ b/services/std_svc/spm/spm_mm/spm_mm.mk @@ -21,7 +21,6 @@ ifeq (${CTX_INCLUDE_FPREGS},0) endif SPM_MM_SOURCES := $(addprefix services/std_svc/spm/spm_mm/, \ - ${ARCH}/spm_mm_shim_exceptions.S \ spm_mm_main.c \ spm_mm_setup.c \ spm_mm_xlat.c) diff --git a/services/std_svc/spm/spm_mm/spm_mm_setup.c b/services/std_svc/spm/spm_mm/spm_mm_setup.c index 04dc21291..4e65c9cb1 100644 --- a/services/std_svc/spm/spm_mm/spm_mm_setup.c +++ b/services/std_svc/spm/spm_mm/spm_mm_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2021, NVIDIA Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -21,7 +21,7 @@ #include "spm_common.h" #include "spm_mm_private.h" -#include "spm_mm_shim_private.h" +#include "spm_shim_private.h" /* Setup context of the Secure Partition */ void spm_sp_setup(sp_context_t *sp_ctx) diff --git a/services/std_svc/spm/spm_mm/spm_mm_xlat.c b/services/std_svc/spm/spm_mm/spm_mm_xlat.c index b1ca55ae3..858ca1b00 100644 --- a/services/std_svc/spm/spm_mm/spm_mm_xlat.c +++ b/services/std_svc/spm/spm_mm/spm_mm_xlat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -15,7 +15,7 @@ #include <services/spm_mm_svc.h> #include "spm_mm_private.h" -#include "spm_mm_shim_private.h" +#include "spm_shim_private.h" /* Place translation tables by default along with the ones used by BL31. */ #ifndef PLAT_SP_IMAGE_XLAT_SECTION_NAME |