#[repr(packed(1))]pub struct InitializationSegment { /* private fields */ }
Expand description
The initialization segment is located at offset 0 of PCI BAR0. It is used in the initialization procedure of the device, and it contains the 32-bit command doorbell vector used to inform the HW when a command is ready to be processed.
Implementations§
source§impl InitializationSegment
impl InitializationSegment
sourcepub fn num_cmdq_entries(&self) -> u8
pub fn num_cmdq_entries(&self) -> u8
Returns the maximum number of entries that can be in the command queue
sourcepub fn cmdq_entry_stride(&self) -> u8
pub fn cmdq_entry_stride(&self) -> u8
Returns the required stride of command queue entries (bytes between the start of consecutive entries)
sourcepub fn set_physical_address_of_cmdq(
&mut self,
cmdq_physical_addr: PhysicalAddress
) -> Result<(), &'static str>
pub fn set_physical_address_of_cmdq( &mut self, cmdq_physical_addr: PhysicalAddress ) -> Result<(), &'static str>
Sets the physical address of the command queue within the initialization segment.
Arguments
cmdq_physical_addr
: the starting physical address of the command queue, the lower 12 bits of which must be zero.
sourcepub fn device_is_initializing(&self) -> bool
pub fn device_is_initializing(&self) -> bool
Returns true if the device is still initializing, and driver should not pass any commands to the device.
Trait Implementations§
source§impl Debug for InitializationSegment
impl Debug for InitializationSegment
impl FromBytes for InitializationSegment
Auto Trait Implementations§
impl RefUnwindSafe for InitializationSegment
impl Send for InitializationSegment
impl Sync for InitializationSegment
impl Unpin for InitializationSegment
impl UnwindSafe for InitializationSegment
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more