mirror of
https://github.com/ipxe/ipxe
synced 2025-12-07 09:50:26 +03:00
[ena] Use pci_bar_set() to place device within bridge memory window
Use pci_bar_set() when we need to set a device base address (on instance types such as c6i.metal where the BIOS fails to do so), so that 64-bit BARs will be handled automatically. This particular issue has so far been observed only on 6th generation instances. These use 32-bit BARs, and so the lack of support for handling 64-bit BARs has not caused any observable issue. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1102,7 +1102,7 @@ static int ena_membase ( struct ena_nic *ena, struct pci_device *pci ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Place device at start of memory window */
|
/* Place device at start of memory window */
|
||||||
pci_write_config_dword ( pci, PCI_BASE_ADDRESS_0, bridge->membase );
|
pci_bar_set ( pci, PCI_BASE_ADDRESS_0, bridge->membase );
|
||||||
pci->membase = bridge->membase;
|
pci->membase = bridge->membase;
|
||||||
DBGC ( ena, "ENA %p at " PCI_FMT " claiming bridge " PCI_FMT " mem "
|
DBGC ( ena, "ENA %p at " PCI_FMT " claiming bridge " PCI_FMT " mem "
|
||||||
"%08x\n", ena, PCI_ARGS ( pci ), PCI_ARGS ( bridge->pci ),
|
"%08x\n", ena, PCI_ARGS ( pci ), PCI_ARGS ( bridge->pci ),
|
||||||
|
|||||||
Reference in New Issue
Block a user