Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 1 | /* |
| 2 | * SPDX-License-Identifier: BSD-3-Clause |
| 3 | * SPDX-FileCopyrightText: Copyright TF-RMM Contributors. |
| 4 | */ |
| 5 | |
| 6 | #ifndef RUN_H |
| 7 | #define RUN_H |
| 8 | |
Arunachalam Ganapathy | f649121 | 2023-02-23 16:04:34 +0000 | [diff] [blame] | 9 | struct rec; |
| 10 | |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 11 | /* |
| 12 | * Function to enter Realm with `regs` pointing to GP Regs to be |
| 13 | * restored/saved when entering/exiting the Realm. This function |
| 14 | * returns with the Realm exception code which is populated by |
| 15 | * Realm_exit() on aarch64. |
| 16 | */ |
| 17 | int run_realm(unsigned long *regs); |
| 18 | |
Arunachalam Ganapathy | f649121 | 2023-02-23 16:04:34 +0000 | [diff] [blame] | 19 | /* |
| 20 | * Configure CPTR_EL2 register to not trap FPU or SVE access for Realm and |
| 21 | * restore the saved SIMD state from memory to registers. |
| 22 | */ |
| 23 | void rec_simd_enable_restore(struct rec *rec); |
| 24 | |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 25 | #endif /* RUN_H */ |