mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 18:41:22 +00:00
feat(sys_reg_trace): enable trace system registers access from lower NS ELs
Introduced a build flag 'ENABLE_SYS_REG_TRACE_FOR_NS' to enable trace system registers access in NS-EL2, or NS-EL1 (when NS-EL2 is implemented but unused). Change-Id: Idc1acede4186e101758cbf7bed5af7b634d7d18d Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
This commit is contained in:
parent
2031d6166a
commit
d4582d3088
11 changed files with 124 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <context.h>
|
||||
#include <lib/el3_runtime/context_mgmt.h>
|
||||
#include <lib/extensions/amu.h>
|
||||
#include <lib/extensions/sys_reg_trace.h>
|
||||
#include <lib/utils.h>
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -136,6 +137,10 @@ static void enable_extensions_nonsecure(bool el2_unused)
|
|||
#if ENABLE_AMU
|
||||
amu_enable(el2_unused);
|
||||
#endif
|
||||
|
||||
#if ENABLE_SYS_REG_TRACE_FOR_NS
|
||||
sys_reg_trace_enable();
|
||||
#endif /* ENABLE_SYS_REG_TRACE_FOR_NS */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <lib/extensions/mpam.h>
|
||||
#include <lib/extensions/spe.h>
|
||||
#include <lib/extensions/sve.h>
|
||||
#include <lib/extensions/sys_reg_trace.h>
|
||||
#include <lib/extensions/trbe.h>
|
||||
#include <lib/extensions/twed.h>
|
||||
#include <lib/utils.h>
|
||||
|
@ -354,6 +355,10 @@ static void enable_extensions_nonsecure(bool el2_unused, cpu_context_t *ctx)
|
|||
trbe_enable();
|
||||
#endif /* ENABLE_TRBE_FOR_NS */
|
||||
|
||||
#if ENABLE_SYS_REG_TRACE_FOR_NS
|
||||
sys_reg_trace_enable(ctx);
|
||||
#endif /* ENABLE_SYS_REG_TRACE_FOR_NS */
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -463,6 +468,8 @@ void cm_prepare_el3_exit(uint32_t security_state)
|
|||
* CPTR_EL2.TTA: Set to zero so that Non-secure System
|
||||
* register accesses to the trace registers from both
|
||||
* Execution states do not trap to EL2.
|
||||
* If PE trace unit System registers are not implemented
|
||||
* then this bit is reserved, and must be set to zero.
|
||||
*
|
||||
* CPTR_EL2.TFP: Set to zero so that Non-secure accesses
|
||||
* to SIMD and floating-point functionality from both
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue