[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [Qemu-ppc] [PATCH 05/10] ppc405_boards: Do
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-block] [Qemu-devel] [Qemu-ppc] [PATCH 05/10] ppc405_boards: Don't size flash memory to match backing image |
Date: |
Tue, 19 Feb 2019 16:55:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
BALATON Zoltan <address@hidden> writes:
> On Mon, 18 Feb 2019, Markus Armbruster wrote:
>> Machine "ref405ep" maps its flash memory at address 2^32 - image size.
>> Image size is rounded up to the next multiple of 64KiB. Useless,
>> because pflash_cfi02_realize() fails with "failed to read the initial
>> flash content" unless the rounding is a no-op.
>>
>> If the image size exceeds 0x80000 Bytes, we overlap first SRAM, then
>> other stuff. No idea how that would play out, but a useful outcomes
>> seem unlikely.
>>
>> Map the flash memory at fixed address 0xFFF80000 with size 512KiB,
>> regardless of image size, to match the physical hardware.
>
> If PPC405 behaves the same as PPC440 and starts at 0xfffffffc then
> this won't boot. It's maybe better to keep 2^32 - image_size but
> assert image is not bigger than 512kB. But I don't know anything about
> these boards so just sharing this comment for your consideration. I'm
> fine with any decision you take.
If the image is smaller than 512KiB, pflash_cfi02_realize() fails with
"failed to read the initial flash content".
Alex Bennée has a patch that'll make it fail for any size mismatch, with
a much nicer error message. I like it; silently truncating firmware
images is unlikely to be useful.
For what it's worth, my patch brings this board into line with most
other boards: create flash memory of fixed size at a fixed address,
matching the physical machine we emulate.
- Re: [Qemu-block] [Qemu-devel] [PATCH 07/10] mips_malta: Clean up definition of flash memory size somewhat, (continued)
Re: [Qemu-block] [PATCH 07/10] mips_malta: Clean up definition of flash memory size somewhat, Alex Bennée, 2019/02/21
[Qemu-block] [PATCH 03/10] hw: Use CFI_PFLASH0{1, 2} and TYPE_CFI_PFLASH0{1, 2}, Markus Armbruster, 2019/02/18
- Re: [Qemu-block] [PATCH 03/10] hw: Use CFI_PFLASH0{1, 2} and TYPE_CFI_PFLASH0{1, 2}, Laszlo Ersek, 2019/02/18
- Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] hw: Use CFI_PFLASH0{1, 2} and TYPE_CFI_PFLASH0{1, 2}, Philippe Mathieu-Daudé, 2019/02/19
- Re: [Qemu-block] [PATCH 03/10] hw: Use CFI_PFLASH0{1, 2} and TYPE_CFI_PFLASH0{1, 2}, Alex Bennée, 2019/02/21
[Qemu-block] [PATCH 05/10] ppc405_boards: Don't size flash memory to match backing image, Markus Armbruster, 2019/02/18
[Qemu-block] [PATCH 04/10] sam460ex: Don't size flash memory to match backing image, Markus Armbruster, 2019/02/18
[Qemu-block] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME, Markus Armbruster, 2019/02/18