qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 35/50] lasi: move second serial port initialisation to mac


From: Mark Cave-Ayland
Subject: Re: [PATCH v2 35/50] lasi: move second serial port initialisation to machine.c
Date: Sun, 8 May 2022 09:50:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 08/05/2022 03:50, Richard Henderson wrote:

On 5/4/22 04:25, Mark Cave-Ayland wrote:
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
---
  hw/hppa/lasi.c    | 8 --------
  hw/hppa/machine.c | 7 +++++++
  2 files changed, 7 insertions(+), 8 deletions(-)


In that it is code movement,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

+    if (serial_hd(1)) {
+        /* Serial port */
+        serial_mm_init(addr_space, LASI_UART_HPA + 0x800, 0,
+                qdev_get_gpio_in(lasi_dev, LASI_IRQ_UART_HPA), 8000000 / 16,
+                serial_hd(1), DEVICE_BIG_ENDIAN);
+    }

Although I believe there's a bug: both of these serial ports are being registered at LASI_UART_HPA + 0x800.  I suspect this bug was hidden by the bug fixed in patch 31, in that serial_hd(0) should be at 0x800, and serial_hd(1) should be elsewhere.

FWIW I nearly the made the same error myself, but they are different: serial_hd(0) is mapped to DINO_UART_HPA + 0x800 = 0xfff83800 whereas serial_hd(1) is mapped to LASI_UART_HPA + 0x800 = 0xffd05800 so I believe this is correct.


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]