semihosting: Split out guestfd.c

In arm-compat-semi.c, we have more advanced treatment of
guest file descriptors than we do in other implementations.
Split out GuestFD and related functions to a new file so
that they can be shared.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson
2022-04-27 21:38:02 -07:00
parent 3d5e2b4f26
commit 1c6ff7205b
10 changed files with 233 additions and 142 deletions

View File

@ -1,3 +1,7 @@
specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files(
'guestfd.c',
))
specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SOFTMMU'], if_true: files(
'config.c',
'console.c',