Skip to content

eMMC support is missing as a storage type

Goal

Some SBC systems use eMMC based storage to boot and execute. There is a very subtle difference between sd-card and eMMC but its sufficient to stop a bootloader from successfully starting the system. I am asking that the QEMU group adds support for eMMC storage cards, and a generic controller.

Technical details

I believe the already existing generic sdhci already mimics sufficiently close enough something similar to Arasan SD/eMMC controller, but there is no storage card for eMMC which means the command interpretation is lacking. It would be very useful for some boards models to have additional commands such as;

  • CMD8 (SEND_EXTCSD),
  • CMD6 (CMD_SET) for setting EXT_CSD bits, and function/command setting
  • CMD35/36 ERASE_GROUP_START/ERASE_GROUP_END
  • Boot partitions, RPMB partition, and arbitrary partition sizes
  • Various EXT/CSD bit differences
  • switches or files to allow setting of the CSD/CID/EXT_CSD parameters
  • allow for sdcard-spec upto 9.0 from 2022, and eMMC to 5.1a from 2019
  • Auto-CMD23 transfer feature (SDHCI controller)

Additional information

There seems several attempts at this, but the most recent appears much more complete:

Historical; "[PATCH v3 06/21] sd: emmc: Update CMD8 to send EXT_CSD register" https://mail.gnu.org/archive/html/qemu-devel/2021-03/msg00118.html

"[RFC PATCH 00/17] hw/sd: Rework models for eMMC support" https://lore.kernel.org/qemu-devel/8aa56da0-a54a-102a-fc85-2fa9f02c18d1@kaod.org/

2011 eMMC original support https://lists.nongnu.org/archive/html/qemu-devel/2011-07/msg02835.html

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information