OpenCore  1.0.7
OpenCore Bootloader
Loading...
Searching...
No Matches
DeviceIo.h
Go to the documentation of this file.
1
12#ifndef __DEVICE_IO_H__
13#define __DEVICE_IO_H__
14
15#define EFI_DEVICE_IO_PROTOCOL_GUID \
16 { \
17 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
18 }
19
21
25#define DEVICE_IO_PROTOCOL EFI_DEVICE_IO_PROTOCOL_GUID
26
31
35typedef enum {
40 //
41 // Below enumerations are added in "Extensible Firmware Interface Specification,
42 // Version 1.10, Specification Update, Version 001".
43 //
49
68typedef
69EFI_STATUS
70(EFIAPI *EFI_DEVICE_IO)(
72 IN EFI_IO_WIDTH Width,
73 IN UINT64 Address,
74 IN UINTN Count,
75 IN OUT VOID *Buffer
76 );
77
82
97typedef
98EFI_STATUS
99(EFIAPI *EFI_PCI_DEVICE_PATH)(
100 IN EFI_DEVICE_IO_PROTOCOL *This,
101 IN UINT64 PciAddress,
102 IN OUT EFI_DEVICE_PATH_PROTOCOL **PciDevicePath
103 );
104
124
144typedef
145EFI_STATUS
146(EFIAPI *EFI_IO_MAP)(
147 IN EFI_DEVICE_IO_PROTOCOL *This,
148 IN EFI_IO_OPERATION_TYPE Operation,
149 IN EFI_PHYSICAL_ADDRESS *HostAddress,
150 IN OUT UINTN *NumberOfBytes,
151 OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
152 OUT VOID **Mapping
153 );
154
165typedef
166EFI_STATUS
167(EFIAPI *EFI_IO_UNMAP)(
168 IN EFI_DEVICE_IO_PROTOCOL *This,
169 IN VOID *Mapping
170 );
171
189typedef
190EFI_STATUS
191(EFIAPI *EFI_IO_ALLOCATE_BUFFER)(
192 IN EFI_DEVICE_IO_PROTOCOL *This,
193 IN EFI_ALLOCATE_TYPE Type,
194 IN EFI_MEMORY_TYPE MemoryType,
195 IN UINTN Pages,
196 IN OUT EFI_PHYSICAL_ADDRESS *HostAddress
197 );
198
208typedef
209EFI_STATUS
210(EFIAPI *EFI_IO_FLUSH)(
212 );
213
227typedef
228EFI_STATUS
229(EFIAPI *EFI_IO_FREE_BUFFER)(
230 IN EFI_DEVICE_IO_PROTOCOL *This,
231 IN UINTN Pages,
232 IN EFI_PHYSICAL_ADDRESS HostAddress
233 );
234
259
260extern EFI_GUID gEfiDeviceIoProtocolGuid;
261
262#endif
EFI_STATUS(EFIAPI * EFI_IO_UNMAP)(IN EFI_DEVICE_IO_PROTOCOL *This, IN VOID *Mapping)
Definition DeviceIo.h:167
EFI_STATUS(EFIAPI * EFI_DEVICE_IO)(IN EFI_DEVICE_IO_PROTOCOL *This, IN EFI_IO_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
Definition DeviceIo.h:70
EFI_STATUS(EFIAPI * EFI_IO_FLUSH)(IN EFI_DEVICE_IO_PROTOCOL *This)
Definition DeviceIo.h:210
EFI_IO_WIDTH
Definition DeviceIo.h:35
@ MMIO_COPY_UINT16
Definition DeviceIo.h:45
@ MMIO_COPY_UINT32
Definition DeviceIo.h:46
@ IO_UINT64
Definition DeviceIo.h:39
@ IO_UINT8
Definition DeviceIo.h:36
@ MMIO_COPY_UINT8
Definition DeviceIo.h:44
@ IO_UINT32
Definition DeviceIo.h:38
@ MMIO_COPY_UINT64
Definition DeviceIo.h:47
@ IO_UINT16
Definition DeviceIo.h:37
EFI_IO_OPERATION_TYPE
Definition DeviceIo.h:105
@ EfiBusMasterWrite
Definition DeviceIo.h:114
@ EfiBusMasterCommonBuffer
Definition DeviceIo.h:122
@ EfiBusMasterRead
Definition DeviceIo.h:109
EFI_STATUS(EFIAPI * EFI_IO_MAP)(IN EFI_DEVICE_IO_PROTOCOL *This, IN EFI_IO_OPERATION_TYPE Operation, IN EFI_PHYSICAL_ADDRESS *HostAddress, IN OUT UINTN *NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
Definition DeviceIo.h:146
EFI_GUID gEfiDeviceIoProtocolGuid
EFI_STATUS(EFIAPI * EFI_PCI_DEVICE_PATH)(IN EFI_DEVICE_IO_PROTOCOL *This, IN UINT64 PciAddress, IN OUT EFI_DEVICE_PATH_PROTOCOL **PciDevicePath)
Definition DeviceIo.h:99
EFI_STATUS(EFIAPI * EFI_IO_ALLOCATE_BUFFER)(IN EFI_DEVICE_IO_PROTOCOL *This, IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN OUT EFI_PHYSICAL_ADDRESS *HostAddress)
Definition DeviceIo.h:191
EFI_STATUS(EFIAPI * EFI_IO_FREE_BUFFER)(IN EFI_DEVICE_IO_PROTOCOL *This, IN UINTN Pages, IN EFI_PHYSICAL_ADDRESS HostAddress)
Definition DeviceIo.h:229
EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_INTERFACE
Definition DeviceIo.h:30
OC_TYPING_BUFFER_ENTRY Buffer[OC_TYPING_BUFFER_SIZE]
Definition OcTypingLib.h:42
EFI_IO_ACCESS Mem
Definition DeviceIo.h:243
EFI_IO_FREE_BUFFER FreeBuffer
Definition DeviceIo.h:257
EFI_PCI_DEVICE_PATH PciDevicePath
Definition DeviceIo.h:253
EFI_IO_ACCESS Pci
Definition DeviceIo.h:251
EFI_IO_ALLOCATE_BUFFER AllocateBuffer
Definition DeviceIo.h:255
EFI_DEVICE_IO Read
Definition DeviceIo.h:79
EFI_DEVICE_IO Write
Definition DeviceIo.h:80