StructsΒ§
- Capability π
- Command π
- Completion π
- Completion
Entry π - Controller
Config π - Controller
Status π - Identify
Controller πData - Identify Controller data (partial : fields we need).
- Identify
Namespace πData - Identify Namespace data (first 384 bytes needed). Layout per NVMe spec: bytes 0-73 are explicit fields, 74-127 reserved, 128-383 LBAF[0..64].
- IoQueue π
- IoQueue
Pair π - LbaFormat π
- LBA Format descriptor (4 bytes each, starting at byte 128 of Identify Namespace).
- Nvme
Completion Result - Nvme
Controller - Nvme
Namespace - Queue π
- Queue
Pair π - Registers π
- Submission π
- Version π
- Volatile
Cell π
EnumsΒ§
- Nvme
Error π
ConstantsΒ§
- ADMIN_
CQE_ πERROR - IO_
QUEUE_ πSIZE - MAX_
IO_ πCOMMANDS - MAX_
PRP_ πENTRIES - NVME_
PAGE_ πSIZE
StaticsΒ§
- NVME_
CONTROLLERS π - NVME_
INITIALIZED π - NVME_
IRQ_ LINE
TraitsΒ§
- Queue
Type π
FunctionsΒ§
- build_
prp_ π βlist - Build PRP (Physical Region Page) list for a physically contiguous buffer.
- get_
first_ controller - handle_
interrupt - init
- is_
available - list_
controllers - rdtsc π
- Read the TSC (Time Stamp Counter).
- regs_
read64 π β - Read a 64-bit register from the NVMe controller.
- tsc_
deadline_ πms - Get a TSC deadline for
msmilliseconds from now. - tsc_
expired π - Check if a TSC deadline has expired.
- tsc_
to_ πms - Convert TSC ticks to approximate milliseconds (assumes ~3GHz TSC). For exact calibration, use the kernelβs TSC frequency if available.