All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seth K <skintigh@gmail.com>
To: peter.maydell@linaro.org
Cc: "Alistair Francis" <alistair@alistair23.me>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] hw/arm/stm32f205: Fix the UART and Timer region size
Date: Sun, 18 Nov 2018 22:15:36 -0500	[thread overview]
Message-ID: <CAErn8fSyzGLaywOf3qGXD7pUtKnH+ZxG3W1ocXPMwcsmpoC-yQ@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9o0m+Nc3PgbMfM95NczASWjqc8X+=xrJONRuc5d_nydg@mail.gmail.com>

From: Seth Kintigh <skintigh@gmail.com>

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,

Signed-off-by: Seth Kintigh <skintigh@gmail.com>
---
Phil, I hope this is the right format.

PMM, my original changes were made on an old version, but I made the patch
from the latest version per the instructions. I'm glad to hear that serial
port limit is gone!

 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);


On Thu, Nov 15, 2018 at 7:05 AM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On 4 November 2018 at 07:42, Seth K <skintigh@gmail.com> wrote:
> > 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.
>
> Hi; thanks for the patch. As Philippe says, it looks good,
> but the one thing we definitely need is a Signed-off-by:
> line from you.
>
> A minor note -- there is no "MAX_SERIAL_PORTS" definition
> in QEMU any more: we removed that artificial limitation
> earlier this year. Maybe you're basing your patch on an
> older version of QEMU? It's best to use git master for
> development. Our SoC model defines 6 uarts (STM_NUM_USARTS)
> in hw/arm/stm32f205_soc.c, which should all now be connectable
> on the command line, though I haven't tested that or checked
> whether the hardware has 6 or some other number...
>
> thanks
> -- PMM
>

  reply	other threads:[~2018-11-19  3:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Seth K [this message]
2018-11-19 10:43     ` [Qemu-devel] [PATCH] hw/arm/stm32f205: Fix the UART and Timer region size 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

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=CAErn8fSyzGLaywOf3qGXD7pUtKnH+ZxG3W1ocXPMwcsmpoC-yQ@mail.gmail.com \
    --to=skintigh@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=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 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.