On 23/07/2025 17:30, Philippe Mathieu-Daudé wrote:
Hi Ben,
On 23/7/25 16:55, Ben Dooks wrote:
I am currently trying to track down two errors with mmc-spi.
The first looks like u-boot is sending a couple of CMDs (9, 10)
in the wrong state (currently this works however with a real SD
card) so I have a tmp-fix in to just ignore the two checks in
these and u-boot is now working.
I'm also getting multiple versions of linux failing with QEMU10
on Debian/testing and my own close to the current git tree with
Linux and CMD13...
[ 0.579845] EXT4-fs (mmcblk0): INFO: recovery required on readonly
filesystem
[ 0.580222] EXT4-fs (mmcblk0): write access will be enabled during
recovery
ssi_sd: error: Unexpected response to cmd 13, arglen=16
ssi_sd: error: Unexpected response to cmd 13, arglen=16
ssi_sd: error: Unexpected response to cmd 13, arglen=16
ssi_sd: error: Unexpected response to cmd 13, arglen=16
CMD13's arg len should be 2 in SSI mode.
Then the system stops working.
Systems are riscv sifive_u and my own cva6 machine
Do you mind sharing a reproducer?
Even better if contributed as a functional test :)
(see tests/functional/test_arm_sx1.py for example).
Regards,
So looks like running a kernel directly on sifive_u is stopping
because of this commit:
commit da954d0e32444f122a41c24948d4d1c718bf66d4
Author: Philippe Mathieu-Daudé <phi...@linaro.org>
Date: Wed Jun 12 23:16:40 2024 +0200
hw/sd/sdcard: Add spi_cmd_SEND_CSD/CID handlers (CMD9 & CMD10)
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Tested-by: Cédric Le Goater <c...@redhat.com>
Reviewed-by: Cédric Le Goater <c...@redhat.com>
Message-Id: <20240628070216.92609-52-phi...@linaro.org>
hw/sd/sd.c | 50 ++++++++++++++++++++------------------------------
1 file changed, 20 insertions(+), 30 deletions(-)
I think the CMD13 might be something else so going to look into that
now.
FYI, qemu command line is
$qemu -M sifive_u -m 1G -s \
-kernel ./linux-kernel-mmc/arch/riscv/boot/Image \
-append "root=/dev/mmcblk0 rootwait earlycon=sbi conole=ttyS0,115200"
\
-drive file=./rootfs-le.tmp.ext2,if=sd \
-netdev user,id=usernet,hostfwd=tcp::5556-:22 \
-nographic 2>&1
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html