mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
fix(cm): hide cm_init_context_by_index
from BL1
BL1 requires the context management library but does not use or implement `cm_init_context_by_index`. This change ensures that is not compiled into BL1, as linking with LTO enabled causes an undefined reference for this function. Change-Id: I4a4602843bd75bc4f47b3e0c4c5a6efce1514ef6 Signed-off-by: Chris Kay <chris.kay@arm.com>
This commit is contained in:
parent
e40b563e87
commit
a6b3643c2a
3 changed files with 11 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue