]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c
Coding style modification.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaFloppyDxe / IsaFloppyCtrl.c
index a2f0ca924713045f10d97ac23bf92a91df319a73..da6af56a4347581ec219206c29946cbf71815f3b 100644 (file)
@@ -22,22 +22,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "IsaFloppy.h"\r
 \r
+/**\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
+\r
+**/\r
 EFI_STATUS\r
 DiscoverFddDevice (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  Detect the floppy drive is presented or not\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS    Drive is presented\r
-    EFI_NOT_FOUND  Drive is not presented\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -61,23 +58,19 @@ DiscoverFddDevice (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\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
+**/\r
 EFI_STATUS\r
 FddIdentify (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:   Do recalibrate  and see the drive is presented or not\r
-         Set the media parameters\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS:\r
-    EFI_DEVICE_ERROR:\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -143,23 +136,21 @@ FddIdentify (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\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
+  @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
+\r
+**/\r
 EFI_STATUS\r
 FddReset (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  Reset the Floppy Logic Drive\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS:    The Floppy Logic Drive is reset\r
-    EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly and\r
-                      can not be reset\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   UINT8 data;\r
   UINT8 StatusRegister0;\r
@@ -244,24 +235,22 @@ FddReset (
   return EFI_SUCCESS;\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
+  @param  FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\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
+\r
+**/\r
 EFI_STATUS\r
 MotorOn (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  Turn the drive's motor on\r
-        The drive's motor must be on before any command can be executed\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS:       Turn the drive's motor on successfully\r
-    EFI_DEVICE_ERROR:    The drive is busy, so can not turn motor on\r
-    EFI_INVALID_PARAMETER: Fail to Set timer(Cancel timer)\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
   UINT8       data;\r
@@ -328,22 +317,21 @@ MotorOn (
   return EFI_SUCCESS;\r
 }\r
 \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
+  @retval  EFI_SUCCESS:       Set the Timer successfully\r
+  @retval  EFI_INVALID_PARAMETER: Fail to Set the timer\r
+\r
+**/\r
 EFI_STATUS\r
 MotorOff (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  Set a Timer and when Timer goes off, turn the motor off\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS:       Set the Timer successfully\r
-    EFI_INVALID_PARAMETER: Fail to Set the timer\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   //\r
   // Set the timer : 2s\r
@@ -351,24 +339,21 @@ MotorOff (
   return gBS->SetTimer (FdcDev->Event, TimerRelative, 20000000);\r
 }\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
+  @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
+  @retval  EFI_MEDIA_CHANGED:  There is a new disk in the drive\r
+**/\r
 EFI_STATUS\r
 DisketChanged (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  Detect the disk in the drive is changed or not\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS:    No disk media change\r
-    EFI_DEVICE_ERROR: Fail to do the recalibrate or seek operation\r
-    EFI_NO_MEDIA:   No disk in the drive\r
-    EFI_MEDIA_CHANGED:  There is a new disk in the drive\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
   UINT8       data;\r
@@ -418,24 +403,21 @@ DisketChanged (
   return EFI_SUCCESS;\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
+  @param This    Pointer to instance of FDC_BLK_IO_DEV\r
+  \r
+  @retval  EFI_SUCCESS:    Execute the Specify command successfully\r
+  @retval  EFI_DEVICE_ERROR: Fail to execute the command\r
+\r
+**/\r
 EFI_STATUS\r
 Specify (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  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
-  Parameters:\r
-    None\r
-  Returns:\r
-    EFI_SUCCESS:    Execute the Specify command successfully\r
-    EFI_DEVICE_ERROR: Fail to execute the command\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   FDD_SPECIFY_CMD Command;\r
   UINTN           Index;\r
@@ -464,22 +446,18 @@ Specify (
   return EFI_SUCCESS;\r
 }\r
 \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
+\r
+**/\r
 EFI_STATUS\r
 Recalibrate (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  Set the head of floppy drive to track 0\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS:    Execute the Recalibrate operation successfully\r
-    EFI_DEVICE_ERROR: Fail to execute the Recalibrate operation\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   FDD_COMMAND_PACKET2 Command;\r
   UINTN               Index;\r
@@ -542,25 +520,21 @@ Recalibrate (
   return EFI_SUCCESS;\r
 }\r
 \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
+  @retval  EFI_SUCCESS:    Execute the Seek operation successfully\r
+  @retval  EFI_DEVICE_ERROR: Fail to execute the Seek operation\r
+\r
+**/\r
 EFI_STATUS\r
 Seek (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN EFI_LBA         Lba\r
   )\r
-/*++\r
-\r
-  Routine Description:  Set the head of floppy drive to the new cylinder\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-    Lba EFI_LBA     : The logic block address want to seek\r
-  Returns:\r
-    EFI_SUCCESS:    Execute the Seek operation successfully\r
-    EFI_DEVICE_ERROR: Fail to execute the Seek operation\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Lba - add argument and description to function comment\r
 {\r
   FDD_SEEK_CMD  Command;\r
   UINT8         EndOfTrack;\r
@@ -649,29 +623,25 @@ Seek (
   }\r
 }\r
 \r
+/**\r
+  Do the Sense Interrupt Status command, this command\r
+  resets the interrupt signal\r
+  \r
+  \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
+  @retval  EFI_SUCCESS:    Execute the Sense Interrupt Status command successfully\r
+  @retval  EFI_DEVICE_ERROR: Fail to execute the command\r
+\r
+**/\r
 EFI_STATUS\r
 SenseIntStatus (\r
   IN     FDC_BLK_IO_DEV  *FdcDev,\r
   IN OUT UINT8           *StatusRegister0,\r
   IN OUT UINT8           *PresentCylinderNumber\r
   )\r
-/*++\r
-\r
-  Routine Description:  Do the Sense Interrupt Status command, this command\r
-                        resets the interrupt signal\r
-  Parameters:\r
-    StatusRegister0 UINT8 *: Be used to save Status Register 0 read from FDC\r
-    PresentCylinderNumber  UINT8 *: Be used to save present cylinder number\r
-                                    read from FDC\r
-  Returns:\r
-    EFI_SUCCESS:    Execute the Sense Interrupt Status command successfully\r
-    EFI_DEVICE_ERROR: Fail to execute the command\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    StatusRegister0 - add argument and description to function comment\r
-// GC_TODO:    PresentCylinderNumber - add argument and description to function comment\r
 {\r
   UINT8 command;\r
 \r
@@ -691,26 +661,22 @@ SenseIntStatus (
   return EFI_SUCCESS;\r
 }\r
 \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
+  @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
+\r
+**/\r
 EFI_STATUS\r
 SenseDrvStatus (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN EFI_LBA         Lba\r
   )\r
-/*++\r
-\r
-  Routine Description:  Do the Sense Drive Status command\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-    Lba EFI_LBA     : Logic block address\r
-  Returns:\r
-    EFI_SUCCESS:    Execute the Sense Drive Status command successfully\r
-    EFI_DEVICE_ERROR: Fail to execute the command\r
-    EFI_WRITE_PROTECTED:The disk is write protected\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Lba - add argument and description to function comment\r
 {\r
   FDD_COMMAND_PACKET2 Command;\r
   UINT8               Head;\r
@@ -758,23 +724,20 @@ SenseDrvStatus (
   return CheckStatus3 (StatusRegister3);\r
 }\r
 \r
+/**\r
+  Update the disk media properties and if necessary\r
+                        reinstall Block I/O interface\r
\r
+  @param  FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
+  \r
+  @retval  EFI_SUCCESS:    Do the operation successfully\r
+  @retval  EFI_DEVICE_ERROR: Fail to the operation\r
+\r
+**/\r
 EFI_STATUS\r
 DetectMedia (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description:  Update the disk media properties and if necessary\r
-                        reinstall Block I/O interface\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-  Returns:\r
-    EFI_SUCCESS:    Do the operation successfully\r
-    EFI_DEVICE_ERROR: Fail to the operation\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
   BOOLEAN     bReset;\r
@@ -840,22 +803,17 @@ DetectMedia (
   return EFI_SUCCESS;\r
 }\r
 \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
+**/\r
 EFI_STATUS\r
 Setup (\r
   IN FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-  Routine Description: Set the data rate and so on\r
-  Parameters:\r
-    None\r
-  Returns:\r
-    EFI_SUCCESS:\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -878,6 +836,18 @@ Setup (
   return EFI_SUCCESS;\r
 }\r
 \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  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
+  @retval EFI_SUCCESS Success operate\r
+\r
+**/\r
 EFI_STATUS\r
 ReadWriteDataSector (\r
   IN  FDC_BLK_IO_DEV  *FdcDev,\r
@@ -886,30 +856,6 @@ ReadWriteDataSector (
   IN  UINTN           NumberOfBlocks,\r
   IN  BOOLEAN         Read\r
   )\r
-/*++\r
-\r
-  Routine Description: Read or Write a number of blocks in the same cylinder\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV * : A pointer to Data Structure FDC_BLK_IO_DEV\r
-    Buffer VOID *:\r
-    Lba EFI_LBA:\r
-    NumberOfBlocks UINTN:\r
-    Read BOOLEAN:\r
-  Returns:\r
-    EFI_SUCCESS:\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    HostAddress - add argument and description to function comment\r
-// GC_TODO:    Lba - add argument and description to function comment\r
-// GC_TODO:    NumberOfBlocks - add argument and description to function comment\r
-// GC_TODO:    Read - add argument and description to function comment\r
-// GC_TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
-// GC_TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
-// GC_TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
-// GC_TODO:    EFI_TIMEOUT - add return value to function comment\r
-// GC_TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 {\r
   EFI_STATUS                                    Status;\r
   FDD_COMMAND_PACKET1                           Command;\r
@@ -1040,23 +986,20 @@ ReadWriteDataSector (
   return CheckResult (&Result, FdcDev);\r
 }\r
 \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
+\r
+**/\r
 VOID\r
 FillPara (\r
   IN  FDC_BLK_IO_DEV       *FdcDev,\r
   IN  EFI_LBA              Lba,\r
   IN  FDD_COMMAND_PACKET1  *Command\r
   )\r
-/*++\r
-\r
-  Routine Description: Fill in Parameter\r
-  Parameters:\r
-  Returns:\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Lba - add argument and description to function comment\r
-// GC_TODO:    Command - add argument and description to function comment\r
 {\r
   UINT8 EndOfTrack;\r
 \r
@@ -1084,24 +1027,22 @@ FillPara (
   Command->DataLength = DISK_1440K_DTL;\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
+\r
+**/\r
 EFI_STATUS\r
 DataInByte (\r
   IN     FDC_BLK_IO_DEV  *FdcDev,\r
   IN OUT UINT8           *Pointer\r
   )\r
-/*++\r
-\r
-  Routine Description:  Read result byte from Data Register of FDC\r
-  Parameters:\r
-    Pointer UINT8 *: Be used to save result byte read from FDC\r
-  Returns:\r
-    EFI_SUCCESS:    Read result byte from FDC successfully\r
-    EFI_DEVICE_ERROR: The FDC is not ready to be read\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Pointer - add argument and description to function comment\r
 {\r
   UINT8 data;\r
 \r
@@ -1126,24 +1067,21 @@ DataInByte (
   return EFI_SUCCESS;\r
 }\r
 \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
+  @retval  EFI_SUCCESS:    Write command byte to FDC successfully\r
+  @retval  EFI_DEVICE_ERROR: The FDC is not ready to be written\r
+\r
+**/\r
 EFI_STATUS\r
 DataOutByte (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN UINT8           *Pointer\r
   )\r
-/*++\r
-\r
-  Routine Description:  Write command byte to Data Register of FDC\r
-  Parameters:\r
-    Pointer UINT8 *: Be used to save command byte written to FDC\r
-  Returns:\r
-    EFI_SUCCESS:    Write command byte to FDC successfully\r
-    EFI_DEVICE_ERROR: The FDC is not ready to be written\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Pointer - add argument and description to function comment\r
 {\r
   UINT8 data;\r
 \r
@@ -1169,27 +1107,23 @@ DataOutByte (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Detect the specified floppy logic drive is busy or\r
+  not within a period of time\r
+  \r
+  @param Disk             Indicate it is drive A or drive B\r
+  @param TimeoutInSeconds 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
+\r
+**/\r
 EFI_STATUS\r
 FddWaitForBSYClear (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN UINTN           TimeoutInSeconds\r
   )\r
-/*++\r
-\r
-  Routine Description:  Detect the specified floppy logic drive is busy or\r
-                        not within a period of time\r
-  Parameters:\r
-    Disk EFI_FDC_DISK:    Indicate it is drive A or drive B\r
-    TimeoutInSeconds UINTN: the time period for waiting\r
-  Returns:\r
-    EFI_SUCCESS:  The drive and command are not busy\r
-    EFI_TIMEOUT:  The drive or command is still busy after a period time that\r
-                  set by TimeoutInSeconds\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    TimeoutInSeconds - add argument and description to function comment\r
 {\r
   UINTN Delay;\r
   UINT8 StatusRegister;\r
@@ -1228,27 +1162,24 @@ FddWaitForBSYClear (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\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
+  @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
+**/\r
 EFI_STATUS\r
 FddDRQReady (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN BOOLEAN         Dio,\r
   IN  UINTN          TimeoutInSeconds\r
   )\r
-/*++\r
-\r
-  Routine Description:  Determine whether FDC is ready to write or read\r
-  Parameters:\r
-    Dio BOOLEAN:      Indicate the FDC is waiting to write or read\r
-    TimeoutInSeconds UINTN: The time period for waiting\r
-  Returns:\r
-    EFI_SUCCESS:  FDC is ready to write or read\r
-    EFI_NOT_READY:  FDC is not ready within the specified time period\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Dio - add argument and description to function comment\r
-// GC_TODO:    TimeoutInSeconds - add argument and description to function comment\r
 {\r
   UINTN Delay;\r
   UINT8 StatusRegister;\r
@@ -1294,30 +1225,24 @@ FddDRQReady (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Set FDC control structure's attribute according to\r
+  result \r
+\r
+  @param Result  Point to result structure\r
+  @param FdcDev  FDC control structure\r
+\r
+  @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
+  @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
+  @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
+  @param EFI_SUCCESS - GC_TODO: Add description for return value\r
+\r
+**/\r
 EFI_STATUS\r
 CheckResult (\r
   IN     FDD_RESULT_PACKET  *Result,\r
   IN OUT FDC_BLK_IO_DEV     *FdcDev\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  GC_TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Result  - GC_TODO: add argument description\r
-  FdcDev  - GC_TODO: add argument description\r
-\r
-Returns:\r
-\r
-  EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
-  EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
-  EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
-  EFI_SUCCESS - GC_TODO: Add description for return value\r
-\r
---*/\r
 {\r
   //\r
   // Check Status Register0\r
@@ -1351,22 +1276,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Check the drive status information\r
+  \r
+  @param StatusRegister3  the value of Status Register 3\r
+  \r
+  @retval EFI_SUCCESS           The disk is not write protected\r
+  @retval EFI_WRITE_PROTECTED:  The disk is write protected\r
+\r
+**/\r
 EFI_STATUS\r
 CheckStatus3 (\r
   IN UINT8 StatusRegister3\r
   )\r
-/*++\r
-\r
-  Routine Description:  Check the drive status information\r
-  Parameters:\r
-    StatusRegister3 UINT8: the value of Status Register 3\r
-  Returns:\r
-    EFI_SUCCESS:\r
-    EFI_WRITE_PROTECTED:  The disk is write protected\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    StatusRegister3 - add argument and description to function comment\r
 {\r
   if (StatusRegister3 & STS3_WP) {\r
     return EFI_WRITE_PROTECTED;\r
@@ -1375,29 +1297,24 @@ CheckStatus3 (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Calculate the number of block in the same cylinder\r
+  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 NumberOfBlocks UINTN: The number of blocks\r
+  \r
+  @return The number of blocks in the same cylinder which the starting\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  UINTN           NumberOfBlocks\r
   )\r
-/*++\r
-\r
-  Routine Description:  Calculate the number of block in the same cylinder\r
-                        according to LBA\r
-  Parameters:\r
-    FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV\r
-    LBA EFI_LBA:      The starting logic block address\r
-    NumberOfBlocks UINTN: The number of blocks\r
-  Returns:\r
-    UINTN : The number of blocks in the same cylinder which the starting\r
-        logic block address is LBA\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    LBA - add argument and description to function comment\r
-// GC_TODO:    NumberOfBlocks - add argument and description to function comment\r
 {\r
   UINT8 EndOfTrack;\r
   UINT8 Head;\r
@@ -1417,26 +1334,20 @@ GetTransferBlockCount (
   }\r
 }\r
 \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
+\r
+**/\r
 VOID\r
 EFIAPI\r
 FddTimerProc (\r
   IN EFI_EVENT  Event,\r
   IN VOID       *Context\r
   )\r
-/*++\r
-\r
-  Routine Description:  When the Timer(2s) off, turn the drive's motor off\r
-  Parameters:\r
-    Event EFI_EVENT: Event(the timer) whose notification function is being\r
-                     invoked\r
-    Context VOID *:  Pointer to the notification function's context\r
-  Returns:\r
-    VOID\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    Event - add argument and description to function comment\r
-// GC_TODO:    Context - add argument and description to function comment\r
 {\r
   FDC_BLK_IO_DEV  *FdcDev;\r
   UINT8           data;\r
@@ -1462,21 +1373,18 @@ FddTimerProc (
   MicroSecondDelay (500);\r
 }\r
 \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
+**/\r
 UINT8\r
 FdcReadPort (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN UINT32          Offset\r
   )\r
-/*++\r
-\r
-  Routine Description: Read I/O port for FDC\r
-  Parameters:\r
-  Returns:\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Offset - add argument and description to function comment\r
 {\r
   UINT8       Data;\r
 \r
@@ -1494,23 +1402,19 @@ FdcReadPort (
   return Data;\r
 }\r
 \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
+\r
+**/\r
 VOID\r
 FdcWritePort (\r
   IN FDC_BLK_IO_DEV  *FdcDev,\r
   IN UINT32          Offset,\r
   IN UINT8           Data\r
   )\r
-/*++\r
-\r
-  Routine Description: Write I/O port for FDC\r
-  Parameters:\r
-  Returns:\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    FdcDev - add argument and description to function comment\r
-// GC_TODO:    Offset - add argument and description to function comment\r
-// GC_TODO:    Data - add argument and description to function comment\r
 {\r
 \r
   //\r
@@ -1524,3 +1428,4 @@ FdcWritePort (
                       &Data\r
                       );\r
 }\r
+\r