Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/propolis/src/hw/nvme/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -785,12 +785,29 @@ impl PciNvme {
let cqes = size_of::<CompletionQueueEntry>().trailing_zeros() as u8;
let sqes = size_of::<SubmissionQueueEntry>().trailing_zeros() as u8;

let mn = {
// Use all spaces for the model: otherwise, OVMF's boot order may be
// affected.
let mn = [0x20u8; 40];
mn
};

let fr = {
let mut fr = [0u8; 8];
const FW_REV: &'static str = "1.0";
let sz = FW_REV.len().min(40);
fr[..sz].clone_from_slice(&FW_REV.as_bytes()[..sz]);
fr
};

// Initialize the Identify structure returned when the host issues
// an Identify Controller command.
let ctrl_ident = bits::IdentifyController {
vid: VENDOR_OXIDE,
ssvid: VENDOR_OXIDE,
sn: *serial_number,
mn,
fr,
ieee: OXIDE_OUI,
mdts: mdts.unwrap_or(0),
// We use standard Completion/Submission Queue Entry structures with no extra
Expand Down
Loading