57792106 | 16-Jan-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
semihosting/console: Avoid including 'cpu.h'
The CPUState structure is declared in "hw/core/cpu.h", the EXCP_HALTED definition in "exec/cpu-common.h". Both headers are indirectly include by "cpu.h".
semihosting/console: Avoid including 'cpu.h'
The CPUState structure is declared in "hw/core/cpu.h", the EXCP_HALTED definition in "exec/cpu-common.h". Both headers are indirectly include by "cpu.h". In order to remove "cpu.h" from "semihosting/console.h", explicitly include them in console.c, otherwise we'd get:
../semihosting/console.c:88:11: error: incomplete definition of type 'struct CPUState' 88 | cs->exception_index = EXCP_HALTED; | ~~^ ../semihosting/console.c:88:31: error: use of undeclared identifier 'EXCP_HALTED' 88 | cs->exception_index = EXCP_HALTED; | ^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250103171037.11265-5-philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250116160306.1709518-7-alex.bennee@linaro.org>
show more ...
|
056c4059 | 16-Jan-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
semihosting/syscalls: Include missing 'exec/cpu-defs.h' header
target_ulong is defined in each target "cpu-param.h", itself included by "exec/cpu-defs.h". Include the latter in order to avoid when r
semihosting/syscalls: Include missing 'exec/cpu-defs.h' header
target_ulong is defined in each target "cpu-param.h", itself included by "exec/cpu-defs.h". Include the latter in order to avoid when refactoring:
include/semihosting/syscalls.h:26:24: error: unknown type name 'target_ulong' 26 | target_ulong fname, target_ulong fname_len, | ^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250103171037.11265-2-philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250116160306.1709518-4-alex.bennee@linaro.org>
show more ...
|
1b9177f7 | 02-May-2022 |
Richard Henderson <richard.henderson@linaro.org> |
semihosting: Create semihost_sys_poll_one
This will be used for implementing the xtensa select_one system call. Choose "poll" over "select" so that we can reuse Glib's g_poll constants and to avoid
semihosting: Create semihost_sys_poll_one
This will be used for implementing the xtensa select_one system call. Choose "poll" over "select" so that we can reuse Glib's g_poll constants and to avoid struct timeval.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
e4a4aaa5 | 01-May-2022 |
Richard Henderson <richard.henderson@linaro.org> |
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
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>
show more ...
|
008e1475 | 01-May-2022 |
Richard Henderson <richard.henderson@linaro.org> |
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 ap
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>
show more ...
|
cd66f20f | 01-May-2022 |
Richard Henderson <richard.henderson@linaro.org> |
semihosting: Create qemu_semihosting_console_write
Will replace qemu_semihosting_console_{outs,outc}, but we need more plumbing first.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Ric
semihosting: Create qemu_semihosting_console_write
Will replace qemu_semihosting_console_{outs,outc}, but we need more plumbing first.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
fb08790b | 01-May-2022 |
Richard Henderson <richard.henderson@linaro.org> |
semihosting: Cleanup chardev init
Rename qemu_semihosting_connect_chardevs to qemu_semihosting_chardev_init; pass the result directly to qemu_semihosting_console_init.
Store the chardev in Semihost
semihosting: Cleanup chardev init
Rename qemu_semihosting_connect_chardevs to qemu_semihosting_chardev_init; pass the result directly to qemu_semihosting_console_init.
Store the chardev in SemihostingConsole instead of SemihostingConfig, which lets us drop semihosting_get_chardev.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
3367d452 | 01-May-2022 |
Richard Henderson <richard.henderson@linaro.org> |
semihosting: Pass CPUState to qemu_semihosting_console_inc
We don't need CPUArchState, and we do want the CPUState of the thread performing the operation -- use this instead of current_cpu.
Reviewe
semihosting: Pass CPUState to qemu_semihosting_console_inc
We don't need CPUArchState, and we do want the CPUState of the thread performing the operation -- use this instead of current_cpu.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
1875dab0 | 29-Apr-2022 |
Richard Henderson <richard.henderson@linaro.org> |
semihosting: Create semihost_sys_gettimeofday
This syscall will be used by m68k and nios2 semihosting.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderso
semihosting: Create semihost_sys_gettimeofday
This syscall will be used by m68k and nios2 semihosting.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
dffeb775 | 29-Apr-2022 |
Richard Henderson <richard.henderson@linaro.org> |
semihosting: Create semihost_sys_{stat,fstat}
These syscalls will be used by m68k and nios2 semihosting.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.hender
semihosting: Create semihost_sys_{stat,fstat}
These syscalls will be used by m68k and nios2 semihosting.
Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|