mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
008e147572
commit
e4a4aaa51b
5 changed files with 61 additions and 10 deletions
|
@ -54,6 +54,10 @@
|
|||
#include "loader.h"
|
||||
#include "user-mmap.h"
|
||||
|
||||
#ifdef CONFIG_SEMIHOSTING
|
||||
#include "semihosting/semihost.h"
|
||||
#endif
|
||||
|
||||
#ifndef AT_FLAGS_PRESERVE_ARGV0
|
||||
#define AT_FLAGS_PRESERVE_ARGV0_BIT 0
|
||||
#define AT_FLAGS_PRESERVE_ARGV0 (1 << AT_FLAGS_PRESERVE_ARGV0_BIT)
|
||||
|
@ -906,6 +910,11 @@ int main(int argc, char **argv, char **envp)
|
|||
}
|
||||
gdb_handlesig(cpu, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SEMIHOSTING
|
||||
qemu_semihosting_guestfd_init();
|
||||
#endif
|
||||
|
||||
cpu_loop(env);
|
||||
/* never exits */
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue