mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 19:49:45 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user