Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/pci: Squash warning from devices with no ecaps
The PCIe Base spec says that normal endpoints that implement no extended capabilities should return 0x0 when reading from 0x100. In other words the extended capability ID and next pointer should be zero. The rules are slightly different for root complex integrated endpoints and root ports. Those are supposed to return 0xFFFF for the extended capbility ID if they implement no extended capabilities in their Root Complex Register Block. For a bit of added fun QEMU just returns 0xFFs for any reads above 0x100 when the device doesn't implement any extended capabilities, so check for that too. Fixing this isn't really needed since we already detect loops in the capability linked-list, but it squashes some spurious errors when booting under Qemu. e.g. [ 6.128432797,5] PCI: Probing slots... [ 6.141580545,3] PHB#0000:01:00.0 pci_find_ecap hit a loop ! [ 6.147535578,3] PHB#0001:01:00.0 pci_find_ecap hit a loop ! [ 6.151533200,3] PHB#0002:01:00.0 pci_find_ecap hit a loop ! [ 6.158426029,3] PHB#0002:02:00.0 pci_find_ecap hit a loop ! [ 6.159566265,3] PHB#0002:02:01.0 pci_find_ecap hit a loop ! [ 6.160878962,3] PHB#0002:02:02.0 pci_find_ecap hit a loop ! [ 6.171709230,3] PHB#0002:09:00.0 pci_find_ecap hit a loop ! Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
- Loading branch information