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 SMC_HANDLER_H |
| 7 | #define SMC_HANDLER_H |
| 8 | |
| 9 | #include <smc.h> |
| 10 | |
| 11 | unsigned long smc_version(void); |
| 12 | |
| 13 | void smc_read_feature_register(unsigned long index, |
| 14 | struct smc_result *ret_struct); |
| 15 | |
AlexeiFedorov | ac923c8 | 2023-04-06 15:12:04 +0100 | [diff] [blame] | 16 | unsigned long smc_data_create(unsigned long rd_addr, |
| 17 | unsigned long data_addr, |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 18 | unsigned long map_addr, |
| 19 | unsigned long src_addr, |
| 20 | unsigned long flags); |
| 21 | |
AlexeiFedorov | ac923c8 | 2023-04-06 15:12:04 +0100 | [diff] [blame] | 22 | unsigned long smc_data_create_unknown(unsigned long rd_addr, |
| 23 | unsigned long data_addr, |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 24 | unsigned long map_addr); |
| 25 | |
AlexeiFedorov | e2002be | 2023-04-19 17:20:12 +0100 | [diff] [blame] | 26 | void smc_data_destroy(unsigned long rd_addr, |
| 27 | unsigned long map_addr, |
| 28 | struct smc_result *ret_struct); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 29 | |
| 30 | unsigned long smc_granule_delegate(unsigned long addr); |
| 31 | |
| 32 | unsigned long smc_granule_undelegate(unsigned long addr); |
| 33 | |
| 34 | unsigned long smc_realm_activate(unsigned long rd_addr); |
| 35 | |
| 36 | unsigned long smc_realm_create(unsigned long rd_addr, |
AlexeiFedorov | e2002be | 2023-04-19 17:20:12 +0100 | [diff] [blame] | 37 | unsigned long realm_params_addr); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 38 | |
| 39 | unsigned long smc_realm_destroy(unsigned long rd_addr); |
| 40 | |
AlexeiFedorov | ac923c8 | 2023-04-06 15:12:04 +0100 | [diff] [blame] | 41 | unsigned long smc_rec_create(unsigned long rd_addr, |
| 42 | unsigned long rec_addr, |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 43 | unsigned long rec_params_addr); |
| 44 | |
| 45 | unsigned long smc_rec_destroy(unsigned long rec_addr); |
| 46 | |
| 47 | unsigned long smc_rec_enter(unsigned long rec_addr, |
| 48 | unsigned long rec_run_addr); |
| 49 | |
| 50 | void smc_rec_aux_count(unsigned long rd_addr, |
| 51 | struct smc_result *ret_struct); |
| 52 | |
AlexeiFedorov | ac923c8 | 2023-04-06 15:12:04 +0100 | [diff] [blame] | 53 | unsigned long smc_rtt_create(unsigned long rd_addr, |
| 54 | unsigned long rtt_addr, |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 55 | unsigned long map_addr, |
| 56 | unsigned long ulevel); |
| 57 | |
AlexeiFedorov | e2002be | 2023-04-19 17:20:12 +0100 | [diff] [blame] | 58 | void smc_rtt_destroy(unsigned long rd_addr, |
| 59 | unsigned long map_addr, |
| 60 | unsigned long ulevel, |
| 61 | struct smc_result *ret_struct); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 62 | |
AlexeiFedorov | e2002be | 2023-04-19 17:20:12 +0100 | [diff] [blame] | 63 | void smc_rtt_fold(unsigned long rd_addr, |
| 64 | unsigned long map_addr, |
| 65 | unsigned long ulevel, |
| 66 | struct smc_result *ret_struct); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 67 | |
| 68 | unsigned long smc_rtt_map_unprotected(unsigned long rd_addr, |
| 69 | unsigned long map_addr, |
| 70 | unsigned long ulevel, |
| 71 | unsigned long s2tte); |
| 72 | |
AlexeiFedorov | 917eabf | 2023-04-24 12:20:41 +0100 | [diff] [blame^] | 73 | void smc_rtt_unmap_unprotected(unsigned long rd_addr, |
| 74 | unsigned long map_addr, |
| 75 | unsigned long ulevel, |
| 76 | struct smc_result *res); |
Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame] | 77 | |
| 78 | void smc_rtt_read_entry(unsigned long rd_addr, |
| 79 | unsigned long map_addr, |
| 80 | unsigned long ulevel, |
| 81 | struct smc_result *ret_struct); |
| 82 | |
| 83 | unsigned long smc_psci_complete(unsigned long calling_rec_addr, |
| 84 | unsigned long target_rec_addr); |
| 85 | |
| 86 | unsigned long smc_rtt_init_ripas(unsigned long rd_addr, |
| 87 | unsigned long map_addr, |
| 88 | unsigned long ulevel); |
| 89 | |
| 90 | unsigned long smc_rtt_set_ripas(unsigned long rd_addr, |
| 91 | unsigned long rec_addr, |
| 92 | unsigned long map_addr, |
| 93 | unsigned long ulevel, |
| 94 | unsigned long uripas); |
| 95 | |
| 96 | |
| 97 | #endif /* SMC_HANDLER_H */ |