diff options
author | Helge Deller <deller@gmx.de> | 2022-05-25 19:45:45 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-05-25 19:45:45 +0200 |
commit | 56c99ae57897a1bdd164ef705d5c4126ab62ec27 (patch) | |
tree | c8729eb4e48a06bb0de222ae94b87fbd86069da7 | |
parent | 17ca7a9998c1755d42321cfc0afb5f480f5a58ff (diff) | |
download | seabios-hppa-serial-port-fix-test.zip seabios-hppa-serial-port-fix-test.tar.gz seabios-hppa-serial-port-fix-test.tar.bz2 |
parisc: SEABIOS_HPPA_VERSION 6serial-port-fix-test
New features and fixes:
* Allow "z" instead of "y" in firmware boot menu for german keyboards
* Fixed serial port emulation
Serial ports ttyS0 and ttyS1 were swapped compared to the real hardware.
So, a booting Linux was actually using ttyS1 as serial console, and the
emulated ttyS0 wasn't useable.
With this version you can use e.g.:
-serial mon:stdio -serial /dev/ttyS4
to use emulated ttyS0 in the gueast for console output, and pass ttyS4
from the host to ttyS1 in the guest.
NOTE: This version is incompatible with older qemu versions, since
the serial ports are now swapped.
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | src/parisc/hppa_hardware.h | 5 | ||||
-rw-r--r-- | src/parisc/parisc.c | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/parisc/hppa_hardware.h b/src/parisc/hppa_hardware.h index 5edf577..c036d46 100644 --- a/src/parisc/hppa_hardware.h +++ b/src/parisc/hppa_hardware.h @@ -1,4 +1,5 @@ /* HPPA cores and system support chips. */ +/* Be aware: This file is shared as-is with seabios-hppa. */ #ifndef HW_HPPA_HPPA_HARDWARE_H #define HW_HPPA_HPPA_HARDWARE_H @@ -40,8 +41,8 @@ #define FW_CFG_IO_BASE 0xfffa0000 -#define PORT_SERIAL1 (DINO_UART_HPA + 0x800) -#define PORT_SERIAL2 (LASI_UART_HPA + 0x800) +#define PORT_SERIAL1 (LASI_UART_HPA + 0x800) +#define PORT_SERIAL2 (DINO_UART_HPA + 0x800) #define HPPA_MAX_CPUS 16 /* max. number of SMP CPUs */ #define CPU_CLOCK_MHZ 250 /* emulate a 250 MHz CPU */ diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index b679954..deb9ce6 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. @@ -535,7 +535,7 @@ static void parisc_serial_out(char c) for (;;) { if (c == '\n') parisc_serial_out('\r'); - const portaddr_t addr = PORT_SERIAL1; + const portaddr_t addr = PARISC_SERIAL_CONSOLE; u8 lsr = inb(addr+SEROFF_LSR); if ((lsr & 0x60) == 0x60) { // Success - can write data @@ -1823,7 +1823,7 @@ static void menu_loop(void) { int scsi_boot_target; char input[24]; - char *c; + char *c, reply; // snprintf(input, sizeof(input), "BOOT FWSCSI.%d.0", boot_drive->target); again: @@ -1877,9 +1877,11 @@ again2: input[0] = '\0'; enter_text(input, 1); parisc_putchar('\n'); - if (input[0] == 'C' || input[0] == 'c') + reply = input[0]; + if (reply == 'C' || reply == 'c') goto again2; - if (input[0] == 'Y' || input[0] == 'y') + // allow Z as Y. It's the key used on german keyboards. + if (reply == 'Y' || reply == 'y' || reply == 'Z' || reply == 'z') interact_ipl = 1; } |