mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
PCI DEN0115: Reliably check for a memory resource during probe.
rid was stack garbage, so the bus_alloc_resource_any() call could fail
and fall through to the SMCCC version check even if a bridge had a
memory resource.
Debugging help: jrtc27
Reviewed by: jrtc27
Fixes: c9a05c0722 Add a PCI driver that follows the Arm DEN0115 spec
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D41025
This commit is contained in:
parent
a248abb55a
commit
6582301f83
1 changed files with 2 additions and 1 deletions
|
|
@ -71,10 +71,11 @@ pci_host_acpi_smccc_probe(device_t dev)
|
|||
return (ENXIO);
|
||||
|
||||
/*
|
||||
* Check we have memory resources. We may have a non-memory
|
||||
* Check if we have memory resources. We may have a non-memory
|
||||
* mapped device, e.g. using the Arm PCI Configuration Space
|
||||
* Access Firmware Interface (DEN0115).
|
||||
*/
|
||||
rid = 0;
|
||||
res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0);
|
||||
if (res != NULL) {
|
||||
bus_release_resource(dev, SYS_RES_MEMORY, rid, res);
|
||||
|
|
|
|||
Loading…
Reference in a new issue