semihosting: Add GuestFDConsole
commit008e147572863a7a54c54403e626aaed3e50574f
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 1 May 2022 20:11:45 +0000 (1 13:11 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 27 Jun 2022 23:06:30 +0000 (28 04:36 +0530)
treeaf60fe601e194d14360d832c6aa5a0c15fe848e8
parentcd66f20f614bb492e4e5be11e4b65d58b4a046ca
semihosting: Add GuestFDConsole

Add a GuestFDType for connecting to the semihosting console.
Hook up to read, write, isatty, and fstat syscalls.

Note that the arm-specific syscall flen cannot be applied
to the console, because the console is not a descriptor
exposed to the guest.

Reviewed-by: Luc Michel <lmichel@kalray.eu>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/semihosting/guestfd.h
semihosting/syscalls.c