From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: qemu-devel@nongnu.org, Stafford Horne <shorne@gmail.com>
Cc: openrisc@lists.librecores.org, "Jason A . Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH RESEND] hw/openrisc/openrisc_sim: keep serial@90000000 as default
Date: Thu, 22 Aug 2024 18:38:38 +0200 [thread overview]
Message-ID: <20240822163838.3722764-1-a.fatoum@pengutronix.de> (raw)
We used to only have a single UART on the platform and it was located at
address 0x90000000. When the number of UARTs was increased to 4, the
first UART remained at its location, but instead of being the first one
to be registered, it became the last.
This caused QEMU to pick 0x90000300 as the default UART, which broke
software that hardcoded the address of 0x90000000 and expected its
output to be visible when the user configured only a single console.
This caused regressions[1] in the barebox test suite when updating to a
newer QEMU. As there seems to be no good reason to register the UARTs in
inverse order, let's register them by ascending address, so existing
software can remain oblivious to the additional UART ports.
[1]: https://lore.barebox.org/barebox/707e7c50-aad1-4459-8796-0cc54bab32e2@pengutronix.de/T/#m5da26e8a799033301489a938b5d5667b81cef6ad
---
v1 -> RESEND:
- expand addressees beyond apparently defunct openrisc@lists.librecores.org
NOTE: I am not familiar with QEMU internals, so please let me know
if registration in inverse order served a particular purpose.
---
hw/openrisc/openrisc_sim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index bffd6f721f7b..d147b00e4817 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -265,7 +265,7 @@ static void openrisc_sim_serial_init(Or1ksimState *state, hwaddr base,
serial_irq = get_cpu_irq(cpus, 0, irq_pin);
}
serial_mm_init(get_system_memory(), base, 0, serial_irq, 115200,
- serial_hd(OR1KSIM_UART_COUNT - uart_idx - 1),
+ serial_hd(uart_idx),
DEVICE_NATIVE_ENDIAN);
/* Add device tree node for serial. */
--
2.39.2
next reply other threads:[~2024-08-22 19:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 16:38 Ahmad Fatoum [this message]
2024-08-23 6:28 ` [PATCH RESEND] hw/openrisc/openrisc_sim: keep serial@90000000 as default Stafford Horne
2024-08-23 7:23 ` Ahmad Fatoum
2024-08-25 5:49 ` Stafford Horne
2024-08-25 11:34 ` Jason A. Donenfeld
2024-08-25 14:09 ` Peter Maydell
2024-08-27 18:53 ` Stafford Horne
2024-08-28 15:38 ` Peter Maydell
2024-08-29 15:40 ` Stafford Horne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240822163838.3722764-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=Jason@zx2c4.com \
--cc=openrisc@lists.librecores.org \
--cc=qemu-devel@nongnu.org \
--cc=shorne@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).