[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 05/10] ppc405_boards: Don't size flas
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [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-ppc] [PATCH 07/10] mips_malta: Clean up definition of flash memory size somewhat, (continued)
[Qemu-ppc] [PATCH 05/10] ppc405_boards: Don't size flash memory to match backing image, Markus Armbruster, 2019/02/18
[Qemu-ppc] [PATCH 08/10] pflash: Clean up after commit 368a354f02b part 1, Markus Armbruster, 2019/02/18
[Qemu-ppc] [PATCH 09/10] pflash: Clean up after commit 368a354f02b part 2, Markus Armbruster, 2019/02/18