File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ pub(crate) fn init() {
9494 }
9595
9696 // For Hermit, we currently limit scanning to the first 32 buses.
97- const PCI_MAX_BUS_NUMBER : u8 = 32 ;
9897 scan_bus (
9998 0 ..PCI_MAX_BUS_NUMBER ,
10099 PciConfigRegion :: Pci ( LegacyPciConfigRegion :: new ( ) ) ,
@@ -205,11 +204,7 @@ mod pcie {
205204 let region_start = u64:: try_from ( mem_region. starting_address . addr ( ) ) . unwrap ( ) ;
206205 let region_end = region_start + u64:: try_from ( mem_region. size . expect ( "found a memory region with no declared size" ) ) . unwrap ( ) ;
207206
208- if
209- ( pci_start >= region_start && pci_start <= region_end) // PCI region starts within the memory region
210- || ( pci_end >= region_start && pci_end <= region_end) // PCI region ends within the memory region
211- || ( pci_start <= region_start && pci_end >= region_end) // PCI region contains the memory region
212- {
207+ if pci_start < region_end && pci_end > region_start {
213208 error ! ( "The declared PCI region {pci_start:x}-{pci_end:x} may overlap with physical memory region {region_start:x}-{region_end:x}" ) ;
214209 return false ;
215210 }
You can’t perform that action at this time.
0 commit comments