Skip to content

sd: assertion in sd_read_byte()

Host environment

  • Operating system: Ubuntu 22.04.4 LTS
  • OS/kernel version: Linux 6.5.0-25-generic
  • Architecture: x86_64
  • QEMU flavor: 9.0.2
  • QEMU version: commit 029e13a8

Description of problem

The following log reveals it:

ERROR: qemu/hw/sd/sd.c:2541:sd_read_byte: code should not be reached
Bail out! ERROR: qemu/hw/sd/sd.c:2541:sd_read_byte: code should not be reached Aborted (core dumped)

Reproducer

cat << EOF | qemu-system-x86_64 \
-display none -machine accel=qtest, -m 512M -nodefaults -device \
sdhci-pci,sd-spec-version=3 -device sd-card,drive=mydrive -drive \
if=none,index=0,file=null-co://,format=raw,id=mydrive -nographic -qtest \
stdio
outl 0xcf8 0x80001010
outl 0xcfc 0xe0000000
outl 0xcf8 0x80001004
outw 0xcfc 0x02
write 0xe000002c 0x1 0x05
write 0xe000000f 0x1 0x13
write 0xe000000c 0x1 0x10
write 0xe0000005 0x1 0x01
write 0xe0000006 0x1 0x02
write 0xe000000f 0x1 0x02
write 0xe0000003 0x1 0x00
EOF
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information