diff --git a/include/lib/el3_runtime/context_mgmt.h b/include/lib/el3_runtime/context_mgmt.h index f631125f0..7451b8580 100644 --- a/include/lib/el3_runtime/context_mgmt.h +++ b/include/lib/el3_runtime/context_mgmt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -30,12 +30,15 @@ void cm_set_context_by_index(unsigned int cpu_idx, void *cm_get_context(uint32_t security_state); void cm_set_context(void *context, uint32_t security_state); void cm_init_my_context(const struct entry_point_info *ep); -void cm_init_context_by_index(unsigned int cpu_idx, - const struct entry_point_info *ep); void cm_setup_context(cpu_context_t *ctx, const struct entry_point_info *ep); void cm_prepare_el3_exit(uint32_t security_state); void cm_prepare_el3_exit_ns(void); +#if !IMAGE_BL1 +void cm_init_context_by_index(unsigned int cpu_idx, + const struct entry_point_info *ep); +#endif /* !IMAGE_BL1 */ + #ifdef __aarch64__ #if IMAGE_BL31 void cm_manage_extensions_el3(void); diff --git a/lib/el3_runtime/aarch32/context_mgmt.c b/lib/el3_runtime/aarch32/context_mgmt.c index b60b8e0f0..e96156d16 100644 --- a/lib/el3_runtime/aarch32/context_mgmt.c +++ b/lib/el3_runtime/aarch32/context_mgmt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -157,6 +157,7 @@ static void enable_extensions_nonsecure(bool el2_unused) #endif /* IMAGE_BL32 */ } +#if !IMAGE_BL1 /******************************************************************************* * The following function initializes the cpu_context for a CPU specified by * its `cpu_idx` for first use, and sets the initial entrypoint state as @@ -169,6 +170,7 @@ void cm_init_context_by_index(unsigned int cpu_idx, ctx = cm_get_context_by_index(cpu_idx, GET_SECURITY_STATE(ep->h.attr)); cm_setup_context(ctx, ep); } +#endif /* !IMAGE_BL1 */ /******************************************************************************* * The following function initializes the cpu_context for the current CPU diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c index 39f39476f..6d9886040 100644 --- a/lib/el3_runtime/aarch64/context_mgmt.c +++ b/lib/el3_runtime/aarch64/context_mgmt.c @@ -809,6 +809,7 @@ static void manage_extensions_secure(cpu_context_t *ctx) #endif /* IMAGE_BL31 */ } +#if !IMAGE_BL1 /******************************************************************************* * The following function initializes the cpu_context for a CPU specified by * its `cpu_idx` for first use, and sets the initial entrypoint state as @@ -821,6 +822,7 @@ void cm_init_context_by_index(unsigned int cpu_idx, ctx = cm_get_context_by_index(cpu_idx, GET_SECURITY_STATE(ep->h.attr)); cm_setup_context(ctx, ep); } +#endif /* !IMAGE_BL1 */ /******************************************************************************* * The following function initializes the cpu_context for the current CPU