blob: d9f7f1b92ef25aa92201cf00cd4cbb7d5ca55b9a [file] [log] [blame]
Manish V Badarkhef356f7e2021-06-29 11:44:20 +01001/*
Boyan Karatotev6468d4a2023-02-16 15:12:45 +00002 * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
Manish V Badarkhef356f7e2021-06-29 11:44:20 +01003 *
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
Andre Przywara44e33e02022-11-17 16:42:09 +000012#if ENABLE_SYS_REG_TRACE_FOR_NS
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000013
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010014#if __aarch64__
15void sys_reg_trace_enable(cpu_context_t *context);
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000016void sys_reg_trace_init_el2_unused(void);
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010017#else
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000018void sys_reg_trace_init_el3(void);
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010019#endif /* __aarch64__ */
20
Andre Przywara44e33e02022-11-17 16:42:09 +000021#else /* !ENABLE_SYS_REG_TRACE_FOR_NS */
22
23#if __aarch64__
24static inline void sys_reg_trace_enable(cpu_context_t *context)
25{
26}
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000027static inline void sys_reg_trace_disable(cpu_context_t *context)
28{
29}
30static inline void sys_reg_trace_init_el2_unused(void)
31{
32}
Andre Przywara44e33e02022-11-17 16:42:09 +000033#else
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000034static inline void sys_reg_trace_init_el3(void)
Andre Przywara44e33e02022-11-17 16:42:09 +000035{
36}
37#endif /* __aarch64__ */
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000038
Andre Przywara44e33e02022-11-17 16:42:09 +000039#endif /* ENABLE_SYS_REG_TRACE_FOR_NS */
40
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010041#endif /* SYS_REG_TRACE_H */