qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/1] hw/arm/aspeed: Automatically zero-extend flash images


From: Cédric Le Goater
Subject: Re: [PATCH 0/1] hw/arm/aspeed: Automatically zero-extend flash images
Date: Tue, 15 Nov 2022 15:16:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1

On 11/15/22 15:06, Philippe Mathieu-Daudé wrote:
On 15/11/22 14:06, Cédric Le Goater wrote:
Hello Peter,

On 11/14/22 20:08, Peter Delevoryas wrote:
I've been using this patch for a long time so that I don't have to use
dd to zero-extend stuff all the time. It's just doing what people are
doing already, right? I hope it's not controversial.

I simply run :

    truncate --size <size>

on the FW file when needed and it is rare because most FW image builders
know the flash size of the target.

However, the current error message is confusing and the following could
be an improvement :

@@ -1606,6 +1606,13 @@ static void m25p80_realize(SSIPeripheral
      if (s->blk) {
          uint64_t perm = BLK_PERM_CONSISTENT_READ |
                          (blk_supports_write_perm(s->blk) ? BLK_PERM_WRITE : 
0);
+
+        if (blk_getlength(s->blk) != s->size) {

'!=' -> '<' ?

Hey. yes :)

I will send a patch. I am not sure this is 7.2 material though.

Thanks,

C.



reply via email to

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