diff options
| author | Michael Brown | 2020-11-04 16:08:48 +0100 |
|---|---|---|
| committer | Michael Brown | 2020-11-04 16:16:22 +0100 |
| commit | 36dde9b0bf27ae411af677ca1fa3075113133cfe (patch) | |
| tree | e9f2cc06c015068c973a8b243943a4a4d3ac67f2 /src/include/ipxe/efi | |
| parent | [realtek] Reset NIC when closing interface if using legacy mode (diff) | |
| download | ipxe-36dde9b0bf27ae411af677ca1fa3075113133cfe.tar.gz ipxe-36dde9b0bf27ae411af677ca1fa3075113133cfe.tar.xz ipxe-36dde9b0bf27ae411af677ca1fa3075113133cfe.zip | |
[efi] Retain a long-lived reference to the EFI_PCI_IO_PROTOCOL instance
Provide opened EFI PCI devices with access to the underlying
EFI_PCI_IO_PROTOCOL instance, in order to facilitate the future use of
the DMA mapping methods within the fast data path.
Do not require the use of this stored EFI_PCI_IO_PROTOCOL instance for
memory-mapped I/O (since the entire point of memory-mapped I/O as a
concept is to avoid this kind of unnecessary complexity) or for
slow-path PCI configuration space accesses (since these may be
required for access to PCI bus:dev.fn addresses that do not correspond
to a device bound via our driver binding protocol instance).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi')
| -rw-r--r-- | src/include/ipxe/efi/efi_pci.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/include/ipxe/efi/efi_pci.h b/src/include/ipxe/efi/efi_pci.h index 6dd945f05..2ea1a8f0e 100644 --- a/src/include/ipxe/efi/efi_pci.h +++ b/src/include/ipxe/efi/efi_pci.h @@ -17,9 +17,17 @@ static inline EFIAPI uint64_t LShiftU64 ( UINT64 value, UINTN shift ) { return ( value << shift ); } +/** An EFI PCI device */ +struct efi_pci_device { + /** PCI device */ + struct pci_device pci; + /** PCI I/O protocol */ + EFI_PCI_IO_PROTOCOL *io; +}; + extern int efipci_open ( EFI_HANDLE device, UINT32 attributes, - struct pci_device *pci ); + struct efi_pci_device *efipci ); extern void efipci_close ( EFI_HANDLE device ); -extern int efipci_info ( EFI_HANDLE device, struct pci_device *pci ); +extern int efipci_info ( EFI_HANDLE device, struct efi_pci_device *efipci ); #endif /* _IPXE_EFI_PCI_H */ |
