What the review read and ran
An appendix to the milestone.
The crate
partsfoundry/designware_mobile_storage at ac950346f360fa260ef23e3601738376f9ea66f1,
version 0.1.0-pre.3. Read: Cargo.toml, README.md, CHANGELOG.md and every module under
src/ (host_controller, sd, card, command, internal_direct_memory_access,
registers, exported_simulator and proofs), with the simulator read for its types only.
The commands
cargo build --lib --target riscv64imac-unknown-none-elfpasses.cargo build --lib --target riscv64imac-unknown-none-elf --features simulatorfails with 320 errors (missingderive,assertandvec), since the feature turns offno_stdand the bare target has no std (P1-1).grep -c 'kani::proof' src/proofs.rsprints 22 (P1-2).
The comparators read
Each .crate from crates.io at the version in the prior-art table, unpacked and read.
embedded-sdmmc0.10.0: an SD card in SPI mode overembedded-hal, with a FAT volume manager above it andBlockDevicefromembedded-sdmmc-types.embedded-sdmmc-types0.1.0:BlockDevicewithread(&self, &mut [Block], BlockIdx),write(&self, &[Block], BlockIdx)andnum_blocks, its error type bound bycore::error::Error. The methods take&self, so an adapter over&mut HostControllerneeds a cell.block-device-driver0.2.0: an asyncBlockDevice<const SIZE: usize>with an alignment type.sdmmc-protocol0.5.4 anddwmmc-host0.4.2: the card protocol over thesdmmc_host::SdMmcHosttrait, and the controller behind it.dwmmc-hostopens withpub unsafe fn new(base: NonNull<u8>), states that block I/O uses the internal engine only and completes through acknowledged interrupts, takes its region fromdma-api, and supports UHS-I and HS200 clocking, which this crate does not.simple-sdmmc0.1.1: the same controller.read_block,write_block,read_blocksandwrite_blocksunwrapthe command's result;read_blocks_dmaandwrite_blocks_dmadivide the length by the block size and castbuf.as_ptr()tou32, under a comment that the virtual address must equal the physical.sdio-host0.9.0 andsdio0.5.3: card register types, for the neighbor role.sdmmc0.1.0: measured, not read.
The systems outside Rust
- Linux v6.12,
drivers/mmc/host/dw_mmc.c:dma_map_sgmaps the request's own pages for the engine,dw_mci_opsfillsmmc_host_opsbetween the card core and the controller, anddma_64bit_addressselects the 64-bit descriptor format. - U-Boot v2025.10,
drivers/mmc/dw_mmc.c:bounce_buffer_startaround each engine transfer, both descriptor formats, anddm_mmc_opsbetween the card layer and the controller.
Both are GPL; the review read them for their interface shape only.
What was not run
- No benchmark: the throughput question (P2-2) needs a board, and the simulator models no bus timing.
- Kani was not run; the harness count is from source.
- The review built and ran no comparator.