3 Copyright (c) 2004 - 2008, 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 // Common definitions for Light ISA I/O Protocol and ISA I/O Protocol
31 #include EFI_PROTOCOL_DEFINITION(IsaAcpi)
37 EfiIsaIoWidthReserved
,
38 EfiIsaIoWidthFifoUint8
,
39 EfiIsaIoWidthFifoUint16
,
40 EfiIsaIoWidthFifoUint32
,
41 EfiIsaIoWidthFifoReserved
,
42 EfiIsaIoWidthFillUint8
,
43 EfiIsaIoWidthFillUint16
,
44 EfiIsaIoWidthFillUint32
,
45 EfiIsaIoWidthFillReserved
,
47 } EFI_ISA_IO_PROTOCOL_WIDTH
;
50 // Attributes for common buffer allocations
52 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x080 // Map a memory range so write are combined
53 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED 0x800 // Map a memory range so all r/w accesses are cached
54 #define EFI_ISA_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 // Disable a memory range
57 // Channel attribute for DMA operations
59 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE 0x001
60 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A 0x002
61 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B 0x004
62 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C 0x008
63 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 0x010
64 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16 0x020
65 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE 0x040
66 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE 0x080
67 #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE 0x100
70 EfiIsaIoOperationBusMasterRead
,
71 EfiIsaIoOperationBusMasterWrite
,
72 EfiIsaIoOperationBusMasterCommonBuffer
,
73 EfiIsaIoOperationSlaveRead
,
74 EfiIsaIoOperationSlaveWrite
,
75 EfiIsaIoOperationMaximum
76 } EFI_ISA_IO_PROTOCOL_OPERATION
;
79 // Specific for ISA I/O Protocol
82 #define EFI_INTERFACE_DEFINITION_FOR_ISA_IO EFI_ISA_IO_PROTOCOL
83 #define EFI_ISA_IO_PROTOCOL_VERSION &gEfiIsaIoProtocolGuid
84 #define EFI_ISA_IO_OPERATION_TOKEN EfiIsaIoOperationBusMasterWrite
88 // Global ID for the ISA I/O Protocol
91 #define EFI_ISA_IO_PROTOCOL_GUID \
92 { 0x7ee2bd44, 0x3da0, 0x11d4, {0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
94 EFI_FORWARD_DECLARATION (EFI_ISA_IO_PROTOCOL
);
98 (EFIAPI
*EFI_ISA_IO_PROTOCOL_IO_MEM
) (
99 IN EFI_ISA_IO_PROTOCOL
*This
,
100 IN EFI_ISA_IO_PROTOCOL_WIDTH Width
,
107 EFI_ISA_IO_PROTOCOL_IO_MEM Read
;
108 EFI_ISA_IO_PROTOCOL_IO_MEM Write
;
109 } EFI_ISA_IO_PROTOCOL_ACCESS
;
113 (EFIAPI
*EFI_ISA_IO_PROTOCOL_COPY_MEM
) (
114 IN EFI_ISA_IO_PROTOCOL
*This
,
115 IN EFI_ISA_IO_PROTOCOL_WIDTH Width
,
116 IN UINT32 DestOffset
,
123 (EFIAPI
*EFI_ISA_IO_PROTOCOL_MAP
) (
124 IN EFI_ISA_IO_PROTOCOL
*This
,
125 IN EFI_ISA_IO_PROTOCOL_OPERATION Operation
,
126 IN UINT8 ChannelNumber OPTIONAL
,
127 IN UINT32 ChannelAttributes
,
128 IN VOID
*HostAddress
,
129 IN OUT UINTN
*NumberOfBytes
,
130 OUT EFI_PHYSICAL_ADDRESS
*DeviceAddress
,
136 (EFIAPI
*EFI_ISA_IO_PROTOCOL_UNMAP
) (
137 IN EFI_ISA_IO_PROTOCOL
*This
,
143 (EFIAPI
*EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER
) (
144 IN EFI_ISA_IO_PROTOCOL
*This
,
145 IN EFI_ALLOCATE_TYPE Type
,
146 IN EFI_MEMORY_TYPE MemoryType
,
148 OUT VOID
**HostAddress
,
154 (EFIAPI
*EFI_ISA_IO_PROTOCOL_FREE_BUFFER
) (
155 IN EFI_ISA_IO_PROTOCOL
*This
,
162 (EFIAPI
*EFI_ISA_IO_PROTOCOL_FLUSH
) (
163 IN EFI_ISA_IO_PROTOCOL
*This
167 // Interface structure for the ISA I/O Protocol
169 struct _EFI_ISA_IO_PROTOCOL
{
170 EFI_ISA_IO_PROTOCOL_ACCESS Mem
;
171 EFI_ISA_IO_PROTOCOL_ACCESS Io
;
172 EFI_ISA_IO_PROTOCOL_COPY_MEM CopyMem
;
173 EFI_ISA_IO_PROTOCOL_MAP Map
;
174 EFI_ISA_IO_PROTOCOL_UNMAP Unmap
;
175 EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer
;
176 EFI_ISA_IO_PROTOCOL_FREE_BUFFER FreeBuffer
;
177 EFI_ISA_IO_PROTOCOL_FLUSH Flush
;
178 EFI_ISA_ACPI_RESOURCE_LIST
*ResourceList
;
183 extern EFI_GUID gEfiIsaIoProtocolGuid
;