diff options
author | Kautuk Consul <kconsul@ventanamicro.com> | 2022-12-07 17:12:34 +0530 |
---|---|---|
committer | Leo Yu-Chi Liang <ycliang@andestech.com> | 2022-12-08 15:15:22 +0800 |
commit | 1c03ab9f4bdf19d1ac7afc157788bd0102ccd969 (patch) | |
tree | 6ba8dbdc7c9742719cdf35452392d40470584de2 /include/semihosting.h | |
parent | 14f2d087a3d6347ba0ff7a7e9aaff6955e53e7a8 (diff) | |
download | u-boot-1c03ab9f4bdf19d1ac7afc157788bd0102ccd969.tar.gz |
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 <kconsul@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'include/semihosting.h')
-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 |