Skip to content

Commit 55051fe

Browse files
Bjorn Helgaasjbarnes993
authored andcommitted
x86/PCI: never allocate PCI MMIO resources below BIOS_END
When we move a PCI device or assign resources to a device not configured by the BIOS, we want to avoid the BIOS region below 1MB. Note that if the BIOS places devices below 1MB, we leave them there. See https://bugzilla.kernel.org/show_bug.cgi?id=15744 and https://bugzilla.kernel.org/show_bug.cgi?id=15841 Tested-by: Andy Isaacson <adi@hexapodia.org> Tested-by: Andy Bailey <bailey@akamai.com> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent b91ce4d commit 55051fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎arch/x86/pci/i386.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ pcibios_align_resource(void *data, const struct resource *res,
7272
return start;
7373
if (start & 0x300)
7474
start = (start + 0x3ff) & ~0x3ff;
75+
} else if (res->flags & IORESOURCE_MEM) {
76+
if (start < BIOS_END)
77+
start = BIOS_END;
7578
}
7679
return start;
7780
}

0 commit comments

Comments
 (0)