#
72a3412d |
| 12-Nov-2023 |
jmcneill <jmcneill@NetBSD.org> |
pci: Improve resource allocation for non-prefetchable BARs.
When allocating resources for PCI devices, use the following criteria: - Prefetchable memory must be allocated from the prefetchable rang
pci: Improve resource allocation for non-prefetchable BARs.
When allocating resources for PCI devices, use the following criteria: - Prefetchable memory must be allocated from the prefetchable range of the parent bridge. - For 64-bit MMIO, try the prefetchable range first, and fallback to the non-prefetchable range. The idea here is to preserve 32-bit resources for 32-bit BARs. - For 32-bit MMIO, try the non-prefetchable range first. If that fails, make one last attempt at allocating from the prefetchable range, in the event that it has resources below 4GB.
show more ...
|
#
1099f047 |
| 14-Oct-2022 |
jmcneill <jmcneill@NetBSD.org> |
Add a PCI resource manager and use it on Arm ACPI platforms.
The Arm ACPI code relied on PCI_NETBSD_CONFIGURE to configure devices that were not enabled by system firmware. This is not safe to do un
Add a PCI resource manager and use it on Arm ACPI platforms.
The Arm ACPI code relied on PCI_NETBSD_CONFIGURE to configure devices that were not enabled by system firmware. This is not safe to do unless the firmware explicitly permits it using a device specific method defined in the PCI firmware spec.
Introduce a new PCI resource manager that discovers what has already been configured by firmware and allocates from the remaining space. This will ensure that devices setup by firmware are untouched and only will program BARs of devices that are not enabled at boot time.
The current implementation assumes that the parent PCI-PCI bridge's are already configured. A worthwhile improvement in the future would be to support programming windows for bridges that are not fully configured.
show more ...
|