summary refs log tree commit diff stats
path: root/include/semihosting/guestfd.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-05-01 17:21:00 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-06-28 04:36:50 +0530
commite4a4aaa51b4c71914a6f30ca504ab78e8f695aee (patch)
treeb36e1de06b9d0165a59f06d284808ef546e725eb /include/semihosting/guestfd.h
parent008e147572863a7a54c54403e626aaed3e50574f (diff)
downloadfocaccia-qemu-e4a4aaa51b4c71914a6f30ca504ab78e8f695aee.tar.gz
focaccia-qemu-e4a4aaa51b4c71914a6f30ca504ab78e8f695aee.zip
semihosting: Create qemu_semihosting_guestfd_init
For arm-compat, initialize console_{in,out}_gf;
otherwise, initialize stdio file descriptors.

This will go some way to cleaning up arm-compat, and
will allow other semihosting to use normal stdio.

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>
Diffstat (limited to 'include/semihosting/guestfd.h')
-rw-r--r--include/semihosting/guestfd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/semihosting/guestfd.h b/include/semihosting/guestfd.h
index a7ea1041ea..3d426fedab 100644
--- a/include/semihosting/guestfd.h
+++ b/include/semihosting/guestfd.h
@@ -35,6 +35,13 @@ typedef struct GuestFD {
     };
 } GuestFD;
 
+/*
+ * For ARM semihosting, we have a separate structure for routing
+ * data for the console which is outside the guest fd address space.
+ */
+extern GuestFD console_in_gf;
+extern GuestFD console_out_gf;
+
 /**
  * alloc_guestfd:
  *