semihosting: Split out semihost_sys_open
[qemu/rayw.git] / include / semihosting / syscalls.h
blob991658bf79fee4f7601f15e6ec1eceb9e84c82ed
1 /*
2 * Syscall implementations for semihosting.
4 * Copyright (c) 2022 Linaro
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef SEMIHOSTING_SYSCALLS_H
10 #define SEMIHOSTING_SYSCALLS_H
13 * Argument loading from the guest is performed by the caller;
14 * results are returned via the 'complete' callback.
16 * String operands are in address/len pairs. The len argument may be 0
17 * (when the semihosting abi does not already provide the length),
18 * or non-zero (where it should include the terminating zero).
21 void semihost_sys_open(CPUState *cs, gdb_syscall_complete_cb complete,
22 target_ulong fname, target_ulong fname_len,
23 int gdb_flags, int mode);
25 #endif /* SEMIHOSTING_SYSCALLS_H */