4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The header file for ISA driver
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCopyright (c) 2010, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncThis program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncare licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncwhich accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// 8237 DMA registers
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef enum {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// ISA I/O Device Structure
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define ISA_IO_DEVICE_SIGNATURE SIGNATURE_32 ('i', 's', 'a', 'i')
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define ISA_IO_DEVICE_FROM_ISA_IO_THIS(a) CR (a, ISA_IO_DEVICE, IsaIo, ISA_IO_DEVICE_SIGNATURE)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Mapping structure for performing ISA DMA to a buffer above 16 MB
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// EFI Driver Binding Protocol Interface Functions
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Tests to see if a controller can be managed by the ISA Driver.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync How the Start() function of a driver is implemented can affect how the Supported() function is implemented.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Controller The handle of the controller to test.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The device is supported by this driver.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_ALREADY_STARTED The device is already being managed by this driver.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_ACCESS_DENIED The device is already being managed by a different driver
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync or an application that requires exclusive access.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_UNSUPPORTED The device is is not supported by this driver.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Start this driver on ControllerHandle.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Start() function is designed to be invoked from the EFI boot service ConnectController().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync As a result, much of the error checking on the parameters to Start() has been moved into this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync common boot service. It is legal to call Start() from other locations, but the following calling
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync restrictions must be followed or the system behavior will not be deterministic.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 1. ControllerHandle must be a valid EFI_HANDLE.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EFI_DEVICE_PATH_PROTOCOL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 3. Prior to calling Start(), the Supported() function for the driver specified by This must
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] ControllerHandle The handle of the controller to start. This handle
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync must support a protocol interface that supplies
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync an I/O abstraction to the driver.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This parameter is ignored by device drivers, and is optional for bus drivers.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The device was started.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_DEVICE_ERROR The device could not be started due to a device error.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Currently not implemented.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval Others The driver failded to start the device.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Stop this driver on ControllerHandle.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync As a result, much of the error checking on the parameters to Stop() has been moved
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync into this common boot service. It is legal to call Stop() from other locations,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync but the following calling restrictions must be followed or the system behavior will not be deterministic.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync same driver's Start() function.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EFI_HANDLE. In addition, all of these handles must have been created in this driver's
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Start() function, and the Start() function must have called OpenProtocol() on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] ControllerHandle A handle to the device being stopped. The handle must
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync support a bus specific I/O protocol for the driver
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to use to stop the device.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if NumberOfChildren is 0.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The device was stopped.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Function Prototypes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Initializes an ISA I/O Instance
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] IsaIoDevice The isa device to be initialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] DevicePath The device path of the isa device.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Resources The ACPI resource list.