[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH] m25p80: fix test on blk_pread() return value

From: Cédric Le Goater
Subject: Re: [Qemu-block] [PATCH] m25p80: fix test on blk_pread() return value
Date: Wed, 15 Jun 2016 19:03:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

Hello Eric,

On 06/13/2016 06:47 PM, Eric Blake wrote:
> On 06/13/2016 10:25 AM, Cédric Le Goater wrote:
>> It seems that commit 243e6f69c129 ("m25p80: Switch to byte-based block 
>> access") 
>> is bringing another issue :
>> qemu-system-arm: 
>> /home/legoater/work/qemu/qemu-ast2400-mainline.git/block/io.c:1252: 
>> bdrv_aligned_pwritev: Assertion `!qiov || bytes == qiov->size' failed.
>> Aborted (core dumped)
> Can you provide a more complete stack dump, and/or a recipe on how to
> repeat the assertion?

Here you are, it is a bit long ...
You need to get a few files :

* an OpenBMC kernel : 


* an OpenBMC rootfs : 


* an OpenBMC flash image containing the above (with which we should boot 
someday) : 


* an OpenPower flash image for the host : 


Clone this qemu branch which adds to the ast24000 SOC its SPI/SMC controllers:


The extra commits bring :

         ast2400: add SMC controllers (FMC and SPI)
         ast2400: add SPI flash slave object
         ast2400: create SPI flash slaves

         hw/arm/ast2400.c            |  31 +++
         hw/arm/palmetto-bmc.c       |   3 +
         hw/ssi/Makefile.objs        |   1 +
         hw/ssi/aspeed_smc.c         | 451 
         include/hw/arm/ast2400.h    |   3 +
         include/hw/ssi/aspeed_smc.h | 105 +++++++++++
         6 files changed, 594 insertions(+)
         create mode 100644 hw/ssi/aspeed_smc.c
         create mode 100644 include/hw/ssi/aspeed_smc.h

and these, but we don't really care :

         m25p80: fix test on blk_pread() return value
         ssi: change ssi_slave_init to be a realize ops

Compile with arm-softmmu, should be enough, and run with :

        qemu-system-arm -m 256 -M palmetto-bmc -kernel ./cuImage  -initrd 
./obmc-phosphor-image-palmetto.cpio.gz -mtdblock ./flash-palmetto -mtdblock 
./palmetto.pnor -snapshot -nographic -nodefaults -monitor stdio -serial pty -S

When booted, log with root/OpenBmc and run :

        dd if=/dev/zero of=/dev/mtd0

you should get :

        (qemu) qemu-system-arm: .../block/io.c:1243: bdrv_aligned_pwritev: 
Assertion `!qiov || bytes == qiov->size' failed.
        Aborted (core dumped)

If there are some messages like :

        qemu-system-arm: aspeed_smc_flash_read: flash not in usermode

This is because a userspace tool is trying to access the host
flash image (./palmetto.pnor) but the support for linear
addressing mode is not in the branch yet. you can ignore them.

If you have read up to here, that probably means you might try the
above :) I wish I had a simpler way, but no ... we need to work on 
some unit test I guess.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]