]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/hppa: Add "diag 0x101" for console output support
authorHelge Deller <deller@gmx.de>
Fri, 2 Feb 2024 10:57:11 +0000 (11:57 +0100)
committerHelge Deller <deller@gmx.de>
Sun, 11 Feb 2024 12:20:23 +0000 (13:20 +0100)
commitdbca083513aeb2ba65fe170f39e535c165abee22
tree2fbe1465982a52251f1780515e76fa489351752f
parent1a72469ccc580b6ace89d92977de7f80434ffbd1
target/hppa: Add "diag 0x101" for console output support

For debugging purposes at the early stage of the bootup process,
the SeaBIOS-hppa firmware sometimes needs to output characters to the
serial console. Note that the serial console is the default output
method for parisc machines.

At this stage PCI busses and other devices haven't been initialized
yet. So, SeaBIOS-hppa will not be able to find the correct I/O ports
for the serial ports yet.

Instead, add an emulation for the "diag 0x101" opcode to assist here.
Without any other dependencies, SeaBIOS-hppa can then load the character
to be printed in register %r26 and issue the diag assembly instruction.

The qemu diag_console_output() helper function will then print
that character to the first serial port.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
target/hppa/helper.h
target/hppa/sys_helper.c
target/hppa/translate.c