[Zion][Denali] Move to MSI for AHCI devices.
This will allow us to properly do interrupts for XHCI devices in the future. Also move PCI device header parsing to a shared library. Get rid of the old irq register format which supplied an irq number and instead pass the appropriate irq number back out to the caller.
This commit is contained in:
parent
c645405ca8
commit
f26fd73116
21 changed files with 371 additions and 124 deletions
|
|
@ -120,6 +120,12 @@ impl<T> AsRef<T> for MemoryRegion {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> AsMut<T> for MemoryRegion {
|
||||
fn as_mut(&mut self) -> &mut T {
|
||||
unsafe { (self.virt_addr as *mut T).as_mut().unwrap() }
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for MemoryRegion {
|
||||
fn drop(&mut self) {
|
||||
// FIXME: We shouldn't have to do this manual adjustment.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue