]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.h
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaFloppyDxe / IsaFloppy.h
index 520a41aa45ec3d38a295581f36828be6afaebb66..4fdaa64bdd39d390c4e59fb943da0c3b28183723 100644 (file)
@@ -1,9 +1,8 @@
-/**@file\r
-  Include for ISA Floppy Driver\r
-  Define the data structure and so on\r
-  \r
-Copyright (c) 2006 - 2007, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+/** @file\r
+  Include file for ISA Floppy Driver\r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -13,15 +12,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _ISA_FLOPPY_H\r
-#define _ISA_FLOPPY_H\r
+#ifndef _ISA_FLOPPY_H_\r
+#define _ISA_FLOPPY_H_\r
 \r
-#include <PiDxe.h>\r
-#include <FrameworkPei.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/IsaIo.h>\r
 #include <Protocol/DevicePath.h>\r
+#include <Guid/StatusCodeDataTypeId.h>\r
 \r
 #include <Library/TimerLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -32,16 +31,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
-//\r
-// Driver Binding Externs\r
-//\r
+#include <Library/PcdLib.h>\r
+\r
 extern EFI_DRIVER_BINDING_PROTOCOL  gFdcControllerDriver;\r
-extern EFI_COMPONENT_NAME_PROTOCOL  gIsaFloppyComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL gIsaFloppyComponentName2;\r
 \r
-//\r
-// define some value\r
-//\r
 #define STALL_1_SECOND  1000000\r
 #define STALL_1_MSECOND 1000\r
 \r
@@ -53,18 +46,18 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gIsaFloppyComponentName2;
 //\r
 // Internal Data Structures\r
 //\r
-#define FDC_BLK_IO_DEV_SIGNATURE            EFI_SIGNATURE_32 ('F', 'B', 'I', 'O')\r
-#define FLOPPY_CONTROLLER_CONTEXT_SIGNATURE EFI_SIGNATURE_32 ('F', 'D', 'C', 'C')\r
+#define FDC_BLK_IO_DEV_SIGNATURE            SIGNATURE_32 ('F', 'B', 'I', 'O')\r
+#define FLOPPY_CONTROLLER_CONTEXT_SIGNATURE SIGNATURE_32 ('F', 'D', 'C', 'C')\r
 \r
 typedef enum {\r
-  FDC_DISK0   = 0,\r
-  FDC_DISK1   = 1,\r
-  FDC_MAX_DISK= 2\r
+  FdcDisk0   = 0,\r
+  FdcDisk1   = 1,\r
+  FdcMaxDisk = 2\r
 } EFI_FDC_DISK;\r
 \r
 typedef struct {\r
   UINT32          Signature;\r
-  LIST_ENTRY  Link;\r
+  LIST_ENTRY      Link;\r
   BOOLEAN         FddResetPerformed;\r
   EFI_STATUS      FddResetStatus;\r
   BOOLEAN         NeedRecalibrate;\r
@@ -97,11 +90,11 @@ typedef struct {
 \r
 #define FDD_BLK_IO_FROM_THIS(a) CR (a, FDC_BLK_IO_DEV, BlkIo, FDC_BLK_IO_DEV_SIGNATURE)\r
 #define FLOPPY_CONTROLLER_FROM_LIST_ENTRY(a) \\r
-  CR (a, \\r
-      FLOPPY_CONTROLLER_CONTEXT, \\r
-      Link, \\r
-      FLOPPY_CONTROLLER_CONTEXT_SIGNATURE \\r
-      )\r
+          CR (a, \\r
+              FLOPPY_CONTROLLER_CONTEXT, \\r
+              Link, \\r
+              FLOPPY_CONTROLLER_CONTEXT_SIGNATURE \\r
+              )\r
 \r
 #define DISK_1440K_EOT            0x12\r
 #define DISK_1440K_GPL            0x1b\r
@@ -154,9 +147,9 @@ typedef struct {
   UINT8 Status0;\r
   UINT8 Status1;\r
   UINT8 Status2;\r
-  UINT8 C;\r
-  UINT8 H;\r
-  UINT8 S;\r
+  UINT8 Cylinder;\r
+  UINT8 Head;\r
+  UINT8 Sector;\r
   UINT8 Number;\r
 } FDD_RESULT_PACKET;\r
 \r
@@ -164,32 +157,31 @@ typedef struct {
 // FDC Registers\r
 //\r
 //\r
-// 0x3F2 Digital Output Register\r
+// Digital Output Register address offset\r
 //\r
 #define FDC_REGISTER_DOR  2\r
 \r
 //\r
-// 0x3F4 Main Status Register\r
+// Main Status Register address offset\r
 //\r
 #define FDC_REGISTER_MSR  4\r
 \r
 //\r
-// 0x3F5 Data Register\r
+// Data Register address offset\r
 //\r
 #define FDC_REGISTER_DTR  5\r
 \r
 //\r
-// 0x3F7 Configuration Control Register(data rate select)\r
+// Configuration Control Register(data rate select) address offset\r
 //\r
 #define FDC_REGISTER_CCR  7\r
 \r
 //\r
-// 0x3F7 Digital Input Register(diskchange)\r
+// Digital Input Register(diskchange) address offset\r
 //\r
 #define FDC_REGISTER_DIR  7\r
 \r
 \r
-\r
 //\r
 // FDC Register Bit Definitions\r
 //\r
@@ -484,23 +476,21 @@ typedef struct {
 //\r
 #define IC_ATRC 0xC0\r
 \r
-//\r
-// Global Variables\r
-//\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gFdcControllerDriver;\r
-\r
 //\r
 // EFI Driver Binding Protocol Functions\r
 //\r
+\r
 /**\r
-  Test controller is a Floppy Disk Controller\r
-  \r
-  @param This                 Pointer of EFI_DRIVER_BINDING_PROTOCOL\r
-  @param Controller           driver's controller\r
-  @param RemainingDevicePath  children device path\r
-  \r
-  @retval EFI_UNSUPPORTED controller is not floppy disk\r
-  @retval EFI_SUCCESS     controller is floppy disk\r
+  Test controller is a floppy disk drive device\r
+\r
+  @param[in] This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
+  @param[in] Controller           The handle of the controller to test.\r
+  @param[in] RemainingDevicePath  A pointer to the remaining portion of a device path.\r
+\r
+  @retval EFI_SUCCESS             The device is supported by this driver.\r
+  @retval EFI_ALREADY_STARTED     The device is already being managed by this driver.\r
+  @retval EFI_ACCESS_DENIED       The device is already being managed by a different driver\r
+                                  or an application that requires exclusive access.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -508,17 +498,23 @@ FdcControllerDriverSupported (
   IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Create floppy control instance on controller.\r
-  \r
-  @param This         Pointer of EFI_DRIVER_BINDING_PROTOCOL\r
-  @param Controller   driver controller handle\r
-  @param RemainingDevicePath Children's device path\r
-  \r
-  @retval whether success to create floppy control instance.\r
+  Start this driver on Controller.\r
+\r
+  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
+                                   an I/O abstraction to the driver.\r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.\r
+                                   This parameter is ignored by device drivers, and is optional for bus drivers.\r
+\r
+  @retval EFI_SUCCESS              The device was started.\r
+  @retval EFI_DEVICE_ERROR         The device could not be started due to a device error.\r
+                                   Currently not implemented.\r
+  @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of resources.\r
+  @retval Others                   The driver failded to start the device.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -526,22 +522,21 @@ FdcControllerDriverStart (
   IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle. Support stoping any child handles\r
-  created by this driver.\r
-\r
-  @param  This              Protocol instance pointer.\r
-  @param  Controller        Handle of device to stop driver on\r
-  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
-                            children is zero stop the entire bus driver.\r
-  @param  ChildHandleBuffer List of Child Handles to Stop.\r
-\r
-  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
-  @retval other             This driver was not removed from this device\r
-\r
+  Stop this driver on ControllerHandle.\r
+\r
+  @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
+                                to use to stop the device.\r
+  @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
+                                if NumberOfChildren is 0.\r
+\r
+  @retval EFI_SUCCESS           The device was stopped.\r
+  @retval EFI_DEVICE_ERROR      The device could not be stopped due to a device error.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -550,21 +545,21 @@ FdcControllerDriverStop (
   IN EFI_HANDLE                   Controller,\r
   IN UINTN                        NumberOfChildren,\r
   IN EFI_HANDLE                   *ChildHandleBuffer\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // EFI Block I/O Protocol Functions\r
 //\r
+\r
 /**\r
-  Reset the Floppy Logic Drive, call the FddReset function   \r
-  \r
+  Reset the Floppy Logic Drive, call the FddReset function.\r
+\r
   @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
-  @param ExtendedVerification BOOLEAN: Indicate that the driver may perform a more \r
-                    exhaustive verification operation of the device during \r
-                    reset, now this par is ignored in this driver          \r
+  @param ExtendedVerification BOOLEAN: Indicate that the driver may perform a more\r
+                    exhaustive verification operation of the device during\r
+                    reset, now this par is ignored in this driver\r
   @retval  EFI_SUCCESS:      The Floppy Logic Drive is reset\r
-  @retval  EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly \r
+  @retval  EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly\r
                       and can not be reset\r
 \r
 **/\r
