[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 24/27] hw/block/pflash_cfi02: Implement erase sus
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PULL 24/27] hw/block/pflash_cfi02: Implement erase suspend/resume |
Date: |
Thu, 11 Jul 2019 14:51:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 7/11/19 2:35 PM, Peter Maydell wrote:
> On Tue, 2 Jul 2019 at 04:29, Philippe Mathieu-Daudé <address@hidden> wrote:
>>
>> From: Stephen Checkoway <address@hidden>
>>
>> During a sector erase (but not a chip erase), the embeded erase program
>> can be suspended. Once suspended, the sectors not selected for erasure
>> may be read and programmed. Autoselect mode is allowed during erase
>> suspend mode. Presumably, CFI queries are similarly allowed so this
>> commit allows them as well.
>>
>> Since guest firmware can use status bits DQ7, DQ6, DQ3, and DQ2 to
>> determine the current state of sector erasure, these bits are properly
>> implemented.
>>
>> @@ -305,13 +364,16 @@ static uint64_t pflash_read(void *opaque, hwaddr
>> offset, unsigned int width)
>> }
>> DPRINTF("%s: ID " TARGET_FMT_plx " %" PRIx64 "\n", __func__, boff,
>> ret);
>> break;
>> - case 0xA0:
>> case 0x10:
>> case 0x30:
>> + /* Toggle bit 2 during erase, but not program. */
>> + toggle_dq2(pfl);
>> + case 0xA0:
>> + /* Toggle bit 6 */
>> + toggle_dq6(pfl);
>> /* Status register read */
>> ret = pfl->status;
>> DPRINTF("%s: status %" PRIx64 "\n", __func__, ret);
>> - toggle_dq6(pfl);
>> break;
>> case 0x98:
>> /* CFI query mode */
>
> Hi; Coverity (CID 1403012) flags up the case 0x30 as an implicit
> fallthrough. Should it have an explicit "break" or a "/* fall through */"
> comment?
Yes, it is an implicit fallthrough. I'll send a patch.
Thanks,
Phil.
- [Qemu-devel] [PULL 15/27] hw/block/pflash_cfi02: Document the current CFI values, (continued)
- [Qemu-devel] [PULL 15/27] hw/block/pflash_cfi02: Document the current CFI values, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 20/27] hw/block/pflash_cfi02: Split if() condition, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 25/27] hw/block/pflash_cfi02: Use chip erase time specified in the CFI table, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 23/27] hw/block/pflash_cfi02: Implement multi-sector erase, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 18/27] hw/block/pflash_cfi02: Implement nonuniform sector sizes, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 14/27] hw/block/pflash_cfi02: Remove pointless local variable, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 22/27] hw/block/pflash_cfi02: Fix reset command not ignored during erase, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 11/27] hw/block/pflash_cfi02: Unify the MemoryRegionOps, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 24/27] hw/block/pflash_cfi02: Implement erase suspend/resume, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 19/27] hw/block/pflash_cfi02: Extract pflash_regions_count(), Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 13/27] tests/pflash-cfi02: Refactor to support testing multiple configurations, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 09/27] hw/block/pflash_cfi02: Use the ldst API in pflash_read(), Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 10/27] hw/block/pflash_cfi02: Extract the pflash_data_read() function, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-devel] [PULL 27/27] hw/block/pflash_cfi02: Reduce I/O accesses to 16-bit, Philippe Mathieu-Daudé, 2019/07/01