Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions uefi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Added `proto::shell::Shell::{var(), set_var(), vars()}`
- Added `proto::pci::root_bridge::PciRootBridgeIo::configuration()`.
- Added `proto::pci::root_bridge::PciRootBridgeIo::enumerate()`.
- Added `proto::nvme::pass_thru::NvmePassThru::broadcast()`.

## Changed
- Changed ordering of `proto::pci::PciIoAddress` to (bus -> dev -> fun -> reg -> ext_reg).
Expand Down
14 changes: 13 additions & 1 deletion uefi/src/proto/nvme/pass_thru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,26 @@ impl NvmePassThru {
/// This can be used to send ADMIN commands.
///
/// # Returns
/// A [`NvmeNamespaceIterator`] for iterating through the namespaces.
/// A [`NvmeNamespace`] addressing the controller (nsid = 0).
#[must_use]
pub const fn controller(&self) -> NvmeNamespace<'_> {
NvmeNamespace {
proto: &self.0,
namespace_id: 0,
}
}

/// Get the broadcast namespace (id = 0xffffffff).
///
/// # Returns
/// A [`NvmeNamespace`] with nsid = 0xffffffff.
#[must_use]
pub const fn broadcast(&self) -> NvmeNamespace<'_> {
NvmeNamespace {
proto: &self.0,
namespace_id: 0xffffffff,
}
}
}

/// Represents one namespace on an NVMe controller.
Expand Down
Loading