[Denali] Reset HBA and iterate over ports.

This commit is contained in:
Drew Galbraith 2024-09-10 01:12:32 -07:00
parent 7d4c882f2b
commit df79233bbb
6 changed files with 289 additions and 162 deletions

View file

@ -295,6 +295,18 @@ pub fn port_poll(
Ok((num_bytes, num_caps))
}
pub fn register_irq(irq_num: u64) -> Result<Capability, ZError> {
let mut port_cap: z_cap_t = 0;
syscall(
zion::kZionIrqRegister,
&zion::ZIrqRegisterReq {
irq_num,
port_cap: &mut port_cap,
},
)?;
Ok(Capability::take(port_cap))
}
pub fn endpoint_create() -> Result<Capability, ZError> {
let mut endpoint_cap: z_cap_t = 0;
syscall(