aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-05-26 12:01:15 +0200
committerHelge Deller <deller@gmx.de>2022-05-26 12:01:15 +0200
commit458626c4c6441045c0612f24313c7cf1f95e71c6 (patch)
tree9d1b03b7d07f9a3fc02c125b57b98b95e7bd6707
parent20cf9c785c3aa493a39be532642883a7a1dc360c (diff)
downloadseabios-hppa-458626c4c6441045c0612f24313c7cf1f95e71c6.zip
seabios-hppa-458626c4c6441045c0612f24313c7cf1f95e71c6.tar.gz
seabios-hppa-458626c4c6441045c0612f24313c7cf1f95e71c6.tar.bz2
parisc: SEABIOS_HPPA_VERSION 6seabios-hppa-v6v6-test
Fixes the serial port emulation Qemu versions which request a SEABIOS_HPPA_VERSION < 6 have the bug that they use the DINO UART instead of the LASI UART as serial port #0. Staring with SEABIOS_HPPA_VERSION 6 the serial ports are now emulated as on physical hardware, with LASI UART being serial port #0. This patch adds a compat patch, which will use the DINO UART port for console I/O if it detects that qemu requests a SEABIOS_HPPA_VERSION < 6. Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--src/parisc/parisc.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index 0a60fa1..d2eca58 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -31,7 +31,7 @@
#include "vgabios.h"
-#define SEABIOS_HPPA_VERSION 5
+#define SEABIOS_HPPA_VERSION 6
/*
* Various variables which are needed by x86 code.
@@ -2002,13 +2002,13 @@ static const struct pz_device mem_kbd_sti_boot = {
.cl_class = CL_KEYBD,
};
-static const struct pz_device mem_cons_boot = {
+static struct pz_device mem_cons_boot = {
.hpa = PARISC_SERIAL_CONSOLE - 0x800,
.iodc_io = (unsigned long)&iodc_entry,
.cl_class = CL_DUPLEX,
};
-static const struct pz_device mem_kbd_boot = {
+static struct pz_device mem_kbd_boot = {
.hpa = PARISC_SERIAL_CONSOLE - 0x800,
.iodc_io = (unsigned long)&iodc_entry,
.cl_class = CL_KEYBD,
@@ -2122,6 +2122,15 @@ void __VISIBLE start_parisc_firmware(void)
"Please update.\n", (int)SEABIOS_HPPA_VERSION, i);
hlt();
}
+ /* Qemu versions which request a SEABIOS_HPPA_VERSION < 6 have the bug that
+ * they use the DINO UART instead of the LASI UART as serial port #0.
+ * Fix it up here and switch the serial console code to use PORT_SERIAL2
+ * for such Qemu versions, so that we can still use this higher SeaBIOS
+ * version with older Qemus. */
+ if (i < 6) {
+ mem_cons_boot.hpa = PORT_SERIAL2 - 0x800;
+ mem_kbd_boot.hpa = PORT_SERIAL2 - 0x800;
+ }
tlb_entries = romfile_loadint("/etc/cpu/tlb_entries", 256);
dprintf(0, "fw_cfg: TLB entries %d\n", tlb_entries);