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,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"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user