From 652b2ab926de736d7e7ae8aa3079c72a97fdf5a2 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Thu, 26 May 2022 10:19:22 +0200 Subject: 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 --- src/parisc/parisc.c | 4 ++-- 1 file 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 -- cgit v1.1