From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 06/10] hw/arm/stm32f205: Fix the UART and Timer region size
Date: Mon, 19 Nov 2018 15:57:26 +0000 [thread overview]
Message-ID: <20181119155730.11758-7-peter.maydell@linaro.org> (raw)
In-Reply-To: <20181119155730.11758-1-peter.maydell@linaro.org>
From: Seth Kintigh <skintigh@gmail.com>
The UART and timer devices for the stm32f205 were being created
with memory regions that were too large. Use the size specified
in the chip datasheet.
The old sizes were so large that the devices would overlap with
each other in the SoC memory map, so this fixes a bug that
caused odd behavior and/or crashes when trying to set up multiple
UARTs.
Signed-off-by: Seth Kintigh <skintigh@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: rephrased commit message to follow our usual standard]
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/char/stm32f2xx_usart.c | 2 +-
hw/timer/stm32f2xx_timer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c
index 032b5fda135..f3363a2952d 100644
--- a/hw/char/stm32f2xx_usart.c
+++ b/hw/char/stm32f2xx_usart.c
@@ -202,7 +202,7 @@ static void stm32f2xx_usart_init(Object *obj)
sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq);
memory_region_init_io(&s->mmio, obj, &stm32f2xx_usart_ops, s,
- TYPE_STM32F2XX_USART, 0x2000);
+ TYPE_STM32F2XX_USART, 0x400);
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
}
diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c
index 58fc7b1188e..ae744d16425 100644
--- a/hw/timer/stm32f2xx_timer.c
+++ b/hw/timer/stm32f2xx_timer.c
@@ -308,7 +308,7 @@ static void stm32f2xx_timer_init(Object *obj)
sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq);
memory_region_init_io(&s->iomem, obj, &stm32f2xx_timer_ops, s,
- "stm32f2xx_timer", 0x4000);
+ "stm32f2xx_timer", 0x400);
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->iomem);
s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, stm32f2xx_timer_interrupt, s);
--
2.19.1
next prev parent reply other threads:[~2018-11-19 15:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 15:57 [Qemu-devel] [PULL 00/10] target-arm queue Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 01/10] target/arm: Install ARMISARegisters from kvm host Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 02/10] target/arm: Fill in ARMISARegisters for kvm64 Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 03/10] target/arm: Introduce read_sys_reg32 for kvm32 Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 04/10] target/arm: Fill in ARMISARegisters " Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 05/10] MAINTAINERS: Add entries for missing ARM boards Peter Maydell
2018-11-19 15:57 ` Peter Maydell [this message]
2018-11-19 15:57 ` [Qemu-devel] [PULL 07/10] target/arm: fix smc incorrectly trapping to EL3 when secure is off Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 08/10] hw/block/onenand: Fix off-by-one error allowing out-of-bounds read Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 09/10] hw/block/onenand: use qemu_log_mask() for reporting Peter Maydell
2018-11-19 15:57 ` [Qemu-devel] [PULL 10/10] MAINTAINERS: list myself as maintainer for various Arm boards Peter Maydell
2018-11-19 18:10 ` [Qemu-devel] [PULL 00/10] target-arm queue Peter Maydell
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=20181119155730.11758-7-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).