mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 11:34:20 +00:00

These bits (MDCR_EL3.{NSTB, NSTBE, TTRF, TPM}, CPTR_EL3.TTA) only affect EL2 (and lower) execution. Each feat_init_el3() is called long before any lower EL has had a chance to execute, so setting the bits at reset is redundant. Removing them from reset code also improves readability of the immutable EL3 state. Preserve the original intention for the TTA bit of "enabled for NS and disabled everywhere else" (inferred from commit messagesd4582d3088
and2031d6166a
and the comment). This is because CPTR_EL3 will be contexted and so everyone will eventually get whatever NS has anyway. Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I3d24b45d3ea80882c8e450b2d9db9d5531facec1
42 lines
855 B
C
42 lines
855 B
C
/*
|
|
* Copyright (c) 2021-2023, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef SYS_REG_TRACE_H
|
|
#define SYS_REG_TRACE_H
|
|
|
|
#include <context.h>
|
|
|
|
#if ENABLE_SYS_REG_TRACE_FOR_NS
|
|
|
|
#if __aarch64__
|
|
void sys_reg_trace_enable(cpu_context_t *context);
|
|
void sys_reg_trace_disable(cpu_context_t *context);
|
|
void sys_reg_trace_init_el2_unused(void);
|
|
#else
|
|
void sys_reg_trace_init_el3(void);
|
|
#endif /* __aarch64__ */
|
|
|
|
#else /* !ENABLE_SYS_REG_TRACE_FOR_NS */
|
|
|
|
#if __aarch64__
|
|
static inline void sys_reg_trace_enable(cpu_context_t *context)
|
|
{
|
|
}
|
|
static inline void sys_reg_trace_disable(cpu_context_t *context)
|
|
{
|
|
}
|
|
static inline void sys_reg_trace_init_el2_unused(void)
|
|
{
|
|
}
|
|
#else
|
|
static inline void sys_reg_trace_init_el3(void)
|
|
{
|
|
}
|
|
#endif /* __aarch64__ */
|
|
|
|
#endif /* ENABLE_SYS_REG_TRACE_FOR_NS */
|
|
|
|
#endif /* SYS_REG_TRACE_H */
|