diff options
author | Michael Brown <mcb30@ipxe.org> | 2020-10-30 14:22:55 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2020-10-30 14:25:41 +0000 |
commit | 9b25f6e5cf517f426de80ede618398ef01e385f9 (patch) | |
tree | 96e3e438148ed0270265b9b3564699498fa3cb54 /src/interface | |
parent | 16873703ddea2d64fac1809967ef5198b8764baa (diff) | |
download | ipxe-9b25f6e5cf517f426de80ede618398ef01e385f9.tar.gz |
[efi] Fall back to assuming identity mapping of MMIO address space
Some UEFI systems (observed with a Supermicro X11SPG-TF motherboard)
seem to fail to provide a valid ACPI address space descriptor for the
MMIO address space associated with a PCI root bridge.
If no valid descriptor can be found, fall back to assuming that the
MMIO address space is identity mapped, thereby matching the behaviour
prior to commit 27e886c ("[efi] Use address offset as reported by
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL").
Debugged-by: Tore Anderson <tore@fud.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface')
-rw-r--r-- | src/interface/efi/efi_pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c index 93a3738a9..f72ba13b4 100644 --- a/src/interface/efi/efi_pci.c +++ b/src/interface/efi/efi_pci.c @@ -244,7 +244,6 @@ void * efipci_ioremap ( struct pci_device *pci, unsigned long bus_addr, uint64_t offset; uint64_t start; uint64_t end; - void *io_addr = NULL; EFI_STATUS efirc; int rc; @@ -282,10 +281,9 @@ void * efipci_ioremap ( struct pci_device *pci, unsigned long bus_addr, PCI_ARGS ( pci ), bus_addr, len ); bus_addr -= offset; DBGC2 ( pci, "%08lx\n", bus_addr ); - io_addr = ioremap ( bus_addr, len ); break; } - if ( ! io_addr ) { + if ( tag == ACPI_END_RESOURCE ) { DBGC ( pci, "EFIPCI " PCI_FMT " %08lx+%zx is not within " "root bridge address space\n", PCI_ARGS ( pci ), bus_addr, len ); @@ -294,7 +292,7 @@ void * efipci_ioremap ( struct pci_device *pci, unsigned long bus_addr, err_config: efipci_root_close ( handle ); err_root: - return io_addr; + return ioremap ( bus_addr, len ); } PROVIDE_PCIAPI_INLINE ( efi, pci_num_bus ); |