diff --git a/xhcid/src/main.rs b/xhcid/src/main.rs index 50304e4c18..f64af404af 100644 --- a/xhcid/src/main.rs +++ b/xhcid/src/main.rs @@ -101,7 +101,10 @@ fn main() { name.push_str("_xhci"); let bar_ptr = match bar { - pcid_interface::PciBar::Memory(ptr) => ptr, + pcid_interface::PciBar::Memory(ptr) => match ptr { + 0 => panic!("BAR is mapped to address 0"), + _ => ptr, + }, other => panic!("Expected memory bar, found {}", other), };