pcengines/apu2-documentation

PCI resources - I/O port space issue

Opened this issue · 2 comments

Up to and including v4.11.0.4 the following warning for failing to allocate I/O port window would appear in FreeBSD 11.x dmesg:
pcib1: failed to allocate initial I/O port window: 0x1000-0x1fff

In v4.11.0.5 the warning disappeared - presumably resulting from GNB IOAPIC change:
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: could not evaluate _ADR - AE_NOT_FOUND
pci0: <ACPI PCI bus> on pcib0
pci0: <base peripheral, IOMMU> at device 0.2 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> irq 25 at device 2.2 on pci0
pci1: <ACPI PCI bus> on pcib1
igb0: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port 0x1000-0x101f mem 0xf7900000-0xf791ffff,0xf7920000-0xf7923fff irq 28 at device 0.0 on pci1

Note that the igb driver has access to I/O port range 0x1000-0x101f

Unfortunately the same message is now back in v4.11.0.6:
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: could not evaluate _ADR - AE_NOT_FOUND
pci0: <ACPI PCI bus> on pcib0
pci0: <base peripheral, IOMMU> at device 0.2 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> irq 25 at device 2.2 on pci0
pcib1: failed to allocate initial I/O port window: 0x1000-0x1fff
pci1: <ACPI PCI bus> on pcib1
igb0: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> mem 0xf7900000-0xf791ffff,0xf7920000-0xf7923fff irq 28 at device 0.0 on pci1

The igb driver no longer has access to I/O range as above. Fortunately there is no impact as the FreeBSD igb driver is able to use memory access instead.

Is this a possible regression?

@dugeem I think it is rather caused by the ACPI CPU declarations somehow. In v4.11.0.5 the CPUs were described correctly, however, not all BSD systems implement the ACPI specification requirements for CPUs yet, which caused the system to not detect CPUs on ACPI (see pcengines/coreboot#389). As far as I know, since FreeBSD 12.x it is done correctly. I will check what is going on either way.

@dugeem v4.11.0.5 seems to be the only working version for unknown reason. Around v4.11.0.5 and v4.11.0.6 we have been doing the ACPi transitions to be compliant to the newer ACPI specification and I suspect that the kernel gave up relying on ACPI at some point in v4.11.0.5 allocating resources by itself.

We have tested also the newer FreeBSD 12.1 and the error still persists across all firmware versions (even v4.11.0.5). To me it looks like a FreeBSD issue rather than BIOS issue, because coreboot and Linux doesn't show problems with allocating IO ports for this bridge.