@@ -573,12 +568,11 @@ EFIAPI
 FdcReset (\r
   IN EFI_BLOCK_IO_PROTOCOL  *This,\r
   IN BOOLEAN                ExtendedVerification\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Flush block via fdd controller\r
-  \r
+  Flush block via fdd controller.\r
+\r
   @param  This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
   @return EFI_SUCCESS\r
 \r
@@ -587,27 +581,26 @@ EFI_STATUS
 EFIAPI\r
 FddFlushBlocks (\r
   IN EFI_BLOCK_IO_PROTOCOL  *This\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Read the requested number of blocks from the device   \r
-  \r
+  Read the requested number of blocks from the device.\r
+\r
   @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
-  @param MediaId UINT32:    The media id that the read request is for    \r
-  @param  LBA EFI_LBA:     The starting logic block address to read from on the device\r
+  @param MediaId UINT32:    The media id that the read request is for\r
+  @param  Lba EFI_LBA:     The starting logic block address to read from on the device\r
   @param  BufferSize UINTN:  The size of the Buffer in bytes\r
   @param  Buffer VOID *:     A pointer to the destination buffer for the data\r
-  \r
+\r
   @retval  EFI_SUCCESS:     The data was read correctly from the device\r
   @retval  EFI_DEVICE_ERROR:The device reported an error while attempting to perform\r
                      the read operation\r
   @retval  EFI_NO_MEDIA:    There is no media in the device\r
   @retval  EFI_MEDIA_CHANGED:   The MediaId is not for the current media\r
-  @retval  EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the \r
+  @retval  EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the\r
                          intrinsic block size of the device\r
-  @retval  EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid, \r
-                          or the buffer is not on proper alignment \r
+  @retval  EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid,\r
+                          or the buffer is not on proper alignment\r
 \r
 **/\r
 EFI_STATUS\r
@@ -615,50 +608,48 @@ EFIAPI
 FddReadBlocks (\r
   IN  EFI_BLOCK_IO_PROTOCOL  *This,\r
   IN  UINT32                 MediaId,\r
-  IN  EFI_LBA                LBA,\r
+  IN  EFI_LBA                Lba,\r
   IN  UINTN                  BufferSize,\r
   OUT VOID                   *Buffer\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Write a specified number of blocks to the device   \r
-  \r
+  Write a specified number of blocks to the device.\r
+\r
   @param  This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
-  @param  MediaId UINT32:    The media id that the write request is for   \r
-  @param  LBA EFI_LBA:     The starting logic block address to be written\r
+  @param  MediaId UINT32:    The media id that the write request is for\r
+  @param  Lba EFI_LBA:     The starting logic block address to be written\r
   @param  BufferSize UINTN:  The size in bytes in Buffer\r
   @param  Buffer VOID *:     A pointer to the source buffer for the data\r
-  \r
+\r
   @retval  EFI_SUCCESS:     The data were written correctly to the device\r
-  @retval  EFI_WRITE_PROTECTED: The device can not be written to \r
+  @retval  EFI_WRITE_PROTECTED: The device can not be written to\r
   @retval  EFI_NO_MEDIA:    There is no media in the device\r
   @retval  EFI_MEDIA_CHANGED:   The MediaId is not for the current media\r
-  @retval  EFI_DEVICE_ERROR:  The device reported an error while attempting to perform \r
-                       the write operation \r
-  @retval  EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the \r
+  @retval  EFI_DEVICE_ERROR:  The device reported an error while attempting to perform\r
+                       the write operation\r
+  @retval  EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the\r
                          intrinsic block size of the device\r
-  @retval  EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid, \r
-                          or the buffer is not on proper alignment \r
+  @retval  EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid,\r
+                          or the buffer is not on proper alignment\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 FddWriteBlocks (\r
   IN EFI_BLOCK_IO_PROTOCOL  *This,\r
   IN UINT32                 MediaId,\r
-  IN EFI_LBA                LBA,\r
+  IN EFI_LBA                Lba,\r
   IN UINTN                  BufferSize,\r
   IN VOID                   *Buffer\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // Prototypes of internal functions\r
 //\r
 /**\r
 \r
-  Detect the floppy drive is presented or not\r
\r
+  Detect the floppy drive is presented or not.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
   @retval EFI_SUCCESS    Drive is presented\r
   @retval EFI_NOT_FOUND  Drive is not presented\r
@@ -667,14 +658,13 @@ FddWriteBlocks (
 EFI_STATUS\r
 DiscoverFddDevice (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
-  Do recalibrate  and see the drive is presented or not\r
-  Set the media parameters\r
-  \r
+  Do recalibrate  and see the drive is presented or not.\r
+  Set the media parameters.\r
+\r
   @param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
   @return the drive is presented or not\r
 \r
@@ -682,15 +672,14 @@ DiscoverFddDevice (
 EFI_STATUS\r
 FddIdentify (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
-  Reset the Floppy Logic Drive\r
-  \r
+  Reset the Floppy Logic Drive.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  \r
+\r
   @retval EFI_SUCCESS:    The Floppy Logic Drive is reset\r
   @retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly and\r
                       can not be reset\r
@@ -699,16 +688,15 @@ FddIdentify (
 EFI_STATUS\r
 FddReset (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
-  Turn the drive's motor on\r
-  The drive's motor must be on before any command can be executed\r
-  \r
+  Turn the drive's motor on.\r
+  The drive's motor must be on before any command can be executed.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  \r
+\r
   @retval  EFI_SUCCESS:       Turn the drive's motor on successfully\r
   @retval  EFI_DEVICE_ERROR:    The drive is busy, so can not turn motor on\r
   @retval  EFI_INVALID_PARAMETER: Fail to Set timer(Cancel timer)\r
@@ -717,16 +705,15 @@ FddReset (
 EFI_STATUS\r
 MotorOn (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
 \r
-  Set a Timer and when Timer goes off, turn the motor off\r
-  \r
-  \r
+  Set a Timer and when Timer goes off, turn the motor off.\r
+\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  \r
+\r
   @retval  EFI_SUCCESS:       Set the Timer successfully\r
   @retval  EFI_INVALID_PARAMETER: Fail to Set the timer\r
 \r
@@ -734,15 +721,14 @@ MotorOn (
 EFI_STATUS\r
 MotorOff (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Detect the disk in the drive is changed or not\r
-  \r
-  \r
+  Detect the disk in the drive is changed or not.\r
+\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-  \r
+\r
   @retval  EFI_SUCCESS:    No disk media change\r
   @retval  EFI_DEVICE_ERROR: Fail to do the recalibrate or seek operation\r
   @retval  EFI_NO_MEDIA:   No disk in the drive\r
@@ -751,16 +737,15 @@ MotorOff (
 EFI_STATUS\r
 DisketChanged (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Do the Specify command, this command sets DMA operation\r
   and the initial values for each of the three internal\r
-  times: HUT, SRT and HLT\r
-  \r
+  times: HUT, SRT and HLT.\r
+\r
   @param FdcDev    Pointer to instance of FDC_BLK_IO_DEV\r
-  \r
+\r
   @retval  EFI_SUCCESS:    Execute the Specify command successfully\r
   @retval  EFI_DEVICE_ERROR: Fail to execute the command\r
 \r
@@ -768,12 +753,11 @@ DisketChanged (
 EFI_STATUS\r
 Specify (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Set the head of floppy drive to track 0\r
\r
+  Set the head of floppy drive to track 0.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
   @retval EFI_SUCCESS:    Execute the Recalibrate operation successfully\r
   @retval EFI_DEVICE_ERROR: Fail to execute the Recalibrate operation\r
@@ -782,15 +766,14 @@ Specify (
 EFI_STATUS\r
 Recalibrate (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Set the head of floppy drive to the new cylinder\r
-  \r
+  Set the head of floppy drive to the new cylinder.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
   @param  Lba EFI_LBA     : The logic block address want to seek\r
-  \r
+\r
   @retval  EFI_SUCCESS:    Execute the Seek operation successfully\r
   @retval  EFI_DEVICE_ERROR: Fail to execute the Seek operation\r
 \r
@@ -799,18 +782,16 @@ EFI_STATUS
 Seek (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN EFI_LBA         Lba\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Do the Sense Interrupt Status command, this command\r
-  resets the interrupt signal\r
-  \r
+  Do the Sense Interrupt Status command, this command resets the interrupt signal.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
   @param  StatusRegister0 UINT8 *: Be used to save Status Register 0 read from FDC\r
   @param  PresentCylinderNumber  UINT8 *: Be used to save present cylinder number\r
                                     read from FDC\r
-  \r
+\r
   @retval  EFI_SUCCESS:    Execute the Sense Interrupt Status command successfully\r
   @retval  EFI_DEVICE_ERROR: Fail to execute the command\r
 \r
@@ -820,15 +801,14 @@ SenseIntStatus (
   IN     FDC_BLK_IO_DEV  *FdcDev,\r
   IN OUT UINT8           *StatusRegister0,\r
   IN OUT UINT8           *PresentCylinderNumber\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Do the Sense Drive Status command\r
-  \r
+  Do the Sense Drive Status command.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
   @param  Lba EFI_LBA     : Logic block address\r
-  \r
+\r
   @retval  EFI_SUCCESS:    Execute the Sense Drive Status command successfully\r
   @retval  EFI_DEVICE_ERROR: Fail to execute the command\r
   @retval  EFI_WRITE_PROTECTED:The disk is write protected\r
@@ -838,15 +818,13 @@ EFI_STATUS
 SenseDrvStatus (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN EFI_LBA         Lba\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Update the disk media properties and if necessary\r
-                        reinstall Block I/O interface\r
\r
+  Update the disk media properties and if necessary reinstall Block I/O interface.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-  \r
+\r
   @retval  EFI_SUCCESS:    Do the operation successfully\r
   @retval  EFI_DEVICE_ERROR: Fail to the operation\r
 \r
@@ -854,12 +832,11 @@ SenseDrvStatus (
 EFI_STATUS\r
 DetectMedia (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Set the data rate and so on\r
\r
+  Set the data rate and so on.\r
+\r
   @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
 \r
   @retval EFI_SUCCESS success to set the data rate\r
@@ -867,18 +844,17 @@ DetectMedia (
 EFI_STATUS\r
 Setup (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Read or Write a number of blocks in the same cylinder\r
\r
+  Read or Write a number of blocks in the same cylinder.\r
+\r
   @param  FdcDev      A pointer to Data Structure FDC_BLK_IO_DEV\r
-  @param  HostAddress device address \r
+  @param  HostAddress device address\r
   @param  Lba         The starting logic block address to read from on the device\r
   @param  NumberOfBlocks The number of block wanted to be read or write\r
   @param  Read        Operation type: read or write\r
-  \r
+\r
   @retval EFI_SUCCESS Success operate\r
 \r
 **/\r
@@ -889,12 +865,11 @@ ReadWriteDataSector (
   IN EFI_LBA         Lba,\r
   IN UINTN           NumberOfBlocks,\r
   IN BOOLEAN         Read\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Fill in FDD command's parameter\r
-  \r
+  Fill in FDD command's parameter.\r
+\r
   @param FdcDev   Pointer to instance of FDC_BLK_IO_DEV\r
   @param Lba      The starting logic block address to read from on the device\r
   @param Command  FDD command\r
@@ -905,33 +880,30 @@ FillPara (
   IN FDC_BLK_IO_DEV       *FdcDev,\r
   IN EFI_LBA              Lba,\r
   IN FDD_COMMAND_PACKET1  *Command\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Read result byte from Data Register of FDC\r
-  \r
-  @param FdcDev  Pointer to instance of FDC_BLK_IO_DEV\r
-  @param Pointer UINT8 *: Be used to save result byte read from FDC\r
-  \r
-  \r
-  @retval  EFI_SUCCESS:    Read result byte from FDC successfully\r
-  @retval  EFI_DEVICE_ERROR: The FDC is not ready to be read\r
+  Read result byte from Data Register of FDC.\r
+\r
+  @param FdcDev   Pointer to instance of FDC_BLK_IO_DEV\r
+  @param Pointer  Buffer to store the byte read from FDC\r
+\r
+  @retval EFI_SUCCESS       Read result byte from FDC successfully\r
+  @retval EFI_DEVICE_ERROR  The FDC is not ready to be read\r
 \r
 **/\r
 EFI_STATUS\r
 DataInByte (\r
-  IN FDC_BLK_IO_DEV  *FdcDev,\r
-  IN UINT8           *Pointer\r
-  )\r
-;\r
+  IN  FDC_BLK_IO_DEV  *FdcDev,\r
+  OUT UINT8           *Pointer\r
+  );\r
 \r
 /**\r
-  Write command byte to Data Register of FDC\r
-  \r
+  Write command byte to Data Register of FDC.\r
+\r
   @param FdcDev  Pointer to instance of FDC_BLK_IO_DEV\r
   @param Pointer Be used to save command byte written to FDC\r
-  \r
+\r
   @retval  EFI_SUCCESS:    Write command byte to FDC successfully\r
   @retval  EFI_DEVICE_ERROR: The FDC is not ready to be written\r
 \r
@@ -940,36 +912,32 @@ EFI_STATUS
 DataOutByte (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN UINT8           *Pointer\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Detect the specified floppy logic drive is busy or\r
-  not within a period of time\r
-  \r
-  @param FdcDev          Indicate it is drive A or drive B\r
-  @param TimeoutInSeconds the time period for waiting\r
-  \r
+  Detect the specified floppy logic drive is busy or not within a period of time.\r
+\r
+  @param FdcDev           Indicate it is drive A or drive B\r
+  @param Timeout          The time period for waiting\r
+\r
   @retval EFI_SUCCESS:  The drive and command are not busy\r
   @retval EFI_TIMEOUT:  The drive or command is still busy after a period time that\r
-                        set by TimeoutInSeconds\r
+                        set by Timeout\r
 \r
 **/\r
 EFI_STATUS\r
 FddWaitForBSYClear (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
-  IN UINTN           TimeoutInSeconds\r
-  )\r
-;\r
+  IN UINTN           Timeout\r
+  );\r
 \r
 /**\r
+  Determine whether FDC is ready to write or read.\r
 \r
-  Routine Description:  Determine whether FDC is ready to write or read\r
-  \r
   @param  FdcDev Pointer to instance of FDC_BLK_IO_DEV\r
   @param  Dio BOOLEAN:      Indicate the FDC is waiting to write or read\r
-  @param  TimeoutInSeconds UINTN: The time period for waiting\r
-  \r
+  @param  Timeout           The time period for waiting\r
+\r
   @retval EFI_SUCCESS:  FDC is ready to write or read\r
   @retval EFI_NOT_READY:  FDC is not ready within the specified time period\r
 \r
@@ -978,13 +946,11 @@ EFI_STATUS
 FddDRQReady (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN BOOLEAN         Dio,\r
-  IN UINTN           TimeoutInSeconds\r
-  )\r
-;\r
+  IN UINTN           Timeout\r
+  );\r
 \r
 /**\r
-  Set FDC control structure's attribute according to\r
-  result \r
+  Set FDC control structure's attribute according to result.\r
 \r
   @param Result  Point to result structure\r
   @param FdcDev  FDC control structure\r
@@ -999,14 +965,13 @@ EFI_STATUS
 CheckResult (\r
   IN     FDD_RESULT_PACKET  *Result,\r
   IN OUT FDC_BLK_IO_DEV     *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Check the drive status information\r
-  \r
+  Check the drive status information.\r
+\r
   @param StatusRegister3  the value of Status Register 3\r
-  \r
+\r
   @retval EFI_SUCCESS           The disk is not write protected\r
   @retval EFI_WRITE_PROTECTED:  The disk is write protected\r
 \r
@@ -1014,32 +979,29 @@ CheckResult (
 EFI_STATUS\r
 CheckStatus3 (\r
   IN UINT8 StatusRegister3\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Calculate the number of block in the same cylinder\r
-  according to LBA\r
-  \r
+  Calculate the number of block in the same cylinder according to Lba.\r
+\r
   @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-  @param LBA EFI_LBA:      The starting logic block address\r
+  @param Lba EFI_LBA:      The starting logic block address\r
   @param NumberOfBlocks UINTN: The number of blocks\r
-  \r
+\r
   @return The number of blocks in the same cylinder which the starting\r
-        logic block address is LBA\r
+        logic block address is Lba\r
 \r
 **/\r
 UINTN\r
 GetTransferBlockCount (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
-  IN EFI_LBA         LBA,\r
+  IN EFI_LBA         Lba,\r
   IN UINTN           NumberOfBlocks\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  When the Timer(2s) off, turn the drive's motor off\r
-  \r
+  When the Timer(2s) off, turn the drive's motor off.\r
+\r
   @param Event EFI_EVENT: Event(the timer) whose notification function is being\r
                      invoked\r
   @param Context VOID *:  Pointer to the notification function's context\r
@@ -1050,12 +1012,11 @@ EFIAPI
 FddTimerProc (\r
   IN EFI_EVENT  Event,\r
   IN VOID       *Context\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Read I/O port for FDC\r
\r
+  Read I/O port for FDC.\r
+\r
   @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
   @param Offset The offset address of port\r
 \r
@@ -1064,31 +1025,29 @@ UINT8
 FdcReadPort (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN UINT32          Offset\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Write I/O port for FDC\r
\r
+  Write I/O port for FDC.\r
+\r
   @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
   @param Offset The offset address of port\r
   @param Data   Value written to port\r
-  \r
+\r
 **/\r
 VOID\r
 FdcWritePort (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN UINT32          Offset,\r
   IN UINT8           Data\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Read or Write a number of blocks to floppy device\r
+  Read or Write a number of blocks to floppy device.\r
 \r
   @param This     Pointer to instance of EFI_BLOCK_IO_PROTOCOL\r
   @param MediaId  The media id of read/write request\r
-  @param LBA      The starting logic block address to read from on the device\r
+  @param Lba      The starting logic block address to read from on the device\r
   @param BufferSize The size of the Buffer in bytes\r
   @param Operation   - GC_TODO: add argument description\r
   @param Buffer      - GC_TODO: add argument description\r
@@ -1113,24 +1072,22 @@ EFI_STATUS
 FddReadWriteBlocks (\r
   IN  EFI_BLOCK_IO_PROTOCOL  *This,\r
   IN  UINT32                 MediaId,\r
-  IN  EFI_LBA                LBA,\r
+  IN  EFI_LBA                Lba,\r
   IN  UINTN                  BufferSize,\r
   IN  BOOLEAN                Operation,\r
   OUT VOID                   *Buffer\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Common interface for free cache \r
-  \r
+  Common interface for free cache.\r
+\r
   @param FdcDev  Pointer of FDC_BLK_IO_DEV instance\r
-  \r
+\r
 **/\r
 VOID\r
 FdcFreeCache (\r
   IN    FDC_BLK_IO_DEV  *FdcDev\r
-  )\r
-;\r
+  );\r
 \r
 #endif\r
 \r