4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #define EFI_ISA_ACPI_PROTOCOL_GUID \
19 { 0x64a892dc, 0x5561, 0x4536, { 0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55 } }
21 typedef struct _EFI_ISA_ACPI_PROTOCOL EFI_ISA_ACPI_PROTOCOL
;
24 // Resource Attribute definition
26 #define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_EDGE_SENSITIVE 0x01
27 #define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_EDGE_SENSITIVE 0x02
28 #define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_LEVEL_SENSITIVE 0x04
29 #define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_LEVEL_SENSITIVE 0x08
31 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_MASK 0x03
33 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00
34 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_A 0x01
35 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_B 0x02
36 #define EFI_ISA_ACPI_DMA_SPEED_TYPE_F 0x03
37 #define EFI_ISA_ACPI_DMA_COUNT_BY_BYTE 0x04
38 #define EFI_ISA_ACPI_DMA_COUNT_BY_WORD 0x08
39 #define EFI_ISA_ACPI_DMA_BUS_MASTER 0x10
40 #define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x20
41 #define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x40
42 #define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x80
44 #define EFI_ISA_ACPI_MEMORY_WIDTH_MASK 0x03
46 #define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT 0x00
47 #define EFI_ISA_ACPI_MEMORY_WIDTH_16_BIT 0x01
48 #define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT_AND_16_BIT 0x02
49 #define EFI_ISA_ACPI_MEMORY_WRITEABLE 0x04
50 #define EFI_ISA_ACPI_MEMORY_CACHEABLE 0x08
51 #define EFI_ISA_ACPI_MEMORY_SHADOWABLE 0x10
52 #define EFI_ISA_ACPI_MEMORY_EXPANSION_ROM 0x20
54 #define EFI_ISA_ACPI_IO_DECODE_10_BITS 0x01
55 #define EFI_ISA_ACPI_IO_DECODE_16_BITS 0x02
58 // Resource List definition:
59 // at first, the resource was defined as below
60 // but in the future, it will be defined again that follow ACPI spec: ACPI resource type
61 // so that, in this driver, we can interpret the ACPI table and get the ISA device information.
65 EfiIsaAcpiResourceEndOfList
,
67 EfiIsaAcpiResourceMemory
,
68 EfiIsaAcpiResourceDma
,
69 EfiIsaAcpiResourceInterrupt
70 } EFI_ISA_ACPI_RESOURCE_TYPE
;
73 EFI_ISA_ACPI_RESOURCE_TYPE Type
;
77 } EFI_ISA_ACPI_RESOURCE
;
82 } EFI_ISA_ACPI_DEVICE_ID
;
85 EFI_ISA_ACPI_DEVICE_ID Device
;
86 EFI_ISA_ACPI_RESOURCE
*ResourceItem
;
87 } EFI_ISA_ACPI_RESOURCE_LIST
;
90 // Prototypes for the ISA ACPI Protocol
94 (EFIAPI
*EFI_ISA_ACPI_DEVICE_ENUMERATE
) (
95 IN EFI_ISA_ACPI_PROTOCOL
*This
,
96 OUT EFI_ISA_ACPI_DEVICE_ID
**Device
101 (EFIAPI
*EFI_ISA_ACPI_SET_DEVICE_POWER
) (
102 IN EFI_ISA_ACPI_PROTOCOL
*This
,
103 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
109 (EFIAPI
*EFI_ISA_ACPI_GET_CUR_RESOURCE
) (
110 IN EFI_ISA_ACPI_PROTOCOL
*This
,
111 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
112 OUT EFI_ISA_ACPI_RESOURCE_LIST
**ResourceList
117 (EFIAPI
*EFI_ISA_ACPI_GET_POS_RESOURCE
) (
118 IN EFI_ISA_ACPI_PROTOCOL
*This
,
119 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
120 OUT EFI_ISA_ACPI_RESOURCE_LIST
**ResourceList
125 (EFIAPI
*EFI_ISA_ACPI_SET_RESOURCE
) (
126 IN EFI_ISA_ACPI_PROTOCOL
*This
,
127 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
128 IN EFI_ISA_ACPI_RESOURCE_LIST
*ResourceList
133 (EFIAPI
*EFI_ISA_ACPI_ENABLE_DEVICE
) (
134 IN EFI_ISA_ACPI_PROTOCOL
*This
,
135 IN EFI_ISA_ACPI_DEVICE_ID
*Device
,
141 (EFIAPI
*EFI_ISA_ACPI_INIT_DEVICE
) (
142 IN EFI_ISA_ACPI_PROTOCOL
*This
,
143 IN EFI_ISA_ACPI_DEVICE_ID
*Device
148 (EFIAPI
*EFI_ISA_ACPI_INTERFACE_INIT
) (
149 IN EFI_ISA_ACPI_PROTOCOL
*This
153 // Interface structure for the ISA ACPI Protocol
155 struct _EFI_ISA_ACPI_PROTOCOL
{
156 EFI_ISA_ACPI_DEVICE_ENUMERATE DeviceEnumerate
;
157 EFI_ISA_ACPI_SET_DEVICE_POWER SetPower
;
158 EFI_ISA_ACPI_GET_CUR_RESOURCE GetCurResource
;
159 EFI_ISA_ACPI_GET_POS_RESOURCE GetPosResource
;
160 EFI_ISA_ACPI_SET_RESOURCE SetResource
;
161 EFI_ISA_ACPI_ENABLE_DEVICE EnableDevice
;
162 EFI_ISA_ACPI_INIT_DEVICE InitDevice
;
163 EFI_ISA_ACPI_INTERFACE_INIT InterfaceInit
;
166 extern EFI_GUID gEfiIsaAcpiProtocolGuid
;