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.
27 #define EFI_ISA_ACPI_PROTOCOL_GUID \
28 { 0x64a892dc, 0x5561, 0x4536, { 0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55 } }
30 typedef struct _EFI_ISA_ACPI_PROTOCOL EFI_ISA_ACPI_PROTOCOL
;
33 // Resource Attribute definition
35 #define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_EDGE_SENSITIVE 0x01
36 #define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_EDGE_SENSITIVE 0x02
37 #define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_LEVEL_SENSITIVE 0x04
38 #define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_LEVEL_SENSITIVE 0x08
40 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_MASK 0x03
42 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00
43 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_A 0x01
44 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_B 0x02
45 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_F 0x03
46 #define EFI_ISA_ACPI_DMA_COUNT_BY_BYTE 0x04
47 #define EFI_ISA_ACPI_DMA_COUNT_BY_WORD 0x08
48 #define EFI_ISA_ACPI_DMA_BUS_MASTER 0x10
49 #define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x20
50 #define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x40
51 #define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x80
53 #define EFI_ISA_ACPI_MEMORY_WIDTH_MASK 0x03
55 #define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT 0x00
56 #define EFI_ISA_ACPI_MEMORY_WIDTH_16_BIT 0x01
57 #define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT_AND_16_BIT 0x02
58 #define EFI_ISA_ACPI_MEMORY_WRITEABLE 0x04
59 #define EFI_ISA_ACPI_MEMORY_CACHEABLE 0x08
60 #define EFI_ISA_ACPI_MEMORY_SHADOWABLE 0x10
61 #define EFI_ISA_ACPI_MEMORY_EXPANSION_ROM 0x20
63 #define EFI_ISA_ACPI_IO_DECODE_10_BITS 0x01
64 #define EFI_ISA_ACPI_IO_DECODE_16_BITS 0x02
67 // Resource List definition:
68 // at first, the resource was defined as below
69 // but in the future, it will be defined again that follow ACPI spec: ACPI resource type
70 // so that, in this driver, we can interpret the ACPI table and get the ISA device information.
74 EfiIsaAcpiResourceEndOfList
,
76 EfiIsaAcpiResourceMemory
,
77 EfiIsaAcpiResourceDma
,
78 EfiIsaAcpiResourceInterrupt
79 } EFI_ISA_ACPI_RESOURCE_TYPE
;
82 EFI_ISA_ACPI_RESOURCE_TYPE Type
;
86 } EFI_ISA_ACPI_RESOURCE
;
91 } EFI_ISA_ACPI_DEVICE_ID
;
94 EFI_ISA_ACPI_DEVICE_ID Device
;
95 EFI_ISA_ACPI_RESOURCE
*ResourceItem
;
96 } EFI_ISA_ACPI_RESOURCE_LIST
;
99 // Prototypes for the ISA ACPI Protocol
103 (EFIAPI
*EFI_ISA_ACPI_DEVICE_ENUMERATE
) (
104 IN EFI_ISA_ACPI_PROTOCOL
*This
,
105 OUT EFI_ISA_ACPI_DEVICE_ID
**Device
110 (EFIAPI
*EFI_ISA_ACPI_SET_DEVICE_POWER
) (
111 IN EFI_ISA_ACPI_PROTOCOL
*This
,
112 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
118 (EFIAPI
*EFI_ISA_ACPI_GET_CUR_RESOURCE
) (
119 IN EFI_ISA_ACPI_PROTOCOL
*This
,
120 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
121 OUT EFI_ISA_ACPI_RESOURCE_LIST
**ResourceList
126 (EFIAPI
*EFI_ISA_ACPI_GET_POS_RESOURCE
) (
127 IN EFI_ISA_ACPI_PROTOCOL
*This
,
128 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
129 OUT EFI_ISA_ACPI_RESOURCE_LIST
**ResourceList
134 (EFIAPI
*EFI_ISA_ACPI_SET_RESOURCE
) (
135 IN EFI_ISA_ACPI_PROTOCOL
*This
,
136 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
137 IN EFI_ISA_ACPI_RESOURCE_LIST
*ResourceList
142 (EFIAPI
*EFI_ISA_ACPI_ENABLE_DEVICE
) (
143 IN EFI_ISA_ACPI_PROTOCOL
*This
,
144 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
150 (EFIAPI
*EFI_ISA_ACPI_INIT_DEVICE
) (
151 IN EFI_ISA_ACPI_PROTOCOL
*This
,
152 IN EFI_ISA_ACPI_DEVICE_ID
*Device
157 (EFIAPI
*EFI_ISA_ACPI_INTERFACE_INIT
) (
158 IN EFI_ISA_ACPI_PROTOCOL
*This
162 // Interface structure for the ISA ACPI Protocol
164 struct _EFI_ISA_ACPI_PROTOCOL
{
165 EFI_ISA_ACPI_DEVICE_ENUMERATE DeviceEnumerate
;
166 EFI_ISA_ACPI_SET_DEVICE_POWER SetPower
;
167 EFI_ISA_ACPI_GET_CUR_RESOURCE GetCurResource
;
168 EFI_ISA_ACPI_GET_POS_RESOURCE GetPosResource
;
169 EFI_ISA_ACPI_SET_RESOURCE SetResource
;
170 EFI_ISA_ACPI_ENABLE_DEVICE EnableDevice
;
171 EFI_ISA_ACPI_INIT_DEVICE InitDevice
;
172 EFI_ISA_ACPI_INTERFACE_INIT InterfaceInit
;
175 extern EFI_GUID gEfiIsaAcpiProtocolGuid
;