diff --git a/uefi/CHANGELOG.md b/uefi/CHANGELOG.md index ff89f01e7..31b4df6d7 100644 --- a/uefi/CHANGELOG.md +++ b/uefi/CHANGELOG.md @@ -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). diff --git a/uefi/src/proto/nvme/pass_thru.rs b/uefi/src/proto/nvme/pass_thru.rs index 14c087252..0854b840d 100644 --- a/uefi/src/proto/nvme/pass_thru.rs +++ b/uefi/src/proto/nvme/pass_thru.rs @@ -101,7 +101,7 @@ 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 { @@ -109,6 +109,18 @@ impl NvmePassThru { 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.