[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 4/9] hw/block/pflash_cfi01: Start state machine a
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH v3 4/9] hw/block/pflash_cfi01: Start state machine as READY to accept commands |
Date: |
Fri, 5 Jul 2019 17:46:34 +0200 |
When the state machine is ready to accept command, the bit 7 of
the status register (SR) is set to 1.
The guest polls the status register and check this bit before
writting command to the internal 'Write State Machine' (WSM).
Set SR.7 bit to 1 when the device is created.
There is no migration impact by this change.
Reference: Read Array Flowchart
"Common Flash Interface (CFI) and Command Sets"
(Intel Application Note 646)
Appendix B "Basic Command Set"
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Regression-tested-by: Laszlo Ersek <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
v3: Added migration comment.
---
hw/block/pflash_cfi01.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 81fbdbde7f..200bfd0ab8 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -763,7 +763,7 @@ static void pflash_cfi01_realize(DeviceState *dev, Error
**errp)
}
pflash_mode_read_array(pfl);
- pfl->status = 0;
+ pfl->status = 0x80; /* WSM ready */
/* Hardcoded CFI table */
/* Standard "QRY" string */
pfl->cfi_table[0x10] = 'Q';
--
2.20.1
[Qemu-devel] [PATCH v3 4/9] hw/block/pflash_cfi01: Start state machine as READY to accept commands,
Philippe Mathieu-Daudé <=
[Qemu-devel] [PATCH v3 5/9] hw/block/pflash_cfi01: Add the DeviceReset() handler, Philippe Mathieu-Daudé, 2019/07/05
[Qemu-devel] [PATCH v3 6/9] hw/block/pflash_cfi01: Simplify CFI_QUERY processing, Philippe Mathieu-Daudé, 2019/07/05
[Qemu-devel] [PATCH v3 7/9] hw/block/pflash_cfi01: Improve command comments, Philippe Mathieu-Daudé, 2019/07/05
[Qemu-devel] [PATCH v3 8/9] hw/block/pflash_cfi01: Replace DPRINTF by qemu_log_mask(GUEST_ERROR), Philippe Mathieu-Daudé, 2019/07/05
[Qemu-devel] [PATCH v3 9/9] hw/block/pflash_cfi01: Hold the PRI table offset in a variable, Philippe Mathieu-Daudé, 2019/07/05