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 | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 16 | void sys_reg_trace_init_el2_unused(void); |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 17 | #else |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 18 | void sys_reg_trace_init_el3(void); |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 19 | #endif /* __aarch64__ */ |
| 20 | |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 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 | } |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 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 | } |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 33 | #else |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 34 | static inline void sys_reg_trace_init_el3(void) |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 35 | { |
| 36 | } |
| 37 | #endif /* __aarch64__ */ |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 38 | |
Andre Przywara | 44e33e0 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 39 | #endif /* ENABLE_SYS_REG_TRACE_FOR_NS */ |
| 40 | |
Manish V Badarkhe | f356f7e | 2021-06-29 11:44:20 +0100 | [diff] [blame] | 41 | #endif /* SYS_REG_TRACE_H */ |