diff options
author | Helge Deller <deller@gmx.de> | 2022-05-26 10:19:22 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-05-26 10:19:22 +0200 |
commit | 652b2ab926de736d7e7ae8aa3079c72a97fdf5a2 (patch) | |
tree | 992cb512be6ff1103b587fe9779223a3ce1b2df3 /src/parisc | |
parent | 583d81f166dedf04554a7c291174f7de9fac4510 (diff) | |
download | seabios-hppa-652b2ab926de736d7e7ae8aa3079c72a97fdf5a2.zip seabios-hppa-652b2ab926de736d7e7ae8aa3079c72a97fdf5a2.tar.gz seabios-hppa-652b2ab926de736d7e7ae8aa3079c72a97fdf5a2.tar.bz2 |
parisc: Use serial port addresses for console I/O from PAGE0
The structs mem_kbd and mem_cons holds the HPA of the serial ports
used for console I/O, so use those instead of hardcoding to
PARISC_SERIAL_CONSOLE.
There is no functional change with this, but now it complies to how
the values from PAGE0 should be used.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'src/parisc')
-rw-r--r-- | src/parisc/parisc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index 27fe705..3404578 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -514,7 +514,7 @@ static hppa_device_t *find_hppa_device_by_path(struct pdc_module_path *search, #define SERIAL_TIMEOUT 20 static unsigned long parisc_serial_in(char *c, unsigned long maxchars) { - const portaddr_t addr = PARISC_SERIAL_CONSOLE; + portaddr_t addr = PAGE0->mem_kbd.hpa + 0x800; /* PARISC_SERIAL_CONSOLE */ unsigned long end = timer_calc(SERIAL_TIMEOUT); unsigned long count = 0; while (count < maxchars) { @@ -532,10 +532,10 @@ static unsigned long parisc_serial_in(char *c, unsigned long maxchars) static void parisc_serial_out(char c) { + portaddr_t addr = PAGE0->mem_cons.hpa + 0x800; /* PARISC_SERIAL_CONSOLE */ for (;;) { if (c == '\n') parisc_serial_out('\r'); - const portaddr_t addr = PORT_SERIAL1; u8 lsr = inb(addr+SEROFF_LSR); if ((lsr & 0x60) == 0x60) { // Success - can write data |