3 Copyright (c) 2006 - 2007, Intel Corporation<BR>
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.
18 The header file for ISA bus driver
24 #ifndef _EFI_ISA_BUS_H
25 #define _EFI_ISA_BUS_H
28 // Include common header file for this module.
30 #include "CommonHeader.h"
32 #include "ComponentName.h"
34 extern EFI_ISA_IO_PROTOCOL IsaIoInterface
;
46 #define ISA_MAX_MEMORY_ADDRESS 0x1000000
50 #define ISA_MAX_IO_ADDRESS 0x10000
56 } EFI_ISA_DMA_REGISTERS
;
59 // ISA I/O Device Structure
61 #define ISA_IO_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('i', 's', 'a', 'i')
66 EFI_ISA_IO_PROTOCOL IsaIo
;
67 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
68 EFI_PCI_IO_PROTOCOL
*PciIo
;
71 #define ISA_IO_DEVICE_FROM_ISA_IO_THIS(a) CR (a, ISA_IO_DEVICE, IsaIo, ISA_IO_DEVICE_SIGNATURE)
76 extern EFI_DRIVER_BINDING_PROTOCOL gIsaBusControllerDriver
;
79 // Mapping structure for performing ISA DMA to a buffer above 16 MB
82 EFI_ISA_IO_PROTOCOL_OPERATION Operation
;
85 EFI_PHYSICAL_ADDRESS HostAddress
;
86 EFI_PHYSICAL_ADDRESS MappedHostAddress
;
90 // EFI Driver Binding Protocol Interface Functions
95 IsaBusControllerDriverSupported (
96 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
97 IN EFI_HANDLE Controller
,
98 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
104 This function checks to see if a controller can be managed by the ISA Bus
105 Driver. This is done by checking to see if the controller supports the
106 EFI_PCI_IO_PROTOCOL protocol, and then looking at the PCI Configuration
107 Header to see if the device is a PCI to ISA bridge. The class code of
108 PCI to ISA bridge: Base class 06h, Sub class 01h Interface 00h
112 This - The EFI_DRIVER_BINDING_PROTOCOL instance.
113 Controller - The handle of the device to check.
114 RemainingDevicePath - A pointer to the remaining portion of a device path.
118 EFI_SUCCESS - The device is supported by this driver.
119 EFI_UNSUPPORTED - The device is not supported by this driver.
126 IsaBusControllerDriverStart (
127 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
128 IN EFI_HANDLE Controller
,
129 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
135 This function tells the ISA Bus Driver to start managing a PCI to ISA
140 This - The EFI_DRIVER_BINDING_PROTOCOL instance.
141 Controller - A handle to the device being started.
142 RemainingDevicePath - A pointer to the remaining portion of a device path.
146 EFI_SUCCESS - The device was started.
147 EFI_UNSUPPORTED - The device is not supported.
148 EFI_DEVICE_ERROR - The device could not be started due to a device error.
149 EFI_ALREADY_STARTED - The device has already been started.
150 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
151 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of
159 IsaBusControllerDriverStop (
160 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
161 IN EFI_HANDLE Controller
,
162 IN UINTN NumberOfChildren
,
163 IN EFI_HANDLE
* ChildHandleBuffer OPTIONAL
169 This function tells the ISA Bus Driver to stop managing a PCI to ISA
174 This - The EFI_DRIVER_BINDING_PROTOCOL instance.
175 Controller - A handle to the device being stopped.
176 NumberOfChindren - The number of child device handles in ChildHandleBuffer.
177 ChildHandleBuffer - An array of child handles to be freed.
182 EFI_SUCCESS - The device was stopped.
183 EFI_DEVICE_ERROR - The device could not be stopped due to a device error.
184 EFI_NOT_STARTED - The device has not been started.
185 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
186 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of
193 // Function Prototypes
198 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
199 IN EFI_HANDLE Controller
,
200 IN EFI_PCI_IO_PROTOCOL
*PciIo
,
201 IN EFI_DEVICE_PATH_PROTOCOL
*ParentDevicePath
,
202 IN EFI_ISA_ACPI_RESOURCE_LIST
*IsaDeviceResourceList
,
203 OUT EFI_DEVICE_PATH_PROTOCOL
**ChildDevicePath
209 Create ISA device found by IsaPnpProtocol
213 This - The EFI_DRIVER_BINDING_PROTOCOL instance.
214 Controller - The handle of ISA bus controller(PCI to ISA bridge)
215 PciIo - The Pointer to the PCI protocol
216 ParentDevicePath - Device path of the ISA bus controller
217 IsaDeviceResourceList - The resource list of the ISA device
218 ChildDevicePath - The pointer to the child device.
222 EFI_SUCCESS - Create the child device.
223 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of
225 EFI_DEVICE_ERROR - Can not create child device.
231 InitializeIsaIoInstance (
232 IN ISA_IO_DEVICE
*IsaIoDevice
,
233 IN EFI_ISA_ACPI_RESOURCE_LIST
*IsaDevice
239 Initializes an ISA I/O Instance
243 IsaIoDevice - The iso device to be initialized.
244 IsaDevice - The resource list.
248 EFI_SUCCESS - Initial success.