diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2017-05-12 11:09:14 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-06-06 02:40:48 -0700 |
commit | 8128b3e0798e6c7e5742fa9f85bf8a4bf90af94a (patch) | |
tree | 068e7f48cbe3422f7ff79a6ee339657bb6221f4f /target/xtensa/cpu.h | |
parent | 347ec03093f9668a379ef6b7fa1feb332fff039c (diff) |
target/xtensa: support output to chardev console
In semihosting mode QEMU allows guest to read and write host file
descriptors directly, including descriptors 0..2, a.k.a. stdin, stdout
and stderr. Sometimes it's desirable to have semihosting console
controlled by -serial option, e.g. to connect it to network.
Add semihosting console to xtensa-semi.c, open it in the 'sim' machine
in the presence of -serial option and direct stdout and stderr to it
when it's present.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/cpu.h')
-rw-r--r-- | target/xtensa/cpu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index ecca17d45d..ee29fb1a14 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -483,6 +483,7 @@ void xtensa_translate_init(void); void xtensa_breakpoint_handler(CPUState *cs); void xtensa_finalize_config(XtensaConfig *config); void xtensa_register_core(XtensaConfigList *node); +void xtensa_sim_open_console(Chardev *chr); void check_interrupts(CPUXtensaState *s); void xtensa_irq_init(CPUXtensaState *env); void *xtensa_get_extint(CPUXtensaState *env, unsigned extint); |