All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Seth K <skintigh@gmail.com>
Cc: Bug 1630723 <1630723@bugs.launchpad.net>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Bug 1630723] [NEW] UART writes to netduino2/stm32f205-soc disappear
Date: Fri, 7 Oct 2016 09:10:19 -0700	[thread overview]
Message-ID: <CAKmqyKOfys_MJ1AYe7acRh013W0TD+CCcPLkGteYwr3tqp+jdg@mail.gmail.com> (raw)
In-Reply-To: <CAKmqyKOD8enBVAesVY56otCpjFEE6KYLFe3g5uj1SKL62bz2nQ@mail.gmail.com>

On Fri, Oct 7, 2016 at 9:03 AM, Alistair Francis <alistair23@gmail.com> wrote:
> On Fri, Oct 7, 2016 at 8:59 AM, Seth K <skintigh@gmail.com> wrote:
>> The only machine I saw listed in the help output is "netduino2." I pulled
>> QEMU from github, was that the right thing to do?
>>
>> I found the specifications for the stm32f2xx and some similar chips and
>> verified the addresses and interrupts are correct.
>
> Sorry my mistake. It is a the Netduino 2 Plus that we don't support.
>
> I think we should move this conversation to the bug report as well, I
> was hoping that replying to the email would update the bug report but
> it doesn't look like it.
>
>>
>> The stm32f205 should support 6 UARTs, and the 6 addresses and IRQs are coded
>> correctly. However there is a hard-coded value MAX_SERIAL_PORTS limiting
>> serial_hds to 4, and I don't know why. I am considering submitting a patch.
>
> I'm not sure why we have that limit, you can submit a patch and see
> what everyone says.
>
>>
>> If I increase MAX_SERIAL_PORTS I can write to UARTs 1, 4, 5, and 6 and
>> output them to sockets. However writes to UARTs 2 and 3 just disappear. They
>> don't even trigger my printf in stm32f2xx_usart_write. It seems like they
>> are being intercepted somewhere, and unfortunately my knowledge of QEMU is
>> too low to know where to look. Any pointers would be greatly appreciated.
>
> Strange. There could be something else addressed there. If you run
> 'info mtree' at the QEMU prompt (Ctrl-a + c) you should be able to see
> the memory map of the system.

Hey Seth,

What if you try this diff? Does that help?

diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c
index 4c6640d..b07c67b 100644
--- a/hw/char/stm32f2xx_usart.c
+++ b/hw/char/stm32f2xx_usart.c
@@ -204,7 +204,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, 0x200);
     sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
 }

Thanks,

Alistair

  reply	other threads:[~2016-10-07 16:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 18:56 [Qemu-devel] [Bug 1630723] [NEW] UART writes to netduino2/stm32f205-soc disappear Seth
2016-10-07  0:18 ` Alistair Francis
2016-10-07 15:59   ` Seth K
2016-10-07 16:03     ` Alistair Francis
2016-10-07 16:10       ` Alistair Francis [this message]
2016-10-07 20:04         ` Seth K
2016-10-07 22:27           ` Alistair Francis
2016-10-12 22:25             ` Seth K
2016-10-20 22:55               ` Seth K
2016-10-25 22:34                 ` Alistair Francis
2016-10-07 16:11       ` Peter Maydell
2020-11-08  9:23 ` [Bug 1630723] " Thomas Huth
2020-11-08 15:39 ` Philippe Mathieu-Daudé

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=CAKmqyKOfys_MJ1AYe7acRh013W0TD+CCcPLkGteYwr3tqp+jdg@mail.gmail.com \
    --to=alistair23@gmail.com \
    --cc=1630723@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    --cc=skintigh@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 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.