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>
This commit is contained in:
Richard Henderson
2022-05-01 13:11:45 -07:00
parent cd66f20f61
commit 008e147572
2 changed files with 72 additions and 3 deletions

View File

@@ -13,9 +13,10 @@
typedef enum GuestFDType {
GuestFDUnused = 0,
GuestFDHost = 1,
GuestFDGDB = 2,
GuestFDStatic = 3,
GuestFDHost,
GuestFDGDB,
GuestFDStatic,
GuestFDConsole,
} GuestFDType;
/*