11// SPDX-License-Identifier: MIT OR Apache-2.0
22
3- //! EDK2 IOMMU protocol.
3+ //! EDKII IOMMU protocol.
44
5+ use crate :: data_types:: PhysicalAddress ;
6+ use crate :: mem:: memory_map:: MemoryType ;
7+ use crate :: proto:: unsafe_protocol;
8+ use crate :: { Handle , Result , StatusExt } ;
59use core:: ffi:: c_void;
6- use uefi:: data_types:: PhysicalAddress ;
7- use uefi:: mem:: memory_map:: MemoryType ;
8- use uefi:: proto:: unsafe_protocol;
9- use uefi:: { Handle , Result , StatusExt } ;
1010use uefi_raw:: table:: boot:: AllocateType ;
1111
1212pub use crate :: proto:: dma:: { DmaBuffer , Mapping } ;
13- pub use crate :: uefi_raw:: protocol:: iommu:: {
13+ pub use uefi_raw:: protocol:: iommu:: {
1414 EdkiiIommuAccess , EdkiiIommuAttribute , EdkiiIommuOperation , EdkiiIommuProtocol ,
1515} ;
1616
@@ -33,10 +33,10 @@ impl Iommu {
3333 ///
3434 /// # Errors
3535 ///
36- /// * [`Status::INVALID_PARAMETER`]: invalid device handle, mapping, or access flags
37- /// * [`Status::UNSUPPORTED`]: operation not supported by this IOMMU
38- /// * [`Status::OUT_OF_RESOURCES`]: insufficient resources to modify IOMMU access
39- /// * [`Status::DEVICE_ERROR`]: IOMMU device reported an error
36+ /// * [`crate:: Status::INVALID_PARAMETER`]: invalid device handle, mapping, or access flags
37+ /// * [`crate:: Status::UNSUPPORTED`]: operation not supported by this IOMMU
38+ /// * [`crate:: Status::OUT_OF_RESOURCES`]: insufficient resources to modify IOMMU access
39+ /// * [`crate:: Status::DEVICE_ERROR`]: IOMMU device reported an error
4040 pub fn set_attribute (
4141 & self ,
4242 device_handle : Handle ,
@@ -58,10 +58,10 @@ impl Iommu {
5858 ///
5959 /// # Errors
6060 ///
61- /// * [`Status::INVALID_PARAMETER`]: invalid operation or buffer
62- /// * [`Status::UNSUPPORTED`]: host address cannot be mapped as a common buffer
63- /// * [`Status::OUT_OF_RESOURCES`]: insufficient resources
64- /// * [`Status::DEVICE_ERROR`]: system hardware could not map the requested address
61+ /// * [`crate:: Status::INVALID_PARAMETER`]: invalid operation or buffer
62+ /// * [`crate:: Status::UNSUPPORTED`]: host address cannot be mapped as a common buffer
63+ /// * [`crate:: Status::OUT_OF_RESOURCES`]: insufficient resources
64+ /// * [`crate:: Status::DEVICE_ERROR`]: system hardware could not map the requested address
6565 pub fn map (
6666 & self ,
6767 operation : EdkiiIommuOperation ,
@@ -104,9 +104,9 @@ impl Iommu {
104104 ///
105105 /// # Errors
106106 ///
107- /// * [`Status::INVALID_PARAMETER`]: invalid memory type or attributes
108- /// * [`Status::UNSUPPORTED`]: unsupported attributes
109- /// * [`Status::OUT_OF_RESOURCES`]: memory pages could not be allocated
107+ /// * [`crate:: Status::INVALID_PARAMETER`]: invalid memory type or attributes
108+ /// * [`crate:: Status::UNSUPPORTED`]: unsupported attributes
109+ /// * [`crate:: Status::OUT_OF_RESOURCES`]: memory pages could not be allocated
110110 pub fn allocate_buffer (
111111 & self ,
112112 memory_type : MemoryType ,
0 commit comments