qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Cc: "Cédric Le Goater" <clg@kaod.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/arm/aspeed: directly map the serial device to the system address space
Date: Fri, 09 Feb 2018 11:10:59 +1030	[thread overview]
Message-ID: <1518136859.14456.14.camel@aj.id.au> (raw)
In-Reply-To: <5562bd02-5399-b1af-f183-d9a16b0a1c62@amsat.org>

[-- Attachment #1: Type: text/plain, Size: 2419 bytes --]

On Thu, 2018-02-08 at 14:40 -0300, Philippe Mathieu-Daudé wrote:
> On 02/08/2018 02:30 PM, Peter Maydell wrote:
> > On 8 February 2018 at 17:22, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > > ---
> > >  hw/arm/aspeed_soc.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
> > > index c83b7e207b..a786750e14 100644
> > > --- a/hw/arm/aspeed_soc.c
> > > +++ b/hw/arm/aspeed_soc.c
> > > @@ -257,7 +257,7 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
> > >      /* UART - attach an 8250 to the IO space as our UART5 */
> > >      if (serial_hds[0]) {
> > >          qemu_irq uart5 = qdev_get_gpio_in(DEVICE(&s->vic), uart_irqs[4]);
> > > -        serial_mm_init(&s->iomem, ASPEED_SOC_UART_5_BASE, 2,
> > > +        serial_mm_init(get_system_memory(), ASPEED_SOC_UART_5_BASE, 2,
> > >                         uart5, 38400, serial_hds[0], DEVICE_LITTLE_ENDIAN);
> > >      }
> > 
> > Is this a bug fix? It certainly changes behaviour, which
> > suggests that a fuller commit message would be useful.
> 
> This patch is buggy indeed, using system_memory the serial address
> should be ASPEED_SOC_IOMEM_BASE + ASPEED_SOC_UART_5_BASE.
> 

If you'd like to test, you can grab images from here:

https://openpower.xyz/job/openbmc-build/distro=ubuntu,target=romulus/

For example (without the patch):

    $ wget     https://openpower.xyz/job/openbmc-build/1240/distro=ubuntu,target=romulus/artifact/deploy/images/romulus/image-bmc
...
$ qemu-system-arm -M romulus-bmc -m 512 -drive file=image-bmc,if=mtd,format=raw -nographic


U-Boot 2016.07 (Jan 25 2018 - 16:31:27 +0000)   

       Watchdog enabled                         
DRAM:  496 MiB                                  
Flash: 32 MiB                                   
*** Warning - bad CRC, using default environment

In:    serial                                   
Out:   serial                                   
Err:   serial                                   
Net:   aspeednic#0                              
Error: aspeednic#0 address not set.             

Hit any key to stop autoboot:  0                
## Loading kernel from FIT Image at 20080000 ...
...

And yeah, this patch breaks output.

Thanks for the cleanup though.

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2018-02-09  0:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 17:22 [Qemu-devel] [PATCH 0/2] aspeed: simplify using the 'unimplemented device' for aspeed_soc.io Philippe Mathieu-Daudé
2018-02-08 17:22 ` [Qemu-devel] [PATCH 1/2] hw/arm/aspeed: directly map the serial device to the system address space Philippe Mathieu-Daudé
2018-02-08 17:30   ` Peter Maydell
2018-02-08 17:40     ` Philippe Mathieu-Daudé
2018-02-09  0:40       ` Andrew Jeffery [this message]
2018-02-09  8:57         ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-02-08 17:22 ` [Qemu-devel] [PATCH 2/2] hw/arm/aspeed: simplify using the 'unimplemented device' for aspeed_soc.io Philippe Mathieu-Daudé
2018-02-08 18:14   ` Cédric Le Goater
2018-02-09  8:56     ` [Qemu-devel] [Qemu-arm] " 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=1518136859.14456.14.camel@aj.id.au \
    --to=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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).