IntelFrameworkModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file for ISA bus driver
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -157,20 +157,20 @@ typedef struct {
|
||||
// EFI Driver Binding Protocol Interface Functions
|
||||
//
|
||||
|
||||
/**
|
||||
Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided,
|
||||
/**
|
||||
Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
|
||||
Note that the ISA Bus driver always creates all of its child handles on the first call to Start().
|
||||
How the Start() function of a driver is implemented can affect how the Supported() function is implemented.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of the controller to test.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The device is supported by this driver.
|
||||
@retval EFI_ALREADY_STARTED The device is already being managed by this driver.
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
or an application that requires exclusive access.
|
||||
@retval EFI_UNSUPPORTED The device is is not supported by this driver.
|
||||
|
||||
@@ -184,24 +184,24 @@ IsaBusControllerDriverSupported (
|
||||
);
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
Note that the ISA Bus driver always creates all of its child handles on the first call to Start().
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -219,11 +219,11 @@ IsaBusControllerDriverStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -231,13 +231,13 @@ IsaBusControllerDriverStart (
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -257,11 +257,11 @@ IsaBusControllerDriverStop (
|
||||
//
|
||||
|
||||
/**
|
||||
Create EFI Handle for a ISA device found via ISA ACPI Protocol
|
||||
Create EFI Handle for a ISA device found via ISA ACPI Protocol
|
||||
|
||||
@param[in] This The EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of ISA bus controller(PCI to ISA bridge)
|
||||
@param[in] PciIo The Pointer to the PCI protocol
|
||||
@param[in] PciIo The Pointer to the PCI protocol
|
||||
@param[in] ParentDevicePath Device path of the ISA bus controller
|
||||
@param[in] IsaDeviceResourceList The resource list of the ISA device
|
||||
@param[out] ChildDevicePath The pointer to the child device.
|
||||
@@ -285,7 +285,7 @@ IsaCreateDevice (
|
||||
|
||||
@param[in] IsaIoDevice The iso device to be initialized.
|
||||
@param[in] IsaDeviceResourceList The resource list.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
InitializeIsaIoInstance (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file for EFI_ISA_IO protocol implementation.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -34,9 +34,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@param[in] IsaIoDevice The ISA device to be verified.
|
||||
@param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo.
|
||||
@param[in] Width The width of the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@retval EFI_SUCCESS Verify success.
|
||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
@retval EFI_UNSUPPORTED The device ont support the access type.
|
||||
@@ -49,14 +49,14 @@ IsaIoVerifyAccess (
|
||||
IN UINTN Count,
|
||||
IN UINT32 Offset
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Performs an ISA I/O Read Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device sucessfully.
|
||||
@@ -79,8 +79,8 @@ IsaIoIoRead (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was writen to the device sucessfully.
|
||||
@@ -102,18 +102,18 @@ IsaIoIoWrite (
|
||||
Maps a memory region for DMA
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
|
||||
@@ -173,8 +173,8 @@ IsaIoFlush (
|
||||
@param[in] PageOffset The page's offest.
|
||||
@param[in] CountOffset The count's offset.
|
||||
@param[in] BaseAddress The base address.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Parameter is invalid.
|
||||
@retval EFI_UNSUPPORTED The address range specified by these Offsets and Count is not valid.
|
||||
@@ -194,7 +194,7 @@ WriteDmaPort (
|
||||
Writes an 8-bit I/O Port
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Value The data to write port.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@@ -207,17 +207,17 @@ WritePort (
|
||||
IN EFI_ISA_IO_PROTOCOL *This,
|
||||
IN UINT32 Offset,
|
||||
IN UINT8 Value
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
Performs an ISA Memory Read Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device successfully.
|
||||
@retval EFI_UNSUPPORTED The Offset is not valid for this device.
|
||||
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
|
||||
@@ -237,10 +237,10 @@ IsaIoMemRead (
|
||||
/**
|
||||
Performs an ISA Memory Write Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was written to the device sucessfully.
|
||||
@@ -263,7 +263,7 @@ IsaIoMemWrite (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory copy operation.
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] SrcOffset The offset of the source
|
||||
@param[in] Count The number of memory copy operations to perform
|
||||
|
||||
@@ -294,7 +294,7 @@ IsaIoCopyMem (
|
||||
|
||||
@retval EFI_SUCCESS The requested memory pages were allocated.
|
||||
@retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
by HostAddress, Pages, and Type is not available for common buffer use.
|
||||
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
|
||||
**/
|
||||
@@ -310,7 +310,7 @@ IsaIoAllocateBuffer (
|
||||
);
|
||||
|
||||
/**
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Pages The number of pages to free.
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/** @file
|
||||
ISA Bus UEFI driver.
|
||||
|
||||
Discovers all the ISA Controllers and their resources by using the ISA ACPI
|
||||
Protocol, produces an instance of the ISA I/O Protocol for every ISA
|
||||
Discovers all the ISA Controllers and their resources by using the ISA ACPI
|
||||
Protocol, produces an instance of the ISA I/O Protocol for every ISA
|
||||
Controller found. This driver is designed to manage a PCI-to-ISA bridge Device
|
||||
such as LPC bridge.
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -34,9 +34,9 @@ EFI_DRIVER_BINDING_PROTOCOL gIsaBusControllerDriver = {
|
||||
/**
|
||||
The main entry point for the ISA Bus driver.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.
|
||||
**/
|
||||
@@ -65,20 +65,20 @@ InitializeIsaBus(
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided,
|
||||
/**
|
||||
Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
|
||||
Note that the ISA Bus driver always creates all of its child handles on the first call to Start().
|
||||
How the Start() function of a driver is implemented can affect how the Supported() function is implemented.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of the controller to test.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The device is supported by this driver.
|
||||
@retval EFI_ALREADY_STARTED The device is already being managed by this driver.
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
or an application that requires exclusive access.
|
||||
@retval EFI_UNSUPPORTED The device is is not supported by this driver.
|
||||
|
||||
@@ -97,7 +97,7 @@ IsaBusControllerDriverSupported (
|
||||
|
||||
//
|
||||
// If RemainingDevicePath is not NULL, it should verify that the first device
|
||||
// path node in RemainingDevicePath is an ACPI Device path node which is a
|
||||
// path node in RemainingDevicePath is an ACPI Device path node which is a
|
||||
// legal Device Path Node for this bus driver's children.
|
||||
//
|
||||
if (RemainingDevicePath != NULL) {
|
||||
@@ -192,24 +192,24 @@ IsaBusControllerDriverSupported (
|
||||
}
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
Note that the ISA Bus driver always creates all of its child handles on the first call to Start().
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -413,11 +413,11 @@ IsaBusControllerDriverStart (
|
||||
}
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -425,13 +425,13 @@ IsaBusControllerDriverStart (
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -538,7 +538,7 @@ IsaBusControllerDriverStop (
|
||||
This->DriverBindingHandle,
|
||||
ChildHandleBuffer[Index],
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,11 +559,11 @@ IsaBusControllerDriverStop (
|
||||
//
|
||||
|
||||
/**
|
||||
Create EFI Handle for a ISA device found via ISA ACPI Protocol
|
||||
Create EFI Handle for a ISA device found via ISA ACPI Protocol
|
||||
|
||||
@param[in] This The EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of ISA bus controller(PCI to ISA bridge)
|
||||
@param[in] PciIo The Pointer to the PCI protocol
|
||||
@param[in] PciIo The Pointer to the PCI protocol
|
||||
@param[in] ParentDevicePath Device path of the ISA bus controller
|
||||
@param[in] IsaDeviceResourceList The resource list of the ISA device
|
||||
@param[out] ChildDevicePath The pointer to the child device.
|
||||
|
@@ -6,13 +6,13 @@
|
||||
// Controller found. This driver is designed to manage a PCI-to-ISA bridge Device
|
||||
// such as an LPC bridge.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// IsaBusDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ISA Bus DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The implementation for EFI_ISA_IO_PROTOCOL.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
The implementation for EFI_ISA_IO_PROTOCOL.
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
// Module Variables
|
||||
//
|
||||
EFI_ISA_IO_PROTOCOL mIsaIoInterface = {
|
||||
{
|
||||
{
|
||||
IsaIoMemRead,
|
||||
IsaIoMemWrite
|
||||
},
|
||||
{
|
||||
{
|
||||
IsaIoIoRead,
|
||||
IsaIoIoWrite
|
||||
},
|
||||
@@ -85,7 +85,7 @@ EFI_ISA_DMA_REGISTERS mDmaRegisters[8] = {
|
||||
|
||||
@param[in] IsaIoDevice The iso device to be initialized.
|
||||
@param[in] IsaDeviceResourceList The resource list.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
InitializeIsaIoInstance (
|
||||
@@ -110,8 +110,8 @@ InitializeIsaIoInstance (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device sucessfully.
|
||||
@@ -172,8 +172,8 @@ IsaIoIoRead (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was writen to the device sucessfully.
|
||||
@@ -233,7 +233,7 @@ IsaIoIoWrite (
|
||||
Writes an 8-bit I/O Port
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Value The data to write port.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@@ -282,8 +282,8 @@ WritePort (
|
||||
@param[in] PageOffset The page's offest.
|
||||
@param[in] CountOffset The count's offset.
|
||||
@param[in] BaseAddress The base address.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Parameter is invalid.
|
||||
@retval EFI_UNSUPPORTED The address range specified by these Offsets and Count is not valid.
|
||||
@@ -420,9 +420,9 @@ IsaIoFlush (
|
||||
@param[in] IsaIoDevice The ISA device to be verified.
|
||||
@param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo.
|
||||
@param[in] Width The width of the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@retval EFI_SUCCESS Verify success.
|
||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
@retval EFI_UNSUPPORTED The device ont support the access type.
|
||||
@@ -482,10 +482,10 @@ IsaIoVerifyAccess (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device successfully.
|
||||
@retval EFI_UNSUPPORTED The Offset is not valid for this device.
|
||||
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
|
||||
@@ -549,10 +549,10 @@ IsaIoMemRead (
|
||||
/**
|
||||
Performs an ISA Memory Write Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was written to the device sucessfully.
|
||||
@@ -620,7 +620,7 @@ IsaIoMemWrite (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory copy operation.
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] SrcOffset The offset of the source
|
||||
@param[in] Count The number of memory copy operations to perform
|
||||
|
||||
@@ -701,18 +701,18 @@ IsaIoCopyMem (
|
||||
only supports slave read/write operation to save code size.
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
|
||||
@@ -743,7 +743,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
UINT8 DmaMask;
|
||||
UINT8 DmaClear;
|
||||
UINT8 DmaChannelMode;
|
||||
|
||||
|
||||
if ((NULL == This) ||
|
||||
(NULL == HostAddress) ||
|
||||
(NULL == NumberOfBytes) ||
|
||||
@@ -762,7 +762,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
// Make sure the Operation parameter is valid.
|
||||
// Light IsaIo only supports two operations.
|
||||
//
|
||||
if (!(Operation == EfiIsaIoOperationSlaveRead ||
|
||||
if (!(Operation == EfiIsaIoOperationSlaveRead ||
|
||||
Operation == EfiIsaIoOperationSlaveWrite)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -848,7 +848,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
//
|
||||
*DeviceAddress = PhysicalAddress;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Figure out what to program into the DMA Channel Mode Register
|
||||
//
|
||||
@@ -933,22 +933,22 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
}
|
||||
|
||||
/**
|
||||
Maps a memory region for DMA. This implementation implement the
|
||||
Maps a memory region for DMA. This implementation implement the
|
||||
the full mapping support.
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
|
||||
@@ -1262,18 +1262,18 @@ IsaIoMapFullSupport (
|
||||
Maps a memory region for DMA
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
|
||||
@@ -1302,7 +1302,7 @@ IsaIoMap (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for
|
||||
// Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for
|
||||
// ISA Bus Master.
|
||||
//
|
||||
// So we just return EFI_UNSUPPORTED for these functions.
|
||||
@@ -1345,7 +1345,7 @@ IsaIoMap (
|
||||
|
||||
@retval EFI_SUCCESS The requested memory pages were allocated.
|
||||
@retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
by HostAddress, Pages, and Type is not available for common buffer use.
|
||||
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
|
||||
**/
|
||||
@@ -1364,7 +1364,7 @@ IsaIoAllocateBuffer (
|
||||
EFI_PHYSICAL_ADDRESS PhysicalAddress;
|
||||
|
||||
//
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// ISA Bus Master.
|
||||
// Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
|
||||
//
|
||||
@@ -1418,7 +1418,7 @@ IsaIoAllocateBuffer (
|
||||
}
|
||||
|
||||
/**
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Pages The number of pages to free.
|
||||
@@ -1438,7 +1438,7 @@ IsaIoFreeBuffer (
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// ISA Bus Master.
|
||||
// Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
|
||||
//
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
ISA Floppy Disk UEFI Driver conforming to the UEFI driver model
|
||||
|
||||
1. Support two types diskette drive
|
||||
1. Support two types diskette drive
|
||||
1.44M drive and 2.88M drive (and now only support 1.44M)
|
||||
2. Support two diskette drives per floppy disk controller
|
||||
3. Use DMA channel 2 to transfer data
|
||||
4. Do not use interrupt
|
||||
5. Support diskette change line signal and write protect
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -39,9 +39,9 @@ EFI_DRIVER_BINDING_PROTOCOL gFdcControllerDriver = {
|
||||
/**
|
||||
The main Entry Point for this driver.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
**/
|
||||
@@ -72,14 +72,14 @@ InitializeIsaFloppy(
|
||||
|
||||
/**
|
||||
Test if the controller is a floppy disk drive device
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of the controller to test.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The device is supported by this driver.
|
||||
@retval EFI_ALREADY_STARTED The device is already being managed by this driver.
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
or an application that requires exclusive access.
|
||||
@retval EFI_UNSUPPORTED The device is is not supported by this driver.
|
||||
**/
|
||||
@@ -159,10 +159,10 @@ FdcControllerDriverSupported (
|
||||
Start this driver on Controller.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -248,7 +248,7 @@ FdcControllerDriverStart (
|
||||
|
||||
FdcDev->ControllerNameTable = NULL;
|
||||
AddName (FdcDev);
|
||||
|
||||
|
||||
//
|
||||
// Look up the base address of the Floppy Disk Controller which controls this floppy device
|
||||
//
|
||||
@@ -397,11 +397,11 @@ Done:
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Include file for ISA Floppy Driver
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -482,14 +482,14 @@ typedef struct {
|
||||
|
||||
/**
|
||||
Test controller is a floppy disk drive device
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of the controller to test.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The device is supported by this driver.
|
||||
@retval EFI_ALREADY_STARTED The device is already being managed by this driver.
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
or an application that requires exclusive access.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -504,10 +504,10 @@ FdcControllerDriverSupported (
|
||||
Start this driver on Controller.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -528,11 +528,11 @@ FdcControllerDriverStart (
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -552,14 +552,14 @@ FdcControllerDriverStop (
|
||||
//
|
||||
|
||||
/**
|
||||
Reset the Floppy Logic Drive, call the FddReset function.
|
||||
|
||||
Reset the Floppy Logic Drive, call the FddReset function.
|
||||
|
||||
@param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
|
||||
@param ExtendedVerification BOOLEAN: Indicate that the driver may perform a more
|
||||
exhaustive verification operation of the device during
|
||||
reset, now this par is ignored in this driver
|
||||
@param ExtendedVerification BOOLEAN: Indicate that the driver may perform a more
|
||||
exhaustive verification operation of the device during
|
||||
reset, now this par is ignored in this driver
|
||||
@retval EFI_SUCCESS: The Floppy Logic Drive is reset
|
||||
@retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly
|
||||
@retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly
|
||||
and can not be reset
|
||||
|
||||
**/
|
||||
@@ -572,7 +572,7 @@ FdcReset (
|
||||
|
||||
/**
|
||||
Flush block via fdd controller.
|
||||
|
||||
|
||||
@param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
|
||||
@return EFI_SUCCESS
|
||||
|
||||
@@ -584,23 +584,23 @@ FddFlushBlocks (
|
||||
);
|
||||
|
||||
/**
|
||||
Read the requested number of blocks from the device.
|
||||
|
||||
Read the requested number of blocks from the device.
|
||||
|
||||
@param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
|
||||
@param MediaId UINT32: The media id that the read request is for
|
||||
@param MediaId UINT32: The media id that the read request is for
|
||||
@param Lba EFI_LBA: The starting logic block address to read from on the device
|
||||
@param BufferSize UINTN: The size of the Buffer in bytes
|
||||
@param Buffer VOID *: A pointer to the destination buffer for the data
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: The data was read correctly from the device
|
||||
@retval EFI_DEVICE_ERROR:The device reported an error while attempting to perform
|
||||
the read operation
|
||||
@retval EFI_NO_MEDIA: There is no media in the device
|
||||
@retval EFI_MEDIA_CHANGED: The MediaId is not for the current media
|
||||
@retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the
|
||||
@retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the
|
||||
intrinsic block size of the device
|
||||
@retval EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid,
|
||||
or the buffer is not on proper alignment
|
||||
@retval EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid,
|
||||
or the buffer is not on proper alignment
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -614,24 +614,24 @@ FddReadBlocks (
|
||||
);
|
||||
|
||||
/**
|
||||
Write a specified number of blocks to the device.
|
||||
|
||||
Write a specified number of blocks to the device.
|
||||
|
||||
@param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
|
||||
@param MediaId UINT32: The media id that the write request is for
|
||||
@param MediaId UINT32: The media id that the write request is for
|
||||
@param Lba EFI_LBA: The starting logic block address to be written
|
||||
@param BufferSize UINTN: The size in bytes in Buffer
|
||||
@param Buffer VOID *: A pointer to the source buffer for the data
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: The data were written correctly to the device
|
||||
@retval EFI_WRITE_PROTECTED: The device can not be written to
|
||||
@retval EFI_WRITE_PROTECTED: The device can not be written to
|
||||
@retval EFI_NO_MEDIA: There is no media in the device
|
||||
@retval EFI_MEDIA_CHANGED: The MediaId is not for the current media
|
||||
@retval EFI_DEVICE_ERROR: The device reported an error while attempting to perform
|
||||
the write operation
|
||||
@retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the
|
||||
@retval EFI_DEVICE_ERROR: The device reported an error while attempting to perform
|
||||
the write operation
|
||||
@retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the
|
||||
intrinsic block size of the device
|
||||
@retval EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid,
|
||||
or the buffer is not on proper alignment
|
||||
@retval EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid,
|
||||
or the buffer is not on proper alignment
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -649,7 +649,7 @@ FddWriteBlocks (
|
||||
/**
|
||||
|
||||
Detect the floppy drive is presented or not.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
|
||||
@retval EFI_SUCCESS Drive is presented
|
||||
@retval EFI_NOT_FOUND Drive is not presented
|
||||
@@ -664,7 +664,7 @@ DiscoverFddDevice (
|
||||
|
||||
Do recalibrate and see the drive is presented or not.
|
||||
Set the media parameters.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
|
||||
@return the drive is presented or not
|
||||
|
||||
@@ -677,9 +677,9 @@ FddIdentify (
|
||||
/**
|
||||
|
||||
Reset the Floppy Logic Drive.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: The Floppy Logic Drive is reset
|
||||
@retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly and
|
||||
can not be reset
|
||||
@@ -694,9 +694,9 @@ FddReset (
|
||||
|
||||
Turn the drive's motor on.
|
||||
The drive's motor must be on before any command can be executed.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Turn the drive's motor on successfully
|
||||
@retval EFI_DEVICE_ERROR: The drive is busy, so can not turn motor on
|
||||
@retval EFI_INVALID_PARAMETER: Fail to Set timer(Cancel timer)
|
||||
@@ -710,10 +710,10 @@ MotorOn (
|
||||
/**
|
||||
|
||||
Set a Timer and when Timer goes off, turn the motor off.
|
||||
|
||||
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Set the Timer successfully
|
||||
@retval EFI_INVALID_PARAMETER: Fail to Set the timer
|
||||
|
||||
@@ -725,10 +725,10 @@ MotorOff (
|
||||
|
||||
/**
|
||||
Detect the disk in the drive is changed or not.
|
||||
|
||||
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: No disk media change
|
||||
@retval EFI_DEVICE_ERROR: Fail to do the recalibrate or seek operation
|
||||
@retval EFI_NO_MEDIA: No disk in the drive
|
||||
@@ -743,9 +743,9 @@ DisketChanged (
|
||||
Do the Specify command, this command sets DMA operation
|
||||
and the initial values for each of the three internal
|
||||
times: HUT, SRT and HLT.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Execute the Specify command successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the command
|
||||
|
||||
@@ -757,7 +757,7 @@ Specify (
|
||||
|
||||
/**
|
||||
Set the head of floppy drive to track 0.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@retval EFI_SUCCESS: Execute the Recalibrate operation successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the Recalibrate operation
|
||||
@@ -770,10 +770,10 @@ Recalibrate (
|
||||
|
||||
/**
|
||||
Set the head of floppy drive to the new cylinder.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@param Lba EFI_LBA : The logic block address want to seek
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Execute the Seek operation successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the Seek operation
|
||||
|
||||
@@ -786,12 +786,12 @@ Seek (
|
||||
|
||||
/**
|
||||
Do the Sense Interrupt Status command, this command resets the interrupt signal.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@param StatusRegister0 UINT8 *: Be used to save Status Register 0 read from FDC
|
||||
@param PresentCylinderNumber UINT8 *: Be used to save present cylinder number
|
||||
read from FDC
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Execute the Sense Interrupt Status command successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the command
|
||||
|
||||
@@ -805,10 +805,10 @@ SenseIntStatus (
|
||||
|
||||
/**
|
||||
Do the Sense Drive Status command.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@param Lba EFI_LBA : Logic block address
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Execute the Sense Drive Status command successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the command
|
||||
@retval EFI_WRITE_PROTECTED:The disk is write protected
|
||||
@@ -822,9 +822,9 @@ SenseDrvStatus (
|
||||
|
||||
/**
|
||||
Update the disk media properties and if necessary reinstall Block I/O interface.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Do the operation successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to the operation
|
||||
|
||||
@@ -836,7 +836,7 @@ DetectMedia (
|
||||
|
||||
/**
|
||||
Set the data rate and so on.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
|
||||
@retval EFI_SUCCESS success to set the data rate
|
||||
@@ -848,13 +848,13 @@ Setup (
|
||||
|
||||
/**
|
||||
Read or Write a number of blocks in the same cylinder.
|
||||
|
||||
|
||||
@param FdcDev A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@param HostAddress device address
|
||||
@param HostAddress device address
|
||||
@param Lba The starting logic block address to read from on the device
|
||||
@param NumberOfBlocks The number of block wanted to be read or write
|
||||
@param Read Operation type: read or write
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success operate
|
||||
|
||||
**/
|
||||
@@ -869,7 +869,7 @@ ReadWriteDataSector (
|
||||
|
||||
/**
|
||||
Fill in FDD command's parameter.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Lba The starting logic block address to read from on the device
|
||||
@param Command FDD command
|
||||
@@ -884,10 +884,10 @@ FillPara (
|
||||
|
||||
/**
|
||||
Read result byte from Data Register of FDC.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Pointer Buffer to store the byte read from FDC
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Read result byte from FDC successfully
|
||||
@retval EFI_DEVICE_ERROR The FDC is not ready to be read
|
||||
|
||||
@@ -900,10 +900,10 @@ DataInByte (
|
||||
|
||||
/**
|
||||
Write command byte to Data Register of FDC.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Pointer Be used to save command byte written to FDC
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Write command byte to FDC successfully
|
||||
@retval EFI_DEVICE_ERROR: The FDC is not ready to be written
|
||||
|
||||
@@ -916,10 +916,10 @@ DataOutByte (
|
||||
|
||||
/**
|
||||
Detect the specified floppy logic drive is busy or not within a period of time.
|
||||
|
||||
|
||||
@param FdcDev Indicate it is drive A or drive B
|
||||
@param Timeout The time period for waiting
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: The drive and command are not busy
|
||||
@retval EFI_TIMEOUT: The drive or command is still busy after a period time that
|
||||
set by Timeout
|
||||
@@ -933,11 +933,11 @@ FddWaitForBSYClear (
|
||||
|
||||
/**
|
||||
Determine whether FDC is ready to write or read.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Dio BOOLEAN: Indicate the FDC is waiting to write or read
|
||||
@param Timeout The time period for waiting
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: FDC is ready to write or read
|
||||
@retval EFI_NOT_READY: FDC is not ready within the specified time period
|
||||
|
||||
@@ -969,9 +969,9 @@ CheckResult (
|
||||
|
||||
/**
|
||||
Check the drive status information.
|
||||
|
||||
|
||||
@param StatusRegister3 the value of Status Register 3
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The disk is not write protected
|
||||
@retval EFI_WRITE_PROTECTED: The disk is write protected
|
||||
|
||||
@@ -983,11 +983,11 @@ CheckStatus3 (
|
||||
|
||||
/**
|
||||
Calculate the number of block in the same cylinder according to Lba.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@param Lba EFI_LBA: The starting logic block address
|
||||
@param NumberOfBlocks UINTN: The number of blocks
|
||||
|
||||
|
||||
@return The number of blocks in the same cylinder which the starting
|
||||
logic block address is Lba
|
||||
|
||||
@@ -1001,7 +1001,7 @@ GetTransferBlockCount (
|
||||
|
||||
/**
|
||||
When the Timer(2s) off, turn the drive's motor off.
|
||||
|
||||
|
||||
@param Event EFI_EVENT: Event(the timer) whose notification function is being
|
||||
invoked
|
||||
@param Context VOID *: Pointer to the notification function's context
|
||||
@@ -1016,7 +1016,7 @@ FddTimerProc (
|
||||
|
||||
/**
|
||||
Read I/O port for FDC.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@param Offset The offset address of port
|
||||
|
||||
@@ -1029,11 +1029,11 @@ FdcReadPort (
|
||||
|
||||
/**
|
||||
Write I/O port for FDC.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
|
||||
@param Offset The offset address of port
|
||||
@param Data Value written to port
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
FdcWritePort (
|
||||
@@ -1079,10 +1079,10 @@ FddReadWriteBlocks (
|
||||
);
|
||||
|
||||
/**
|
||||
Common interface for free cache.
|
||||
|
||||
Common interface for free cache.
|
||||
|
||||
@param FdcDev Pointer of FDC_BLK_IO_DEV instance
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
FdcFreeCache (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
/** @file
|
||||
Implementation of the EFI Block IO Protocol for ISA Floppy driver
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -71,7 +71,7 @@ FddFlushBlocks (
|
||||
|
||||
/**
|
||||
Common report status code interface.
|
||||
|
||||
|
||||
@param This Pointer of FDC_BLK_IO_DEV instance
|
||||
@param Read Read or write operation when error occurrs
|
||||
**/
|
||||
@@ -107,7 +107,7 @@ FddReportStatus (
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.
|
||||
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
|
||||
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
|
||||
or the buffer is not on proper alignment.
|
||||
|
||||
**/
|
||||
@@ -148,7 +148,7 @@ FddReadBlocks (
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
|
||||
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
||||
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
||||
or the buffer is not on proper alignment.
|
||||
|
||||
**/
|
||||
@@ -189,7 +189,7 @@ FddWriteBlocks (
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.
|
||||
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
|
||||
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
|
||||
or the buffer is not on proper alignment.
|
||||
@retval EFI_WRITE_PROTECTED The device can not be written to.
|
||||
|
||||
@@ -359,9 +359,9 @@ FddReadWriteBlocks (
|
||||
|
||||
/**
|
||||
Free cache for a floppy disk.
|
||||
|
||||
|
||||
@param FdcDev A Pointer to FDC_BLK_IO_DEV instance
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
FdcFreeCache (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Internal floppy disk controller programming functions for the floppy driver.
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
/**
|
||||
Detect whether a floppy drive is present or not.
|
||||
|
||||
|
||||
@param[in] FdcDev A pointer to the FDC_BLK_IO_DEV
|
||||
|
||||
@retval EFI_SUCCESS The floppy disk drive is present
|
||||
@@ -49,7 +49,7 @@ DiscoverFddDevice (
|
||||
/**
|
||||
Do recalibrate and check if the drive is present or not
|
||||
and set the media parameters if the driver is present.
|
||||
|
||||
|
||||
@param[in] FdcDev A pointer to the FDC_BLK_IO_DEV
|
||||
|
||||
@retval EFI_SUCCESS The floppy disk drive is present
|
||||
@@ -123,9 +123,9 @@ FddIdentify (
|
||||
|
||||
/**
|
||||
Reset the Floppy Logic Drive.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV * : A pointer to the FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: The Floppy Logic Drive is reset
|
||||
@retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly and
|
||||
can not be reset
|
||||
@@ -222,9 +222,9 @@ FddReset (
|
||||
/**
|
||||
Turn the floppy disk drive's motor on.
|
||||
The drive's motor must be on before any command can be executed.
|
||||
|
||||
|
||||
@param[in] FdcDev A pointer to the FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The drive's motor was turned on successfully
|
||||
@retval EFI_DEVICE_ERROR The drive is busy, so can not turn motor on
|
||||
**/
|
||||
@@ -298,9 +298,9 @@ MotorOn (
|
||||
|
||||
/**
|
||||
Set a Timer and when Timer goes off, turn the motor off.
|
||||
|
||||
|
||||
@param[in] FdcDev A pointer to the FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Set the Timer successfully
|
||||
@retval EFI_INVALID_PARAMETER Fail to Set the timer
|
||||
**/
|
||||
@@ -317,9 +317,9 @@ MotorOff (
|
||||
|
||||
/**
|
||||
Detect whether the disk in the drive is changed or not.
|
||||
|
||||
|
||||
@param[in] FdcDev A pointer to FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS No disk media change
|
||||
@retval EFI_DEVICE_ERROR Fail to do the recalibrate or seek operation
|
||||
@retval EFI_NO_MEDIA No disk in the drive
|
||||
@@ -382,9 +382,9 @@ DisketChanged (
|
||||
Do the Specify command, this command sets DMA operation
|
||||
and the initial values for each of the three internal
|
||||
times: HUT, SRT and HLT.
|
||||
|
||||
|
||||
@param[in] FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Execute the Specify command successfully
|
||||
@retval EFI_DEVICE_ERROR Fail to execute the command
|
||||
**/
|
||||
@@ -422,7 +422,7 @@ Specify (
|
||||
|
||||
/**
|
||||
Set the head of floppy drive to track 0.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV
|
||||
@retval EFI_SUCCESS: Execute the Recalibrate operation successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the Recalibrate operation
|
||||
@@ -496,10 +496,10 @@ Recalibrate (
|
||||
|
||||
/**
|
||||
Set the head of floppy drive to the new cylinder.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV
|
||||
@param Lba EFI_LBA : The logic block address want to seek
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Execute the Seek operation successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the Seek operation
|
||||
|
||||
@@ -600,12 +600,12 @@ Seek (
|
||||
/**
|
||||
Do the Sense Interrupt Status command, this command
|
||||
resets the interrupt signal.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV
|
||||
@param StatusRegister0 UINT8 *: Be used to save Status Register 0 read from FDC
|
||||
@param PresentCylinderNumber UINT8 *: Be used to save present cylinder number
|
||||
read from FDC
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Execute the Sense Interrupt Status command successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the command
|
||||
|
||||
@@ -637,10 +637,10 @@ SenseIntStatus (
|
||||
|
||||
/**
|
||||
Do the Sense Drive Status command.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV
|
||||
@param Lba EFI_LBA : Logic block address
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Execute the Sense Drive Status command successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to execute the command
|
||||
@retval EFI_WRITE_PROTECTED:The disk is write protected
|
||||
@@ -700,9 +700,9 @@ SenseDrvStatus (
|
||||
|
||||
/**
|
||||
Update the disk media properties and if necessary reinstall Block I/O interface.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Do the operation successfully
|
||||
@retval EFI_DEVICE_ERROR: Fail to the operation
|
||||
|
||||
@@ -778,7 +778,7 @@ DetectMedia (
|
||||
|
||||
/**
|
||||
Set the data rate and so on.
|
||||
|
||||
|
||||
@param FdcDev A pointer to FDC_BLK_IO_DEV
|
||||
|
||||
@retval EFI_SUCCESS success to set the data rate
|
||||
@@ -811,13 +811,13 @@ Setup (
|
||||
|
||||
/**
|
||||
Read or Write a number of blocks in the same cylinder.
|
||||
|
||||
|
||||
@param FdcDev A pointer to FDC_BLK_IO_DEV
|
||||
@param HostAddress device address
|
||||
@param HostAddress device address
|
||||
@param Lba The starting logic block address to read from on the device
|
||||
@param NumberOfBlocks The number of block wanted to be read or write
|
||||
@param Read Operation type: read or write
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success operate
|
||||
|
||||
**/
|
||||
@@ -961,7 +961,7 @@ ReadWriteDataSector (
|
||||
|
||||
/**
|
||||
Fill in FDD command's parameter.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Lba The starting logic block address to read from on the device
|
||||
@param Command FDD command
|
||||
@@ -1002,10 +1002,10 @@ FillPara (
|
||||
|
||||
/**
|
||||
Read result byte from Data Register of FDC.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Pointer Buffer to store the byte read from FDC
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Read result byte from FDC successfully
|
||||
@retval EFI_DEVICE_ERROR The FDC is not ready to be read
|
||||
|
||||
@@ -1041,10 +1041,10 @@ DataInByte (
|
||||
|
||||
/**
|
||||
Write command byte to Data Register of FDC.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Pointer Be used to save command byte written to FDC
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: Write command byte to FDC successfully
|
||||
@retval EFI_DEVICE_ERROR: The FDC is not ready to be written
|
||||
|
||||
@@ -1081,10 +1081,10 @@ DataOutByte (
|
||||
|
||||
/**
|
||||
Detect the specified floppy logic drive is busy or not within a period of time.
|
||||
|
||||
|
||||
@param FdcDev Indicate it is drive A or drive B
|
||||
@param Timeout The time period for waiting
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: The drive and command are not busy
|
||||
@retval EFI_TIMEOUT: The drive or command is still busy after a period time that
|
||||
set by Timeout
|
||||
@@ -1135,11 +1135,11 @@ FddWaitForBSYClear (
|
||||
|
||||
/**
|
||||
Determine whether FDC is ready to write or read.
|
||||
|
||||
|
||||
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV
|
||||
@param Dio BOOLEAN: Indicate the FDC is waiting to write or read
|
||||
@param Timeout The time period for waiting
|
||||
|
||||
|
||||
@retval EFI_SUCCESS: FDC is ready to write or read
|
||||
@retval EFI_NOT_READY: FDC is not ready within the specified time period
|
||||
|
||||
@@ -1196,7 +1196,7 @@ FddDRQReady (
|
||||
}
|
||||
|
||||
/**
|
||||
Set FDC control structure's attribute according to result.
|
||||
Set FDC control structure's attribute according to result.
|
||||
|
||||
@param Result Point to result structure
|
||||
@param FdcDev FDC control structure
|
||||
@@ -1247,9 +1247,9 @@ CheckResult (
|
||||
|
||||
/**
|
||||
Check the drive status information.
|
||||
|
||||
|
||||
@param StatusRegister3 the value of Status Register 3
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The disk is not write protected
|
||||
@retval EFI_WRITE_PROTECTED: The disk is write protected
|
||||
|
||||
@@ -1268,11 +1268,11 @@ CheckStatus3 (
|
||||
|
||||
/**
|
||||
Calculate the number of block in the same cylinder according to LBA.
|
||||
|
||||
|
||||
@param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV
|
||||
@param LBA EFI_LBA: The starting logic block address
|
||||
@param NumberOfBlocks UINTN: The number of blocks
|
||||
|
||||
|
||||
@return The number of blocks in the same cylinder which the starting
|
||||
logic block address is LBA
|
||||
|
||||
@@ -1304,7 +1304,7 @@ GetTransferBlockCount (
|
||||
|
||||
/**
|
||||
When the Timer(2s) off, turn the drive's motor off.
|
||||
|
||||
|
||||
@param Event EFI_EVENT: Event(the timer) whose notification function is being
|
||||
invoked
|
||||
@param Context VOID *: Pointer to the notification function's context
|
||||
@@ -1343,7 +1343,7 @@ FddTimerProc (
|
||||
|
||||
/**
|
||||
Read an I/O port of FDC.
|
||||
|
||||
|
||||
@param[in] FdcDev A pointer to FDC_BLK_IO_DEV.
|
||||
@param[in] Offset The address offset of the I/O port.
|
||||
|
||||
@@ -1372,7 +1372,7 @@ FdcReadPort (
|
||||
|
||||
/**
|
||||
Write an I/O port of FDC.
|
||||
|
||||
|
||||
@param[in] FdcDev A pointer to FDC_BLK_IO_DEV
|
||||
@param[in] Offset The address offset of the I/O port
|
||||
@param[in] Data 8-bit Value written to the I/O port
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// driver provides support for two drives per controller, DMA channel 2, diskette
|
||||
// change line and write protect. Currently only 1.44MB drives are supported.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// IsaFloppyDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ISA Floppy DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
/** @file
|
||||
Definition of FDC registers and structures.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Floppy Peim to support Recovery function from Floppy device.
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The
|
||||
@@ -152,7 +152,7 @@ PEI_DMA_TABLE mRegisterTable[] = {
|
||||
};
|
||||
|
||||
//
|
||||
// Table of diskette parameters of various diskette types
|
||||
// Table of diskette parameters of various diskette types
|
||||
//
|
||||
DISKET_PARA_TABLE DiskPara[9] = {
|
||||
{
|
||||
@@ -292,7 +292,7 @@ FDC_BLK_IO_DEV mBlockIoDevTemplate = {
|
||||
TRUE means input.
|
||||
FALSE means output.
|
||||
@param TimeoutInMseconds Timeout value to wait.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS FDC is ready.
|
||||
@retval EFI_NOT_READY FDC is not ready within the specified time period.
|
||||
|
||||
@@ -783,7 +783,7 @@ Recalibrate (
|
||||
|
||||
if ((Sts0 & 0xf0) == BIT5 && Pcn == 0) {
|
||||
//
|
||||
// Recalibration is successful.
|
||||
// Recalibration is successful.
|
||||
//
|
||||
Info->Pcn = 0;
|
||||
Info->NeedRecalibrate = FALSE;
|
||||
@@ -1022,7 +1022,7 @@ DiscoverFdcDevice (
|
||||
//
|
||||
// No diskette in floppy.
|
||||
//
|
||||
MediaInfo->MediaPresent = FALSE;
|
||||
MediaInfo->MediaPresent = FALSE;
|
||||
} else if (Status != EFI_MEDIA_CHANGED && Status != EFI_SUCCESS) {
|
||||
//
|
||||
// EFI_DEVICE_ERROR
|
||||
@@ -1439,16 +1439,16 @@ ReadDataSector (
|
||||
/**
|
||||
Gets the count of block I/O devices that one specific block driver detects.
|
||||
|
||||
This function is used for getting the count of block I/O devices that one
|
||||
This function is used for getting the count of block I/O devices that one
|
||||
specific block driver detects. To the PEI ATAPI driver, it returns the number
|
||||
of all the detected ATAPI devices it detects during the enumeration process.
|
||||
To the PEI legacy floppy driver, it returns the number of all the legacy
|
||||
devices it finds during its enumeration process. If no device is detected,
|
||||
then the function will return zero.
|
||||
|
||||
@param[in] PeiServices General-purpose services that are available
|
||||
of all the detected ATAPI devices it detects during the enumeration process.
|
||||
To the PEI legacy floppy driver, it returns the number of all the legacy
|
||||
devices it finds during its enumeration process. If no device is detected,
|
||||
then the function will return zero.
|
||||
|
||||
@param[in] PeiServices General-purpose services that are available
|
||||
to every PEIM.
|
||||
@param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI
|
||||
@param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI
|
||||
instance.
|
||||
@param[out] NumberBlockDevices The number of block I/O devices discovered.
|
||||
|
||||
@@ -1477,27 +1477,27 @@ FdcGetNumberOfBlockDevices (
|
||||
/**
|
||||
Gets a block device's media information.
|
||||
|
||||
This function will provide the caller with the specified block device's media
|
||||
information. If the media changes, calling this function will update the media
|
||||
This function will provide the caller with the specified block device's media
|
||||
information. If the media changes, calling this function will update the media
|
||||
information accordingly.
|
||||
|
||||
@param[in] PeiServices General-purpose services that are available to every
|
||||
PEIM
|
||||
@param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance.
|
||||
@param[in] DeviceIndex Specifies the block device to which the function wants
|
||||
to talk. Because the driver that implements Block I/O
|
||||
PPIs will manage multiple block devices, the PPIs that
|
||||
want to talk to a single device must specify the
|
||||
@param[in] DeviceIndex Specifies the block device to which the function wants
|
||||
to talk. Because the driver that implements Block I/O
|
||||
PPIs will manage multiple block devices, the PPIs that
|
||||
want to talk to a single device must specify the
|
||||
device index that was assigned during the enumeration
|
||||
process. This index is a number from one to
|
||||
process. This index is a number from one to
|
||||
NumberBlockDevices.
|
||||
@param[out] MediaInfo The media information of the specified block media.
|
||||
The caller is responsible for the ownership of this
|
||||
@param[out] MediaInfo The media information of the specified block media.
|
||||
The caller is responsible for the ownership of this
|
||||
data structure.
|
||||
|
||||
@retval EFI_SUCCESS Media information about the specified block device
|
||||
|
||||
@retval EFI_SUCCESS Media information about the specified block device
|
||||
was obtained successfully.
|
||||
@retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware
|
||||
@retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware
|
||||
error.
|
||||
@retval Others Other failure occurs.
|
||||
|
||||
@@ -1559,31 +1559,31 @@ FdcGetBlockDeviceMediaInfo (
|
||||
/**
|
||||
Reads the requested number of blocks from the specified block device.
|
||||
|
||||
The function reads the requested number of blocks from the device. All the
|
||||
The function reads the requested number of blocks from the device. All the
|
||||
blocks are read, or an error is returned. If there is no media in the device,
|
||||
the function returns EFI_NO_MEDIA.
|
||||
|
||||
@param[in] PeiServices General-purpose services that are available to
|
||||
@param[in] PeiServices General-purpose services that are available to
|
||||
every PEIM.
|
||||
@param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance.
|
||||
@param[in] DeviceIndex Specifies the block device to which the function wants
|
||||
to talk. Because the driver that implements Block I/O
|
||||
PPIs will manage multiple block devices, the PPIs that
|
||||
want to talk to a single device must specify the device
|
||||
index that was assigned during the enumeration process.
|
||||
@param[in] DeviceIndex Specifies the block device to which the function wants
|
||||
to talk. Because the driver that implements Block I/O
|
||||
PPIs will manage multiple block devices, the PPIs that
|
||||
want to talk to a single device must specify the device
|
||||
index that was assigned during the enumeration process.
|
||||
This index is a number from one to NumberBlockDevices.
|
||||
@param[in] StartLBA The starting logical block address (LBA) to read from
|
||||
on the device
|
||||
@param[in] BufferSize The size of the Buffer in bytes. This number must be
|
||||
a multiple of the intrinsic block size of the device.
|
||||
@param[out] Buffer A pointer to the destination buffer for the data.
|
||||
The caller is responsible for the ownership of the
|
||||
The caller is responsible for the ownership of the
|
||||
buffer.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read correctly from the device.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while attempting
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while attempting
|
||||
to perform the read operation.
|
||||
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not
|
||||
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not
|
||||
valid, or the buffer is not properly aligned.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of
|
||||
@@ -1729,7 +1729,7 @@ FdcPeimEntry (
|
||||
|
||||
//
|
||||
// Allocate memory for instance of FDC_BLK_IO_DEV and copy initial value
|
||||
// from template to it.
|
||||
// from template to it.
|
||||
//
|
||||
FdcBlkIoDev = AllocatePages (EFI_SIZE_TO_PAGES(sizeof (FDC_BLK_IO_DEV)));
|
||||
if (FdcBlkIoDev == NULL) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Private include file for IsaFloppyPei PEIM.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The
|
||||
@@ -104,7 +104,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
///
|
||||
/// ISA memory range
|
||||
///
|
||||
#define ISA_MAX_MEMORY_ADDRESS 0x1000000
|
||||
#define ISA_MAX_MEMORY_ADDRESS 0x1000000
|
||||
|
||||
//
|
||||
// Macro for time delay & interval
|
||||
|
@@ -5,14 +5,14 @@
|
||||
// the PEIM will install the BlockIo PPI. This module is only dispatched if it
|
||||
// is in the Recovery Boot mode.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions
|
||||
// of the BSD License which accompanies this distribution. The
|
||||
// full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// IsaFloppyPei Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions
|
||||
@@ -14,8 +14,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ISA Floppy PEI Module"
|
||||
|
||||
|
||||
|
@@ -2,8 +2,8 @@
|
||||
IsaIo UEFI driver.
|
||||
|
||||
Produce an instance of the ISA I/O Protocol for every SIO controller.
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -31,9 +31,9 @@ EFI_DRIVER_BINDING_PROTOCOL gIsaIoDriver = {
|
||||
/**
|
||||
The main entry point for the IsaIo driver.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.
|
||||
**/
|
||||
@@ -62,16 +62,16 @@ InitializeIsaIo (
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Tests to see if a controller can be managed by the IsaIo driver.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of the controller to test.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The device is supported by this driver.
|
||||
@retval EFI_ALREADY_STARTED The device is already being managed by this driver.
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
or an application that requires exclusive access.
|
||||
@retval EFI_UNSUPPORTED The device is is not supported by this driver.
|
||||
|
||||
@@ -136,23 +136,23 @@ IsaIoDriverSupported (
|
||||
}
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -254,11 +254,11 @@ IsaIoDriverStart (
|
||||
}
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -266,13 +266,13 @@ IsaIoDriverStart (
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file for ISA driver
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -148,18 +148,18 @@ typedef struct {
|
||||
// EFI Driver Binding Protocol Interface Functions
|
||||
//
|
||||
|
||||
/**
|
||||
/**
|
||||
Tests to see if a controller can be managed by the ISA Driver.
|
||||
|
||||
How the Start() function of a driver is implemented can affect how the Supported() function is implemented.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] Controller The handle of the controller to test.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The device is supported by this driver.
|
||||
@retval EFI_ALREADY_STARTED The device is already being managed by this driver.
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
@retval EFI_ACCESS_DENIED The device is already being managed by a different driver
|
||||
or an application that requires exclusive access.
|
||||
@retval EFI_UNSUPPORTED The device is is not supported by this driver.
|
||||
|
||||
@@ -173,23 +173,23 @@ IsaIoDriverSupported (
|
||||
);
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -207,11 +207,11 @@ IsaIoDriverStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -219,13 +219,13 @@ IsaIoDriverStart (
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -250,7 +250,7 @@ IsaIoDriverStop (
|
||||
@param[in] IsaIoDevice The isa device to be initialized.
|
||||
@param[in] DevicePath The device path of the isa device.
|
||||
@param[in] Resources The ACPI resource list.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
InitializeIsaIoInstance (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The implementation for EFI_ISA_IO_PROTOCOL.
|
||||
|
||||
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
The implementation for EFI_ISA_IO_PROTOCOL.
|
||||
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
// Module Variables
|
||||
//
|
||||
EFI_ISA_IO_PROTOCOL mIsaIoInterface = {
|
||||
{
|
||||
{
|
||||
IsaIoMemRead,
|
||||
IsaIoMemWrite
|
||||
},
|
||||
{
|
||||
{
|
||||
IsaIoIoRead,
|
||||
IsaIoIoWrite
|
||||
},
|
||||
@@ -86,9 +86,9 @@ EFI_ISA_DMA_REGISTERS mDmaRegisters[8] = {
|
||||
@param[in] IsaIoDevice The ISA device to be verified.
|
||||
@param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo.
|
||||
@param[in] Width The width of the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@retval EFI_SUCCESS Verify success.
|
||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
@retval EFI_UNSUPPORTED The device ont support the access type.
|
||||
@@ -163,7 +163,7 @@ IsaIoAttribute (
|
||||
case EFI_ACPI_IO_DECODE_16_BIT:
|
||||
Attribute |= EFI_ISA_ACPI_IO_DECODE_16_BITS;
|
||||
break;
|
||||
|
||||
|
||||
case EFI_ACPI_IO_DECODE_10_BIT:
|
||||
Attribute |= EFI_ISA_ACPI_IO_DECODE_10_BITS;
|
||||
break;
|
||||
@@ -244,7 +244,7 @@ IsaDmaAttribute (
|
||||
UINT32 Attribute;
|
||||
|
||||
Attribute = EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE;
|
||||
|
||||
|
||||
switch (Information & EFI_ACPI_DMA_SPEED_TYPE_MASK) {
|
||||
case EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY:
|
||||
Attribute |= EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE;
|
||||
@@ -424,7 +424,7 @@ AcpiResourceToIsaResource (
|
||||
@param[in] IsaIoDevice The isa device to be initialized.
|
||||
@param[in] DevicePath The device path of the isa device.
|
||||
@param[in] Resources The ACPI resource list.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
InitializeIsaIoInstance (
|
||||
@@ -452,7 +452,7 @@ InitializeIsaIoInstance (
|
||||
ResourcePtr = Resources;
|
||||
Index = 0;
|
||||
while (ResourcePtr.SmallHeader->Byte != ACPI_END_TAG_DESCRIPTOR) {
|
||||
|
||||
|
||||
Index += AcpiResourceToIsaResource (ResourcePtr, NULL);
|
||||
|
||||
if (ResourcePtr.SmallHeader->Bits.Type == 0) {
|
||||
@@ -498,7 +498,7 @@ InitializeIsaIoInstance (
|
||||
+ sizeof (*ResourcePtr.LargeHeader));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Convert the ACPI End Tag
|
||||
//
|
||||
@@ -510,8 +510,8 @@ InitializeIsaIoInstance (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device sucessfully.
|
||||
@@ -572,8 +572,8 @@ IsaIoIoRead (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was writen to the device sucessfully.
|
||||
@@ -633,7 +633,7 @@ IsaIoIoWrite (
|
||||
Writes an 8-bit I/O Port
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Value The data to write port.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@@ -685,8 +685,8 @@ WritePort (
|
||||
@param[in] PageOffset The page's offest.
|
||||
@param[in] CountOffset The count's offset.
|
||||
@param[in] BaseAddress The base address.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Parameter is invalid.
|
||||
@retval EFI_UNSUPPORTED The address range specified by these Offsets and Count is not valid.
|
||||
@@ -822,10 +822,10 @@ IsaIoFlush (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device successfully.
|
||||
@retval EFI_UNSUPPORTED The Offset is not valid for this device.
|
||||
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
|
||||
@@ -889,10 +889,10 @@ IsaIoMemRead (
|
||||
/**
|
||||
Performs an ISA Memory Write Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was written to the device sucessfully.
|
||||
@@ -960,7 +960,7 @@ IsaIoMemWrite (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory copy operation.
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] SrcOffset The offset of the source
|
||||
@param[in] Count The number of memory copy operations to perform
|
||||
|
||||
@@ -1041,18 +1041,18 @@ IsaIoCopyMem (
|
||||
only supports slave read/write operation to save code size.
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
|
||||
@@ -1083,7 +1083,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
UINT8 DmaMask;
|
||||
UINT8 DmaClear;
|
||||
UINT8 DmaChannelMode;
|
||||
|
||||
|
||||
if ((NULL == This) ||
|
||||
(NULL == HostAddress) ||
|
||||
(NULL == NumberOfBytes) ||
|
||||
@@ -1102,7 +1102,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
// Make sure the Operation parameter is valid.
|
||||
// Light IsaIo only supports two operations.
|
||||
//
|
||||
if (!(Operation == EfiIsaIoOperationSlaveRead ||
|
||||
if (!(Operation == EfiIsaIoOperationSlaveRead ||
|
||||
Operation == EfiIsaIoOperationSlaveWrite)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -1188,7 +1188,7 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
//
|
||||
*DeviceAddress = PhysicalAddress;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Figure out what to program into the DMA Channel Mode Register
|
||||
//
|
||||
@@ -1273,22 +1273,22 @@ IsaIoMapOnlySupportSlaveReadWrite (
|
||||
}
|
||||
|
||||
/**
|
||||
Maps a memory region for DMA. This implementation implement the
|
||||
Maps a memory region for DMA. This implementation implement the
|
||||
the full mapping support.
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
|
||||
@@ -1602,18 +1602,18 @@ IsaIoMapFullSupport (
|
||||
Maps a memory region for DMA
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
|
||||
@@ -1642,7 +1642,7 @@ IsaIoMap (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for
|
||||
// Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for
|
||||
// ISA Bus Master.
|
||||
//
|
||||
// So we just return EFI_UNSUPPORTED for these functions.
|
||||
@@ -1685,7 +1685,7 @@ IsaIoMap (
|
||||
|
||||
@retval EFI_SUCCESS The requested memory pages were allocated.
|
||||
@retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
by HostAddress, Pages, and Type is not available for common buffer use.
|
||||
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
|
||||
**/
|
||||
@@ -1704,7 +1704,7 @@ IsaIoAllocateBuffer (
|
||||
EFI_PHYSICAL_ADDRESS PhysicalAddress;
|
||||
|
||||
//
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// ISA Bus Master.
|
||||
// Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
|
||||
//
|
||||
@@ -1758,7 +1758,7 @@ IsaIoAllocateBuffer (
|
||||
}
|
||||
|
||||
/**
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Pages The number of pages to free.
|
||||
@@ -1778,7 +1778,7 @@ IsaIoFreeBuffer (
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for
|
||||
// ISA Bus Master.
|
||||
// Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file for EFI_ISA_IO protocol implementation.
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -34,9 +34,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@param[in] IsaIoDevice The ISA device to be verified.
|
||||
@param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo.
|
||||
@param[in] Width The width of the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
|
||||
@retval EFI_SUCCESS Verify success.
|
||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
@retval EFI_UNSUPPORTED The device ont support the access type.
|
||||
@@ -49,14 +49,14 @@ IsaIoVerifyAccess (
|
||||
IN UINTN Count,
|
||||
IN UINT32 Offset
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Performs an ISA I/O Read Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device sucessfully.
|
||||
@@ -79,8 +79,8 @@ IsaIoIoRead (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the I/O operation.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Offset The offset in ISA I/O space to start the I/O operation.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was writen to the device sucessfully.
|
||||
@@ -102,18 +102,18 @@ IsaIoIoWrite (
|
||||
Maps a memory region for DMA
|
||||
|
||||
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param Operation Indicates the type of DMA (slave or bus master), and if
|
||||
the DMA operation is going to read or write to system memory.
|
||||
@param ChannelNumber The slave channel number to use for this DMA operation.
|
||||
If Operation and ChannelAttributes shows that this device
|
||||
performs bus mastering DMA, then this field is ignored.
|
||||
The legal range for this field is 0..7.
|
||||
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
@param HostAddress The system memory address to map to the device.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number
|
||||
of bytes that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param DeviceAddress The resulting map address for the bus master device to use
|
||||
to access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
|
||||
|
||||
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
|
||||
@@ -173,8 +173,8 @@ IsaIoFlush (
|
||||
@param[in] PageOffset The page's offest.
|
||||
@param[in] CountOffset The count's offset.
|
||||
@param[in] BaseAddress The base address.
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@param[in] Count The number of I/O operations to perform.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_INVALID_PARAMETER Parameter is invalid.
|
||||
@retval EFI_UNSUPPORTED The address range specified by these Offsets and Count is not valid.
|
||||
@@ -194,7 +194,7 @@ WriteDmaPort (
|
||||
Writes an 8-bit I/O Port
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Offset The offset in ISA IO space to start the IO operation.
|
||||
@param[in] Value The data to write port.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@@ -207,17 +207,17 @@ WritePort (
|
||||
IN EFI_ISA_IO_PROTOCOL *This,
|
||||
IN UINT32 Offset,
|
||||
IN UINT8 Value
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
Performs an ISA Memory Read Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[out] Buffer The destination buffer to store the results
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read from the device successfully.
|
||||
@retval EFI_UNSUPPORTED The Offset is not valid for this device.
|
||||
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
|
||||
@@ -237,10 +237,10 @@ IsaIoMemRead (
|
||||
/**
|
||||
Performs an ISA Memory Write Cycle
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory operation.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Offset The offset in ISA memory space to start the memory operation.
|
||||
@param[in] Count The number of memory operations to perform.
|
||||
@param[in] Buffer The source buffer to write data from
|
||||
|
||||
@retval EFI_SUCCESS The data was written to the device sucessfully.
|
||||
@@ -263,7 +263,7 @@ IsaIoMemWrite (
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Width Specifies the width of the memory copy operation.
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] DestOffset The offset of the destination
|
||||
@param[in] SrcOffset The offset of the source
|
||||
@param[in] Count The number of memory copy operations to perform
|
||||
|
||||
@@ -294,7 +294,7 @@ IsaIoCopyMem (
|
||||
|
||||
@retval EFI_SUCCESS The requested memory pages were allocated.
|
||||
@retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
|
||||
by HostAddress, Pages, and Type is not available for common buffer use.
|
||||
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
|
||||
**/
|
||||
@@ -310,7 +310,7 @@ IsaIoAllocateBuffer (
|
||||
);
|
||||
|
||||
/**
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer().
|
||||
|
||||
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
|
||||
@param[in] Pages The number of pages to free.
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// I/O protocols are installed based off of the information provided by each
|
||||
// instance of the SIO Protocol found.
|
||||
//
|
||||
// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// IsaIoDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ISA I/O DXE Driver"
|
||||
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# Produces the Serial I/O protocol for standard UARTS using ISA I/O. This driver
|
||||
# supports the 8250, 16450, 16550 and 16550A UART types.
|
||||
#
|
||||
# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -30,8 +30,8 @@
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gSerialControllerDriver
|
||||
# COMPONENT_NAME = gIsaSerialComponentName
|
||||
# DRIVER_BINDING = gSerialControllerDriver
|
||||
# COMPONENT_NAME = gIsaSerialComponentName
|
||||
# COMPONENT_NAME2 = gIsaSerialComponentName2
|
||||
#
|
||||
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// Produces the Serial I/O protocol for standard UARTS using ISA I/O. This driver
|
||||
// supports the 8250, 16450, 16550 and 16550A UART types.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// IsaSerialDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ISA UART Serial Bus DXE Driver"
|
||||
|
||||
|
||||
|
@@ -90,7 +90,7 @@ SERIAL_DEV gSerialDevTempate = {
|
||||
Check the device path node whether it's the Flow Control node or not.
|
||||
|
||||
@param[in] FlowControl The device path node to be checked.
|
||||
|
||||
|
||||
@retval TRUE It's the Flow Control node.
|
||||
@retval FALSE It's not.
|
||||
|
||||
@@ -111,7 +111,7 @@ IsUartFlowControlNode (
|
||||
Check the device path node whether it contains Flow Control node or not.
|
||||
|
||||
@param[in] DevicePath The device path to be checked.
|
||||
|
||||
|
||||
@retval TRUE It contains the Flow Control node.
|
||||
@retval FALSE It doesn't.
|
||||
|
||||
@@ -134,9 +134,9 @@ ContainsFlowControl (
|
||||
/**
|
||||
The user Entry Point for module IsaSerial. The user code starts with this function.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
@@ -213,7 +213,7 @@ SerialControllerDriverSupported (
|
||||
//
|
||||
if (RemainingDevicePath != NULL) {
|
||||
//
|
||||
// Check if RemainingDevicePath is the End of Device Path Node,
|
||||
// Check if RemainingDevicePath is the End of Device Path Node,
|
||||
// if yes, go on checking other conditions
|
||||
//
|
||||
if (!IsDevicePathEnd (RemainingDevicePath)) {
|
||||
@@ -230,27 +230,27 @@ SerialControllerDriverSupported (
|
||||
) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
||||
if (UartNode->BaudRate > SERIAL_PORT_MAX_BAUD_RATE) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
||||
if (UartNode->Parity < NoParity || UartNode->Parity > SpaceParity) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
||||
if (UartNode->DataBits < 5 || UartNode->DataBits > 8) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
||||
if (UartNode->StopBits < OneStopBit || UartNode->StopBits > TwoStopBits) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
||||
if ((UartNode->DataBits == 5) && (UartNode->StopBits == TwoStopBits)) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
|
||||
if ((UartNode->DataBits >= 6) && (UartNode->DataBits <= 8) && (UartNode->StopBits == OneFiveStopBits)) {
|
||||
goto Error;
|
||||
}
|
||||
@@ -510,7 +510,7 @@ SerialControllerDriverStart (
|
||||
// Clear the bits that are not allowed to pass to SetControl
|
||||
//
|
||||
Control &= (EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY |
|
||||
EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |
|
||||
EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |
|
||||
EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE);
|
||||
Status = SerialIo->SetControl (SerialIo, Control);
|
||||
}
|
||||
@@ -529,7 +529,7 @@ SerialControllerDriverStart (
|
||||
//
|
||||
// If RemainingDevicePath is the End of Device Path Node,
|
||||
// skip enumerate any device and return EFI_SUCESSS
|
||||
//
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -550,13 +550,13 @@ SerialControllerDriverStart (
|
||||
FlowControlMap = 0;
|
||||
|
||||
//
|
||||
// Check if RemainingDevicePath is NULL,
|
||||
// Check if RemainingDevicePath is NULL,
|
||||
// if yes, use the values from the gSerialDevTempate as no remaining device path was
|
||||
// passed in.
|
||||
//
|
||||
if (RemainingDevicePath != NULL) {
|
||||
//
|
||||
// If RemainingDevicePath isn't NULL,
|
||||
// If RemainingDevicePath isn't NULL,
|
||||
// match the configuration of the RemainingDevicePath. IsHandleSupported()
|
||||
// already checked to make sure the RemainingDevicePath contains settings
|
||||
// that we can support.
|
||||
@@ -577,7 +577,7 @@ SerialControllerDriverStart (
|
||||
SerialDevice->BaseAddress = (UINT16) SerialDevice->IsaIo->ResourceList->ResourceItem[Index].StartRange;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SerialDevice->HardwareFlowControl = (BOOLEAN) (FlowControlMap == UART_FLOW_CONTROL_HARDWARE);
|
||||
|
||||
//
|
||||
@@ -601,7 +601,7 @@ SerialControllerDriverStart (
|
||||
|
||||
//
|
||||
// Build the device path by appending the UART node to the ParentDevicePath.
|
||||
// The Uart setings are zero here, since SetAttribute() will update them to match
|
||||
// The Uart setings are zero here, since SetAttribute() will update them to match
|
||||
// the default setings.
|
||||
//
|
||||
SerialDevice->DevicePath = AppendDevicePathNode (
|
||||
@@ -853,7 +853,7 @@ IsaSerialFifoFull (
|
||||
|
||||
/**
|
||||
Detect whether specific FIFO is empty or not.
|
||||
|
||||
|
||||
@param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
|
||||
|
||||
@return whether specific FIFO is empty or not
|
||||
@@ -1022,7 +1022,7 @@ IsaSerialReceiveTransmit (
|
||||
Data = READ_RBR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
|
||||
|
||||
IsaSerialFifoAdd (&SerialDevice->Receive, Data);
|
||||
|
||||
|
||||
//
|
||||
// For full handshake flow control, if receive buffer full
|
||||
// tell the peer to stop sending data.
|
||||
@@ -1571,7 +1571,7 @@ IsaSerialSetControl (
|
||||
// first determine the parameter is invalid
|
||||
//
|
||||
if ((Control & (~(EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY |
|
||||
EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |
|
||||
EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |
|
||||
EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE))) != 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
@@ -1783,20 +1783,20 @@ IsaSerialWrite (
|
||||
//
|
||||
// Compute the number of bits in a single character. This is a start bit,
|
||||
// followed by the number of data bits, followed by the number of stop bits.
|
||||
// The number of stop bits is specified by an enumeration that includes
|
||||
// The number of stop bits is specified by an enumeration that includes
|
||||
// support for 1.5 stop bits. Treat 1.5 stop bits as 2 stop bits.
|
||||
//
|
||||
BitsPerCharacter =
|
||||
1 +
|
||||
This->Mode->DataBits +
|
||||
BitsPerCharacter =
|
||||
1 +
|
||||
This->Mode->DataBits +
|
||||
((This->Mode->StopBits == TwoStopBits) ? 2 : This->Mode->StopBits);
|
||||
|
||||
//
|
||||
// Compute the timeout in microseconds to wait for a single byte to be
|
||||
// transmitted. The Mode structure contans a Timeout field that is the
|
||||
// maximum time to transmit or receive a character. However, many UARTs
|
||||
// Compute the timeout in microseconds to wait for a single byte to be
|
||||
// transmitted. The Mode structure contans a Timeout field that is the
|
||||
// maximum time to transmit or receive a character. However, many UARTs
|
||||
// have a FIFO for transmits, so the time required to add one new character
|
||||
// to the transmit FIFO may be the time required to flush a full FIFO. If
|
||||
// to the transmit FIFO may be the time required to flush a full FIFO. If
|
||||
// the Timeout in the Mode structure is smaller than the time required to
|
||||
// flush a full FIFO at the current baud rate, then use a timeout value that
|
||||
// is required to flush a full transmit FIFO.
|
||||
@@ -1809,7 +1809,7 @@ IsaSerialWrite (
|
||||
NULL
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
for (Index = 0; Index < *BufferSize; Index++) {
|
||||
IsaSerialFifoAdd (&SerialDevice->Transmit, CharBuffer[Index]);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Include for Serial Driver
|
||||
|
||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -603,7 +603,7 @@ IsaSerialFifoFull (
|
||||
|
||||
/**
|
||||
Detect whether specific FIFO is empty or not.
|
||||
|
||||
|
||||
@param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
|
||||
|
||||
@return whether specific FIFO is empty or not
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Routines related Component Name protocol.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1548,8 +1548,8 @@ InitKeyboard (
|
||||
// Exceed the max try times. The device may be error.
|
||||
//
|
||||
if (TryTime == KEYBOARD_MAX_TRY) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -1579,7 +1579,7 @@ InitKeyboard (
|
||||
KeyboardError (ConsoleIn, L"\n\r");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
Status = KeyboardRead (ConsoleIn, &CommandByte);
|
||||
if (EFI_ERROR (Status)) {
|
||||
KeyboardError (ConsoleIn, L"\n\r");
|
||||
@@ -1595,7 +1595,7 @@ InitKeyboard (
|
||||
}
|
||||
} else {
|
||||
mEnableMouseInterface = FALSE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// 8042 controller is not setup yet:
|
||||
@@ -1611,13 +1611,13 @@ InitKeyboard (
|
||||
KeyboardError (ConsoleIn, L"\n\r");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_DISABLE_MOUSE_INTERFACE);
|
||||
if (EFI_ERROR (Status)) {
|
||||
KeyboardError (ConsoleIn, L"\n\r");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST,
|
||||
@@ -1631,7 +1631,7 @@ InitKeyboard (
|
||||
KeyboardError (ConsoleIn, L"8042 controller command write error!\n\r");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
Status = KeyboardWaitForValue (ConsoleIn, 0x55);
|
||||
if (EFI_ERROR (Status)) {
|
||||
KeyboardError (ConsoleIn, L"8042 controller self test failed!\n\r");
|
||||
@@ -1903,7 +1903,7 @@ CheckKeyboardConnect (
|
||||
ConsoleIn,
|
||||
KEYBOARD_KBEN
|
||||
);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1917,11 +1917,11 @@ CheckKeyboardConnect (
|
||||
KEYBOARD_CMDECHO_ACK
|
||||
);
|
||||
mWaitForValueTimeOut = WaitForValueTimeOutBcakup;
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
} else {
|
||||
return TRUE;
|
||||
|
@@ -272,7 +272,7 @@ KeyboardReadKeyStroke (
|
||||
EFI_KEY_DATA KeyData;
|
||||
|
||||
ConsoleIn = KEYBOARD_CONSOLE_IN_DEV_FROM_THIS (This);
|
||||
|
||||
|
||||
//
|
||||
// Considering if the partial keystroke is enabled, there maybe a partial
|
||||
// keystroke in the queue, so here skip the partial keystroke and get the
|
||||
@@ -719,7 +719,7 @@ KeyNotifyProcessHandler (
|
||||
while (TRUE) {
|
||||
//
|
||||
// Enter critical section
|
||||
//
|
||||
//
|
||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
Status = PopEfikeyBufHead (&ConsoleIn->EfiKeyQueueForNotify, &KeyData);
|
||||
//
|
||||
|
@@ -3,7 +3,7 @@
|
||||
PS/2 Keyboard driver. Routines that interacts with callers,
|
||||
conforming to EFI driver model
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -21,11 +21,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
/**
|
||||
Test controller is a keyboard Controller.
|
||||
|
||||
|
||||
@param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
|
||||
@param Controller driver's controller
|
||||
@param RemainingDevicePath children device path
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED controller is not floppy disk
|
||||
@retval EFI_SUCCESS controller is floppy disk
|
||||
**/
|
||||
@@ -39,11 +39,11 @@ KbdControllerDriverSupported (
|
||||
|
||||
/**
|
||||
Create KEYBOARD_CONSOLE_IN_DEV instance on controller.
|
||||
|
||||
|
||||
@param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
|
||||
@param Controller driver controller handle
|
||||
@param RemainingDevicePath Children's device path
|
||||
|
||||
|
||||
@retval whether success to create floppy control instance.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -79,16 +79,16 @@ KbdControllerDriverStop (
|
||||
|
||||
/**
|
||||
Free the waiting key notify list.
|
||||
|
||||
|
||||
@param ListHead Pointer to list head
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER ListHead is NULL
|
||||
@retval EFI_SUCCESS Sucess to free NotifyList
|
||||
**/
|
||||
EFI_STATUS
|
||||
KbdFreeNotifyList (
|
||||
IN OUT LIST_ENTRY *ListHead
|
||||
);
|
||||
);
|
||||
|
||||
//
|
||||
// DriverBinding Protocol Instance
|
||||
@@ -104,11 +104,11 @@ EFI_DRIVER_BINDING_PROTOCOL gKeyboardControllerDriver = {
|
||||
|
||||
/**
|
||||
Test controller is a keyboard Controller.
|
||||
|
||||
|
||||
@param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
|
||||
@param Controller driver's controller
|
||||
@param RemainingDevicePath children device path
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED controller is not floppy disk
|
||||
@retval EFI_SUCCESS controller is floppy disk
|
||||
**/
|
||||
@@ -158,11 +158,11 @@ KbdControllerDriverSupported (
|
||||
|
||||
/**
|
||||
Create KEYBOARD_CONSOLE_IN_DEV instance on controller.
|
||||
|
||||
|
||||
@param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
|
||||
@param Controller driver controller handle
|
||||
@param RemainingDevicePath Children's device path
|
||||
|
||||
|
||||
@retval whether success to create floppy control instance.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -249,17 +249,17 @@ KbdControllerDriverStart (
|
||||
ConsoleIn->ConInEx.ReadKeyStrokeEx = KeyboardReadKeyStrokeEx;
|
||||
ConsoleIn->ConInEx.SetState = KeyboardSetState;
|
||||
ConsoleIn->ConInEx.RegisterKeyNotify = KeyboardRegisterKeyNotify;
|
||||
ConsoleIn->ConInEx.UnregisterKeyNotify = KeyboardUnregisterKeyNotify;
|
||||
|
||||
ConsoleIn->ConInEx.UnregisterKeyNotify = KeyboardUnregisterKeyNotify;
|
||||
|
||||
InitializeListHead (&ConsoleIn->NotifyList);
|
||||
|
||||
//
|
||||
// Fix for random hangs in System waiting for the Key if no KBC is present in BIOS.
|
||||
// When KBC decode (IO port 0x60/0x64 decode) is not enabled,
|
||||
// When KBC decode (IO port 0x60/0x64 decode) is not enabled,
|
||||
// KeyboardRead will read back as 0xFF and return status is EFI_SUCCESS.
|
||||
// So instead we read status register to detect after read if KBC decode is enabled.
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Return code is ignored on purpose.
|
||||
//
|
||||
@@ -275,7 +275,7 @@ KbdControllerDriverStart (
|
||||
goto ErrorExit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Setup the WaitForKey event
|
||||
//
|
||||
@@ -293,7 +293,7 @@ KbdControllerDriverStart (
|
||||
}
|
||||
//
|
||||
// Setup the WaitForKeyEx event
|
||||
//
|
||||
//
|
||||
Status = gBS->CreateEvent (
|
||||
EVT_NOTIFY_WAIT,
|
||||
TPL_NOTIFY,
|
||||
@@ -306,7 +306,7 @@ KbdControllerDriverStart (
|
||||
StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR;
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
|
||||
// Setup a periodic timer, used for reading keystrokes at a fixed interval
|
||||
//
|
||||
Status = gBS->CreateEvent (
|
||||
@@ -442,7 +442,7 @@ ErrorExit:
|
||||
Status1 = KeyboardRead (ConsoleIn, &Data);;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ConsoleIn != NULL) {
|
||||
gBS->FreePool (ConsoleIn);
|
||||
}
|
||||
@@ -517,7 +517,7 @@ KbdControllerDriverStop (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
ConsoleIn = KEYBOARD_CONSOLE_IN_DEV_FROM_THIS (ConIn);
|
||||
|
||||
//
|
||||
@@ -595,9 +595,9 @@ KbdControllerDriverStop (
|
||||
|
||||
/**
|
||||
Free the waiting key notify list.
|
||||
|
||||
|
||||
@param ListHead Pointer to list head
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER ListHead is NULL
|
||||
@retval EFI_SUCCESS Sucess to free NotifyList
|
||||
**/
|
||||
@@ -613,24 +613,24 @@ KbdFreeNotifyList (
|
||||
}
|
||||
while (!IsListEmpty (ListHead)) {
|
||||
NotifyNode = CR (
|
||||
ListHead->ForwardLink,
|
||||
KEYBOARD_CONSOLE_IN_EX_NOTIFY,
|
||||
NotifyEntry,
|
||||
ListHead->ForwardLink,
|
||||
KEYBOARD_CONSOLE_IN_EX_NOTIFY,
|
||||
NotifyEntry,
|
||||
KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
||||
);
|
||||
RemoveEntryList (ListHead->ForwardLink);
|
||||
gBS->FreePool (NotifyNode);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
The module Entry Point for module Ps2Keyboard.
|
||||
The module Entry Point for module Ps2Keyboard.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// Ps2 Keyboard Driver for UEFI. The keyboard type implemented follows IBM
|
||||
// compatible PS2 protocol using Scan Code Set 1.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// Ps2KeyboardDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"PS2 Keyboard DXE Driver"
|
||||
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# Ps2 Keyboard Driver for UEFI. The keyboard type implemented follows IBM
|
||||
# compatible PS2 protocol using Scan Code Set 1.
|
||||
#
|
||||
# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -58,7 +58,7 @@
|
||||
BaseMemoryLib
|
||||
TimerLib
|
||||
PcdLib
|
||||
|
||||
|
||||
[Protocols]
|
||||
gEfiSimpleTextInProtocolGuid ## BY_START
|
||||
gEfiSimpleTextInputExProtocolGuid ## BY_START
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
PS2 Mouse Communication Interface.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -21,9 +21,9 @@ UINT8 ResolutionTbl[MaxResolution] = { 0, 1, 2, 3 };
|
||||
|
||||
/**
|
||||
Issue self test command via IsaIo interface.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return EFI_SUCCESS Success to do keyboard self testing.
|
||||
@return others Fail to do keyboard self testing.
|
||||
**/
|
||||
@@ -82,9 +82,9 @@ KbcSelfTest (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -100,9 +100,9 @@ KbcEnableAux (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -118,9 +118,9 @@ KbcDisableAux (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -136,9 +136,9 @@ KbcEnableKb (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -154,10 +154,10 @@ KbcDisableKb (
|
||||
|
||||
/**
|
||||
Issue command to check keyboard status.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param KeyboardEnable return whether keyboard is enable.
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -195,9 +195,9 @@ CheckKbStatus (
|
||||
|
||||
/**
|
||||
Issue command to reset keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -240,10 +240,10 @@ PS2MouseReset (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's sample rate
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -269,10 +269,10 @@ PS2MouseSetSampleRate (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's resolution.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Resolution value of resolution
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -298,10 +298,10 @@ PS2MouseSetResolution (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's scaling.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Scaling value of scaling
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -322,9 +322,9 @@ PS2MouseSetScaling (
|
||||
|
||||
/**
|
||||
Issue command to enable Ps2 mouse.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -341,7 +341,7 @@ PS2MouseEnable (
|
||||
/**
|
||||
Get mouse packet . Only care first 3 bytes
|
||||
|
||||
@param MouseAbsolutePointerDev Pointer to PS2 Absolute Pointer Simulation Device Private Data Structure
|
||||
@param MouseAbsolutePointerDev Pointer to PS2 Absolute Pointer Simulation Device Private Data Structure
|
||||
|
||||
@retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet
|
||||
@retval EFI_SUCCESS The data packet is gotten successfully.
|
||||
@@ -432,19 +432,19 @@ PS2MouseGetPacket (
|
||||
RelativeMovementX = Packet[1];
|
||||
RelativeMovementY = Packet[2];
|
||||
//
|
||||
// Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
|
||||
// Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn
|
||||
// Byte 1 | 8 bit X Movement
|
||||
// Byte 2 | 8 bit Y Movement
|
||||
//
|
||||
// Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
|
||||
// Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn
|
||||
// Byte 1 | 8 bit X Movement
|
||||
// Byte 2 | 8 bit Y Movement
|
||||
//
|
||||
// X sign bit + 8 bit X Movement : 9-bit signed twos complement integer that presents the relative displacement of the device in the X direction since the last data transmission.
|
||||
// Y sign bit + 8 bit Y Movement : Same as X sign bit + 8 bit X Movement.
|
||||
//
|
||||
//
|
||||
// First, Clear X and Y high 8 bits
|
||||
//
|
||||
RelativeMovementX = (INT16) (RelativeMovementX & 0xFF);
|
||||
RelativeMovementY = (INT16) (RelativeMovementY & 0xFF);
|
||||
RelativeMovementX = (INT16) (RelativeMovementX & 0xFF);
|
||||
RelativeMovementY = (INT16) (RelativeMovementY & 0xFF);
|
||||
//
|
||||
// Second, if the 9-bit signed twos complement integer is negative, set the high 8 bit 0xff
|
||||
//
|
||||
@@ -455,7 +455,7 @@ PS2MouseGetPacket (
|
||||
RelativeMovementY = (INT16) (RelativeMovementY | 0xFF00);
|
||||
}
|
||||
|
||||
|
||||
|
||||
RButton = (UINT8) (Packet[0] & 0x2);
|
||||
LButton = (UINT8) (Packet[0] & 0x1);
|
||||
|
||||
@@ -475,12 +475,12 @@ PS2MouseGetPacket (
|
||||
|
||||
/**
|
||||
Read data via IsaIo protocol with given number.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Buffer Buffer receive data of mouse
|
||||
@param BufSize The size of buffer
|
||||
@param State Check input or read data
|
||||
|
||||
|
||||
@return status of reading mouse data.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -536,10 +536,10 @@ PS2MouseRead (
|
||||
//
|
||||
/**
|
||||
I/O work flow of outing 8042 command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command I/O command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -575,10 +575,10 @@ Out8042Command (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -611,10 +611,10 @@ Out8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -654,11 +654,11 @@ In8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command Aux I/O command
|
||||
@param Resend Whether need resend the Aux command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -736,10 +736,10 @@ Out8042AuxCommand (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value
|
||||
|
||||
@param Data Buffer holding return value
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow.
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -782,10 +782,10 @@ Out8042AuxData (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -813,9 +813,9 @@ In8042AuxData (
|
||||
|
||||
/**
|
||||
Check keyboard controller status, if it is output buffer full and for auxiliary device.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Keyboard controller is ready
|
||||
@retval EFI_NOT_READY Keyboard controller is not ready
|
||||
**/
|
||||
@@ -840,10 +840,10 @@ CheckForInput (
|
||||
|
||||
/**
|
||||
I/O work flow to wait input buffer empty in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout Wating time.
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT if input is still not empty in given time.
|
||||
@retval EFI_SUCCESS input is empty.
|
||||
**/
|
||||
@@ -881,10 +881,10 @@ WaitInputEmpty (
|
||||
|
||||
/**
|
||||
I/O work flow to wait output buffer full in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout given time
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT output is not full in given time
|
||||
@retval EFI_SUCCESS output is full in given time.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Using PS2 Mouse to simulation Absolution Pointer Device.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -78,23 +78,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
///
|
||||
/// Parity Error
|
||||
///
|
||||
#define KBC_PARE 0x80
|
||||
#define KBC_PARE 0x80
|
||||
///
|
||||
/// General Time Out
|
||||
///
|
||||
#define KBC_TIM 0x40
|
||||
#define KBC_TIM 0x40
|
||||
///
|
||||
/// Output buffer for auxiliary device (PS/2):
|
||||
/// 0 - Holds keyboard data
|
||||
/// 1 - Holds data for auxiliary device
|
||||
///
|
||||
#define KBC_AUXB 0x20
|
||||
#define KBC_AUXB 0x20
|
||||
///
|
||||
/// Keyboard lock status:
|
||||
/// 0 - keyboard locked
|
||||
/// 1 - keyboard free
|
||||
///
|
||||
#define KBC_KEYL 0x10
|
||||
#define KBC_KEYL 0x10
|
||||
///
|
||||
/// Command/Data:
|
||||
/// 0 - data byte written via port 60h
|
||||
@@ -106,25 +106,25 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
/// 0 - power-on reset
|
||||
/// 1 - self-test successful
|
||||
///
|
||||
#define KBC_SYSF 0x04
|
||||
#define KBC_SYSF 0x04
|
||||
///
|
||||
/// Input Buffer Status :
|
||||
/// 0 - input buffer empty
|
||||
/// 1 - CPU data in input buffer
|
||||
///
|
||||
#define KBC_INPB 0x02
|
||||
#define KBC_INPB 0x02
|
||||
///
|
||||
/// Output Buffer Status :
|
||||
/// 0 - output buffer empty
|
||||
/// 1 - keyboard controller data in output buffer
|
||||
///
|
||||
#define KBC_OUTB 0x01
|
||||
#define KBC_OUTB 0x01
|
||||
|
||||
/**
|
||||
Issue self test command via IsaIo interface.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return EFI_SUCCESS Success to do keyboard self testing.
|
||||
@return others Fail to do keyboard self testing.
|
||||
**/
|
||||
@@ -135,9 +135,9 @@ KbcSelfTest (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -147,9 +147,9 @@ KbcEnableAux (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -159,9 +159,9 @@ KbcDisableAux (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -171,9 +171,9 @@ KbcEnableKb (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -183,10 +183,10 @@ KbcDisableKb (
|
||||
|
||||
/**
|
||||
Issue command to check keyboard status.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param KeyboardEnable return whether keyboard is enable.
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -197,9 +197,9 @@ CheckKbStatus (
|
||||
|
||||
/**
|
||||
Issue command to reset keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -209,10 +209,10 @@ PS2MouseReset (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's sample rate
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -223,10 +223,10 @@ PS2MouseSetSampleRate (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's resolution.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Resolution value of resolution
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -237,10 +237,10 @@ PS2MouseSetResolution (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's scaling.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Scaling value of scaling
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -251,9 +251,9 @@ PS2MouseSetScaling (
|
||||
|
||||
/**
|
||||
Issue command to enable Ps2 mouse.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -277,12 +277,12 @@ PS2MouseGetPacket (
|
||||
|
||||
/**
|
||||
Read data via IsaIo protocol with given number.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Buffer Buffer receive data of mouse
|
||||
@param BufSize The size of buffer
|
||||
@param State Check input or read data
|
||||
|
||||
|
||||
@return status of reading mouse data.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -298,10 +298,10 @@ PS2MouseRead (
|
||||
//
|
||||
/**
|
||||
I/O work flow of outing 8042 command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command I/O command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -313,10 +313,10 @@ Out8042Command (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -328,10 +328,10 @@ In8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -343,11 +343,11 @@ Out8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command Aux I/O command
|
||||
@param Resend Whether need resend the Aux command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -360,10 +360,10 @@ Out8042AuxCommand (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -375,10 +375,10 @@ In8042AuxData (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -390,9 +390,9 @@ Out8042AuxData (
|
||||
|
||||
/**
|
||||
Check keyboard controller status, if it is output buffer full and for auxiliary device.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Keyboard controller is ready
|
||||
@retval EFI_NOT_READY Keyboard controller is not ready
|
||||
**/
|
||||
@@ -403,10 +403,10 @@ CheckForInput (
|
||||
|
||||
/**
|
||||
I/O work flow to wait input buffer empty in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout Wating time.
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT if input is still not empty in given time.
|
||||
@retval EFI_SUCCESS input is empty.
|
||||
**/
|
||||
@@ -418,10 +418,10 @@ WaitInputEmpty (
|
||||
|
||||
/**
|
||||
I/O work flow to wait output buffer full in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout given time
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT output is not full in given time
|
||||
@retval EFI_SUCCESS output is full in given time.
|
||||
**/
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
A faked PS/2 Absolute Pointer driver. Routines that interacts with callers,
|
||||
conforming to EFI driver model
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -230,7 +230,7 @@ PS2MouseAbsolutePointerDriverStart (
|
||||
//
|
||||
// Initialize keyboard controller if necessary
|
||||
//
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
EFI_PERIPHERAL_MOUSE | EFI_P_MOUSE_PC_SELF_TEST,
|
||||
ParentDevicePath
|
||||
@@ -640,7 +640,7 @@ CheckMouseAbsolutePointerConnect (
|
||||
|
||||
/**
|
||||
Get and Clear mouse status.
|
||||
|
||||
|
||||
@param This - Pointer of simple pointer Protocol.
|
||||
@param State - Output buffer holding status.
|
||||
|
||||
@@ -743,9 +743,9 @@ PollMouseAbsolutePointer(
|
||||
/**
|
||||
The user Entry Point for module Ps2MouseAbsolutePointer. The user code starts with this function.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
A Ps2MouseAbsolutePointer driver header file
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -322,7 +322,7 @@ MouseAbsolutePointerReset (
|
||||
|
||||
/**
|
||||
Get and Clear mouse status.
|
||||
|
||||
|
||||
@param This - Pointer of simple pointer Protocol.
|
||||
@param State - Output buffer holding status.
|
||||
|
||||
@@ -370,10 +370,10 @@ PollMouseAbsolutePointer (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// This driver simulates a touch pad absolute pointing device using a standard
|
||||
// PS2 mouse as the input hardware.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// Ps2MouseAbsolutePointerDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"PS2 Tablet Pointer DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
PS2 Mouse Communication Interface.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -21,9 +21,9 @@ UINT8 ResolutionTbl[MaxResolution] = { 0, 1, 2, 3 };
|
||||
|
||||
/**
|
||||
Issue self test command via IsaIo interface.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return EFI_SUCCESS Success to do keyboard self testing.
|
||||
@return others Fail to do keyboard self testing.
|
||||
**/
|
||||
@@ -82,9 +82,9 @@ KbcSelfTest (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -100,9 +100,9 @@ KbcEnableAux (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -118,9 +118,9 @@ KbcDisableAux (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -136,9 +136,9 @@ KbcEnableKb (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -154,10 +154,10 @@ KbcDisableKb (
|
||||
|
||||
/**
|
||||
Issue command to check keyboard status.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param KeyboardEnable return whether keyboard is enable.
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -195,9 +195,9 @@ CheckKbStatus (
|
||||
|
||||
/**
|
||||
Issue command to reset keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -240,10 +240,10 @@ PS2MouseReset (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's sample rate
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -269,10 +269,10 @@ PS2MouseSetSampleRate (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's resolution.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Resolution value of resolution
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -298,10 +298,10 @@ PS2MouseSetResolution (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's scaling.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Scaling value of scaling
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -322,9 +322,9 @@ PS2MouseSetScaling (
|
||||
|
||||
/**
|
||||
Issue command to enable Ps2 mouse.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -341,7 +341,7 @@ PS2MouseEnable (
|
||||
/**
|
||||
Get mouse packet . Only care first 3 bytes
|
||||
|
||||
@param MouseDev Pointer of PS2 Mouse Private Data Structure
|
||||
@param MouseDev Pointer of PS2 Mouse Private Data Structure
|
||||
|
||||
@retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet
|
||||
@retval EFI_SUCCESS The data packet is gotten successfully.
|
||||
@@ -432,19 +432,19 @@ PS2MouseGetPacket (
|
||||
RelativeMovementX = Packet[1];
|
||||
RelativeMovementY = Packet[2];
|
||||
//
|
||||
// Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
|
||||
// Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn
|
||||
// Byte 1 | 8 bit X Movement
|
||||
// Byte 2 | 8 bit Y Movement
|
||||
//
|
||||
// Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
|
||||
// Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn
|
||||
// Byte 1 | 8 bit X Movement
|
||||
// Byte 2 | 8 bit Y Movement
|
||||
//
|
||||
// X sign bit + 8 bit X Movement : 9-bit signed twos complement integer that presents the relative displacement of the device in the X direction since the last data transmission.
|
||||
// Y sign bit + 8 bit Y Movement : Same as X sign bit + 8 bit X Movement.
|
||||
//
|
||||
//
|
||||
// First, Clear X and Y high 8 bits
|
||||
//
|
||||
RelativeMovementX = (INT16) (RelativeMovementX & 0xFF);
|
||||
RelativeMovementY = (INT16) (RelativeMovementY & 0xFF);
|
||||
RelativeMovementX = (INT16) (RelativeMovementX & 0xFF);
|
||||
RelativeMovementY = (INT16) (RelativeMovementY & 0xFF);
|
||||
//
|
||||
// Second, if the 9-bit signed twos complement integer is negative, set the high 8 bit 0xff
|
||||
//
|
||||
@@ -455,7 +455,7 @@ PS2MouseGetPacket (
|
||||
RelativeMovementY = (INT16) (RelativeMovementY | 0xFF00);
|
||||
}
|
||||
|
||||
|
||||
|
||||
RButton = (UINT8) (Packet[0] & 0x2);
|
||||
LButton = (UINT8) (Packet[0] & 0x1);
|
||||
|
||||
@@ -475,12 +475,12 @@ PS2MouseGetPacket (
|
||||
|
||||
/**
|
||||
Read data via IsaIo protocol with given number.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Buffer Buffer receive data of mouse
|
||||
@param BufSize The size of buffer
|
||||
@param State Check input or read data
|
||||
|
||||
|
||||
@return status of reading mouse data.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -535,10 +535,10 @@ PS2MouseRead (
|
||||
//
|
||||
/**
|
||||
I/O work flow of outing 8042 command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command I/O command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -574,10 +574,10 @@ Out8042Command (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -610,10 +610,10 @@ Out8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -653,11 +653,11 @@ In8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command Aux I/O command
|
||||
@param Resend Whether need resend the Aux command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -735,10 +735,10 @@ Out8042AuxCommand (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -781,10 +781,10 @@ Out8042AuxData (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -812,9 +812,9 @@ In8042AuxData (
|
||||
|
||||
/**
|
||||
Check keyboard controller status, if it is output buffer full and for auxiliary device.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Keyboard controller is ready
|
||||
@retval EFI_NOT_READY Keyboard controller is not ready
|
||||
**/
|
||||
@@ -839,10 +839,10 @@ CheckForInput (
|
||||
|
||||
/**
|
||||
I/O work flow to wait input buffer empty in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout Wating time.
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT if input is still not empty in given time.
|
||||
@retval EFI_SUCCESS input is empty.
|
||||
**/
|
||||
@@ -880,10 +880,10 @@ WaitInputEmpty (
|
||||
|
||||
/**
|
||||
I/O work flow to wait output buffer full in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout given time
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT output is not full in given time
|
||||
@retval EFI_SUCCESS output is full in given time.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
PS2 Mouse Communication Interface
|
||||
PS2 Mouse Communication Interface
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -78,23 +78,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
///
|
||||
/// Parity Error
|
||||
///
|
||||
#define KBC_PARE 0x80
|
||||
#define KBC_PARE 0x80
|
||||
///
|
||||
/// General Time Out
|
||||
///
|
||||
#define KBC_TIM 0x40
|
||||
#define KBC_TIM 0x40
|
||||
///
|
||||
/// Output buffer for auxiliary device (PS/2):
|
||||
/// 0 - Holds keyboard data
|
||||
/// 1 - Holds data for auxiliary device
|
||||
///
|
||||
#define KBC_AUXB 0x20
|
||||
#define KBC_AUXB 0x20
|
||||
///
|
||||
/// Keyboard lock status:
|
||||
/// 0 - keyboard locked
|
||||
/// 1 - keyboard free
|
||||
///
|
||||
#define KBC_KEYL 0x10
|
||||
#define KBC_KEYL 0x10
|
||||
///
|
||||
/// Command/Data:
|
||||
/// 0 - data byte written via port 60h
|
||||
@@ -106,25 +106,25 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
/// 0 - power-on reset
|
||||
/// 1 - self-test successful
|
||||
///
|
||||
#define KBC_SYSF 0x04
|
||||
#define KBC_SYSF 0x04
|
||||
///
|
||||
/// Input Buffer Status :
|
||||
/// 0 - input buffer empty
|
||||
/// 1 - CPU data in input buffer
|
||||
///
|
||||
#define KBC_INPB 0x02
|
||||
#define KBC_INPB 0x02
|
||||
///
|
||||
/// Output Buffer Status :
|
||||
/// 0 - output buffer empty
|
||||
/// 1 - keyboard controller data in output buffer
|
||||
///
|
||||
#define KBC_OUTB 0x01
|
||||
#define KBC_OUTB 0x01
|
||||
|
||||
/**
|
||||
Issue self test command via IsaIo interface.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return EFI_SUCCESS Success to do keyboard self testing.
|
||||
@return others Fail to do keyboard self testing.
|
||||
**/
|
||||
@@ -135,9 +135,9 @@ KbcSelfTest (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -147,9 +147,9 @@ KbcEnableAux (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard AUX functionality.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -159,9 +159,9 @@ KbcDisableAux (
|
||||
|
||||
/**
|
||||
Issue command to enable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -171,9 +171,9 @@ KbcEnableKb (
|
||||
|
||||
/**
|
||||
Issue command to disable keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -183,10 +183,10 @@ KbcDisableKb (
|
||||
|
||||
/**
|
||||
Issue command to check keyboard status.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param KeyboardEnable return whether keyboard is enable.
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -197,9 +197,9 @@ CheckKbStatus (
|
||||
|
||||
/**
|
||||
Issue command to reset keyboard.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -209,10 +209,10 @@ PS2MouseReset (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's sample rate
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@param SampleRate value of sample rate
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -223,10 +223,10 @@ PS2MouseSetSampleRate (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's resolution.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Resolution value of resolution
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -237,10 +237,10 @@ PS2MouseSetResolution (
|
||||
|
||||
/**
|
||||
Issue command to set mouse's scaling.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Scaling value of scaling
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -251,9 +251,9 @@ PS2MouseSetScaling (
|
||||
|
||||
/**
|
||||
Issue command to enable Ps2 mouse.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@return Status of command issuing.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -264,7 +264,7 @@ PS2MouseEnable (
|
||||
/**
|
||||
Get mouse packet . Only care first 3 bytes
|
||||
|
||||
@param MouseDev Pointer of PS2 Mouse Private Data Structure
|
||||
@param MouseDev Pointer of PS2 Mouse Private Data Structure
|
||||
|
||||
@retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet
|
||||
@retval EFI_SUCCESS The data packet is gotten successfully.
|
||||
@@ -277,12 +277,12 @@ PS2MouseGetPacket (
|
||||
|
||||
/**
|
||||
Read data via IsaIo protocol with given number.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Buffer Buffer receive data of mouse
|
||||
@param BufSize The size of buffer
|
||||
@param State Check input or read data
|
||||
|
||||
|
||||
@return status of reading mouse data.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -298,10 +298,10 @@ PS2MouseRead (
|
||||
//
|
||||
/**
|
||||
I/O work flow of outing 8042 command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command I/O command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -313,10 +313,10 @@ Out8042Command (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -328,10 +328,10 @@ In8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -343,11 +343,11 @@ Out8042Data (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux command.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Command Aux I/O command
|
||||
@param Resend Whether need resend the Aux command.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -360,10 +360,10 @@ Out8042AuxCommand (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -375,10 +375,10 @@ In8042AuxData (
|
||||
|
||||
/**
|
||||
I/O work flow of outing 8042 Aux data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Buffer holding return value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
@@ -390,9 +390,9 @@ Out8042AuxData (
|
||||
|
||||
/**
|
||||
Check keyboard controller status, if it is output buffer full and for auxiliary device.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Keyboard controller is ready
|
||||
@retval EFI_NOT_READY Keyboard controller is not ready
|
||||
**/
|
||||
@@ -403,10 +403,10 @@ CheckForInput (
|
||||
|
||||
/**
|
||||
I/O work flow to wait input buffer empty in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout Wating time.
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT if input is still not empty in given time.
|
||||
@retval EFI_SUCCESS input is empty.
|
||||
**/
|
||||
@@ -418,10 +418,10 @@ WaitInputEmpty (
|
||||
|
||||
/**
|
||||
I/O work flow to wait output buffer full in given time.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Timeout given time
|
||||
|
||||
|
||||
@retval EFI_TIMEOUT output is not full in given time
|
||||
@retval EFI_SUCCESS output is full in given time.
|
||||
**/
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
PS/2 Mouse driver. Routines that interacts with callers,
|
||||
conforming to EFI driver model.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -109,7 +109,7 @@ PS2MouseDriverSupported (
|
||||
}
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle by opening a IsaIo protocol, creating
|
||||
Start this driver on ControllerHandle by opening a IsaIo protocol, creating
|
||||
PS2_MOUSE_ABSOLUTE_POINTER_DEV device and install gEfiAbsolutePointerProtocolGuid
|
||||
finally.
|
||||
|
||||
@@ -239,7 +239,7 @@ PS2MouseDriverStart (
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
StatusCode = EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED;
|
||||
goto ErrorExit;
|
||||
}
|
||||
}
|
||||
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
@@ -381,7 +381,7 @@ ErrorExit:
|
||||
if ((MouseDev != NULL) && (MouseDev->ControllerNameTable != NULL)) {
|
||||
FreeUnicodeStringTable (MouseDev->ControllerNameTable);
|
||||
}
|
||||
|
||||
|
||||
if (Status != EFI_DEVICE_ERROR) {
|
||||
//
|
||||
// Since there will be no timer handler for mouse input any more,
|
||||
@@ -655,7 +655,7 @@ CheckMouseConnect (
|
||||
|
||||
/**
|
||||
Get and Clear mouse status.
|
||||
|
||||
|
||||
@param This - Pointer of simple pointer Protocol.
|
||||
@param State - Output buffer holding status.
|
||||
|
||||
@@ -757,9 +757,9 @@ PollMouse (
|
||||
/**
|
||||
The user Entry Point for module Ps2Mouse. The user code starts with this function.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
PS/2 Mouse driver header file.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -322,7 +322,7 @@ MouseReset (
|
||||
|
||||
/**
|
||||
Get and Clear mouse status.
|
||||
|
||||
|
||||
@param This - Pointer of simple pointer Protocol.
|
||||
@param State - Output buffer holding status.
|
||||
|
||||
@@ -370,10 +370,10 @@ PollMouse (
|
||||
|
||||
/**
|
||||
I/O work flow of in 8042 data.
|
||||
|
||||
|
||||
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
|
||||
@param Data Data value
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Success to execute I/O work flow
|
||||
@retval EFI_TIMEOUT Keyboard controller time out.
|
||||
**/
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This dirver provides support for PS2 based mice.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// Ps2MouseDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"PS2 Mouse DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This file contains all helper functions on the ATA command
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This file contains all helper functions on the ATA command
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -31,9 +31,9 @@
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
all the information of the IDE device.
|
||||
|
||||
@retval EFI_SUCCESS The disk specified by IdeDev is a Atapi6 supported one and
|
||||
@retval EFI_SUCCESS The disk specified by IdeDev is a Atapi6 supported one and
|
||||
48-bit addressing must be used
|
||||
@retval EFI_UNSUPPORTED The disk dosn't not support Atapi6 or it supports but the
|
||||
@retval EFI_UNSUPPORTED The disk dosn't not support Atapi6 or it supports but the
|
||||
capacity is below 120G, 48bit addressing is not needed
|
||||
@retval EFI_DEVICE_ERROR The identify data in IdeDev is incorrect
|
||||
@retval EFI_INVALID_PARAMETER The identify data in IdeDev is NULL.
|
||||
@@ -110,7 +110,7 @@ AtaAtapi6Identify (
|
||||
/**
|
||||
Enable SMART of the disk if supported
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
|
||||
all the information of the IDE device.
|
||||
**/
|
||||
VOID
|
||||
@@ -263,7 +263,7 @@ AtaSMARTSupport (
|
||||
information it needs to fill the IDE_BLK_IO_DEV data structure,
|
||||
including device type, media block size, media capacity, and etc.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
|
||||
all the information of the IDE device.
|
||||
|
||||
@retval EFI_SUCCESS Identify ATA device successfully.
|
||||
@@ -280,7 +280,7 @@ ATAIdentify (
|
||||
EFI_IDENTIFY_DATA *AtaIdentifyPointer;
|
||||
UINT32 Capacity;
|
||||
UINT8 DeviceSelect;
|
||||
UINTN Retry;
|
||||
UINTN Retry;
|
||||
|
||||
//
|
||||
// AtaIdentifyPointer is used for accommodating returned IDENTIFY data of
|
||||
@@ -297,9 +297,9 @@ ATAIdentify (
|
||||
//
|
||||
DeviceSelect = (UINT8) ((IdeDev->Device) << 4);
|
||||
|
||||
|
||||
|
||||
Retry = 3;
|
||||
while (Retry > 0) {
|
||||
while (Retry > 0) {
|
||||
Status = AtaPioDataIn (
|
||||
IdeDev,
|
||||
(VOID *) AtaIdentifyPointer,
|
||||
@@ -348,20 +348,20 @@ ATAIdentify (
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
} else if (Status == EFI_DEVICE_ERROR) {
|
||||
//
|
||||
// Some disk with big capacity (>200GB) is slow when being identified
|
||||
// and will return all zero for word83.
|
||||
// We try twice at first. If it fails, we do a SoftRest and try again.
|
||||
//
|
||||
Retry--;
|
||||
if (Retry == 1) {
|
||||
//
|
||||
// Do a SoftRest before the third attempt.
|
||||
//
|
||||
AtaSoftReset (IdeDev);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// Some disk with big capacity (>200GB) is slow when being identified
|
||||
// and will return all zero for word83.
|
||||
// We try twice at first. If it fails, we do a SoftRest and try again.
|
||||
//
|
||||
Retry--;
|
||||
if (Retry == 1) {
|
||||
//
|
||||
// Do a SoftRest before the third attempt.
|
||||
//
|
||||
AtaSoftReset (IdeDev);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// This is a hard disk <= 120GB capacity, treat it as normal hard disk
|
||||
//
|
||||
@@ -390,7 +390,7 @@ ATAIdentify (
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
gBS->FreePool (AtaIdentifyPointer);
|
||||
@@ -404,12 +404,12 @@ ATAIdentify (
|
||||
|
||||
/**
|
||||
This function is a helper function used to change the char order in a string. It
|
||||
is designed specially for the PrintAtaModuleName() function. After the IDE device
|
||||
is detected, the IDE driver gets the device module name by sending ATA command
|
||||
is designed specially for the PrintAtaModuleName() function. After the IDE device
|
||||
is detected, the IDE driver gets the device module name by sending ATA command
|
||||
called ATA Identify Command or ATAPI Identify Command to the specified IDE device.
|
||||
The module name returned is a string of ASCII characters: the first character is bit8--bit15
|
||||
of the first word, the second character is BIT0--bit7 of the first word and so on. Thus
|
||||
the string can not be print directly before it is preprocessed by this func to change
|
||||
the string can not be print directly before it is preprocessed by this func to change
|
||||
the order of characters in each word in the string.
|
||||
|
||||
@param Destination Indicates the destination string.
|
||||
@@ -455,7 +455,7 @@ PrintAtaModuleName (
|
||||
/**
|
||||
This function is used to send out ATA commands conforms to the PIO Data In Protocol.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
all the information of the IDE device.
|
||||
@param Buffer buffer contained data transferred from device to host.
|
||||
@param ByteCount data size in byte unit of the buffer.
|
||||
@@ -465,7 +465,7 @@ PrintAtaModuleName (
|
||||
@param SectorNumber value of the Sector Number Register
|
||||
@param CylinderLsb value of the low byte of the Cylinder Register
|
||||
@param CylinderMsb value of the high byte of the Cylinder Register
|
||||
|
||||
|
||||
@retval EFI_SUCCESS send out the ATA command and device send required data successfully.
|
||||
@retval EFI_DEVICE_ERROR command sent failed.
|
||||
|
||||
@@ -752,7 +752,7 @@ AtaPioDataOut (
|
||||
some debug information and if there is ERR bit set in the Status
|
||||
Register, the Error Register's value is also be parsed and print out.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
record all the information of the IDE device.
|
||||
|
||||
@retval EFI_SUCCESS No err information in the Status Register.
|
||||
@@ -850,15 +850,15 @@ CheckErrorStatus (
|
||||
}
|
||||
|
||||
/**
|
||||
This function is called by the AtaBlkIoReadBlocks() to perform reading from
|
||||
This function is called by the AtaBlkIoReadBlocks() to perform reading from
|
||||
media in block unit.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
all the information of the IDE device.
|
||||
@param DataBuffer A pointer to the destination buffer for the data.
|
||||
@param Lba The starting logical block address to read from on the device media.
|
||||
@param NumberOfBlocks The number of transfer data blocks.
|
||||
|
||||
|
||||
@return status is fully dependent on the return status of AtaPioDataIn() function.
|
||||
|
||||
**/
|
||||
@@ -959,7 +959,7 @@ AtaReadSectors (
|
||||
}
|
||||
|
||||
/**
|
||||
This function is called by the AtaBlkIoWriteBlocks() to perform writing onto
|
||||
This function is called by the AtaBlkIoWriteBlocks() to perform writing onto
|
||||
media in block unit.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
|
||||
@@ -967,7 +967,7 @@ AtaReadSectors (
|
||||
@param BufferData A pointer to the source buffer for the data.
|
||||
@param Lba The starting logical block address to write onto the device media.
|
||||
@param NumberOfBlocks The number of transfer data blocks.
|
||||
|
||||
|
||||
@return status is fully dependent on the return status of AtaPioDataIn() function.
|
||||
|
||||
**/
|
||||
@@ -1055,7 +1055,7 @@ AtaWriteSectors (
|
||||
}
|
||||
/**
|
||||
This function is used to implement the Soft Reset on the specified device. But,
|
||||
the ATA Soft Reset mechanism is so strong a reset method that it will force
|
||||
the ATA Soft Reset mechanism is so strong a reset method that it will force
|
||||
resetting on both devices connected to the same cable.
|
||||
|
||||
It is called by IdeBlkIoReset(), a interface function of Block
|
||||
@@ -1120,7 +1120,7 @@ AtaSoftReset (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
/**
|
||||
This function is used to send out ATA commands conforms to the PIO Data In
|
||||
This function is used to send out ATA commands conforms to the PIO Data In
|
||||
Protocol, supporting ATA/ATAPI-6 standard
|
||||
|
||||
Comparing with ATA-3 data in protocol, we have two differents here:
|
||||
@@ -1595,27 +1595,27 @@ DoAtaUdma (
|
||||
// Read BMIS register and clear ERROR and INTR bit
|
||||
//
|
||||
IdeDev->PciIo->Io.Read (
|
||||
IdeDev->PciIo,
|
||||
EfiPciIoWidthUint8,
|
||||
EFI_PCI_IO_PASS_THROUGH_BAR,
|
||||
IoPortForBmis,
|
||||
1,
|
||||
&RegisterValue
|
||||
);
|
||||
|
||||
IdeDev->PciIo,
|
||||
EfiPciIoWidthUint8,
|
||||
EFI_PCI_IO_PASS_THROUGH_BAR,
|
||||
IoPortForBmis,
|
||||
1,
|
||||
&RegisterValue
|
||||
);
|
||||
|
||||
RegisterValue |= (BMIS_INTERRUPT | BMIS_ERROR);
|
||||
|
||||
|
||||
IdeDev->PciIo->Io.Write (
|
||||
IdeDev->PciIo,
|
||||
EfiPciIoWidthUint8,
|
||||
EFI_PCI_IO_PASS_THROUGH_BAR,
|
||||
IoPortForBmis,
|
||||
1,
|
||||
&RegisterValue
|
||||
);
|
||||
IdeDev->PciIo,
|
||||
EfiPciIoWidthUint8,
|
||||
EFI_PCI_IO_PASS_THROUGH_BAR,
|
||||
IoPortForBmis,
|
||||
1,
|
||||
&RegisterValue
|
||||
);
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
||||
RemainBlockNum = NumberOfBlocks;
|
||||
while (RemainBlockNum > 0) {
|
||||
|
||||
@@ -1813,8 +1813,8 @@ DoAtaUdma (
|
||||
);
|
||||
if (((RegisterValue & (BMIS_INTERRUPT | BMIS_ERROR)) != 0) || (Count == 0)) {
|
||||
if (((RegisterValue & BMIS_ERROR) != 0) || (Count == 0)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
break;
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1847,7 +1847,7 @@ DoAtaUdma (
|
||||
1,
|
||||
&RegisterValue
|
||||
);
|
||||
//
|
||||
//
|
||||
// Read Status Register of IDE device to clear interrupt
|
||||
//
|
||||
RegisterValue = IDEReadPortB(IdeDev->PciIo,IdeDev->IoPort->Reg.Status);
|
||||
@@ -1878,9 +1878,9 @@ DoAtaUdma (
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
break;
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
break;
|
||||
}
|
||||
DataBuffer = (UINT8 *) DataBuffer + NumberOfBlocks * IdeDev->BlkIo.Media->BlockSize;
|
||||
StartLba += NumberOfBlocks;
|
||||
}
|
||||
@@ -1898,10 +1898,10 @@ DoAtaUdma (
|
||||
|
||||
/**
|
||||
This function is called by the AtaBlkIoReadBlocks() to perform reading from
|
||||
media in block unit. The function has been enhanced to support >120GB access
|
||||
media in block unit. The function has been enhanced to support >120GB access
|
||||
and transfer at most 65536 blocks per command
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
all the information of the IDE device.
|
||||
@param DataBuffer A pointer to the destination buffer for the data.
|
||||
@param StartLba The starting logical block address to read from on the device media.
|
||||
@@ -1930,7 +1930,7 @@ AtaUdmaReadExt (
|
||||
@param StartLba The starting logical block address to read from
|
||||
on the device media.
|
||||
@param NumberOfBlocks The number of transfer data blocks.
|
||||
|
||||
|
||||
@return status depends on the function DoAtaUdma() returns.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -2313,7 +2313,7 @@ AtaUdmaWriteExt (
|
||||
|
||||
/**
|
||||
This function is called by the AtaBlkIoWriteBlocks() to perform
|
||||
writing to media in block unit.
|
||||
writing to media in block unit.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@@ -2321,7 +2321,7 @@ AtaUdmaWriteExt (
|
||||
@param StartLba The starting logical block address to write to
|
||||
on the device media.
|
||||
@param NumberOfBlocks The number of transfer data blocks.
|
||||
|
||||
|
||||
@return status depends on the function DoAtaUdma() returns.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -2342,7 +2342,7 @@ AtaUdmaWrite (
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used
|
||||
to record all the information of the IDE device.
|
||||
@param DataBuffer A pointer to the source buffer for the data.
|
||||
@param StartLba The starting logical block address to write onto the device
|
||||
@param StartLba The starting logical block address to write onto the device
|
||||
media.
|
||||
@param NumberOfBlocks The number of transfer data blocks.
|
||||
|
||||
@@ -2423,7 +2423,7 @@ AtaWriteSectorsExt (
|
||||
@param BufferSize The size of the Buffer in bytes. This must be a multiple
|
||||
of the intrinsic block size of the device.
|
||||
@param Buffer A pointer to the source buffer for the data.The caller
|
||||
is responsible for either having implicit or explicit
|
||||
is responsible for either having implicit or explicit
|
||||
ownership of the memory that data is written from.
|
||||
|
||||
@retval EFI_SUCCESS Write Blocks successfully.
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
This file contains all helper functions on the ATAPI command
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
This file contains all helper functions on the ATAPI command
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/**
|
||||
This function is used to get the current status of the media residing
|
||||
in the LS-120 drive or ZIP drive. The media status is returned in the
|
||||
in the LS-120 drive or ZIP drive. The media status is returned in the
|
||||
Error Status.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@@ -28,8 +28,8 @@
|
||||
@retval EFI_NO_MEDIA There is no media in the drive.
|
||||
@retval EFI_WRITE_PROTECTED The media is writing protected.
|
||||
|
||||
@note This function must be called after the LS120EnableMediaStatus()
|
||||
with second parameter set to TRUE
|
||||
@note This function must be called after the LS120EnableMediaStatus()
|
||||
with second parameter set to TRUE
|
||||
(means enable media status notification) is called.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -189,8 +189,8 @@ AtapiReadPendingData (
|
||||
while ((TempWordBuffer & (ATA_STSREG_BSY | ATA_STSREG_DRQ)) == ATA_STSREG_DRQ) {
|
||||
IDEReadPortWMultiple (
|
||||
IdeDev->PciIo,
|
||||
IdeDev->IoPort->Data,
|
||||
1,
|
||||
IdeDev->IoPort->Data,
|
||||
1,
|
||||
&TempWordBuffer
|
||||
);
|
||||
TempWordBuffer = IDEReadPortB (IdeDev->PciIo,IdeDev->IoPort->Alt.AltStatus);
|
||||
@@ -200,7 +200,7 @@ AtapiReadPendingData (
|
||||
}
|
||||
|
||||
/**
|
||||
This function is called by either AtapiPacketCommandIn() or AtapiPacketCommandOut().
|
||||
This function is called by either AtapiPacketCommandIn() or AtapiPacketCommandOut().
|
||||
It is used to transfer data between host and device. The data direction is specified
|
||||
by the fourth parameter.
|
||||
|
||||
@@ -246,9 +246,9 @@ PioReadWriteData (
|
||||
}
|
||||
//
|
||||
// for performance, we assert the ByteCount is an even number
|
||||
// which is actually a resonable assumption
|
||||
// which is actually a resonable assumption
|
||||
ASSERT((ByteCount%2) == 0);
|
||||
|
||||
|
||||
PtrBuffer = Buffer;
|
||||
RequiredWordCount = ByteCount / 2;
|
||||
//
|
||||
@@ -257,7 +257,7 @@ PioReadWriteData (
|
||||
ActualWordCount = 0;
|
||||
|
||||
while (ActualWordCount < RequiredWordCount) {
|
||||
|
||||
|
||||
//
|
||||
// before each data transfer stream, the host should poll DRQ bit ready,
|
||||
// to see whether indicates device is ready to transfer data.
|
||||
@@ -266,7 +266,7 @@ PioReadWriteData (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return CheckErrorStatus (IdeDev);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// read Status Register will clear interrupt
|
||||
//
|
||||
@@ -301,7 +301,7 @@ PioReadWriteData (
|
||||
PtrBuffer += WordCount;
|
||||
ActualWordCount += WordCount;
|
||||
}
|
||||
|
||||
|
||||
if (Read) {
|
||||
//
|
||||
// In the case where the drive wants to send more data than we need to read,
|
||||
@@ -326,17 +326,17 @@ PioReadWriteData (
|
||||
}
|
||||
|
||||
/**
|
||||
This function is used to send out ATAPI commands conforms to the Packet Command
|
||||
This function is used to send out ATAPI commands conforms to the Packet Command
|
||||
with PIO Data In Protocol.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param Packet pointer pointing to ATAPI_PACKET_COMMAND data structure
|
||||
which contains the contents of the command.
|
||||
which contains the contents of the command.
|
||||
@param Buffer buffer contained data transferred from device to host.
|
||||
@param ByteCount data size in byte unit of the buffer.
|
||||
@param TimeOut this parameter is used to specify the timeout value for the
|
||||
PioReadWriteData() function.
|
||||
@param TimeOut this parameter is used to specify the timeout value for the
|
||||
PioReadWriteData() function.
|
||||
|
||||
@retval EFI_SUCCESS send out the ATAPI packet command successfully
|
||||
and device sends data successfully.
|
||||
@@ -437,10 +437,10 @@ AtapiPacketCommandIn (
|
||||
which contains the contents of the command.
|
||||
@param Buffer buffer contained data transferred from host to device.
|
||||
@param ByteCount data size in byte unit of the buffer.
|
||||
@param TimeOut this parameter is used to specify the timeout value
|
||||
for the PioReadWriteData() function.
|
||||
@param TimeOut this parameter is used to specify the timeout value
|
||||
for the PioReadWriteData() function.
|
||||
@retval EFI_SUCCESS send out the ATAPI packet command successfully
|
||||
and device received data successfully.
|
||||
and device received data successfully.
|
||||
@retval EFI_DEVICE_ERROR the device failed to send data.
|
||||
|
||||
**/
|
||||
@@ -465,7 +465,7 @@ AtapiPacketCommandOut (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Select device via Device/Head Register.
|
||||
//
|
||||
@@ -587,26 +587,26 @@ AtapiInquiry (
|
||||
to fill in the Media data structure of the Block I/O Protocol interface.
|
||||
|
||||
There are 5 steps to reach such objective:
|
||||
1. Sends out the ATAPI Identify Command to the specified device.
|
||||
1. Sends out the ATAPI Identify Command to the specified device.
|
||||
Only ATAPI device responses to this command. If the command succeeds,
|
||||
it returns the Identify data structure which filled with information
|
||||
about the device. Since the ATAPI device contains removable media,
|
||||
it returns the Identify data structure which filled with information
|
||||
about the device. Since the ATAPI device contains removable media,
|
||||
the only meaningful information is the device module name.
|
||||
2. Sends out ATAPI Inquiry Packet Command to the specified device.
|
||||
This command will return inquiry data of the device, which contains
|
||||
the device type information.
|
||||
3. Allocate sense data space for future use. We don't detect the media
|
||||
presence here to improvement boot performance, especially when CD
|
||||
presence here to improvement boot performance, especially when CD
|
||||
media is present. The media detection will be performed just before
|
||||
each BLK_IO read/write
|
||||
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
|
||||
@retval EFI_SUCCESS Identify ATAPI device successfully.
|
||||
@retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type
|
||||
is not supported by this IDE driver.
|
||||
@retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed
|
||||
@retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed
|
||||
|
||||
@note Parameter "IdeDev" will be updated in this function.
|
||||
**/
|
||||
@@ -719,7 +719,7 @@ ATAPIIdentify (
|
||||
// WORM
|
||||
//
|
||||
case 0x04:
|
||||
|
||||
|
||||
//
|
||||
// Optical
|
||||
//
|
||||
@@ -758,13 +758,13 @@ ATAPIIdentify (
|
||||
}
|
||||
/**
|
||||
Sends out ATAPI Request Sense Packet Command to the specified device. This command
|
||||
will return all the current Sense data in the device. This function will pack
|
||||
will return all the current Sense data in the device. This function will pack
|
||||
all the Sense data in one single buffer.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param SenseCounts allocated in this function, and freed by the calling function.
|
||||
This buffer is used to accommodate all the sense data returned
|
||||
This buffer is used to accommodate all the sense data returned
|
||||
by the device.
|
||||
|
||||
@retval EFI_SUCCESS Request Sense command completes successfully.
|
||||
@@ -850,7 +850,7 @@ AtapiRequestSense (
|
||||
}
|
||||
/**
|
||||
This function is used to parse sense data. Only the first sense data is honoured
|
||||
|
||||
|
||||
@param IdeDev Indicates the calling context.
|
||||
@param SenseCount Count of sense data.
|
||||
@param Result The parsed result.
|
||||
@@ -936,12 +936,12 @@ ParseSenseData (
|
||||
EFI_STATUS
|
||||
AtapiTestUnitReady (
|
||||
IN IDE_BLK_IO_DEV *IdeDev,
|
||||
OUT SENSE_RESULT *SResult
|
||||
OUT SENSE_RESULT *SResult
|
||||
)
|
||||
{
|
||||
ATAPI_PACKET_COMMAND Packet;
|
||||
EFI_STATUS Status;
|
||||
UINTN SenseCount;
|
||||
UINTN SenseCount;
|
||||
|
||||
//
|
||||
// fill command packet
|
||||
@@ -974,7 +974,7 @@ AtapiTestUnitReady (
|
||||
|
||||
Current device status will impact device's response to the Read Capacity
|
||||
Command. For example, if the device once reset, the Read Capacity
|
||||
Command will fail. The Sense data record the current device status, so
|
||||
Command will fail. The Sense data record the current device status, so
|
||||
if the Read Capacity Command failed, the Sense data must be requested
|
||||
and be analyzed to determine if the Read Capacity Command should retry.
|
||||
|
||||
@@ -988,12 +988,12 @@ AtapiTestUnitReady (
|
||||
|
||||
@note Parameter "IdeDev" will be updated in this function.
|
||||
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
AtapiReadCapacity (
|
||||
IN IDE_BLK_IO_DEV *IdeDev,
|
||||
OUT SENSE_RESULT *SResult
|
||||
OUT SENSE_RESULT *SResult
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -1002,7 +1002,7 @@ AtapiReadCapacity (
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS SenseStatus;
|
||||
ATAPI_PACKET_COMMAND Packet;
|
||||
UINTN SenseCount;
|
||||
UINTN SenseCount;
|
||||
|
||||
//
|
||||
// used for capacity data returned from ATAPI device
|
||||
@@ -1048,9 +1048,9 @@ AtapiReadCapacity (
|
||||
SenseStatus = AtapiRequestSense (IdeDev, &SenseCount);
|
||||
|
||||
if (!EFI_ERROR (SenseStatus)) {
|
||||
ParseSenseData (IdeDev, SenseCount, SResult);
|
||||
|
||||
if (!EFI_ERROR (Status) && *SResult == SenseNoSenseKey) {
|
||||
ParseSenseData (IdeDev, SenseCount, SResult);
|
||||
|
||||
if (!EFI_ERROR (Status) && *SResult == SenseNoSenseKey) {
|
||||
if (IdeDev->Type == IdeCdRom) {
|
||||
|
||||
IdeDev->BlkIo.Media->LastBlock = ((UINT32) Data.LastLba3 << 24) |
|
||||
@@ -1058,7 +1058,7 @@ AtapiReadCapacity (
|
||||
(Data.LastLba1 << 8) |
|
||||
Data.LastLba0;
|
||||
|
||||
IdeDev->BlkIo.Media->MediaPresent = TRUE;
|
||||
IdeDev->BlkIo.Media->MediaPresent = TRUE;
|
||||
|
||||
IdeDev->BlkIo.Media->ReadOnly = TRUE;
|
||||
|
||||
@@ -1077,7 +1077,7 @@ AtapiReadCapacity (
|
||||
} else {
|
||||
|
||||
IdeDev->BlkIo.Media->LastBlock = ((UINT32) FormatData.LastLba3 << 24) |
|
||||
(FormatData.LastLba2 << 16) |
|
||||
(FormatData.LastLba2 << 16) |
|
||||
(FormatData.LastLba1 << 8) |
|
||||
FormatData.LastLba0;
|
||||
if (IdeDev->BlkIo.Media->LastBlock != 0) {
|
||||
@@ -1110,7 +1110,7 @@ AtapiReadCapacity (
|
||||
}
|
||||
/**
|
||||
This function is used to test the current media write-protected or not residing
|
||||
in the LS-120 drive or ZIP drive.
|
||||
in the LS-120 drive or ZIP drive.
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param WriteProtected if True, current media is write protected.
|
||||
@@ -1159,8 +1159,8 @@ IsLS120orZipWriteProtected (
|
||||
}
|
||||
|
||||
/**
|
||||
Used before read/write blocks from/to ATAPI device media. Since ATAPI device
|
||||
media is removable, it is necessary to detect whether media is present and
|
||||
Used before read/write blocks from/to ATAPI device media. Since ATAPI device
|
||||
media is removable, it is necessary to detect whether media is present and
|
||||
get current present media's information, and if media has been changed, Block
|
||||
I/O Protocol need to be reinstalled.
|
||||
|
||||
@@ -1409,17 +1409,17 @@ AtapiDetectMedia (
|
||||
This function is called by the AtapiBlkIoReadBlocks() to perform
|
||||
read from media in block unit.
|
||||
|
||||
The main command used to access media here is READ(10) Command.
|
||||
READ(10) Command requests that the ATAPI device media transfer
|
||||
specified data to the host. Data is transferred in block(sector)
|
||||
The main command used to access media here is READ(10) Command.
|
||||
READ(10) Command requests that the ATAPI device media transfer
|
||||
specified data to the host. Data is transferred in block(sector)
|
||||
unit. The maximum number of blocks that can be transferred once is
|
||||
65536. This is the main difference between READ(10) and READ(12)
|
||||
65536. This is the main difference between READ(10) and READ(12)
|
||||
Command. The maximum number of blocks in READ(12) is 2 power 32.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param Buffer A pointer to the destination buffer for the data.
|
||||
@param Lba The starting logical block address to read from on the
|
||||
@param Buffer A pointer to the destination buffer for the data.
|
||||
@param Lba The starting logical block address to read from on the
|
||||
device media.
|
||||
@param NumberOfBlocks The number of transfer data blocks.
|
||||
|
||||
@@ -1527,19 +1527,19 @@ AtapiReadSectors (
|
||||
/**
|
||||
This function is called by the AtapiBlkIoWriteBlocks() to perform
|
||||
write onto media in block unit.
|
||||
The main command used to access media here is Write(10) Command.
|
||||
Write(10) Command requests that the ATAPI device media transfer
|
||||
specified data to the host. Data is transferred in block (sector)
|
||||
The main command used to access media here is Write(10) Command.
|
||||
Write(10) Command requests that the ATAPI device media transfer
|
||||
specified data to the host. Data is transferred in block (sector)
|
||||
unit. The maximum number of blocks that can be transferred once is
|
||||
65536.
|
||||
65536.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param Buffer A pointer to the source buffer for the data.
|
||||
@param Lba The starting logical block address to write onto
|
||||
@param Buffer A pointer to the source buffer for the data.
|
||||
@param Lba The starting logical block address to write onto
|
||||
the device media.
|
||||
@param NumberOfBlocks The number of transfer data blocks.
|
||||
|
||||
|
||||
@return status is fully dependent on the return status of AtapiPacketCommandOut() function.
|
||||
|
||||
**/
|
||||
@@ -1594,7 +1594,7 @@ AtapiWriteSectors (
|
||||
} else {
|
||||
SectorCount = (UINT16) BlocksRemaining;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Command code is WRITE_10.
|
||||
//
|
||||
@@ -1645,7 +1645,7 @@ AtapiWriteSectors (
|
||||
condition (such as BSY bit is always set ), I think the Soft Reset
|
||||
command should be sent without waiting for the BSY clear and DRDY
|
||||
set.
|
||||
This function is called by IdeBlkIoReset(),
|
||||
This function is called by IdeBlkIoReset(),
|
||||
a interface function of Block I/O protocol.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@@ -1683,7 +1683,7 @@ AtapiSoftReset (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// stall 5 seconds to make the device status stable
|
||||
//
|
||||
@@ -1702,9 +1702,9 @@ AtapiSoftReset (
|
||||
@param BufferSize The size of the Buffer in bytes. This must be a multiple
|
||||
of the intrinsic block size of the device.
|
||||
@param Buffer A pointer to the destination buffer for the data. The caller
|
||||
is responsible for either having implicit or explicit
|
||||
is responsible for either having implicit or explicit
|
||||
ownership of the memory that data is read into.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Read Blocks successfully.
|
||||
@retval EFI_DEVICE_ERROR Read Blocks failed.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@@ -1804,11 +1804,11 @@ AtapiBlkIoReadBlocks (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Read blocks succeeded
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// save the first block to the cache for performance
|
||||
//
|
||||
@@ -1840,8 +1840,8 @@ AtapiBlkIoReadBlocks (
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
|
||||
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
|
||||
intrinsic block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
||||
intrinsic block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
||||
or the data buffer is not valid.
|
||||
|
||||
@retval EFI_WRITE_PROTECTED The write protected is enabled or the media does not support write
|
||||
@@ -1889,7 +1889,7 @@ AtapiBlkIoWriteBlocks (
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get the intrinsic block size
|
||||
//
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for ConPlatform driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
|
||||
|
||||
UEFI Component Name(2) protocol implementation header file for IDE Bus driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,15 +1,15 @@
|
||||
/** @file
|
||||
Implementation of UEFI Driver Configuration Protocol for IDE bus driver which
|
||||
Implementation of UEFI Driver Configuration Protocol for IDE bus driver which
|
||||
provides ability to set IDE bus controller specific options.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -80,7 +80,7 @@ GetResponse (
|
||||
}
|
||||
|
||||
/**
|
||||
Allows the user to set controller specific options for a controller that a
|
||||
Allows the user to set controller specific options for a controller that a
|
||||
driver is currently managing.
|
||||
|
||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||
@@ -91,26 +91,26 @@ GetResponse (
|
||||
that wish to set options for the bus controller.
|
||||
It will not be NULL for a bus driver that wishes to set
|
||||
options for one of its child controllers.
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the user interface that should be presented
|
||||
to the user, and it must match one of the languages specified in
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the user interface that should be presented
|
||||
to the user, and it must match one of the languages specified in
|
||||
SupportedLanguages. The number of languages supported by a driver is up to
|
||||
the driver writer.
|
||||
@param ActionRequired A pointer to the action that the calling agent is required
|
||||
@param ActionRequired A pointer to the action that the calling agent is required
|
||||
to perform when this function returns.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The driver specified by This successfully set the configuration
|
||||
|
||||
@retval EFI_SUCCESS The driver specified by This successfully set the configuration
|
||||
options for the controller specified by ControllerHandle..
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for
|
||||
the controller specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language.
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the
|
||||
controller specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the
|
||||
controller specified by ControllerHandle and ChildHandle
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -182,20 +182,20 @@ IDEBusDriverConfigurationSetOptions (
|
||||
Tests to see if a controller's current configuration options are valid.
|
||||
|
||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
|
||||
@param ControllerHandle The handle of the controller to test if it's current configuration options
|
||||
@param ControllerHandle The handle of the controller to test if it's current configuration options
|
||||
are valid.
|
||||
@param ChildHandle The handle of the child controller to test if it's current configuration
|
||||
options are valid. This is an optional parameter that may be NULL. It will
|
||||
@param ChildHandle The handle of the child controller to test if it's current configuration
|
||||
options are valid. This is an optional parameter that may be NULL. It will
|
||||
be NULL for device drivers. It will also be NULL for a bus drivers that
|
||||
wish to test the configuration options for the bus controller. It will
|
||||
not be NULL for a bus driver that wishes to test configuration options for
|
||||
wish to test the configuration options for the bus controller. It will
|
||||
not be NULL for a bus driver that wishes to test configuration options for
|
||||
one of its child controllers.
|
||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being
|
||||
managed by the driver specified by This has a valid set of configuration
|
||||
options.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller
|
||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being
|
||||
managed by the driver specified by This has an invalid set of configuration
|
||||
@@ -236,31 +236,31 @@ IDEBusDriverConfigurationOptionsValid (
|
||||
|
||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||
@param ControllerHandle The handle of the controller to force default configuration options on.
|
||||
@param ChildHandle The handle of the child controller to force default configuration
|
||||
options on This is an optional parameter that may be NULL. It
|
||||
will be NULL for device drivers. It will also be NULL for a bus
|
||||
@param ChildHandle The handle of the child controller to force default configuration
|
||||
options on This is an optional parameter that may be NULL. It
|
||||
will be NULL for device drivers. It will also be NULL for a bus
|
||||
drivers that wish to force default configuration options for the bus
|
||||
controller. It will not be NULL for a bus driver that wishes to force
|
||||
default configuration options for one of its child controllers.
|
||||
@param DefaultType The type of default configuration options to force on the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@param ActionRequired A pointer to the action that the calling agent is required to perform
|
||||
@param DefaultType The type of default configuration options to force on the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@param ActionRequired A pointer to the action that the calling agent is required to perform
|
||||
when this function returns.
|
||||
|
||||
@retval EFI_SUCCESS The driver specified by This successfully forced the
|
||||
default configuration options on the controller specified by
|
||||
@retval EFI_SUCCESS The driver specified by This successfully forced the
|
||||
default configuration options on the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default
|
||||
configuration options on the controller specified by ControllerHandle
|
||||
and ChildHandle.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type
|
||||
specified by DefaultType.
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration
|
||||
options on the controller specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration
|
||||
options on the controller specified by ControllerHandle and ChildHandle.
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -1,15 +1,15 @@
|
||||
/** @file
|
||||
Implementation of UEFI driver Dialnostics protocol which to perform diagnostic on the IDE
|
||||
Bus controller.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -42,24 +42,24 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gIDEBusDriverDiag
|
||||
@param ChildHandle The handle of the child controller to run diagnostics on
|
||||
This is an optional parameter that may be NULL. It will
|
||||
be NULL for device drivers. It will also be NULL for a
|
||||
bus drivers that wish to run diagnostics on the bus controller.
|
||||
It will not be NULL for a bus driver that wishes to run
|
||||
bus drivers that wish to run diagnostics on the bus controller.
|
||||
It will not be NULL for a bus driver that wishes to run
|
||||
diagnostics on one of its child controllers.
|
||||
@param DiagnosticType Indicates type of diagnostics to perform on the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language in which the optional error message should
|
||||
be returned in Buffer, and it must match one of the languages
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language in which the optional error message should
|
||||
be returned in Buffer, and it must match one of the languages
|
||||
specified in SupportedLanguages. The number of languages supported by
|
||||
a driver is up to the driver writer.
|
||||
@param ErrorType A GUID that defines the format of the data returned in Buffer.
|
||||
@param BufferSize The size, in bytes, of the data returned in Buffer.
|
||||
@param Buffer A buffer that contains a Null-terminated Unicode string
|
||||
plus some additional data whose format is defined by ErrorType.
|
||||
Buffer is allocated by this function with AllocatePool(), and
|
||||
plus some additional data whose format is defined by ErrorType.
|
||||
Buffer is allocated by this function with AllocatePool(), and
|
||||
it is the caller's responsibility to free it with a call to FreePool().
|
||||
|
||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed
|
||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed
|
||||
the diagnostic.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@@ -67,18 +67,18 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gIDEBusDriverDiag
|
||||
@retval EFI_INVALID_PARAMETER ErrorType is NULL.
|
||||
@retval EFI_INVALID_PARAMETER BufferType is NULL.
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support running
|
||||
diagnostics for the controller specified by ControllerHandle
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support running
|
||||
diagnostics for the controller specified by ControllerHandle
|
||||
and ChildHandle.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
||||
type of diagnostic specified by DiagnosticType.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the language
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the language
|
||||
specified by Language.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the
|
||||
diagnostics.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the
|
||||
status information in ErrorType, BufferSize,and Buffer.
|
||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle
|
||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle
|
||||
did not pass the diagnostic.
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The file ontaining the helper functions implement of the Ide Bus driver
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -24,7 +24,7 @@ UINT8 MasterDeviceType = INVALID_DEVICE_TYPE;
|
||||
read a one-byte data from a IDE port.
|
||||
|
||||
@param PciIo The PCI IO protocol instance
|
||||
@param Port the IDE Port number
|
||||
@param Port the IDE Port number
|
||||
|
||||
@return the one-byte data read from IDE port
|
||||
**/
|
||||
@@ -270,7 +270,7 @@ IDEWritePortWMultiple (
|
||||
@param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance
|
||||
@param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to
|
||||
receive IDE IO port registers' base addresses
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED return this value when the BARs is not IO type
|
||||
@retval EFI_SUCCESS Get the Base address successfully
|
||||
@retval other read the pci configureation data error
|
||||
@@ -351,7 +351,7 @@ GetIdeRegistersBaseAddr (
|
||||
succeess.
|
||||
|
||||
@param IdeDev The BLK_IO private data which specifies the IDE device
|
||||
|
||||
|
||||
@retval EFI_INVALID_PARAMETER return this value when the channel is invalid
|
||||
@retval EFI_SUCCESS reassign the IDE IO resource successfully
|
||||
@retval other get the IDE current base address effor
|
||||
@@ -370,7 +370,7 @@ ReassignIdeResources (
|
||||
if (IdeDev->Channel >= IdeMaxChannel) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Requery IDE IO port registers' base addresses in case of the switch of
|
||||
// native and legacy modes
|
||||
@@ -593,7 +593,7 @@ DetectIDEController (
|
||||
Detect if there is disk attached to this port
|
||||
|
||||
@param IdeDev The BLK_IO private data which specifies the IDE device.
|
||||
|
||||
|
||||
@retval EFI_NOT_FOUND The device or channel is not found
|
||||
@retval EFI_SUCCESS The device is found
|
||||
|
||||
@@ -715,7 +715,7 @@ InitializeIDEChannelData (
|
||||
Register. DRQ is cleared when the device is finished transferring data.
|
||||
So this function is called after data transfer is finished.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
|
||||
|
||||
@@ -778,7 +778,7 @@ DRQClear (
|
||||
transferring data. So this function is called after data transfer
|
||||
is finished.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
|
||||
@@ -901,10 +901,10 @@ DRQReady (
|
||||
}
|
||||
/**
|
||||
This function is used to poll for the DRQ bit set in the Alternate Status Register.
|
||||
DRQ is set when the device is ready to transfer data. So this function is called after
|
||||
DRQ is set when the device is ready to transfer data. So this function is called after
|
||||
the command is sent to the device and before required data is transferred.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
record all the information of the IDE device.
|
||||
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
|
||||
@@ -966,7 +966,7 @@ DRQReady2 (
|
||||
This function is used to poll for the BSY bit clear in the Status Register. BSY
|
||||
is clear when the device is not busy. Every command must be sent after device is not busy.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
|
||||
|
||||
@@ -1008,11 +1008,11 @@ WaitForBSYClear (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
/**
|
||||
This function is used to poll for the BSY bit clear in the Alternate Status Register.
|
||||
BSY is clear when the device is not busy. Every command must be sent after device is
|
||||
This function is used to poll for the BSY bit clear in the Alternate Status Register.
|
||||
BSY is clear when the device is not busy. Every command must be sent after device is
|
||||
not busy.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
all the information of the IDE device.
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
|
||||
|
||||
@@ -1051,7 +1051,7 @@ WaitForBSYClear2 (
|
||||
}
|
||||
/**
|
||||
This function is used to poll for the DRDY bit set in the Status Register. DRDY
|
||||
bit is set when the device is ready to accept command. Most ATA commands must be
|
||||
bit is set when the device is ready to accept command. Most ATA commands must be
|
||||
sent after DRDY set except the ATAPI Packet Command.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@@ -1103,8 +1103,8 @@ DRDYReady (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
/**
|
||||
This function is used to poll for the DRDY bit set in the Alternate Status Register.
|
||||
DRDY bit is set when the device is ready to accept command. Most ATA commands must
|
||||
This function is used to poll for the DRDY bit set in the Alternate Status Register.
|
||||
DRDY bit is set when the device is ready to accept command. Most ATA commands must
|
||||
be sent after DRDY set except the ATAPI Packet Command.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Header file for IDE Bus Driver, containing the helper functions'
|
||||
prototype.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -28,7 +28,7 @@
|
||||
read a one-byte data from a IDE port.
|
||||
|
||||
@param PciIo The PCI IO protocol instance
|
||||
@param Port the IDE Port number
|
||||
@param Port the IDE Port number
|
||||
|
||||
return the one-byte data read from IDE port
|
||||
**/
|
||||
@@ -153,7 +153,7 @@ IDEWritePortWMultiple (
|
||||
@param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance
|
||||
@param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to
|
||||
receive IDE IO port registers' base addresses
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED return this value when the BARs is not IO type
|
||||
@retval EFI_SUCCESS Get the Base address successfully
|
||||
@retval other read the pci configureation data error
|
||||
@@ -187,7 +187,7 @@ ReassignIdeResources (
|
||||
Detect if there is disk attached to this port.
|
||||
|
||||
@param IdeDev The BLK_IO private data which specifies the IDE device.
|
||||
|
||||
|
||||
@retval EFI_NOT_FOUND The device or channel is not found
|
||||
@retval EFI_SUCCESS The device is found
|
||||
|
||||
@@ -212,7 +212,7 @@ InitializeIDEChannelData (
|
||||
Register. DRQ is cleared when the device is finished transferring data.
|
||||
So this function is called after data transfer is finished.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
|
||||
|
||||
@@ -236,7 +236,7 @@ DRQClear (
|
||||
transferring data. So this function is called after data transfer
|
||||
is finished.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
|
||||
@@ -280,10 +280,10 @@ DRQReady (
|
||||
|
||||
/**
|
||||
This function is used to poll for the DRQ bit set in the Alternate Status Register.
|
||||
DRQ is set when the device is ready to transfer data. So this function is called after
|
||||
DRQ is set when the device is ready to transfer data. So this function is called after
|
||||
the command is sent to the device and before required data is transferred.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
record all the information of the IDE device.
|
||||
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
|
||||
@@ -304,7 +304,7 @@ DRQReady2 (
|
||||
This function is used to poll for the BSY bit clear in the Status Register. BSY
|
||||
is clear when the device is not busy. Every command must be sent after device is not busy.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
|
||||
|
||||
@@ -320,11 +320,11 @@ WaitForBSYClear (
|
||||
);
|
||||
|
||||
/**
|
||||
This function is used to poll for the BSY bit clear in the Alternate Status Register.
|
||||
BSY is clear when the device is not busy. Every command must be sent after device is
|
||||
This function is used to poll for the BSY bit clear in the Alternate Status Register.
|
||||
BSY is clear when the device is not busy. Every command must be sent after device is
|
||||
not busy.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
all the information of the IDE device.
|
||||
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
|
||||
|
||||
@@ -341,7 +341,7 @@ WaitForBSYClear2 (
|
||||
|
||||
/**
|
||||
This function is used to poll for the DRDY bit set in the Status Register. DRDY
|
||||
bit is set when the device is ready to accept command. Most ATA commands must be
|
||||
bit is set when the device is ready to accept command. Most ATA commands must be
|
||||
sent after DRDY set except the ATAPI Packet Command.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@@ -360,8 +360,8 @@ DRDYReady (
|
||||
);
|
||||
|
||||
/**
|
||||
This function is used to poll for the DRDY bit set in the Alternate Status Register.
|
||||
DRDY bit is set when the device is ready to accept command. Most ATA commands must
|
||||
This function is used to poll for the DRDY bit set in the Alternate Status Register.
|
||||
DRDY bit is set when the device is ready to accept command. Most ATA commands must
|
||||
be sent after DRDY set except the ATAPI Packet Command.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@@ -394,7 +394,7 @@ DRDYReady2 (
|
||||
information it needs to fill the IDE_BLK_IO_DEV data structure,
|
||||
including device type, media block size, media capacity, and etc.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
|
||||
all the information of the IDE device.
|
||||
|
||||
@retval EFI_SUCCESS Identify ATA device successfully.
|
||||
@@ -420,7 +420,7 @@ PrintAtaModuleName (
|
||||
/**
|
||||
This function is used to send out ATA commands conforms to the PIO Data In Protocol.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
|
||||
all the information of the IDE device.
|
||||
@param Buffer buffer contained data transferred from device to host.
|
||||
@param ByteCount data size in byte unit of the buffer.
|
||||
@@ -430,7 +430,7 @@ PrintAtaModuleName (
|
||||
@param SectorNumber value of the Sector Number Register
|
||||
@param CylinderLsb value of the low byte of the Cylinder Register
|
||||
@param CylinderMsb value of the high byte of the Cylinder Register
|
||||
|
||||
|
||||
@retval EFI_SUCCESS send out the ATA command and device send required data successfully.
|
||||
@retval EFI_DEVICE_ERROR command sent failed.
|
||||
|
||||
@@ -486,7 +486,7 @@ AtaPioDataOut (
|
||||
some debug information and if there is ERR bit set in the Status
|
||||
Register, the Error Register's value is also be parsed and print out.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
|
||||
record all the information of the IDE device.
|
||||
|
||||
@retval EFI_SUCCESS No err information in the Status Register.
|
||||
@@ -500,7 +500,7 @@ CheckErrorStatus (
|
||||
|
||||
/**
|
||||
This function is used to implement the Soft Reset on the specified device. But,
|
||||
the ATA Soft Reset mechanism is so strong a reset method that it will force
|
||||
the ATA Soft Reset mechanism is so strong a reset method that it will force
|
||||
resetting on both devices connected to the same cable.
|
||||
|
||||
It is called by IdeBlkIoReset(), a interface function of Block
|
||||
@@ -568,7 +568,7 @@ AtaBlkIoReadBlocks (
|
||||
@param BufferSize The size of the Buffer in bytes. This must be a multiple
|
||||
of the intrinsic block size of the device.
|
||||
@param Buffer A pointer to the source buffer for the data.The caller
|
||||
is responsible for either having implicit or explicit
|
||||
is responsible for either having implicit or explicit
|
||||
ownership of the memory that data is written from.
|
||||
|
||||
@retval EFI_SUCCESS Write Blocks successfully.
|
||||
@@ -600,26 +600,26 @@ AtaBlkIoWriteBlocks (
|
||||
to fill in the Media data structure of the Block I/O Protocol interface.
|
||||
|
||||
There are 5 steps to reach such objective:
|
||||
1. Sends out the ATAPI Identify Command to the specified device.
|
||||
1. Sends out the ATAPI Identify Command to the specified device.
|
||||
Only ATAPI device responses to this command. If the command succeeds,
|
||||
it returns the Identify data structure which filled with information
|
||||
about the device. Since the ATAPI device contains removable media,
|
||||
it returns the Identify data structure which filled with information
|
||||
about the device. Since the ATAPI device contains removable media,
|
||||
the only meaningful information is the device module name.
|
||||
2. Sends out ATAPI Inquiry Packet Command to the specified device.
|
||||
This command will return inquiry data of the device, which contains
|
||||
the device type information.
|
||||
3. Allocate sense data space for future use. We don't detect the media
|
||||
presence here to improvement boot performance, especially when CD
|
||||
presence here to improvement boot performance, especially when CD
|
||||
media is present. The media detection will be performed just before
|
||||
each BLK_IO read/write
|
||||
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
to record all the information of the IDE device.
|
||||
|
||||
@retval EFI_SUCCESS Identify ATAPI device successfully.
|
||||
@retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type
|
||||
is not supported by this IDE driver.
|
||||
@retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed
|
||||
@retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed
|
||||
|
||||
@note Parameter "IdeDev" will be updated in this function.
|
||||
**/
|
||||
@@ -637,7 +637,7 @@ ATAPIIdentify (
|
||||
condition (such as BSY bit is always set ), I think the Soft Reset
|
||||
command should be sent without waiting for the BSY clear and DRDY
|
||||
set.
|
||||
This function is called by IdeBlkIoReset(),
|
||||
This function is called by IdeBlkIoReset(),
|
||||
a interface function of Block I/O protocol.
|
||||
|
||||
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
|
||||
@@ -662,9 +662,9 @@ AtapiSoftReset (
|
||||
@param BufferSize The size of the Buffer in bytes. This must be a multiple
|
||||
of the intrinsic block size of the device.
|
||||
@param Buffer A pointer to the destination buffer for the data. The caller
|
||||
is responsible for either having implicit or explicit
|
||||
is responsible for either having implicit or explicit
|
||||
ownership of the memory that data is read into.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Read Blocks successfully.
|
||||
@retval EFI_DEVICE_ERROR Read Blocks failed.
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@@ -701,8 +701,8 @@ AtapiBlkIoReadBlocks (
|
||||
@retval EFI_NO_MEDIA There is no media in the device.
|
||||
@retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
|
||||
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
|
||||
intrinsic block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
||||
intrinsic block size of the device.
|
||||
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
|
||||
or the data buffer is not valid.
|
||||
|
||||
@retval EFI_WRITE_PROTECTED The write protected is enabled or the media does not support write
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
This file implement UEFI driver for IDE Bus which includes device identification,
|
||||
Child device(Disk, CDROM, etc) enumeration and child handler installation, and
|
||||
This file implement UEFI driver for IDE Bus which includes device identification,
|
||||
Child device(Disk, CDROM, etc) enumeration and child handler installation, and
|
||||
driver stop.
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -154,7 +154,7 @@ IDEBusDriverBindingSupported (
|
||||
if (RemainingDevicePath != NULL) {
|
||||
Node = (EFI_DEV_PATH *) RemainingDevicePath;
|
||||
//
|
||||
// Check if RemainingDevicePath is the End of Device Path Node,
|
||||
// Check if RemainingDevicePath is the End of Device Path Node,
|
||||
// if yes, go on checking other conditions
|
||||
//
|
||||
if (!IsDevicePathEnd (Node)) {
|
||||
@@ -190,7 +190,7 @@ IDEBusDriverBindingSupported (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Close the I/O Abstraction(s) used to perform the supported test
|
||||
//
|
||||
@@ -237,11 +237,11 @@ IDEBusDriverBindingSupported (
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Now further check the PCI header: Base class (offset 0x0B) and
|
||||
// Sub Class (offset 0x0A). This controller should be an IDE controller
|
||||
@@ -258,11 +258,11 @@ IDEBusDriverBindingSupported (
|
||||
//
|
||||
// Examine if it is IDE mode by class code
|
||||
//
|
||||
if ((PciData.Hdr.ClassCode[2] != PCI_CLASS_MASS_STORAGE) || (PciData.Hdr.ClassCode[1] != PCI_SUB_CLASS_IDE)) {
|
||||
if ((PciData.Hdr.ClassCode[2] != PCI_CLASS_MASS_STORAGE) || (PciData.Hdr.ClassCode[1] != PCI_SUB_CLASS_IDE)) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
} else {
|
||||
} else {
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
@@ -464,7 +464,7 @@ IDEBusDriverBindingStart (
|
||||
|
||||
if (EnumAll || RemainingDevicePath == NULL) {
|
||||
//
|
||||
// If IdeInit->EnumAll is TRUE or RemainingDevicePath is NULL,
|
||||
// If IdeInit->EnumAll is TRUE or RemainingDevicePath is NULL,
|
||||
// must enumerate all IDE devices anyway
|
||||
//
|
||||
BeginningIdeChannel = IdePrimary;
|
||||
@@ -474,7 +474,7 @@ IDEBusDriverBindingStart (
|
||||
|
||||
} else if (!IsDevicePathEnd (RemainingDevicePath)) {
|
||||
//
|
||||
// If RemainingDevicePath isn't the End of Device Path Node,
|
||||
// If RemainingDevicePath isn't the End of Device Path Node,
|
||||
// only scan the specified device by RemainingDevicePath
|
||||
//
|
||||
Node = (EFI_DEV_PATH *) RemainingDevicePath;
|
||||
@@ -495,7 +495,7 @@ IDEBusDriverBindingStart (
|
||||
//
|
||||
// If RemainingDevicePath is the End of Device Path Node,
|
||||
// skip enumerate any device and return EFI_SUCESSS
|
||||
//
|
||||
//
|
||||
BeginningIdeChannel = IdeMaxChannel;
|
||||
EndIdeChannel = IdeMaxChannel - 1;
|
||||
BeginningIdeDevice = IdeMaxDevice;
|
||||
@@ -1298,7 +1298,7 @@ IDEBlkIoFlushBlocks (
|
||||
}
|
||||
|
||||
/**
|
||||
This function is used by the IDE bus driver to get inquiry data.
|
||||
This function is used by the IDE bus driver to get inquiry data.
|
||||
Data format of Identify data is defined by the Interface GUID.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@@ -1306,9 +1306,9 @@ IDEBlkIoFlushBlocks (
|
||||
@param InquiryDataSize Pointer to the value for the inquiry data size.
|
||||
|
||||
@retval EFI_SUCCESS The command was accepted without any errors.
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -1339,7 +1339,7 @@ IDEDiskInfoInquiry (
|
||||
}
|
||||
|
||||
/**
|
||||
This function is used by the IDE bus driver to get identify data.
|
||||
This function is used by the IDE bus driver to get identify data.
|
||||
Data format of Identify data is defined by the Interface GUID.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@@ -1347,9 +1347,9 @@ IDEDiskInfoInquiry (
|
||||
@param IdentifyDataSize Pointer to the value for the identify data size.
|
||||
|
||||
@retval EFI_SUCCESS The command was accepted without any errors.
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -1380,18 +1380,18 @@ IDEDiskInfoIdentify (
|
||||
}
|
||||
|
||||
/**
|
||||
This function is used by the IDE bus driver to get sense data.
|
||||
This function is used by the IDE bus driver to get sense data.
|
||||
Data format of Sense data is defined by the Interface GUID.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param SenseData Pointer to the SenseData.
|
||||
@param SenseDataSize Size of SenseData in bytes.
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param SenseData Pointer to the SenseData.
|
||||
@param SenseDataSize Size of SenseData in bytes.
|
||||
@param SenseDataNumber Pointer to the value for the identify data size.
|
||||
|
||||
@retval EFI_SUCCESS The command was accepted without any errors.
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -1409,12 +1409,12 @@ IDEDiskInfoSenseData (
|
||||
/**
|
||||
This function is used by the IDE bus driver to get controller information.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param IdeChannel Pointer to the Ide Channel number. Primary or secondary.
|
||||
@param IdeDevice Pointer to the Ide Device number. Master or slave.
|
||||
|
||||
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
|
||||
@retval EFI_UNSUPPORTED This is not an IDE device
|
||||
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
|
||||
@retval EFI_UNSUPPORTED This is not an IDE device
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for IDE Bus Driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -181,7 +181,7 @@ IDEBusDriverBindingStop (
|
||||
// EFI Driver Configuration Functions
|
||||
//
|
||||
/**
|
||||
Allows the user to set controller specific options for a controller that a
|
||||
Allows the user to set controller specific options for a controller that a
|
||||
driver is currently managing.
|
||||
|
||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||
@@ -192,26 +192,26 @@ IDEBusDriverBindingStop (
|
||||
that wish to set options for the bus controller.
|
||||
It will not be NULL for a bus driver that wishes to set
|
||||
options for one of its child controllers.
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the user interface that should be presented
|
||||
to the user, and it must match one of the languages specified in
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the user interface that should be presented
|
||||
to the user, and it must match one of the languages specified in
|
||||
SupportedLanguages. The number of languages supported by a driver is up to
|
||||
the driver writer.
|
||||
@param ActionRequired A pointer to the action that the calling agent is required
|
||||
@param ActionRequired A pointer to the action that the calling agent is required
|
||||
to perform when this function returns.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The driver specified by This successfully set the configuration
|
||||
|
||||
@retval EFI_SUCCESS The driver specified by This successfully set the configuration
|
||||
options for the controller specified by ControllerHandle..
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for
|
||||
the controller specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language.
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the
|
||||
controller specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the
|
||||
controller specified by ControllerHandle and ChildHandle
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -228,20 +228,20 @@ IDEBusDriverConfigurationSetOptions (
|
||||
Tests to see if a controller's current configuration options are valid.
|
||||
|
||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
|
||||
@param ControllerHandle The handle of the controller to test if it's current configuration options
|
||||
@param ControllerHandle The handle of the controller to test if it's current configuration options
|
||||
are valid.
|
||||
@param ChildHandle The handle of the child controller to test if it's current configuration
|
||||
options are valid. This is an optional parameter that may be NULL. It will
|
||||
@param ChildHandle The handle of the child controller to test if it's current configuration
|
||||
options are valid. This is an optional parameter that may be NULL. It will
|
||||
be NULL for device drivers. It will also be NULL for a bus drivers that
|
||||
wish to test the configuration options for the bus controller. It will
|
||||
not be NULL for a bus driver that wishes to test configuration options for
|
||||
wish to test the configuration options for the bus controller. It will
|
||||
not be NULL for a bus driver that wishes to test configuration options for
|
||||
one of its child controllers.
|
||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being
|
||||
managed by the driver specified by This has a valid set of configuration
|
||||
options.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller
|
||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being
|
||||
managed by the driver specified by This has an invalid set of configuration
|
||||
@@ -260,31 +260,31 @@ IDEBusDriverConfigurationOptionsValid (
|
||||
|
||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||
@param ControllerHandle The handle of the controller to force default configuration options on.
|
||||
@param ChildHandle The handle of the child controller to force default configuration
|
||||
options on This is an optional parameter that may be NULL. It
|
||||
will be NULL for device drivers. It will also be NULL for a bus
|
||||
@param ChildHandle The handle of the child controller to force default configuration
|
||||
options on This is an optional parameter that may be NULL. It
|
||||
will be NULL for device drivers. It will also be NULL for a bus
|
||||
drivers that wish to force default configuration options for the bus
|
||||
controller. It will not be NULL for a bus driver that wishes to force
|
||||
default configuration options for one of its child controllers.
|
||||
@param DefaultType The type of default configuration options to force on the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@param ActionRequired A pointer to the action that the calling agent is required to perform
|
||||
@param DefaultType The type of default configuration options to force on the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@param ActionRequired A pointer to the action that the calling agent is required to perform
|
||||
when this function returns.
|
||||
|
||||
@retval EFI_SUCCESS The driver specified by This successfully forced the
|
||||
default configuration options on the controller specified by
|
||||
@retval EFI_SUCCESS The driver specified by This successfully forced the
|
||||
default configuration options on the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default
|
||||
configuration options on the controller specified by ControllerHandle
|
||||
and ChildHandle.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type
|
||||
specified by DefaultType.
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration
|
||||
options on the controller specified by ControllerHandle and ChildHandle.
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration
|
||||
@retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration
|
||||
options on the controller specified by ControllerHandle and ChildHandle.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -308,24 +308,24 @@ IDEBusDriverConfigurationForceDefaults (
|
||||
@param ChildHandle The handle of the child controller to run diagnostics on
|
||||
This is an optional parameter that may be NULL. It will
|
||||
be NULL for device drivers. It will also be NULL for a
|
||||
bus drivers that wish to run diagnostics on the bus controller.
|
||||
It will not be NULL for a bus driver that wishes to run
|
||||
bus drivers that wish to run diagnostics on the bus controller.
|
||||
It will not be NULL for a bus driver that wishes to run
|
||||
diagnostics on one of its child controllers.
|
||||
@param DiagnosticType Indicates type of diagnostics to perform on the controller
|
||||
specified by ControllerHandle and ChildHandle.
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language in which the optional error message should
|
||||
be returned in Buffer, and it must match one of the languages
|
||||
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language in which the optional error message should
|
||||
be returned in Buffer, and it must match one of the languages
|
||||
specified in SupportedLanguages. The number of languages supported by
|
||||
a driver is up to the driver writer.
|
||||
@param ErrorType A GUID that defines the format of the data returned in Buffer.
|
||||
@param BufferSize The size, in bytes, of the data returned in Buffer.
|
||||
@param Buffer A buffer that contains a Null-terminated Unicode string
|
||||
plus some additional data whose format is defined by ErrorType.
|
||||
Buffer is allocated by this function with AllocatePool(), and
|
||||
plus some additional data whose format is defined by ErrorType.
|
||||
Buffer is allocated by this function with AllocatePool(), and
|
||||
it is the caller's responsibility to free it with a call to FreePool().
|
||||
|
||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed
|
||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed
|
||||
the diagnostic.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@@ -333,18 +333,18 @@ IDEBusDriverConfigurationForceDefaults (
|
||||
@retval EFI_INVALID_PARAMETER ErrorType is NULL.
|
||||
@retval EFI_INVALID_PARAMETER BufferType is NULL.
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support running
|
||||
diagnostics for the controller specified by ControllerHandle
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support running
|
||||
diagnostics for the controller specified by ControllerHandle
|
||||
and ChildHandle.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
||||
type of diagnostic specified by DiagnosticType.
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the language
|
||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the language
|
||||
specified by Language.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the
|
||||
diagnostics.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the
|
||||
status information in ErrorType, BufferSize,and Buffer.
|
||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle
|
||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle
|
||||
did not pass the diagnostic.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -427,7 +427,7 @@ IDEBlkIoWriteBlocks (
|
||||
/**
|
||||
Flushes all modified data to a physical block devices
|
||||
|
||||
@param This Indicates a pointer to the calling context which to sepcify a
|
||||
@param This Indicates a pointer to the calling context which to sepcify a
|
||||
sepcific block device
|
||||
|
||||
@retval EFI_SUCCESS Always return success.
|
||||
@@ -438,7 +438,7 @@ IDEBlkIoFlushBlocks (
|
||||
IN EFI_BLOCK_IO_PROTOCOL *This
|
||||
);
|
||||
/**
|
||||
This function is used by the IDE bus driver to get inquiry data.
|
||||
This function is used by the IDE bus driver to get inquiry data.
|
||||
Data format of Identify data is defined by the Interface GUID.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@@ -446,9 +446,9 @@ IDEBlkIoFlushBlocks (
|
||||
@param InquiryDataSize Pointer to the value for the inquiry data size.
|
||||
|
||||
@retval EFI_SUCCESS The command was accepted without any errors.
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -460,7 +460,7 @@ IDEDiskInfoInquiry (
|
||||
);
|
||||
|
||||
/**
|
||||
This function is used by the IDE bus driver to get identify data.
|
||||
This function is used by the IDE bus driver to get identify data.
|
||||
Data format of Identify data is defined by the Interface GUID.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@@ -468,9 +468,9 @@ IDEDiskInfoInquiry (
|
||||
@param IdentifyDataSize Pointer to the value for the identify data size.
|
||||
|
||||
@retval EFI_SUCCESS The command was accepted without any errors.
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -482,18 +482,18 @@ IDEDiskInfoIdentify (
|
||||
);
|
||||
|
||||
/**
|
||||
This function is used by the IDE bus driver to get sense data.
|
||||
This function is used by the IDE bus driver to get sense data.
|
||||
Data format of Sense data is defined by the Interface GUID.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param SenseData Pointer to the SenseData.
|
||||
@param SenseDataSize Size of SenseData in bytes.
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param SenseData Pointer to the SenseData.
|
||||
@param SenseDataSize Size of SenseData in bytes.
|
||||
@param SenseDataNumber Pointer to the value for the identify data size.
|
||||
|
||||
@retval EFI_SUCCESS The command was accepted without any errors.
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
|
||||
@retval EFI_NOT_FOUND Device does not support this data class
|
||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -508,12 +508,12 @@ IDEDiskInfoSenseData (
|
||||
/**
|
||||
This function is used by the IDE bus driver to get controller information.
|
||||
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
|
||||
@param IdeChannel Pointer to the Ide Channel number. Primary or secondary.
|
||||
@param IdeDevice Pointer to the Ide Device number. Master or slave.
|
||||
|
||||
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
|
||||
@retval EFI_UNSUPPORTED This is not an IDE device
|
||||
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
|
||||
@retval EFI_UNSUPPORTED This is not an IDE device
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -524,7 +524,7 @@ IDEDiskInfoWhichIde (
|
||||
OUT UINT32 *IdeDevice
|
||||
);
|
||||
/**
|
||||
The is an event(generally the event is exitBootService event) call back function.
|
||||
The is an event(generally the event is exitBootService event) call back function.
|
||||
Clear pending IDE interrupt before OS loader/kernel take control of the IDE device.
|
||||
|
||||
@param Event Pointer to this event
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# This driver will enumerate IDE device and export the blockIo protocol for every device.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -29,9 +29,9 @@
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gIDEBusDriverBinding
|
||||
# DRIVER_BINDING = gIDEBusDriverBinding
|
||||
# COMPONENT_NAME = gIDEBusComponentName
|
||||
# COMPONENT_NAME2 = gIDEBusComponentName2
|
||||
# COMPONENT_NAME2 = gIDEBusComponentName2
|
||||
# Variable Guid C Name: gConfigurationGuid Variable Name: L"Configuration"
|
||||
#
|
||||
#
|
||||
@@ -53,7 +53,7 @@
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
IntelFrameworkPkg/IntelFrameworkPkg.dec
|
||||
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
||||
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// IdeBusDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"IDE Bus DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Header file for IDE Bus Driver's Data Structures
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -142,7 +142,7 @@ typedef struct {
|
||||
//
|
||||
// 1 second
|
||||
//
|
||||
#define ATATIMEOUT 1000
|
||||
#define ATATIMEOUT 1000
|
||||
|
||||
//
|
||||
// ATAPITIMEOUT is used for waiting operation
|
||||
@@ -152,7 +152,7 @@ typedef struct {
|
||||
//
|
||||
// 1 second
|
||||
//
|
||||
#define ATAPITIMEOUT 1000
|
||||
#define ATAPITIMEOUT 1000
|
||||
|
||||
//
|
||||
// ATAPILONGTIMEOUT is used for waiting read and
|
||||
@@ -162,12 +162,12 @@ typedef struct {
|
||||
//
|
||||
// 2 seconds
|
||||
//
|
||||
#define CDROMLONGTIMEOUT 2000
|
||||
#define CDROMLONGTIMEOUT 2000
|
||||
|
||||
//
|
||||
// 5 seconds
|
||||
//
|
||||
#define ATAPILONGTIMEOUT 5000
|
||||
#define ATAPILONGTIMEOUT 5000
|
||||
|
||||
//
|
||||
// 10 seconds
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implements EFI Component Name Protocol for VGA Mini Port Driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implements EFI Driver Binding Protocol and VGA Mini Port Protocol for VGA Mini Port Driver.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -306,14 +306,14 @@ PciVgaMiniPortDriverBindingStop (
|
||||
This function implements EFI_VGA_MINI_PORT_PROTOCOL.SetMode().
|
||||
If ModeNumber exceeds the valid range, then EFI_UNSUPPORTED is returned.
|
||||
Otherwise, EFI_SUCCESS is directly returned without real operation.
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ModeNumber Mode number. 0 - 80x25 1-80x50
|
||||
|
||||
@retval EFI_SUCCESS The mode was set
|
||||
@retval EFI_UNSUPPORTED ModeNumber is not supported.
|
||||
@retval EFI_DEVICE_ERROR The device is not functioning properly.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -328,4 +328,4 @@ PciVgaMiniPortSetMode (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Internal include file for VGA Mini Port Driver.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -252,14 +252,14 @@ PciVgaMiniPortComponentNameGetControllerName (
|
||||
This function implements EFI_VGA_MINI_PORT_PROTOCOL.SetMode().
|
||||
If ModeNumber exceeds the valid range, then EFI_UNSUPPORTED is returned.
|
||||
Otherwise, EFI_SUCCESS is directly returned without real operation.
|
||||
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ModeNumber Mode number. 0 - 80x25 1-80x50
|
||||
|
||||
@retval EFI_SUCCESS The mode was set
|
||||
@retval EFI_UNSUPPORTED ModeNumber is not supported.
|
||||
@retval EFI_DEVICE_ERROR The device is not functioning properly.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// VGA Mini Port Driver that manages VGA device and produces the VGA Mini Port Protocol.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# VGA Mini Port Driver that manages VGA device and produces VGA Mini Port Protocol.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -29,7 +29,7 @@
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
# DRIVER_BINDING = gPciVgaMiniPortDriverBinding;
|
||||
# COMPONENT_NAME = gPciVgaMiniPortComponentName;
|
||||
# COMPONENT_NAME2 = gPciVgaMiniPortComponentName2;
|
||||
# COMPONENT_NAME2 = gPciVgaMiniPortComponentName2;
|
||||
#
|
||||
|
||||
[Sources]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// VgaMiniPort Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"VGA Mini Port DXE Driver"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user