From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
Hongbo Zhang <hongbo.zhang@linaro.org>,
Tanmay Jagdale <tanmay.jagdale@linaro.org>,
Qemu-block <qemu-block@nongnu.org>,
Markus Armbruster <armbru@redhat.com>,
Radoslaw Biernacki <radoslaw.biernacki@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Max Reitz <mreitz@redhat.com>, Leif Lindholm <leif@nuviainc.com>,
Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH] hw/block/pflash_cfi01: Limit maximum flash size to 256 MiB
Date: Thu, 4 Jun 2020 17:16:25 +0200 [thread overview]
Message-ID: <5dbecc86-f9df-249d-7439-36c358dc5aba@redhat.com> (raw)
In-Reply-To: <CAFEAcA8UGjx5S+zVHX_Oon-ELaCRuLpXEDrjs0VoAwqJ7uPn3g@mail.gmail.com>
Hi Peter,
On 5/25/20 10:59 PM, Peter Maydell wrote:
> On Mon, 25 May 2020 at 16:58, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> As of this commit, the biggest CFI01 NOR flash documented is
>> the Micron PC28F00BP33EF. Its size is 2 GiB (256 MiB).
Oops, read as "2 Gbit (256 Mbyte)".
>>
>> Actually this "2Gb device employs a virtual chip enable feature,
>> which combines two 1Gb die with a common chip enable".
>>
>> Since we do not want to model unrealistic hardware, cap the
>> current model to this maximum. At least we have a datasheet
>> to refer.
>>
>> If a bigger flash is provided, the user get this warning:
>>
>> qemu-system-aarch64: Initialization of device cfi.pflash01 failed: Maximum supported CFI flash size is 16 MiB.
Also here read "256 MiB" (I capped to 16MiB to test the patch).
>>
>> Note, the sbsa-ref ARM machine introduced in commit 64580903c2b
>> already uses a pair of 256 MiB flash devices.
>
> What problem is this check solving? Is there some implementation
> imposed limitation or a limit within the flash header format
> that means larger sizes don't work? If so, what's the restriction?
I am not confident maintaining virtual device with no specifications.
If someone come with a datasheet for a pflash > 256MB then we can add
another commit to relax this restriction.
If someone is forced to use a >256MB and such hardware does not exist,
I'd rather have a document in docs/specs/pflash_cfi01.rst describing the
CFI fields.
IOW this is not a hardware limitation, but a maintenance protection.
I am worried with the recent EDK2 activity with the SBSA-ref, and I
don't want to give false hope to developers that they can create any
kind of pflash with the current device model.
If I reword this better in the commit description, is my argument
acceptable?
Thanks,
Phil.
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2020-06-04 15:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 15:58 [PATCH] hw/block/pflash_cfi01: Limit maximum flash size to 256 MiB Philippe Mathieu-Daudé
2020-05-25 19:02 ` Laszlo Ersek
2020-05-25 20:59 ` Peter Maydell
2020-06-04 15:16 ` Philippe Mathieu-Daudé [this message]
2020-06-04 15:30 ` Peter Maydell
2020-06-04 15:55 ` Philippe Mathieu-Daudé
2020-06-04 16:03 ` Peter Maydell
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=5dbecc86-f9df-249d-7439-36c358dc5aba@redhat.com \
--to=philmd@redhat.com \
--cc=armbru@redhat.com \
--cc=hongbo.zhang@linaro.org \
--cc=kwolf@redhat.com \
--cc=leif@nuviainc.com \
--cc=lersek@redhat.com \
--cc=mreitz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=radoslaw.biernacki@gmail.com \
--cc=tanmay.jagdale@linaro.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).