3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
28 // Global ID for the ISA I/O Protocol
31 #define EFI_ISA_IO_PROTOCOL_GUID \
32 { 0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
34 typedef struct _EFI_ISA_IO_PROTOCOL EFI_ISA_IO_PROTOCOL
;
37 // Prototypes for the ISA I/O Protocol
44 EfiIsaIoWidthReserved
,
45 EfiIsaIoWidthFifoUint8
,
46 EfiIsaIoWidthFifoUint16
,
47 EfiIsaIoWidthFifoUint32
,
48 EfiIsaIoWidthFifoReserved
,
49 EfiIsaIoWidthFillUint8
,
50 EfiIsaIoWidthFillUint16
,
51 EfiIsaIoWidthFillUint32
,
52 EfiIsaIoWidthFillReserved
,
54 } EFI_ISA_IO_PROTOCOL_WIDTH
;
57 // Attributes for common buffer allocations
59 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x080 // Map a memory range so write are combined
60 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED 0x800 // Map a memory range so all r/w accesses are cached
61 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 // Disable a memory range
64 // Channel attribute for DMA operations
66 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE 0x001
67 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A 0x002
68 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B 0x004
69 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C 0x008
70 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 0x010
71 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16 0x020
72 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE 0x040
73 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE 0x080
74 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE 0x100
77 EfiIsaIoOperationBusMasterRead
,
78 EfiIsaIoOperationBusMasterWrite
,
79 EfiIsaIoOperationBusMasterCommonBuffer
,
80 EfiIsaIoOperationSlaveRead
,
81 EfiIsaIoOperationSlaveWrite
,
82 EfiIsaIoOperationMaximum
83 } EFI_ISA_IO_PROTOCOL_OPERATION
;
87 (EFIAPI
*EFI_ISA_IO_PROTOCOL_IO_MEM
) (
88 IN EFI_ISA_IO_PROTOCOL
*This
,
89 IN EFI_ISA_IO_PROTOCOL_WIDTH Width
,
96 EFI_ISA_IO_PROTOCOL_IO_MEM Read
;
97 EFI_ISA_IO_PROTOCOL_IO_MEM Write
;
98 } EFI_ISA_IO_PROTOCOL_ACCESS
;
102 (EFIAPI
*EFI_ISA_IO_PROTOCOL_COPY_MEM
) (
103 IN EFI_ISA_IO_PROTOCOL
*This
,
104 IN EFI_ISA_IO_PROTOCOL_WIDTH Width
,
105 IN UINT32 DestOffset
,
112 (EFIAPI
*EFI_ISA_IO_PROTOCOL_MAP
) (
113 IN EFI_ISA_IO_PROTOCOL
*This
,
114 IN EFI_ISA_IO_PROTOCOL_OPERATION Operation
,
115 IN UINT8 ChannelNumber OPTIONAL
,
116 IN UINT32 ChannelAttributes
,
117 IN VOID
*HostAddress
,
118 IN OUT UINTN
*NumberOfBytes
,
119 OUT EFI_PHYSICAL_ADDRESS
*DeviceAddress
,
125 (EFIAPI
*EFI_ISA_IO_PROTOCOL_UNMAP
) (
126 IN EFI_ISA_IO_PROTOCOL
*This
,
132 (EFIAPI
*EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER
) (
133 IN EFI_ISA_IO_PROTOCOL
*This
,
134 IN EFI_ALLOCATE_TYPE Type
,
135 IN EFI_MEMORY_TYPE MemoryType
,
137 OUT VOID
**HostAddress
,
143 (EFIAPI
*EFI_ISA_IO_PROTOCOL_FREE_BUFFER
) (
144 IN EFI_ISA_IO_PROTOCOL
*This
,
151 (EFIAPI
*EFI_ISA_IO_PROTOCOL_FLUSH
) (
152 IN EFI_ISA_IO_PROTOCOL
*This
156 // Interface structure for the ISA I/O Protocol
158 struct _EFI_ISA_IO_PROTOCOL
{
159 EFI_ISA_IO_PROTOCOL_ACCESS Mem
;
160 EFI_ISA_IO_PROTOCOL_ACCESS Io
;
161 EFI_ISA_IO_PROTOCOL_COPY_MEM CopyMem
;
162 EFI_ISA_IO_PROTOCOL_MAP Map
;
163 EFI_ISA_IO_PROTOCOL_UNMAP Unmap
;
164 EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer
;
165 EFI_ISA_IO_PROTOCOL_FREE_BUFFER FreeBuffer
;
166 EFI_ISA_IO_PROTOCOL_FLUSH Flush
;
167 EFI_ISA_ACPI_RESOURCE_LIST
*ResourceList
;
172 extern EFI_GUID gEfiIsaIoProtocolGuid
;