[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
|
|
@ -310,16 +310,17 @@ pub fn port_poll(
|
|||
Ok((num_bytes, num_caps))
|
||||
}
|
||||
|
||||
pub fn register_irq(irq_num: u64) -> Result<Capability, ZError> {
|
||||
pub fn register_msi_irq() -> Result<(Capability, u64), ZError> {
|
||||
let mut irq_num: u64 = 0;
|
||||
let mut port_cap: z_cap_t = 0;
|
||||
syscall(
|
||||
zion::kZionIrqRegister,
|
||||
&zion::ZIrqRegisterReq {
|
||||
irq_num,
|
||||
zion::kZionMsiIrqRegister,
|
||||
&zion::ZMsiIrqRegisterReq {
|
||||
irq_num: &mut irq_num as *mut u64,
|
||||
port_cap: &mut port_cap,
|
||||
},
|
||||
)?;
|
||||
Ok(Capability::take(port_cap))
|
||||
Ok((Capability::take(port_cap), irq_num))
|
||||
}
|
||||
|
||||
pub fn endpoint_create() -> Result<Capability, ZError> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue