RFC fix SD card migration
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hw/sd/sd.c: add sd_card_powered_up()hw/ | +8 | 0 replies | |
| 2/2 | hw/sd: skip double power-up in sd_vmstate_pre_load()hw/ | +10 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] fix SD card migration
Hi,
I found this bug by accident when doing avocado tests with the RISC-V machines. Trying to migrate the sifive_u machine, which always has a SD card, fails every time:
qemu-system-riscv64: ../hw/sd/sd.c:297: sd_ocr_powerup: Assertion `!FIELD_EX32(sd->ocr, OCR, CARD_POWER_UP)' failed.
I'm sending it as RFC because I am not sure if this fix is a bandaid for something else that should be worked on. The code in question was introduced a while ago to circumvent a power on bug with EDK2, where a timer was introduced to power on the card after receiving a ACMD41 event/command. There is a possibility that the assumptions made back then no longer hold true.
Daniel Henrique Barboza (2):
hw/sd/sd.c: add sd_card_powered_up()
hw/sd: skip double power-up in sd_vmstate_pre_load()
hw/sd/sd.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-)
Signature · 1 line
2.39.0