Skip to content

nvme.device 1.66

Latest

Choose a tag to compare

@derfsss derfsss released this 12 Apr 22:37
· 22 commits to master since this release

nvme.device 1.66 — 2026-04-12

Feature-completeness release. Four new SCSI sub-commands added to HD_SCSICMD, driven by an integration survey of blockdev.library and what SAT-aware tools actually call. Includes the first NVMe TRIM implementation in the Amiga ecosystem.

What's new

  • UNMAP (CDB 0x42) → NVMe Dataset Management with Deallocate (AD=1). Translates up to 256 16-byte SCSI block descriptors per call into the NVMe DSM range-descriptor format and issues one DSM command. Pre-pinned 4 KiB range buffer per unit. Gated on ONCS.DSM from Identify Controller and on successful buffer allocation; unsupported gracefully with CHECK CONDITION.
  • READ CAPACITY(16) (CDB 0x9E). 32-byte response with 64-bit last LBA. Future-proofs > 2 TiB namespaces.
  • SYNCHRONIZE CACHE(10) (CDB 0x35). Translates to NVMe Flush via the new NVMeIO_SubmitAndWait primitive (sync variant of submit that poll-harvests and suppresses the normal Harvest reply so the SCSI handler can translate status before replying).
  • MODE SENSE / MODE SELECT page 0x08 (Caching) — CDB 0x1A / 0x5A / 0x15 / 0x55. The WCE bit maps to NVMe Set Features 0x06 (Volatile Write Cache) via new NVMe_SetFeature / NVMe_GetFeature admin wrappers. State tracked on the controller, seeded from Identify byte 525 bit 0.

What's kept from v1.65

All performance wins from the prior sweep are carried forward unchanged:

  • IExec->CopyMem on the bounce hot path
  • Alignment-aware bounce vs direct-DMA selection
  • Pre-allocated DMAEntry pool per inflight slot
  • NVMeIO_SubmitNoRing + event-loop SQ doorbell batching
  • MDTS soft-cap 2 MiB
  • Signal-handshake shutdown, volatile cross-task fields, ATA PASS-THROUGH SMART tab, et al.

Archive contents (nvme.lha)

nvme/
├── AutoInstall               (AmiUpdate installer)
├── nvme.device               (v1.66 release, 74 204 B)
├── nvme.device.debug         (v1.66 debug — rename to install)
├── test_nvme                 (10-step functional test)
├── nvme_stats                (CLI monitor for NSCMD_NVME_GETSTATS)
├── nvme.readme               (plain-text end-user docs)
└── diskboot.config.sample    (example Kickstart: diskboot.config entry)
nvme.readme                   (duplicate at archive root for os4depot)

Install

lha x nvme.lha
execute nvme/AutoInstall

For boot-drive use, copy nvme.device into Kickstart: and append nvme.device 1 1 to Kickstart:diskboot.config. Full procedure in docs/nvme_boot_strategy.md.

Tested

  • QEMU Pegasos2 end-to-end: boots to DOS / Workbench, partitioned via Media Toolbox, formatted with SFS/00, AmigaDiskBench passes, SMART tab via HD_SCSICMD ATA PASS-THROUGH.
  • New SCSI sub-commands build clean and dispatch correctly; blockdev.library integration will exercise them at runtime.

Links