[−][src]Struct sunrise_ahci::hba::HbaMemoryRegisters
HBA memory registers.
See spec section 3.1
Found at address in pci configuration register BAR5.
Fields
generic_host_control: GenericHostControl_rsv: [Mmio<u8>; 116]_rsv_vendor: [Mmio<u8>; 96]ports: [Px; 32]Implementations
impl HbaMemoryRegisters[src]
pub fn init(bar5: usize) -> Vec<Disk>[src]
Initializes an AHCI Controller.
BAR5 is the physical address of HBA Memory Register, usually obtained via PCI discovery.
This function will map the root Mmio region, allocate memory for every 'implemented' port, put them in the running state, and return an interface to the plugged devices which is up and running.
Error
If an error occurred, this function will stop trying to initialize the HBA and return an empty Vec as if no disks were found. This can happen if:
- mapping
BAR5failed. - GHC.AE is not set (controller is in legacy support mode), because conditions specified in section 10.2 are tedious.
Auto Trait Implementations
impl RefUnwindSafe for HbaMemoryRegisters
impl Send for HbaMemoryRegisters
impl Sync for HbaMemoryRegisters
impl Unpin for HbaMemoryRegisters
impl UnwindSafe for HbaMemoryRegisters
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> SizedIPCBuffer for T[src]
fn size(&self) -> usize[src]
fn is_cool(addr: usize, size: usize) -> bool[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,