All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Corrected memory regions
@ 2018-11-04  7:42 Seth K
  2018-11-14 11:38 ` Philippe Mathieu-Daudé
  2018-11-15 12:05 ` Peter Maydell
  0 siblings, 2 replies; 9+ messages in thread
From: Seth K @ 2018-11-04  7:42 UTC (permalink / raw)
  To: Alistair Francis, Marc-André Lureau, Paolo Bonzini
  Cc: qemu-devel@nongnu.org Developers

I corrected these 2 memory regions based on specifications from the chip
manufacturer. The existing ranges seem to overlap and and cause odd
behavior and/or crashes when trying to set up multiple UARTs,
I also played with changing MAX_SERIAL_PORTS to 8 to match the hardware,
but I did not include that in this patch as I never fully tested its
effects.
This is my first patch, I hope I did it correctly,
Seth Kintigh
---
 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 032b5fda13..f3363a2952 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 58fc7b1188..ae744d1642 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.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-11-26  1:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-04  7:42 [Qemu-devel] [PATCH] Corrected memory regions Seth K
2018-11-14 11:38 ` Philippe Mathieu-Daudé
2018-11-15 12:05 ` Peter Maydell
2018-11-19  3:15   ` [Qemu-devel] [PATCH] hw/arm/stm32f205: Fix the UART and Timer region size Seth K
2018-11-19 10:43     ` Philippe Mathieu-Daudé
2018-11-19 11:08       ` Peter Maydell
2018-11-19 11:35         ` Philippe Mathieu-Daudé
2018-11-20 17:15           ` Alistair Francis
2018-11-26  1:54             ` Seth K

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.