blob: beda88a465191b3a474b11b267c3da58fb6152d4 [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 Karatotev919d3c82023-02-13 16:32:47 +000016void sys_reg_trace_disable(cpu_context_t *context);
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000017void sys_reg_trace_init_el2_unused(void);
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010018#else
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000019void sys_reg_trace_init_el3(void);
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010020#endif /* __aarch64__ */
21
Andre Przywara44e33e02022-11-17 16:42:09 +000022#else /* !ENABLE_SYS_REG_TRACE_FOR_NS */
23
24#if __aarch64__
25static inline void sys_reg_trace_enable(cpu_context_t *context)
26{
27}
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000028static inline void sys_reg_trace_disable(cpu_context_t *context)
29{
30}
31static inline void sys_reg_trace_init_el2_unused(void)
32{
33}
Andre Przywara44e33e02022-11-17 16:42:09 +000034#else
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000035static inline void sys_reg_trace_init_el3(void)
Andre Przywara44e33e02022-11-17 16:42:09 +000036{
37}
38#endif /* __aarch64__ */
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000039
Andre Przywara44e33e02022-11-17 16:42:09 +000040#endif /* ENABLE_SYS_REG_TRACE_FOR_NS */
41
Manish V Badarkhef356f7e2021-06-29 11:44:20 +010042#endif /* SYS_REG_TRACE_H */