Page MenuHomeFreeBSD

nvme: Add handling for bar5
Needs ReviewPublic

Authored by jtranoleary_google.com on Thu, Oct 16, 7:21 PM.

Details

Summary

The NVMe spec allows the Table BIR (TBIR) and PBA DIR (PBIR) to
be 0, 4, or 5. The existing NVMe driver basically only has support
for 4, perhaps under the assumption that BAR4 is 64-bit and also
occupies BAR5.

This change adds support for BAR5, covering the case where BAR4
and BAR5 might both be present and 32-bit, where the Table BIR
might be 4 and the PBA BIR might be 5, or vice versa.

The NVMe spec (in the SR-IOV section) also permits VFs to use BIR=2,
so I haven't added stricter checks on which BIR will be permitted
by the driver.

Co-authored-by: Matt Delco <delco@google.com>
Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67830
Build 64713: arc lint + arc unit