diff options
| author | Kautuk Consul <[email protected]> | 2022-12-07 17:12:34 +0530 |
|---|---|---|
| committer | Leo Yu-Chi Liang <[email protected]> | 2022-12-08 15:15:22 +0800 |
| commit | 1c03ab9f4bdf19d1ac7afc157788bd0102ccd969 (patch) | |
| tree | 6ba8dbdc7c9742719cdf35452392d40470584de2 /include | |
| parent | 14f2d087a3d6347ba0ff7a7e9aaff6955e53e7a8 (diff) | |
lib: Add common semihosting library
We factor out the arch-independent parts of the ARM semihosting
implementation as a common library so that it can be shared
with RISC-V.
Signed-off-by: Kautuk Consul <[email protected]>
Reviewed-by: Leo Yu-Chi Liang <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/semihosting.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/semihosting.h b/include/semihosting.h index f1f73464e4f..4e844cbad87 100644 --- a/include/semihosting.h +++ b/include/semihosting.h @@ -17,6 +17,17 @@ #define SMH_T32_SVC 0xDFAB #define SMH_T32_HLT 0xBABC +/** + * smh_trap() - ARCH-specific semihosting call. + * + * Semihosting library/driver can use this function to do the + * actual semihosting calls. + * + * Return: Error code defined by semihosting spec. + */ + +long smh_trap(unsigned int sysnum, void *addr); + #if CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK) /** * semihosting_enabled() - Determine whether semihosting is supported |
