hw/block/pflash_cfi01: Document use of non-CFI compliant command '0x00'
commitaba53a12bd56902e874b168b07c2ecd7a99e7878
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 16 Jul 2019 17:06:56 +0000 (16 19:06 +0200)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 22 May 2020 16:44:36 +0000 (22 18:44 +0200)
tree0b6a392f865b9666446f9bd8644a1443bb4a0c2f
parentd23048c05cf0a1b9d72b6937a087cb5ed0e14e50
hw/block/pflash_cfi01: Document use of non-CFI compliant command '0x00'

The command 0x00 is used by this model since its origin (commit
05ee37ebf630). In this commit the command is described with a
amusing '/* ??? */' comment, probably meaning 'FIXME'.

        switch (cmd) {
        case 0x00: /* ??? */
            ...

This comment survived 12 years because the 0x00 value is indeed
not specified by the CFI open standard (as of this commit).

The 'cmd' field is transfered during migration. To keep the
migration feature working with older QEMU version, we have to
take a lot of care with migrated field. We figured out it is
too late to remove a non-specified value from this model
(this would make migration review very complex). It is however
not too late to improve the documentation.

Add few comments to remember this is a special value related
to QEMU, and we won't find information about it on the CFI
spec.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190716221555.11145-3-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/block/pflash_cfi01.c