aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-28 11:49:47 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-06-28 04:35:52 +0530
commitaa915bd0a67d6c0a214b45372ed841521c5cd07a (patch)
treeb0269554631c6f481a823fdd6e55db0a1542aa0c /include
parentaf0484b5025f8b7c951428a00b5bb3f172a2da8d (diff)
downloadqemu-aa915bd0a67d6c0a214b45372ed841521c5cd07a.zip
qemu-aa915bd0a67d6c0a214b45372ed841521c5cd07a.tar.gz
qemu-aa915bd0a67d6c0a214b45372ed841521c5cd07a.tar.bz2
semihosting: Split out semihost_sys_write
Split out the non-ARM specific portions of SYS_WRITE to a reusable function. This handles all GuestFD. This removes the last use of common_semi_syscall_len. Note that gdb_do_syscall %x reads target_ulong, not int. Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/semihosting/syscalls.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/semihosting/syscalls.h b/include/semihosting/syscalls.h
index 20da813..2464467 100644
--- a/include/semihosting/syscalls.h
+++ b/include/semihosting/syscalls.h
@@ -33,4 +33,10 @@ void semihost_sys_read(CPUState *cs, gdb_syscall_complete_cb complete,
void semihost_sys_read_gf(CPUState *cs, gdb_syscall_complete_cb complete,
GuestFD *gf, target_ulong buf, target_ulong len);
+void semihost_sys_write(CPUState *cs, gdb_syscall_complete_cb complete,
+ int fd, target_ulong buf, target_ulong len);
+
+void semihost_sys_write_gf(CPUState *cs, gdb_syscall_complete_cb complete,
+ GuestFD *gf, target_ulong buf, target_ulong len);
+
#endif /* SEMIHOSTING_SYSCALLS_H */