xref: /rk3399_ARM-atf/include/lib/extensions/sys_reg_trace.h (revision 4d0b66323b242323ff738431c523aeb6d18dd3d5)
1 /*
2  * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef SYS_REG_TRACE_H
8 #define SYS_REG_TRACE_H
9 
10 #include <context.h>
11 
12 #if ENABLE_SYS_REG_TRACE_FOR_NS
13 
14 #if __aarch64__
15 void sys_reg_trace_enable(cpu_context_t *context);
16 void sys_reg_trace_init_el2_unused(void);
17 #else
18 void sys_reg_trace_init_el3(void);
19 #endif /* __aarch64__ */
20 
21 #else /* !ENABLE_SYS_REG_TRACE_FOR_NS */
22 
23 #if __aarch64__
24 static inline void sys_reg_trace_enable(cpu_context_t *context)
25 {
26 }
27 static inline void sys_reg_trace_disable(cpu_context_t *context)
28 {
29 }
30 static inline void sys_reg_trace_init_el2_unused(void)
31 {
32 }
33 #else
34 static inline void sys_reg_trace_init_el3(void)
35 {
36 }
37 #endif /* __aarch64__ */
38 
39 #endif /* ENABLE_SYS_REG_TRACE_FOR_NS */
40 
41 #endif /* SYS_REG_TRACE_H */
42