blob: 700426717826a5efa1d5d6960f5ee4f2a2d9b02e [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__
Elizabeth Ho4fc00d22023-07-18 14:10:25 +010015void sys_reg_trace_enable_per_world(per_world_context_t *per_world_ctx);
16void sys_reg_trace_disable_per_world(per_world_context_t *per_world_ctx);
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__
Elizabeth Ho4fc00d22023-07-18 14:10:25 +010025static inline void sys_reg_trace_enable_per_world(per_world_context_t *per_world_ctx)
Andre Przywara44e33e02022-11-17 16:42:09 +000026{
27}
Elizabeth Ho4fc00d22023-07-18 14:10:25 +010028static inline void sys_reg_trace_disable_per_world(per_world_context_t *per_world_ctx)
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000029{
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 */