mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
Further relax the strictness of enforcing allocations to only come from
decoded ranges. Pass any request for a specific range that fails because it is not in a decoded range for an ACPI Host-PCI bridge up to the parent to see if it can still be allocated. This is based on the assumption that many BIOSes are inconsistent/broken and that settings programmed into BARs or resources assigned to other built-in components are more trustworthy than the list of decoded resource ranges in _CRS. This effectively limits the decoded ranges to only being used for "wildcard" ranges when allocating fresh resources for a BAR, etc. At some point I would like to only be this permissive during an early scan of firmware-assigned resources during boot and to be strict about all later allocations, but that isn't viable currently. MFC after: 2 weeks
This commit is contained in:
parent
0c0d27d5dd
commit
a74d695299
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228961
@ -511,8 +511,17 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid,
|
||||
sc = device_get_softc(dev);
|
||||
res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end,
|
||||
count, flags);
|
||||
|
||||
/*
|
||||
* XXX: If this is a request for a specific range, assume it is
|
||||
* correct and pass it up to the parent. What we probably want to
|
||||
* do long-term is explicitly trust any firmware-configured
|
||||
* resources during the initial bus scan on boot and then disable
|
||||
* this after that.
|
||||
*/
|
||||
if (res == NULL && start + count - 1 == end)
|
||||
res = acpi_alloc_sysres(child, type, rid, start, end, count, flags);
|
||||
res = bus_generic_alloc_resource(dev, child, type, rid, start, end,
|
||||
count, flags);
|
||||
return (res);
|
||||
#else
|
||||
return (bus_generic_alloc_resource(dev, child, type, rid, start, end,
|
||||
|
Loading…
Reference in New Issue
Block a user