Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 1 | /* |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 2 | * Copyright (c) 2021-2023, Arm Limited. All rights reserved. |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 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 | |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 12 | #if ENABLE_SYS_REG_TRACE_FOR_NS |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 13 | |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 14 | #if __aarch64__ |
| 15 | void sys_reg_trace_enable(cpu_context_t *context); |
Boyan Karatotev | 919d3c8 | 2023-02-13 16:32:47 +0000 | [diff] [blame] | 16 | void sys_reg_trace_disable(cpu_context_t *context); |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 17 | void sys_reg_trace_init_el2_unused(void); |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 18 | #else |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 19 | void sys_reg_trace_init_el3(void); |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 20 | #endif /* __aarch64__ */ |
| 21 | |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 22 | #else /* !ENABLE_SYS_REG_TRACE_FOR_NS */ |
| 23 | |
| 24 | #if __aarch64__ |
| 25 | static inline void sys_reg_trace_enable(cpu_context_t *context) |
| 26 | { |
| 27 | } |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 28 | static inline void sys_reg_trace_disable(cpu_context_t *context) |
| 29 | { |
| 30 | } |
| 31 | static inline void sys_reg_trace_init_el2_unused(void) |
| 32 | { |
| 33 | } |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 34 | #else |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 35 | static inline void sys_reg_trace_init_el3(void) |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 36 | { |
| 37 | } |
| 38 | #endif /* __aarch64__ */ |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 39 | |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 40 | #endif /* ENABLE_SYS_REG_TRACE_FOR_NS */ |
| 41 | |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 42 | #endif /* SYS_REG_TRACE_H */ |