diff options
Diffstat (limited to 'IntelFrameworkModulePkg/Bus')
48 files changed, 2899 insertions, 3917 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h index 520af109aa..14d124f9b1 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h @@ -173,7 +173,7 @@ IsaBusControllerDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -194,7 +194,7 @@ IsaBusControllerDriverSupported ( EFI_SUCCESS - The device is supported by this driver.
EFI_UNSUPPORTED - The device is not supported by this driver.
---*/
+**/
;
EFI_STATUS
@@ -204,7 +204,7 @@ IsaBusControllerDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -227,7 +227,7 @@ IsaBusControllerDriverStart ( EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of
resources.
---*/
+**/
;
EFI_STATUS
@@ -238,7 +238,7 @@ IsaBusControllerDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE * ChildHandleBuffer OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -262,7 +262,7 @@ IsaBusControllerDriverStop ( EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of
resources.
---*/
+**/
;
//
@@ -278,7 +278,7 @@ IsaCreateDevice ( IN EFI_ISA_ACPI_RESOURCE_LIST *IsaDeviceResourceList,
OUT EFI_DEVICE_PATH_PROTOCOL **ChildDevicePath
)
-/*++
+/**
Routine Description:
@@ -300,7 +300,7 @@ IsaCreateDevice ( resources.
EFI_DEVICE_ERROR - Can not create child device.
---*/
+**/
;
EFI_STATUS
@@ -308,7 +308,7 @@ InitializeIsaIoInstance ( IN ISA_IO_DEVICE *IsaIoDevice,
IN EFI_ISA_ACPI_RESOURCE_LIST *IsaDevice
)
-/*++
+/**
Routine Description:
@@ -323,7 +323,7 @@ Returns: EFI_SUCCESS - Initial success.
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.c b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.c index 8e28db2ceb..80c942e289 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.c @@ -77,7 +77,7 @@ IsaBusControllerDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -98,7 +98,7 @@ IsaBusControllerDriverSupported ( EFI_SUCCESS - The device is supported by this driver.
EFI_UNSUPPORTED - The device is not supported by this driver.
---*/
+**/
{
EFI_STATUS Status;
EFI_ISA_ACPI_PROTOCOL *IsaAcpi;
@@ -172,7 +172,7 @@ IsaBusControllerDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -195,7 +195,7 @@ IsaBusControllerDriverStart ( EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of
resources.
---*/
+**/
{
EFI_STATUS Status;
EFI_PCI_IO_PROTOCOL *PciIo;
@@ -414,7 +414,7 @@ IsaBusControllerDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE * ChildHandleBuffer OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -438,7 +438,7 @@ IsaBusControllerDriverStop ( EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of
resources.
---*/
+**/
{
EFI_STATUS Status;
UINTN Index;
@@ -555,7 +555,7 @@ IsaCreateDevice ( IN EFI_ISA_ACPI_RESOURCE_LIST *IsaDeviceResourceList,
OUT EFI_DEVICE_PATH_PROTOCOL **ChildDevicePath
)
-/*++
+/**
Routine Description:
@@ -577,7 +577,7 @@ IsaCreateDevice ( resources.
EFI_DEVICE_ERROR - Can not create child device.
---*/
+**/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c index 24f0029ad0..a86b0c37ba 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c @@ -80,26 +80,18 @@ static EFI_ISA_DMA_REGISTERS DmaRegisters[8] = { },
};
+/**
+ report a error Status code of PCI bus driver controller
+
+ @param Code - The error status code.
+
+ @Return EFI_SUCCESS - Success to report status code.
+**/
EFI_STATUS
ReportErrorStatusCode (
EFI_STATUS_CODE_VALUE Code
)
-/*++
-
-Routine Description:
- report a error Status code of PCI bus driver controller
-
-Arguments:
-
- Code - The error status code.
-
-Returns:
-
- EFI_SUCCESS - Success to report status code.
-
-
---*/
{
return REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
@@ -110,28 +102,21 @@ Returns: //
// Driver Support Functions
//
+/**
+
+ Initializes an ISA I/O Instance
+ @param IsaIoDevice - The iso device to be initialized.
+ @param IsaDeviceResourceList - The resource list.
+
+ @retval EFI_SUCCESS - Initial success.
+
+**/
EFI_STATUS
InitializeIsaIoInstance (
IN ISA_IO_DEVICE *IsaIoDevice,
IN EFI_ISA_ACPI_RESOURCE_LIST *IsaDeviceResourceList
)
-/*++
-
-Routine Description:
-
- Initializes an ISA I/O Instance
-
-Arguments:
-
- IsaIoDevice - The iso device to be initialized.
- IsaDeviceResourceList - The resource list.
-
-Returns:
-
- EFI_SUCCESS - Initial success.
-
---*/
{
//
// Initializes an ISA I/O Instance
@@ -147,6 +132,21 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Performs an ISA I/O Read Cycle
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Width - Signifies the width of the I/O operation.
+ @param Offset - The offset in ISA I/O space to start the I/O operation.
+ @param Count - The number of I/O operations to perform.
+ @param Buffer - The destination buffer to store the results
+
+ @retval EFI_SUCCESS - The data was read from the device sucessfully.
+ @retval EFI_UNSUPPORTED - The Offset is not valid for this device.
+ @retval EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
+ @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
+
+**/
EFI_STATUS
EFIAPI
IsaIoIoRead (
@@ -156,28 +156,7 @@ IsaIoIoRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
-
-Routine Description:
-
- Performs an ISA I/O Read Cycle
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Width - Signifies the width of the I/O operation.
- Offset - The offset in ISA I/O space to start the I/O operation.
- Count - The number of I/O operations to perform.
- Buffer - The destination buffer to store the results
-
-Returns:
-
- EFI_SUCCESS - The data was read from the device sucessfully.
- EFI_UNSUPPORTED - The Offset is not valid for this device.
- EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
- EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
-
---*/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
@@ -216,6 +195,21 @@ Returns: return Status;
}
+/**
+ Performs an ISA I/O Write Cycle
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Width - Signifies the width of the I/O operation.
+ @param Offset - The offset in ISA I/O space to start the I/O operation.
+ @param Count - The number of I/O operations to perform.
+ @param Buffer - The source buffer to write data from
+
+ @Retval EFI_SUCCESS - The data was writen to the device sucessfully.
+ @Retval EFI_UNSUPPORTED - The Offset is not valid for this device.
+ @Retval EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
+ @Retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
+
+**/
EFI_STATUS
EFIAPI
IsaIoIoWrite (
@@ -225,28 +219,6 @@ IsaIoIoWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
-
-Routine Description:
-
- Performs an ISA I/O Write Cycle
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Width - Signifies the width of the I/O operation.
- Offset - The offset in ISA I/O space to start the I/O operation.
- Count - The number of I/O operations to perform.
- Buffer - The source buffer to write data from
-
-Returns:
-
- EFI_SUCCESS - The data was writen to the device sucessfully.
- EFI_UNSUPPORTED - The Offset is not valid for this device.
- EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
- EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
-
---*/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
@@ -285,32 +257,26 @@ Returns: return Status;
}
+/**
+ Writes an 8 bit I/O Port
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Offset - The offset in ISA IO space to start the IO operation.
+ @param Value - The data to write port.
+
+ @retval EFI_SUCCESS - Success.
+ @retval EFI_INVALID_PARAMETER - Parameter is invalid.
+ @retval EFI_UNSUPPORTED - The address range specified by Offset is not valid.
+ @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
+
+**/
EFI_STATUS
WritePort (
IN EFI_ISA_IO_PROTOCOL *This,
IN UINT32 Offset,
IN UINT8 Value
)
-/*++
-
-Routine Description:
-
- Writes an 8 bit I/O Port
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Offset - The offset in ISA IO space to start the IO operation.
- Value - The data to write port.
-
-Returns:
- EFI_SUCCESS - Success.
- EFI_INVALID_PARAMETER - Parameter is invalid.
- EFI_UNSUPPORTED - The address range specified by Offset is not valid.
- EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
-
---*/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
@@ -338,6 +304,22 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Writes I/O operation base address and count number to a 8 bit I/O Port.
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param AddrOffset - The address' offset.
+ @param PageOffset - The page's offest.
+ @param CountOffset - The count's offset.
+ @param BaseAddress - The base address.
+ @param Count - The number of I/O operations to perform.
+
+ @retval EFI_SUCCESS - Success.
+ @retval EFI_INVALID_PARAMETER - Parameter is invalid.
+ @retval EFI_UNSUPPORTED - The address range specified by these Offsets and Count is not valid.
+ @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
+
+**/
EFI_STATUS
WriteDmaPort (
IN EFI_ISA_IO_PROTOCOL *This,
@@ -347,29 +329,7 @@ WriteDmaPort ( IN UINT32 BaseAddress,
IN UINT16 Count
)
-/*++
-
-Routine Description:
-
- Writes I/O operation base address and count number to a 8 bit I/O Port.
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- AddrOffset - The address' offset.
- PageOffset - The page's offest.
- CountOffset - The count's offset.
- BaseAddress - The base address.
- Count - The number of I/O operations to perform.
-
-Returns:
- EFI_SUCCESS - Success.
- EFI_INVALID_PARAMETER - Parameter is invalid.
- EFI_UNSUPPORTED - The address range specified by these Offsets and Count is not valid.
- EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
-
---*/
{
EFI_STATUS Status;
@@ -401,29 +361,22 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Unmaps a memory region for DMA
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Mapping - The mapping value returned from EFI_ISA_IO.Map().
+
+ @retval EFI_SUCCESS - The range was unmapped.
+ @retval EFI_DEVICE_ERROR - The data was not committed to the target system memory.
+
+**/
EFI_STATUS
EFIAPI
IsaIoUnmap (
IN EFI_ISA_IO_PROTOCOL *This,
IN VOID *Mapping
)
-/*++
-
-Routine Description:
-
- Unmaps a memory region for DMA
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Mapping - The mapping value returned from EFI_ISA_IO.Map().
-
-Returns:
-
- EFI_SUCCESS - The range was unmapped.
- EFI_DEVICE_ERROR - The data was not committed to the target system memory.
-
---*/
{
ISA_MAP_INFO *IsaMapInfo;
@@ -467,27 +420,21 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Flushes a DMA buffer
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+
+ @retval EFI_SUCCESS - The buffers were flushed.
+ @retval EFI_DEVICE_ERROR - The buffers were not flushed due to a hardware error.
+
+**/
EFI_STATUS
EFIAPI
IsaIoFlush (
IN EFI_ISA_IO_PROTOCOL *This
)
-/*++
-
-Routine Description:
-
- Flushes a DMA buffer
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
-Returns:
-
- EFI_SUCCESS - The buffers were flushed.
- EFI_DEVICE_ERROR - The buffers were not flushed due to a hardware error.
-
---*/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
@@ -506,6 +453,20 @@ Returns: return Status;
}
+/**
+ Verifies access to an ISA device
+
+ @param IsaIoDevice - The ISA device to be verified.
+ @param Type - The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo.
+ @param Width - Signifies the width of the memory operation.
+ @param Count - The number of memory operations to perform.
+ @param Offset - The offset in ISA memory space to start the memory operation.
+
+ @retval EFI_SUCCESS - Verify success.
+ @retval EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
+ @retval EFI_UNSUPPORTED - The device ont support the access type.
+
+**/
EFI_STATUS
IsaIoVerifyAccess (
IN ISA_IO_DEVICE *IsaIoDevice,
@@ -514,27 +475,7 @@ IsaIoVerifyAccess ( IN UINTN Count,
IN OUT UINT32 *Offset
)
-/*++
-
-Routine Description:
- Verifies access to an ISA device
-
-Arguments:
-
- IsaIoDevice - The ISA device to be verified.
- Type - The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo.
- Width - Signifies the width of the memory operation.
- Count - The number of memory operations to perform.
- Offset - The offset in ISA memory space to start the memory operation.
-
-Returns:
-
- EFI_SUCCESS - Verify success.
- EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
- EFI_UNSUPPORTED - The device ont support the access type.
-
---*/
{
EFI_ISA_ACPI_RESOURCE *Item;
EFI_STATUS Status;
@@ -579,6 +520,22 @@ Returns: return Status;
}
+/**
+
+ Performs an ISA Memory Read Cycle
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Width - Signifies the width of the memory operation.
+ @param Offset - The offset in ISA memory space to start the memory operation.
+ @param Count - The number of memory operations to perform.
+ @param Buffer - The destination buffer to store the results
+
+ @retval EFI_SUCCESS - The data was read from the device successfully.
+ @retval EFI_UNSUPPORTED - The Offset is not valid for this device.
+ @retval EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
+ @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
+
+**/
EFI_STATUS
EFIAPI
IsaIoMemRead (
@@ -588,28 +545,7 @@ IsaIoMemRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
-
-Routine Description:
-
- Performs an ISA Memory Read Cycle
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Width - Signifies the width of the memory operation.
- Offset - The offset in ISA memory space to start the memory operation.
- Count - The number of memory operations to perform.
- Buffer - The destination buffer to store the results
-
-Returns:
-
- EFI_SUCCESS - The data was read from the device successfully.
- EFI_UNSUPPORTED - The Offset is not valid for this device.
- EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
- EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
---*/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
@@ -658,6 +594,21 @@ Returns: return Status;
}
+/**
+ Performs an ISA Memory Write Cycle
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Width - Signifies the width of the memory operation.
+ @param Offset - The offset in ISA memory space to start the memory operation.
+ @param Count - The number of memory operations to perform.
+ @param Buffer - The source buffer to write data from
+
+ @retval EFI_SUCCESS - The data was written to the device sucessfully.
+ @retval EFI_UNSUPPORTED - The Offset is not valid for this device.
+ @retval EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
+ @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
+
+**/
EFI_STATUS
EFIAPI
IsaIoMemWrite (
@@ -667,28 +618,6 @@ IsaIoMemWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
-
-Routine Description:
-
- Performs an ISA Memory Write Cycle
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Width - Signifies the width of the memory operation.
- Offset - The offset in ISA memory space to start the memory operation.
- Count - The number of memory operations to perform.
- Buffer - The source buffer to write data from
-
-Returns:
-
- EFI_SUCCESS - The data was written to the device sucessfully.
- EFI_UNSUPPORTED - The Offset is not valid for this device.
- EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
- EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
-
---*/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
@@ -737,6 +666,21 @@ Returns: return Status;
}
+/**
+ Performs an ISA I/O Copy Memory
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Width - Signifies the width of the memory copy operation.
+ @param DestOffset - The offset of the destination
+ @param SrcOffset - The offset of the source
+ @param Count - The number of memory copy operations to perform
+
+ @retval EFI_SUCCESS - The data was copied sucessfully.
+ @retval EFI_UNSUPPORTED - The DestOffset or SrcOffset is not valid for this device.
+ @retval EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
+ @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
+
+**/
EFI_STATUS
EFIAPI
IsaIoCopyMem (
@@ -746,28 +690,7 @@ IsaIoCopyMem ( IN UINT32 SrcOffset,
IN UINTN Count
)
-/*++
-
-Routine Description:
-
- Performs an ISA I/O Copy Memory
-
-Arguments:
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Width - Signifies the width of the memory copy operation.
- DestOffset - The offset of the destination
- SrcOffset - The offset of the source
- Count - The number of memory copy operations to perform
-
-Returns:
-
- EFI_SUCCESS - The data was copied sucessfully.
- EFI_UNSUPPORTED - The DestOffset or SrcOffset is not valid for this device.
- EFI_INVALID_PARAMETER - Width or Count, or both, were invalid.
- EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.
-
---*/
{
EFI_STATUS Status;
ISA_IO_DEVICE *IsaIoDevice;
@@ -828,6 +751,32 @@ Returns: return Status;
}
+/**
+ Maps a memory region for DMA, note this implementation
+ only supports slave read/write operation to save code size.
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Operation - Indicates the type of DMA (slave or bus master), and if
+ the DMA operation is going to read or write to system memory.
+ @param ChannelNumber - The slave channel number to use for this DMA operation.
+ If Operation and ChannelAttributes shows that this device
+ performs bus mastering DMA, then this field is ignored.
+ The legal range for this field is 0..7.
+ @param ChannelAttributes - The attributes of the DMA channel to use for this DMA operation
+ @param HostAddress - The system memory address to map to the device.
+ @param NumberOfBytes - On input the number of bytes to map. On output the number
+ of bytes that were mapped.
+ @param DeviceAddress - The resulting map address for the bus master device to use
+ to access the hosts HostAddress.
+ @param Mapping - A resulting value to pass to EFI_ISA_IO.Unmap().
+
+ @retval EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
+ @retval EFI_INVALID_PARAMETER - The Operation or HostAddress is undefined.
+ @retval EFI_UNSUPPORTED - The HostAddress can not be mapped as a common buffer.
+ @retval EFI_DEVICE_ERROR - The system hardware could not map the requested address.
+ @retval EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
+
+**/
STATIC
EFI_STATUS
IsaIoMap_OnlySupportSlaveReadWrite (
@@ -840,39 +789,7 @@ IsaIoMap_OnlySupportSlaveReadWrite ( OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
)
-/*++
-
-Routine Description:
- Maps a memory region for DMA, note this implementation
- only supports slave read/write operation to save code size.
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Operation - Indicates the type of DMA (slave or bus master), and if
- the DMA operation is going to read or write to system memory.
- ChannelNumber - The slave channel number to use for this DMA operation.
- If Operation and ChannelAttributes shows that this device
- performs bus mastering DMA, then this field is ignored.
- The legal range for this field is 0..7.
- ChannelAttributes - The attributes of the DMA channel to use for this DMA operation
- HostAddress - The system memory address to map to the device.
- NumberOfBytes - On input the number of bytes to map. On output the number
- of bytes that were mapped.
- DeviceAddress - The resulting map address for the bus master device to use
- to access the hosts HostAddress.
- Mapping - A resulting value to pass to EFI_ISA_IO.Unmap().
-
-Returns:
-
- EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
- EFI_INVALID_PARAMETER - The Operation or HostAddress is undefined.
- EFI_UNSUPPORTED - The HostAddress can not be mapped as a common buffer.
- EFI_DEVICE_ERROR - The system hardware could not map the requested address.
- EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
-
---*/
{
EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS PhysicalAddress;
@@ -1075,6 +992,32 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Maps a memory region for DMA. This implementation implement the
+ the full mapping support.
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Operation - Indicates the type of DMA (slave or bus master), and if
+ the DMA operation is going to read or write to system memory.
+ @param ChannelNumber - The slave channel number to use for this DMA operation.
+ If Operation and ChannelAttributes shows that this device
+ performs bus mastering DMA, then this field is ignored.
+ The legal range for this field is 0..7.
+ @param ChannelAttributes - The attributes of the DMA channel to use for this DMA operation
+ @param HostAddress - The system memory address to map to the device.
+ @param NumberOfBytes - On input the number of bytes to map. On output the number
+ of bytes that were mapped.
+ @param DeviceAddress - The resulting map address for the bus master device to use
+ - to access the hosts HostAddress.
+ @param Mapping - A resulting value to pass to EFI_ISA_IO.Unmap().
+
+ @retval EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
+ @retval EFI_INVALID_PARAMETER - The Operation or HostAddress is undefined.
+ @retval EFI_UNSUPPORTED - The HostAddress can not be mapped as a common buffer.
+ @retval EFI_DEVICE_ERROR - The system hardware could not map the requested address.
+ @retval EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
+
+**/
STATIC
EFI_STATUS
IsaIoMap_FullSupport (
@@ -1087,39 +1030,7 @@ IsaIoMap_FullSupport ( OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
)
-/*++
-
-Routine Description:
-
- Maps a memory region for DMA. This implementation implement the
- the full mapping support.
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Operation - Indicates the type of DMA (slave or bus master), and if
- the DMA operation is going to read or write to system memory.
- ChannelNumber - The slave channel number to use for this DMA operation.
- If Operation and ChannelAttributes shows that this device
- performs bus mastering DMA, then this field is ignored.
- The legal range for this field is 0..7.
- ChannelAttributes - The attributes of the DMA channel to use for this DMA operation
- HostAddress - The system memory address to map to the device.
- NumberOfBytes - On input the number of bytes to map. On output the number
- of bytes that were mapped.
- DeviceAddress - The resulting map address for the bus master device to use
- - to access the hosts HostAddress.
- Mapping - A resulting value to pass to EFI_ISA_IO.Unmap().
-
-Returns:
- EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
- EFI_INVALID_PARAMETER - The Operation or HostAddress is undefined.
- EFI_UNSUPPORTED - The HostAddress can not be mapped as a common buffer.
- EFI_DEVICE_ERROR - The system hardware could not map the requested address.
- EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
-
---*/
{
EFI_STATUS Status;
BOOLEAN Master;
@@ -1411,6 +1322,32 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Maps a memory region for DMA
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Operation - Indicates the type of DMA (slave or bus master), and if
+ the DMA operation is going to read or write to system memory.
+ @param ChannelNumber - The slave channel number to use for this DMA operation.
+ If Operation and ChannelAttributes shows that this device
+ performs bus mastering DMA, then this field is ignored.
+ The legal range for this field is 0..7.
+ @param ChannelAttributes - The attributes of the DMA channel to use for this DMA operation
+ @param HostAddress - The system memory address to map to the device.
+ @param NumberOfBytes - On input the number of bytes to map. On output the number
+ of bytes that were mapped.
+ @param DeviceAddress - The resulting map address for the bus master device to use
+ - to access the hosts HostAddress.
+ @param Mapping - A resulting value to pass to EFI_ISA_IO.Unmap().
+
+
+ @retval EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
+ @retval EFI_INVALID_PARAMETER - The Operation or HostAddress is undefined.
+ @retval EFI_UNSUPPORTED - The HostAddress can not be mapped as a common buffer.
+ @retval EFI_DEVICE_ERROR - The system hardware could not map the requested address.
+ @retval EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
+
+**/
EFI_STATUS
EFIAPI
IsaIoMap (
@@ -1423,38 +1360,7 @@ IsaIoMap ( OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
)
-/*++
-
-Routine Description:
-
- Maps a memory region for DMA
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Operation - Indicates the type of DMA (slave or bus master), and if
- the DMA operation is going to read or write to system memory.
- ChannelNumber - The slave channel number to use for this DMA operation.
- If Operation and ChannelAttributes shows that this device
- performs bus mastering DMA, then this field is ignored.
- The legal range for this field is 0..7.
- ChannelAttributes - The attributes of the DMA channel to use for this DMA operation
- HostAddress - The system memory address to map to the device.
- NumberOfBytes - On input the number of bytes to map. On output the number
- of bytes that were mapped.
- DeviceAddress - The resulting map address for the bus master device to use
- - to access the hosts HostAddress.
- Mapping - A resulting value to pass to EFI_ISA_IO.Unmap().
-
-Returns:
-
- EFI_SUCCESS - The range was mapped for the returned NumberOfBytes.
- EFI_INVALID_PARAMETER - The Operation or HostAddress is undefined.
- EFI_UNSUPPORTED - The HostAddress can not be mapped as a common buffer.
- EFI_DEVICE_ERROR - The system hardware could not map the requested address.
- EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
---*/
{
//
// Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA.
@@ -1493,6 +1399,24 @@ Returns: );
}
}
+
+/**
+ Allocates a common buffer for DMA
+
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Type - The type allocation to perform.
+ @param MemoryType - The type of memory to allocate.
+ @param Pages - The number of pages to allocate.
+ @param HostAddress - A pointer to store the base address of the allocated range.
+ @param Attributes - The requested bit mask of attributes for the allocated range.
+
+ @retval EFI_SUCCESS - The requested memory pages were allocated.
+ @retval EFI_INVALID_PARAMETER - Type is invalid or MemoryType is invalid or HostAddress is NULL
+ @retval EFI_UNSUPPORTED - Attributes is unsupported or the memory range specified
+ by HostAddress, Pages, and Type is not available for common buffer use.
+ @retval EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
+
+**/
EFI_STATUS
EFIAPI
IsaIoAllocateBuffer (
@@ -1503,30 +1427,6 @@ IsaIoAllocateBuffer ( OUT VOID **HostAddress,
IN UINT64 Attributes
)
-/*++
-
-Routine Description:
-
- Allocates a common buffer for DMA
-
-Arguments:
-
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Type - The type allocation to perform.
- MemoryType - The type of memory to allocate.
- Pages - The number of pages to allocate.
- HostAddress - A pointer to store the base address of the allocated range.
- Attributes - The requested bit mask of attributes for the allocated range.
-
-Returns:
-
- EFI_SUCCESS - The requested memory pages were allocated.
- EFI_INVALID_PARAMETER - Type is invalid or MemoryType is invalid or HostAddress is NULL
- EFI_UNSUPPORTED - Attributes is unsupported or the memory range specified
- by HostAddress, Pages, and Type is not available for common buffer use.
- EFI_OUT_OF_RESOURCES - The memory pages could not be allocated.
-
---*/
{
EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS PhysicalAddress;
@@ -1581,31 +1481,27 @@ Returns: return Status;
}
-EFI_STATUS
-EFIAPI
-IsaIoFreeBuffer (
- IN EFI_ISA_IO_PROTOCOL *This,
- IN UINTN Pages,
- IN VOID *HostAddress
- )
-/*++
-
-Routine Description:
+/**
Frees a common buffer
-Arguments:
+ @param This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
+ @param Pages - The number of pages to free.
+ @param HostAddress - The base address of the allocated range.
- This - A pointer to the EFI_ISA_IO_PROTOCOL instance.
- Pages - The number of pages to free.
- HostAddress - The base address of the allocated range.
-Returns:
+ @retval EFI_SUCCESS - The requested memory pages were freed.
+ @retval EFI_INVALID_PARAMETER - The memory was not allocated with EFI_ISA_IO.AllocateBufer().
- EFI_SUCCESS - The requested memory pages were freed.
- EFI_INVALID_PARAMETER - The memory was not allocated with EFI_ISA_IO.AllocateBufer().
+**/
---*/
+EFI_STATUS
+EFIAPI
+IsaIoFreeBuffer (
+ IN EFI_ISA_IO_PROTOCOL *This,
+ IN UINTN Pages,
+ IN VOID *HostAddress
+ )
{
EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS PhysicalAddress;
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c index be4bc969df..4f24f086f2 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c @@ -1,6 +1,5 @@ /**@file
-
Copyright (c) 2006 - 2007, Intel Corporation.<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -242,25 +241,17 @@ IsaFloppyComponentNameGetControllerName ( );
}
+/**
+ Add the component name for the floppy device
+
+ @param FdcDev - A pointer to the FDC_BLK_IO_DEV instance.
+
+**/
VOID
AddName (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
- Routine Description:
-
- Add the component name for the floppy device
-
- Arguments:
-
- FdcDev - A pointer to the FDC_BLK_IO_DEV instance.
-
- Returns:
-
- None
-
---*/
{
CHAR16 FloppyDriveName[FLOPPY_DRIVE_NAME_ASCII_LEN + 1];
@@ -282,3 +273,4 @@ AddName ( );
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.h b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.h index 1d0c27f4b2..c68e059edd 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.h @@ -1,6 +1,5 @@ /**@file
-
Copyright (c) 2006 - 2007, Intel Corporation.<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -156,7 +155,7 @@ VOID AddName (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
+/**
Routine Description:
@@ -170,7 +169,7 @@ Returns: GC_TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.c b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.c index 26c0e63316..e1d6566666 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.c @@ -73,7 +73,16 @@ InitializeIsaFloppy( return Status;
}
-
+/**
+ Test controller is a Floppy Disk Controller
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver's controller
+ @param RemainingDevicePath children device path
+
+ @retval EFI_UNSUPPORTED controller is not floppy disk
+ @retval EFI_SUCCESS controller is floppy disk
+**/
EFI_STATUS
EFIAPI
FdcControllerDriverSupported (
@@ -81,20 +90,6 @@ FdcControllerDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
- ControllerDriver Protocol Method
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: RemainingDevicePath - add argument and description to function comment
{
EFI_STATUS Status;
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -133,6 +128,15 @@ Returns: return Status;
}
+/**
+ Create floppy control instance on controller.
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver controller handle
+ @param RemainingDevicePath Children's device path
+
+ @retval whether success to create floppy control instance.
+**/
EFI_STATUS
EFIAPI
FdcControllerDriverStart (
@@ -140,18 +144,6 @@ FdcControllerDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: RemainingDevicePath - add argument and description to function comment
{
EFI_STATUS Status;
FDC_BLK_IO_DEV *FdcDev;
@@ -364,6 +356,20 @@ Done: return Status;
}
+/**
+ Stop this driver on ControllerHandle. Support stoping any child handles
+ created by this driver.
+
+ @param This Protocol instance pointer.
+ @param ControllerHandle Handle of device to stop driver on
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
+ children is zero stop the entire bus driver.
+ @param ChildHandleBuffer List of Child Handles to Stop.
+
+ @retval EFI_SUCCESS This driver is removed ControllerHandle
+ @retval other This driver was not removed from this device
+
+**/
EFI_STATUS
EFIAPI
FdcControllerDriverStop (
@@ -372,20 +378,6 @@ FdcControllerDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
- Routine Description:
-
- Arguments:
-
- Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: NumberOfChildren - add argument and description to function comment
-// GC_TODO: ChildHandleBuffer - add argument and description to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
EFI_BLOCK_IO_PROTOCOL *BlkIo;
@@ -478,3 +470,4 @@ FdcControllerDriverStop ( return EFI_SUCCESS;
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.h b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.h index 7e2af8e06b..f2f701f901 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.h @@ -492,6 +492,16 @@ extern EFI_DRIVER_BINDING_PROTOCOL gFdcControllerDriver; //
// EFI Driver Binding Protocol Functions
//
+/**
+ Test controller is a Floppy Disk Controller
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver's controller
+ @param RemainingDevicePath children device path
+
+ @retval EFI_UNSUPPORTED controller is not floppy disk
+ @retval EFI_SUCCESS controller is floppy disk
+**/
EFI_STATUS
EFIAPI
FdcControllerDriverSupported (
@@ -499,25 +509,17 @@ FdcControllerDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- Controller - GC_TODO: add argument description
- RemainingDevicePath - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Create floppy control instance on controller.
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver controller handle
+ @param RemainingDevicePath Children's device path
+
+ @retval whether success to create floppy control instance.
+**/
EFI_STATUS
EFIAPI
FdcControllerDriverStart (
@@ -525,25 +527,22 @@ FdcControllerDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- Controller - GC_TODO: add argument description
- RemainingDevicePath - GC_TODO: add argument description
+;
-Returns:
+/**
+ Stop this driver on ControllerHandle. Support stoping any child handles
+ created by this driver.
- GC_TODO: add return values
+ @param This Protocol instance pointer.
+ @param ControllerHandle Handle of device to stop driver on
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
+ children is zero stop the entire bus driver.
+ @param ChildHandleBuffer List of Child Handles to Stop.
---*/
-;
+ @retval EFI_SUCCESS This driver is removed ControllerHandle
+ @retval other This driver was not removed from this device
+**/
EFI_STATUS
EFIAPI
FdcControllerDriverStop (
@@ -552,75 +551,65 @@ FdcControllerDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- Controller - GC_TODO: add argument description
- NumberOfChildren - GC_TODO: add argument description
- ChildHandleBuffer - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
//
// EFI Block I/O Protocol Functions
//
+/**
+ 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
+ @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
+
+**/
EFI_STATUS
EFIAPI
FdcReset (
IN EFI_BLOCK_IO_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- ExtendedVerification - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Flush block via fdd controller
+
+ @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
+ @return EFI_SUCCESS
+
+**/
EFI_STATUS
EFIAPI
FddFlushBlocks (
IN EFI_BLOCK_IO_PROTOCOL *This
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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 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
+ 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
+
+**/
EFI_STATUS
EFIAPI
FddReadBlocks (
@@ -630,27 +619,28 @@ FddReadBlocks ( IN UINTN BufferSize,
OUT VOID *Buffer
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- MediaId - GC_TODO: add argument description
- LBA - GC_TODO: add argument description
- BufferSize - GC_TODO: add argument description
- Buffer - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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 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_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
+ 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
+**/
EFI_STATUS
EFIAPI
FddWriteBlocks (
@@ -660,311 +650,238 @@ FddWriteBlocks ( IN UINTN BufferSize,
IN VOID *Buffer
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- MediaId - GC_TODO: add argument description
- LBA - GC_TODO: add argument description
- BufferSize - GC_TODO: add argument description
- Buffer - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
//
// Prototypes of internal functions
//
+/**
+
+ 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
+
+**/
EFI_STATUS
DiscoverFddDevice (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
---*/
-;
+ 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
+**/
EFI_STATUS
FddIdentify (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
---*/
-;
+ 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
+**/
EFI_STATUS
FddReset (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
---*/
-;
+ 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)
+**/
EFI_STATUS
MotorOn (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
---*/
-;
+ 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
+**/
EFI_STATUS
MotorOff (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+ @retval EFI_MEDIA_CHANGED: There is a new disk in the drive
+**/
EFI_STATUS
DisketChanged (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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 This 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
+
+**/
EFI_STATUS
Specify (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
EFI_STATUS
Recalibrate (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
EFI_STATUS
Seek (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA Lba
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- Lba - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Do the Sense Interrupt Status command, this command
+ resets the interrupt signal
+
+
+ @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
+
+**/
EFI_STATUS
SenseIntStatus (
IN FDC_BLK_IO_DEV *FdcDev,
IN OUT UINT8 *StatusRegister0,
IN OUT UINT8 *PresentCylinderNumber
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- StatusRegister0 - GC_TODO: add argument description
- PresentCylinderNumber - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
EFI_STATUS
SenseDrvStatus (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA Lba
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- Lba - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
EFI_STATUS
DetectMedia (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+**/
EFI_STATUS
Setup (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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 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
+
+**/
EFI_STATUS
ReadWriteDataSector (
IN FDC_BLK_IO_DEV *FdcDev,
@@ -973,287 +890,224 @@ ReadWriteDataSector ( IN UINTN NumberOfBlocks,
IN BOOLEAN Read
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- HostAddress - GC_TODO: add argument description
- Lba - GC_TODO: add argument description
- NumberOfBlocks - GC_TODO: add argument description
- Read - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
VOID
FillPara (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA Lba,
IN FDD_COMMAND_PACKET1 *Command
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- Lba - GC_TODO: add argument description
- Command - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Read result byte from Data Register of FDC
+
+ @param FdcDev Pointer to instance of FDC_BLK_IO_DEV
+ @param Pointer UINT8 *: Be used to save result 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
+
+**/
EFI_STATUS
DataInByte (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINT8 *Pointer
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- Pointer - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
EFI_STATUS
DataOutByte (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINT8 *Pointer
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- Pointer - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Detect the specified floppy logic drive is busy or
+ not within a period of time
+
+ @param Disk Indicate it is drive A or drive B
+ @param TimeoutInSeconds 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 TimeoutInSeconds
+
+**/
EFI_STATUS
FddWaitForBSYClear (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINTN TimeoutInSeconds
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- TimeoutInSeconds - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
---*/
-;
+ Routine Description: 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 TimeoutInSeconds UINTN: 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
+**/
EFI_STATUS
FddDRQReady (
IN FDC_BLK_IO_DEV *FdcDev,
IN BOOLEAN Dio,
IN UINTN TimeoutInSeconds
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- Dio - GC_TODO: add argument description
- TimeoutInSeconds - GC_TODO: add argument description
+;
-Returns:
+/**
+ Set FDC control structure's attribute according to
+ result
- GC_TODO: add return values
+ @param Result Point to result structure
+ @param FdcDev FDC control structure
---*/
-;
+ @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @param EFI_SUCCESS - GC_TODO: Add description for return value
+**/
EFI_STATUS
CheckResult (
IN FDD_RESULT_PACKET *Result,
IN OUT FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- Result - GC_TODO: add argument description
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
EFI_STATUS
CheckStatus3 (
IN UINT8 StatusRegister3
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- StatusRegister3 - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
UINTN
GetTransferBlockCount (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA LBA,
IN UINTN NumberOfBlocks
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- LBA - GC_TODO: add argument description
- NumberOfBlocks - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
VOID
EFIAPI
FddTimerProc (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- Event - GC_TODO: add argument description
- Context - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
UINT8
FdcReadPort (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINT32 Offset
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
- Offset - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ 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
+
+**/
VOID
FdcWritePort (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINT32 Offset,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
+;
- FdcDev - GC_TODO: add argument description
- Offset - GC_TODO: add argument description
- Data - GC_TODO: add argument description
+/**
+ Read or Write a number of blocks to floppy device
-Returns:
+ @param This Pointer to instance of EFI_BLOCK_IO_PROTOCOL
+ @param MediaId The media id of read/write request
+ @param LBA The starting logic block address to read from on the device
+ @param BufferSize The size of the Buffer in bytes
+ @param Operation - GC_TODO: add argument description
+ Buffer - GC_TODO: add argument description
- GC_TODO: add return values
-
---*/
-;
+ @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_NO_MEDIA - GC_TODO: Add description for return value
+ @retval EFI_MEDIA_CHANGED - GC_TODO: Add description for return value
+ @retval EFI_WRITE_PROTECTED - GC_TODO: Add description for return value
+ @retval EFI_BAD_BUFFER_SIZE - GC_TODO: Add description for return value
+ @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
+ @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+**/
EFI_STATUS
FddReadWriteBlocks (
IN EFI_BLOCK_IO_PROTOCOL *This,
@@ -1263,47 +1117,19 @@ FddReadWriteBlocks ( IN BOOLEAN Operation,
OUT VOID *Buffer
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- MediaId - GC_TODO: add argument description
- LBA - GC_TODO: add argument description
- BufferSize - GC_TODO: add argument description
- Operation - GC_TODO: add argument description
- Buffer - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Common interface for free cache
+
+ @param FdcDec Pointer of FDC_BLK_IO_DEV instance
+
+**/
VOID
FdcFreeCache (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
#endif
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyBlock.c b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyBlock.c index eed4f2e72b..6b254cd6a5 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyBlock.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyBlock.c @@ -23,29 +23,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IsaFloppy.h"
+/**
+ 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
+ @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
+
+**/
EFI_STATUS
EFIAPI
FdcReset (
IN EFI_BLOCK_IO_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description: Reset the Floppy Logic Drive, call the FddReset function
- Parameters:
- This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
- 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
- Returns:
- EFI_SUCCESS: The Floppy Logic Drive is reset
- EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly
- and can not be reset
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: ExtendedVerification - add argument and description to function comment
{
FDC_BLK_IO_DEV *FdcDev;
@@ -63,22 +58,18 @@ FdcReset ( return FddReset (FdcDev);
}
+/**
+ Flush block via fdd controller
+
+ @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
+ @return EFI_SUCCESS
+
+**/
EFI_STATUS
EFIAPI
FddFlushBlocks (
IN EFI_BLOCK_IO_PROTOCOL *This
)
-/*++
-
- Routine Description:
- Parameters:
- This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
- Returns:
- EFI_SUCCESS:
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: This - add argument and description to function comment
{
//
// Not supported yet
@@ -86,28 +77,18 @@ FddFlushBlocks ( return EFI_SUCCESS;
}
+/**
+ Common report status code interface
+
+ @param This Pointer of FDC_BLK_IO_DEV instance
+ @param Read Error type: read or write?
+**/
STATIC
VOID
FddReportStatus (
IN EFI_BLOCK_IO_PROTOCOL *This,
IN BOOLEAN Read
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- Read - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
FDC_BLK_IO_DEV *FdcDev;
@@ -120,6 +101,26 @@ Returns: );
}
+/**
+ 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 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
+ 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
+
+**/
EFI_STATUS
EFIAPI
FddReadBlocks (
@@ -129,33 +130,6 @@ FddReadBlocks ( IN UINTN BufferSize,
OUT VOID *Buffer
)
-/*++
-
- Routine Description: Read the requested number of blocks from the device
- Parameters:
- This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
- MediaId UINT32: The media id that the read request is for
- LBA EFI_LBA: The starting logic block address to read from on the device
- BufferSize UINTN: The size of the Buffer in bytes
- Buffer VOID *: A pointer to the destination buffer for the data
- Returns:
- EFI_SUCCESS: The data was read correctly from the device
- EFI_DEVICE_ERROR:The device reported an error while attempting to perform
- the read operation
- EFI_NO_MEDIA: There is no media in the device
- EFI_MEDIA_CHANGED: The MediaId is not for the current media
- EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the
- intrinsic block size of the device
- EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid,
- or the buffer is not on proper alignment
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: MediaId - add argument and description to function comment
-// GC_TODO: LBA - add argument and description to function comment
-// GC_TODO: BufferSize - add argument and description to function comment
-// GC_TODO: Buffer - add argument and description to function comment
{
EFI_STATUS Status;
@@ -168,6 +142,26 @@ FddReadBlocks ( return Status;
}
+/**
+ 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 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_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
+ 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
+**/
EFI_STATUS
EFIAPI
FddWriteBlocks (
@@ -177,35 +171,6 @@ FddWriteBlocks ( IN UINTN BufferSize,
IN VOID *Buffer
)
-/*++
-
- Routine Description: Write a specified number of blocks to the device
- Parameters:
- This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface
- MediaId UINT32: The media id that the write request is for
- LBA EFI_LBA: The starting logic block address to be written
- BufferSize UINTN: The size in bytes in Buffer
- Buffer VOID *: A pointer to the source buffer for the data
- Returns :
- EFI_SUCCESS: The data were written correctly to the device
- EFI_WRITE_PROTECTED: The device can not be written to
- EFI_NO_MEDIA: There is no media in the device
- EFI_MEDIA_CHANGED: The MediaId is not for the current media
- EFI_DEVICE_ERROR: The device reported an error while attempting to perform
- the write operation
- EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the
- intrinsic block size of the device
- EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid,
- or the buffer is not on proper alignment
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: function comment is missing 'Returns:'
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: MediaId - add argument and description to function comment
-// GC_TODO: LBA - add argument and description to function comment
-// GC_TODO: BufferSize - add argument and description to function comment
-// GC_TODO: Buffer - add argument and description to function comment
{
EFI_STATUS Status;
@@ -218,6 +183,32 @@ FddWriteBlocks ( return Status;
}
+/**
+ Read or Write a number of blocks to floppy device
+
+ @param This Pointer to instance of EFI_BLOCK_IO_PROTOCOL
+ @param MediaId The media id of read/write request
+ @param LBA The starting logic block address to read from on the device
+ @param BufferSize The size of the Buffer in bytes
+ @param Operation - GC_TODO: add argument description
+ Buffer - GC_TODO: add argument description
+
+ @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_NO_MEDIA - GC_TODO: Add description for return value
+ @retval EFI_MEDIA_CHANGED - GC_TODO: Add description for return value
+ @retval EFI_WRITE_PROTECTED - GC_TODO: Add description for return value
+ @retval EFI_BAD_BUFFER_SIZE - GC_TODO: Add description for return value
+ @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
+ @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+
+**/
EFI_STATUS
FddReadWriteBlocks (
IN EFI_BLOCK_IO_PROTOCOL *This,
@@ -227,39 +218,6 @@ FddReadWriteBlocks ( IN BOOLEAN Operation,
OUT VOID *Buffer
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- MediaId - GC_TODO: add argument description
- LBA - GC_TODO: add argument description
- BufferSize - GC_TODO: add argument description
- Operation - GC_TODO: add argument description
- Buffer - GC_TODO: add argument description
-
-Returns:
-
- EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_NO_MEDIA - GC_TODO: Add description for return value
- EFI_MEDIA_CHANGED - GC_TODO: Add description for return value
- EFI_WRITE_PROTECTED - GC_TODO: Add description for return value
- EFI_BAD_BUFFER_SIZE - GC_TODO: Add description for return value
- EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
- EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_BLOCK_IO_MEDIA *Media;
FDC_BLK_IO_DEV *FdcDev;
@@ -423,25 +381,16 @@ Returns: }
+/**
+ Common interface for free cache
+
+ @param FdcDec Pointer of FDC_BLK_IO_DEV instance
+
+**/
VOID
FdcFreeCache (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
if (FdcDev->Cache) {
gBS->FreePool (FdcDev->Cache);
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c index a2f0ca9247..da6af56a43 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c @@ -22,22 +22,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IsaFloppy.h"
+/**
+
+ 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
+
+**/
EFI_STATUS
DiscoverFddDevice (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Detect the floppy drive is presented or not
- Parameters:
- FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS Drive is presented
- EFI_NOT_FOUND Drive is not presented
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
EFI_STATUS Status;
@@ -61,23 +58,19 @@ DiscoverFddDevice ( return EFI_SUCCESS;
}
+/**
+
+ 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
+
+**/
EFI_STATUS
FddIdentify (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Do recalibrate and see the drive is presented or not
- Set the media parameters
- Parameters:
- FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS:
- EFI_DEVICE_ERROR:
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
EFI_STATUS Status;
@@ -143,23 +136,21 @@ FddIdentify ( return EFI_SUCCESS;
}
+/**
+
+ 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
+
+**/
EFI_STATUS
FddReset (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Reset the Floppy Logic Drive
- Parameters:
- FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS: The Floppy Logic Drive is reset
- EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly and
- can not be reset
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
UINT8 data;
UINT8 StatusRegister0;
@@ -244,24 +235,22 @@ FddReset ( return EFI_SUCCESS;
}
+/**
+
+ 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)
+
+**/
EFI_STATUS
MotorOn (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Turn the drive's motor on
- The drive's motor must be on before any command can be executed
- Parameters:
- FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS: Turn the drive's motor on successfully
- EFI_DEVICE_ERROR: The drive is busy, so can not turn motor on
- EFI_INVALID_PARAMETER: Fail to Set timer(Cancel timer)
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
EFI_STATUS Status;
UINT8 data;
@@ -328,22 +317,21 @@ MotorOn ( return EFI_SUCCESS;
}
+/**
+
+ 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
+
+**/
EFI_STATUS
MotorOff (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Set a Timer and when Timer goes off, turn the motor off
- Parameters:
- FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS: Set the Timer successfully
- EFI_INVALID_PARAMETER: Fail to Set the timer
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
//
// Set the timer : 2s
@@ -351,24 +339,21 @@ MotorOff ( return gBS->SetTimer (FdcDev->Event, TimerRelative, 20000000);
}
+/**
+ 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
+ @retval EFI_MEDIA_CHANGED: There is a new disk in the drive
+**/
EFI_STATUS
DisketChanged (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Detect the disk in the drive is changed or not
- Parameters:
- FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS: No disk media change
- EFI_DEVICE_ERROR: Fail to do the recalibrate or seek operation
- EFI_NO_MEDIA: No disk in the drive
- EFI_MEDIA_CHANGED: There is a new disk in the drive
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
EFI_STATUS Status;
UINT8 data;
@@ -418,24 +403,21 @@ DisketChanged ( return EFI_SUCCESS;
}
+/**
+ 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 This 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
+
+**/
EFI_STATUS
Specify (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Do the Specify command, this command sets DMA operation
- and the initial values for each of the three internal
- times: HUT, SRT and HLT
- Parameters:
- None
- Returns:
- EFI_SUCCESS: Execute the Specify command successfully
- EFI_DEVICE_ERROR: Fail to execute the command
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
FDD_SPECIFY_CMD Command;
UINTN Index;
@@ -464,22 +446,18 @@ Specify ( return EFI_SUCCESS;
}
+/**
+ 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
+
+**/
EFI_STATUS
Recalibrate (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Set the head of floppy drive to track 0
- Parameters:
- FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS: Execute the Recalibrate operation successfully
- EFI_DEVICE_ERROR: Fail to execute the Recalibrate operation
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
FDD_COMMAND_PACKET2 Command;
UINTN Index;
@@ -542,25 +520,21 @@ Recalibrate ( return EFI_SUCCESS;
}
+/**
+ 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
+
+**/
EFI_STATUS
Seek (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA Lba
)
-/*++
-
- Routine Description: Set the head of floppy drive to the new cylinder
- Parameters:
- FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
- Lba EFI_LBA : The logic block address want to seek
- Returns:
- EFI_SUCCESS: Execute the Seek operation successfully
- EFI_DEVICE_ERROR: Fail to execute the Seek operation
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Lba - add argument and description to function comment
{
FDD_SEEK_CMD Command;
UINT8 EndOfTrack;
@@ -649,29 +623,25 @@ Seek ( }
}
+/**
+ Do the Sense Interrupt Status command, this command
+ resets the interrupt signal
+
+
+ @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
+
+**/
EFI_STATUS
SenseIntStatus (
IN FDC_BLK_IO_DEV *FdcDev,
IN OUT UINT8 *StatusRegister0,
IN OUT UINT8 *PresentCylinderNumber
)
-/*++
-
- Routine Description: Do the Sense Interrupt Status command, this command
- resets the interrupt signal
- Parameters:
- StatusRegister0 UINT8 *: Be used to save Status Register 0 read from FDC
- PresentCylinderNumber UINT8 *: Be used to save present cylinder number
- read from FDC
- Returns:
- EFI_SUCCESS: Execute the Sense Interrupt Status command successfully
- EFI_DEVICE_ERROR: Fail to execute the command
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: StatusRegister0 - add argument and description to function comment
-// GC_TODO: PresentCylinderNumber - add argument and description to function comment
{
UINT8 command;
@@ -691,26 +661,22 @@ SenseIntStatus ( return EFI_SUCCESS;
}
+/**
+ 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
+
+**/
EFI_STATUS
SenseDrvStatus (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA Lba
)
-/*++
-
- Routine Description: Do the Sense Drive Status command
- Parameters:
- FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
- Lba EFI_LBA : Logic block address
- Returns:
- EFI_SUCCESS: Execute the Sense Drive Status command successfully
- EFI_DEVICE_ERROR: Fail to execute the command
- EFI_WRITE_PROTECTED:The disk is write protected
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Lba - add argument and description to function comment
{
FDD_COMMAND_PACKET2 Command;
UINT8 Head;
@@ -758,23 +724,20 @@ SenseDrvStatus ( return CheckStatus3 (StatusRegister3);
}
+/**
+ 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
+
+**/
EFI_STATUS
DetectMedia (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Update the disk media properties and if necessary
- reinstall Block I/O interface
- Parameters:
- FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
- Returns:
- EFI_SUCCESS: Do the operation successfully
- EFI_DEVICE_ERROR: Fail to the operation
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
{
EFI_STATUS Status;
BOOLEAN bReset;
@@ -840,22 +803,17 @@ DetectMedia ( return EFI_SUCCESS;
}
+/**
+ 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
+**/
EFI_STATUS
Setup (
IN FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
- Routine Description: Set the data rate and so on
- Parameters:
- None
- Returns:
- EFI_SUCCESS:
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
{
EFI_STATUS Status;
@@ -878,6 +836,18 @@ Setup ( return EFI_SUCCESS;
}
+/**
+ 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 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
+
+**/
EFI_STATUS
ReadWriteDataSector (
IN FDC_BLK_IO_DEV *FdcDev,
@@ -886,30 +856,6 @@ ReadWriteDataSector ( IN UINTN NumberOfBlocks,
IN BOOLEAN Read
)
-/*++
-
- Routine Description: Read or Write a number of blocks in the same cylinder
- Parameters:
- FdcDev FDC_BLK_IO_DEV * : A pointer to Data Structure FDC_BLK_IO_DEV
- Buffer VOID *:
- Lba EFI_LBA:
- NumberOfBlocks UINTN:
- Read BOOLEAN:
- Returns:
- EFI_SUCCESS:
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: HostAddress - add argument and description to function comment
-// GC_TODO: Lba - add argument and description to function comment
-// GC_TODO: NumberOfBlocks - add argument and description to function comment
-// GC_TODO: Read - add argument and description to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_TIMEOUT - add return value to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
{
EFI_STATUS Status;
FDD_COMMAND_PACKET1 Command;
@@ -1040,23 +986,20 @@ ReadWriteDataSector ( return CheckResult (&Result, FdcDev);
}
+/**
+ 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
+
+**/
VOID
FillPara (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA Lba,
IN FDD_COMMAND_PACKET1 *Command
)
-/*++
-
- Routine Description: Fill in Parameter
- Parameters:
- Returns:
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Lba - add argument and description to function comment
-// GC_TODO: Command - add argument and description to function comment
{
UINT8 EndOfTrack;
@@ -1084,24 +1027,22 @@ FillPara ( Command->DataLength = DISK_1440K_DTL;
}
+/**
+ Read result byte from Data Register of FDC
+
+ @param FdcDev Pointer to instance of FDC_BLK_IO_DEV
+ @param Pointer UINT8 *: Be used to save result 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
+
+**/
EFI_STATUS
DataInByte (
IN FDC_BLK_IO_DEV *FdcDev,
IN OUT UINT8 *Pointer
)
-/*++
-
- Routine Description: Read result byte from Data Register of FDC
- Parameters:
- Pointer UINT8 *: Be used to save result byte read from FDC
- Returns:
- EFI_SUCCESS: Read result byte from FDC successfully
- EFI_DEVICE_ERROR: The FDC is not ready to be read
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Pointer - add argument and description to function comment
{
UINT8 data;
@@ -1126,24 +1067,21 @@ DataInByte ( return EFI_SUCCESS;
}
+/**
+ 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
+
+**/
EFI_STATUS
DataOutByte (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINT8 *Pointer
)
-/*++
-
- Routine Description: Write command byte to Data Register of FDC
- Parameters:
- Pointer UINT8 *: Be used to save command byte written to FDC
- Returns:
- EFI_SUCCESS: Write command byte to FDC successfully
- EFI_DEVICE_ERROR: The FDC is not ready to be written
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Pointer - add argument and description to function comment
{
UINT8 data;
@@ -1169,27 +1107,23 @@ DataOutByte ( return EFI_SUCCESS;
}
+/**
+ Detect the specified floppy logic drive is busy or
+ not within a period of time
+
+ @param Disk Indicate it is drive A or drive B
+ @param TimeoutInSeconds 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 TimeoutInSeconds
+
+**/
EFI_STATUS
FddWaitForBSYClear (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINTN TimeoutInSeconds
)
-/*++
-
- Routine Description: Detect the specified floppy logic drive is busy or
- not within a period of time
- Parameters:
- Disk EFI_FDC_DISK: Indicate it is drive A or drive B
- TimeoutInSeconds UINTN: the time period for waiting
- Returns:
- EFI_SUCCESS: The drive and command are not busy
- EFI_TIMEOUT: The drive or command is still busy after a period time that
- set by TimeoutInSeconds
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: TimeoutInSeconds - add argument and description to function comment
{
UINTN Delay;
UINT8 StatusRegister;
@@ -1228,27 +1162,24 @@ FddWaitForBSYClear ( return EFI_SUCCESS;
}
+/**
+
+ Routine Description: 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 TimeoutInSeconds UINTN: 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
+
+**/
EFI_STATUS
FddDRQReady (
IN FDC_BLK_IO_DEV *FdcDev,
IN BOOLEAN Dio,
IN UINTN TimeoutInSeconds
)
-/*++
-
- Routine Description: Determine whether FDC is ready to write or read
- Parameters:
- Dio BOOLEAN: Indicate the FDC is waiting to write or read
- TimeoutInSeconds UINTN: The time period for waiting
- Returns:
- EFI_SUCCESS: FDC is ready to write or read
- EFI_NOT_READY: FDC is not ready within the specified time period
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Dio - add argument and description to function comment
-// GC_TODO: TimeoutInSeconds - add argument and description to function comment
{
UINTN Delay;
UINT8 StatusRegister;
@@ -1294,30 +1225,24 @@ FddDRQReady ( return EFI_SUCCESS;
}
+/**
+ Set FDC control structure's attribute according to
+ result
+
+ @param Result Point to result structure
+ @param FdcDev FDC control structure
+
+ @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @param EFI_DEVICE_ERROR - GC_TODO: Add description for return value
+ @param EFI_SUCCESS - GC_TODO: Add description for return value
+
+**/
EFI_STATUS
CheckResult (
IN FDD_RESULT_PACKET *Result,
IN OUT FDC_BLK_IO_DEV *FdcDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- Result - GC_TODO: add argument description
- FdcDev - GC_TODO: add argument description
-
-Returns:
-
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
//
// Check Status Register0
@@ -1351,22 +1276,19 @@ Returns: return EFI_SUCCESS;
}
+/**
+ 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
+
+**/
EFI_STATUS
CheckStatus3 (
IN UINT8 StatusRegister3
)
-/*++
-
- Routine Description: Check the drive status information
- Parameters:
- StatusRegister3 UINT8: the value of Status Register 3
- Returns:
- EFI_SUCCESS:
- EFI_WRITE_PROTECTED: The disk is write protected
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: StatusRegister3 - add argument and description to function comment
{
if (StatusRegister3 & STS3_WP) {
return EFI_WRITE_PROTECTED;
@@ -1375,29 +1297,24 @@ CheckStatus3 ( return EFI_SUCCESS;
}
+/**
+ 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
+
+**/
UINTN
GetTransferBlockCount (
IN FDC_BLK_IO_DEV *FdcDev,
IN EFI_LBA LBA,
IN UINTN NumberOfBlocks
)
-/*++
-
- Routine Description: Calculate the number of block in the same cylinder
- according to LBA
- Parameters:
- FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV
- LBA EFI_LBA: The starting logic block address
- NumberOfBlocks UINTN: The number of blocks
- Returns:
- UINTN : The number of blocks in the same cylinder which the starting
- logic block address is LBA
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: LBA - add argument and description to function comment
-// GC_TODO: NumberOfBlocks - add argument and description to function comment
{
UINT8 EndOfTrack;
UINT8 Head;
@@ -1417,26 +1334,20 @@ 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
+
+**/
VOID
EFIAPI
FddTimerProc (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
- Routine Description: When the Timer(2s) off, turn the drive's motor off
- Parameters:
- Event EFI_EVENT: Event(the timer) whose notification function is being
- invoked
- Context VOID *: Pointer to the notification function's context
- Returns:
- VOID
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: Event - add argument and description to function comment
-// GC_TODO: Context - add argument and description to function comment
{
FDC_BLK_IO_DEV *FdcDev;
UINT8 data;
@@ -1462,21 +1373,18 @@ FddTimerProc ( MicroSecondDelay (500);
}
+/**
+ 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
+
+**/
UINT8
FdcReadPort (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINT32 Offset
)
-/*++
-
- Routine Description: Read I/O port for FDC
- Parameters:
- Returns:
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Offset - add argument and description to function comment
{
UINT8 Data;
@@ -1494,23 +1402,19 @@ FdcReadPort ( return Data;
}
+/**
+ 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
+
+**/
VOID
FdcWritePort (
IN FDC_BLK_IO_DEV *FdcDev,
IN UINT32 Offset,
IN UINT8 Data
)
-/*++
-
- Routine Description: Write I/O port for FDC
- Parameters:
- Returns:
-
---*/
-// GC_TODO: function comment is missing 'Arguments:'
-// GC_TODO: FdcDev - add argument and description to function comment
-// GC_TODO: Offset - add argument and description to function comment
-// GC_TODO: Data - add argument and description to function comment
{
//
@@ -1524,3 +1428,4 @@ FdcWritePort ( &Data
);
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c index bbcc9312a9..a8f046b4bc 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c @@ -232,7 +232,7 @@ AddName ( IN SERIAL_DEV *SerialDevice,
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -247,7 +247,7 @@ AddName ( None
---*/
+**/
{
CHAR16 SerialPortName[sizeof (SERIAL_PORT_NAME)];
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.h b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.h index cd81921687..fad55b080b 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.h +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.h @@ -156,7 +156,7 @@ AddName ( IN SERIAL_DEV *SerialDevice,
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -171,7 +171,7 @@ AddName ( None
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c index 134b0fd8a8..ac208dbe09 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c @@ -1,5 +1,5 @@ /**@file
- Serial driver for standard UARTS on an ISA bus.
+ Serial driver for standard UARTS on an ISA bus.
Copyright (c) 2006 - 2007, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
@@ -122,7 +122,16 @@ InitializeIsaSerial ( return Status;
}
+/**
+ Check to see if this driver supports the given controller
+
+ @param This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
+ @param Controller - The handle of the controller to test.
+ @param RemainingDevicePath - A pointer to the remaining portion of a device path.
+ @return EFI_SUCCESS - This driver can support the given controller
+
+**/
EFI_STATUS
EFIAPI
SerialControllerDriverSupported (
@@ -130,23 +139,7 @@ SerialControllerDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
- Routine Description:
-
- Check to see if this driver supports the given controller
-
- Arguments:
- This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- Controller - The handle of the controller to test.
- RemainingDevicePath - A pointer to the remaining portion of a device path.
-
- Returns:
-
- EFI_SUCCESS - This driver can support the given controller
-
---*/
{
EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
@@ -265,6 +258,16 @@ Error: return Status;
}
+/**
+ Start to management the controller passed in
+
+ @param This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
+ @param Controller - The handle of the controller to test.
+ @param RemainingDevicePath - A pointer to the remaining portion of a device path.
+
+ @return EFI_SUCCESS - Driver is started successfully
+
+**/
EFI_STATUS
EFIAPI
SerialControllerDriverStart (
@@ -272,23 +275,7 @@ SerialControllerDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
- Routine Description:
-
- Start to management the controller passed in
-
- Arguments:
-
- This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- Controller - The handle of the controller to test.
- RemainingDevicePath - A pointer to the remaining portion of a device path.
- Returns:
-
- EFI_SUCCESS - Driver is started successfully
-
---*/
{
EFI_STATUS Status;
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -527,6 +514,18 @@ Error: return Status;
}
+/**
+ Disconnect this driver with the controller, uninstall related protocol instance
+
+ @param This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
+ @param Controller - The handle of the controller to test.
+ @param NumberOfChildren - Number of child device.
+ @param RemainingDevicePath - A pointer to the remaining portion of a device path.
+
+ @retval EFI_SUCCESS - Operation successfully
+ @retval EFI_DEVICE_ERROR - Cannot stop the driver successfully
+
+**/
EFI_STATUS
EFIAPI
SerialControllerDriverStop (
@@ -535,25 +534,7 @@ SerialControllerDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
- Routine Description:
-
- Disconnect this driver with the controller, uninstall related protocol instance
-
- Arguments:
-
- This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- Controller - The handle of the controller to test.
- NumberOfChildren - Number of child device.
- RemainingDevicePath - A pointer to the remaining portion of a device path.
-
- Returns:
- EFI_SUCCESS - Operation successfully
- EFI_DEVICE_ERROR - Cannot stop the driver successfully
-
---*/
{
EFI_STATUS Status;
UINTN Index;
@@ -664,26 +645,19 @@ SerialControllerDriverStop ( return EFI_SUCCESS;
}
+/**
+ Detect whether specific FIFO is full or not
+
+ @param Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
+
+ @return whether specific FIFO is full or not
+
+**/
BOOLEAN
IsaSerialFifoFull (
IN SERIAL_DEV_FIFO *Fifo
)
-/*++
- Routine Description:
-
- Detect whether specific FIFO is full or not
-
- Arguments:
-
- Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
-
- Returns:
-
- TRUE - the FIFO is full
- FALSE - the FIFO is not full
-
---*/
{
if (Fifo->Surplus == 0) {
return TRUE;
@@ -692,26 +666,20 @@ IsaSerialFifoFull ( return FALSE;
}
+/**
+ Detect whether specific FIFO is empty or not
+
+
+ @param Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
+
+ @return whether specific FIFO is empty or not
+
+**/
BOOLEAN
IsaSerialFifoEmpty (
IN SERIAL_DEV_FIFO *Fifo
)
-/*++
-
- Routine Description:
- Detect whether specific FIFO is empty or not
-
- Arguments:
-
- Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
-
- Returns:
-
- TRUE - the FIFO is empty
- FALSE - the FIFO is not empty
-
---*/
{
if (Fifo->Surplus == SERIAL_MAX_BUFFER_SIZE) {
return TRUE;
@@ -720,28 +688,22 @@ IsaSerialFifoEmpty ( return FALSE;
}
+/**
+ Add data to specific FIFO
+
+ @param Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
+ @param Data - the data added to FIFO
+
+ @retval EFI_SUCCESS - Add data to specific FIFO successfully
+ @retval EFI_OUT_OF_RESOURCE - Failed to add data because FIFO is already full
+
+**/
EFI_STATUS
IsaSerialFifoAdd (
IN SERIAL_DEV_FIFO *Fifo,
IN UINT8 Data
)
-/*++
-
- Routine Description:
-
- Add data to specific FIFO
-
- Arguments:
- Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
- Data - the data added to FIFO
-
- Returns:
-
- EFI_SUCCESS - Add data to specific FIFO successfully
- EFI_OUT_OF_RESOURCE - Failed to add data because FIFO is already full
-
---*/
{
//
// if FIFO full can not add data
@@ -762,27 +724,22 @@ IsaSerialFifoAdd ( return EFI_SUCCESS;
}
+/**
+ Remove data from specific FIFO
+
+ @param Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
+ @param Data - the data removed from FIFO
+
+ @retval EFI_SUCCESS - Remove data from specific FIFO successfully
+ @retval EFI_OUT_OF_RESOURCE - Failed to remove data because FIFO is empty
+
+**/
EFI_STATUS
IsaSerialFifoRemove (
IN SERIAL_DEV_FIFO *Fifo,
OUT UINT8 *Data
)
-/*++
-
- Routine Description:
-
- Remove data from specific FIFO
-
- Arguments:
-
- Fifo - A pointer to the Data Structure SERIAL_DEV_FIFO
- Data - the data removed from FIFO
- Returns:
- EFI_SUCCESS - Remove data from specific FIFO successfully
- EFI_OUT_OF_RESOURCE - Failed to remove data because FIFO is empty
-
---*/
{
//
// if FIFO is empty, no data can remove
@@ -803,27 +760,21 @@ IsaSerialFifoRemove ( return EFI_SUCCESS;
}
+/**
+ Reads and writes all avaliable data.
+
+ @param SerialDevice - The device to flush
+
+ @retval EFI_SUCCESS - Data was read/written successfully.
+ @retval EFI_OUT_OF_RESOURCE - Failed because software receive FIFO is full. Note, when
+ this happens, pending writes are not done.
+
+**/
EFI_STATUS
IsaSerialReceiveTransmit (
IN SERIAL_DEV *SerialDevice
)
-/*++
-
- Routine Description:
-
- Reads and writes all avaliable data.
-
- Arguments:
-
- SerialDevice - The device to flush
-
- Returns:
-
- EFI_SUCCESS - Data was read/written successfully.
- EFI_OUT_OF_RESOURCE - Failed because software receive FIFO is full. Note, when
- this happens, pending writes are not done.
---*/
{
SERIAL_PORT_LSR Lsr;
UINT8 Data;
@@ -968,30 +919,24 @@ IsaSerialReceiveTransmit ( return EFI_SUCCESS;
}
+
//
// Interface Functions
//
+/**
+ Reset serial device
+
+ @param This - Pointer to EFI_SERIAL_IO_PROTOCOL
+
+ @retval EFI_SUCCESS - Reset successfully
+ @retval EFI_DEVICE_ERROR - Failed to reset
+
+**/
EFI_STATUS
EFIAPI
IsaSerialReset (
IN EFI_SERIAL_IO_PROTOCOL *This
)
-/*++
-
- Routine Description:
-
- Reset serial device
-
- Arguments:
-
- This - Pointer to EFI_SERIAL_IO_PROTOCOL
-
- Returns:
-
- EFI_SUCCESS - Reset successfully
- EFI_DEVICE_ERROR - Failed to reset
-
---*/
{
EFI_STATUS Status;
SERIAL_DEV *SerialDevice;
@@ -1106,6 +1051,23 @@ IsaSerialReset ( return EFI_SUCCESS;
}
+/**
+ Set new attributes to a serial device
+
+ @param This - Pointer to EFI_SERIAL_IO_PROTOCOL
+ @param BaudRate - The baudrate of the serial device
+ @param ReceiveFifoDepth - The depth of receive FIFO buffer
+ @param Timeout - The request timeout for a single char
+ @param Parity - The type of parity used in serial device
+ @param DataBits - Number of databits used in serial device
+ @param StopBits - Number of stopbits used in serial device
+
+ @retval EFI_SUCCESS - The new attributes were set
+ @retval EFI_INVALID_PARAMETERS - One or more attributes have an unsupported value
+ @retval EFI_UNSUPPORTED - Data Bits can not set to 5 or 6
+ @retval EFI_DEVICE_ERROR - The serial device is not functioning correctly (no return)
+
+**/
EFI_STATUS
EFIAPI
IsaSerialSetAttributes (
@@ -1117,30 +1079,6 @@ IsaSerialSetAttributes ( IN UINT8 DataBits,
IN EFI_STOP_BITS_TYPE StopBits
)
-/*++
-
- Routine Description:
-
- Set new attributes to a serial device
-
- Arguments:
-
- This - Pointer to EFI_SERIAL_IO_PROTOCOL
- BaudRate - The baudrate of the serial device
- ReceiveFifoDepth - The depth of receive FIFO buffer
- Timeout - The request timeout for a single char
- Parity - The type of parity used in serial device
- DataBits - Number of databits used in serial device
- StopBits - Number of stopbits used in serial device
-
- Returns:
-
- EFI_SUCCESS - The new attributes were set
- EFI_INVALID_PARAMETERS - One or more attributes have an unsupported value
- EFI_UNSUPPORTED - Data Bits can not set to 5 or 6
- EFI_DEVICE_ERROR - The serial device is not functioning correctly (no return)
-
---*/
{
EFI_STATUS Status;
SERIAL_DEV *SerialDevice;
@@ -1424,29 +1362,22 @@ IsaSerialSetAttributes ( return EFI_SUCCESS;
}
+/**
+ Set Control Bits
+
+ @param This - Pointer to EFI_SERIAL_IO_PROTOCOL
+ @param Control - Control bits that can be settable
+
+ @retval EFI_SUCCESS - New Control bits were set successfully
+ @retval EFI_UNSUPPORTED - The Control bits wanted to set are not supported
+
+**/
EFI_STATUS
EFIAPI
IsaSerialSetControl (
IN EFI_SERIAL_IO_PROTOCOL *This,
IN UINT32 Control
)
-/*++
-
- Routine Description:
-
- Set Control Bits
-
- Arguments:
-
- This - Pointer to EFI_SERIAL_IO_PROTOCOL
- Control - Control bits that can be settable
-
- Returns:
-
- EFI_SUCCESS - New Control bits were set successfully
- EFI_UNSUPPORTED - The Control bits wanted to set are not supported
-
---*/
{
SERIAL_DEV *SerialDevice;
SERIAL_PORT_MCR Mcr;
@@ -1504,28 +1435,21 @@ IsaSerialSetControl ( return EFI_SUCCESS;
}
+/**
+ Get ControlBits
+
+ @param This - Pointer to EFI_SERIAL_IO_PROTOCOL
+ @param Control - Control signals of the serial device
+
+ @retval EFI_SUCCESS - Get Control signals successfully
+
+**/
EFI_STATUS
EFIAPI
IsaSerialGetControl (
IN EFI_SERIAL_IO_PROTOCOL *This,
OUT UINT32 *Control
)
-/*++
-
- Routine Description:
-
- Get ControlBits
-
- Arguments:
-
- This - Pointer to EFI_SERIAL_IO_PROTOCOL
- Control - Control signals of the serial device
-
- Returns:
-
- EFI_SUCCESS - Get Control signals successfully
-
---*/
{
SERIAL_DEV *SerialDevice;
SERIAL_PORT_MSR Msr;
@@ -1604,6 +1528,19 @@ IsaSerialGetControl ( return EFI_SUCCESS;
}
+/**
+ Write the specified number of bytes to serial device
+
+ @param This - Pointer to EFI_SERIAL_IO_PROTOCOL
+ @param BufferSize - On input the size of Buffer, on output the amount of
+ data actually written
+ @param Buffer - The buffer of data to write
+
+ @retval EFI_SUCCESS - The data were written successfully
+ @retval EFI_DEVICE_ERROR - The device reported an error
+ @retval EFI_TIMEOUT - The write operation was stopped due to timeout
+
+**/
EFI_STATUS
EFIAPI
IsaSerialWrite (
@@ -1611,26 +1548,6 @@ IsaSerialWrite ( IN OUT UINTN *BufferSize,
IN VOID *Buffer
)
-/*++
-
- Routine Description:
-
- Write the specified number of bytes to serial device
-
- Arguments:
-
- This - Pointer to EFI_SERIAL_IO_PROTOCOL
- BufferSize - On input the size of Buffer, on output the amount of
- data actually written
- Buffer - The buffer of data to write
-
- Returns:
-
- EFI_SUCCESS - The data were written successfully
- EFI_DEVICE_ERROR - The device reported an error
- EFI_TIMEOUT - The write operation was stopped due to timeout
-
---*/
{
SERIAL_DEV *SerialDevice;
UINT8 *CharBuffer;
@@ -1692,6 +1609,19 @@ IsaSerialWrite ( return EFI_SUCCESS;
}
+/**
+ Read the specified number of bytes from serial device
+
+ @param This - Pointer to EFI_SERIAL_IO_PROTOCOL
+ @param BufferSize - On input the size of Buffer, on output the amount of
+ data returned in buffer
+ @param Buffer - The buffer to return the data into
+
+ @retval EFI_SUCCESS - The data were read successfully
+ @retval EFI_DEVICE_ERROR - The device reported an error
+ @retval EFI_TIMEOUT - The read operation was stopped due to timeout
+
+**/
EFI_STATUS
EFIAPI
IsaSerialRead (
@@ -1699,26 +1629,6 @@ IsaSerialRead ( IN OUT UINTN *BufferSize,
OUT VOID *Buffer
)
-/*++
-
- Routine Description:
-
- Read the specified number of bytes from serial device
-
- Arguments:
-
- This - Pointer to EFI_SERIAL_IO_PROTOCOL
- BufferSize - On input the size of Buffer, on output the amount of
- data returned in buffer
- Buffer - The buffer to return the data into
-
- Returns:
-
- EFI_SUCCESS - The data were read successfully
- EFI_DEVICE_ERROR - The device reported an error
- EFI_TIMEOUT - The read operation was stopped due to timeout
-
---*/
{
SERIAL_DEV *SerialDevice;
UINT32 Index;
@@ -1793,26 +1703,18 @@ IsaSerialRead ( return EFI_SUCCESS;
}
+/**
+ Use scratchpad register to test if this serial port is present
+
+ @param SerialDevice - Pointer to serial device structure
+
+ @return if this serial port is present
+**/
BOOLEAN
IsaSerialPortPresent (
IN SERIAL_DEV *SerialDevice
)
-/*++
-
- Routine Description:
-
- Use scratchpad register to test if this serial port is present
-
- Arguments:
-
- SerialDevice - Pointer to serial device structure
-
- Returns:
- TRUE - The serial port is present
- FALSE - The serial port is NOT present
-
---*/
{
UINT8 Temp;
BOOLEAN Status;
@@ -1845,29 +1747,22 @@ IsaSerialPortPresent ( return Status;
}
+/**
+ Use IsaIo protocol to read serial port
+
+ @param IsaIo - Pointer to EFI_ISA_IO_PROTOCOL instance
+ @param BaseAddress - Serial port register group base address
+ @param Offset - Offset in register group
+
+ @return Data read from serial port
+
+**/
UINT8
IsaSerialReadPort (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT16 BaseAddress,
IN UINT32 Offset
)
-/*++
-
- Routine Description:
-
- Use IsaIo protocol to read serial port
-
- Arguments:
-
- IsaIo - Pointer to EFI_ISA_IO_PROTOCOL instance
- BaseAddress - Serial port register group base address
- Offset - Offset in register group
-
- Returns:
-
- Data read from serial port
-
---*/
{
UINT8 Data;
@@ -1884,6 +1779,15 @@ IsaSerialReadPort ( return Data;
}
+/**
+ Use IsaIo protocol to write serial port
+
+ @param IsaIo - Pointer to EFI_ISA_IO_PROTOCOL instance
+ @param BaseAddress - Serial port register group base address
+ @param Offset - Offset in register group
+ @param Data - data which is to be written to some serial port register
+
+**/
VOID
IsaSerialWritePort (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
@@ -1891,24 +1795,6 @@ IsaSerialWritePort ( IN UINT32 Offset,
IN UINT8 Data
)
-/*++
-
- Routine Description:
-
- Use IsaIo protocol to write serial port
-
- Arguments:
-
- IsaIo - Pointer to EFI_ISA_IO_PROTOCOL instance
- BaseAddress - Serial port register group base address
- Offset - Offset in register group
- Data - data which is to be written to some serial port register
-
- Returns:
-
- None
-
---*/
{
//
// Use IsaIo to access IO
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c index 26e40d6bea..6ca9ece4c1 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c @@ -635,26 +635,20 @@ ConvertKeyboardScanCodeToEfiKey[] = { //
STATIC UINTN mWaitForValueTimeOut = KEYBOARD_WAITFORVALUE_TIMEOUT;
+/**
+ Read data register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return return the value
+
+**/
STATIC
UINT8
KeyReadDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
UINT8 Data;
@@ -675,28 +669,20 @@ Returns: return Data;
}
+/**
+ Write data register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data value wanted to be written
+
+**/
STATIC
VOID
KeyWriteDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -718,25 +704,18 @@ Returns: //
}
+/**
+ Read status register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return value in status register
+
+**/
UINT8
KeyReadStatusRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
UINT8 Data;
@@ -758,28 +737,20 @@ Returns: }
+/**
+ Write command register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data The value wanted to be written
+
+**/
+
STATIC
VOID
KeyWriteCommandRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -798,25 +769,19 @@ Returns: }
+/**
+ Display error message
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param ErrMsg Unicode string of error message
+
+**/
STATIC
VOID
KeyboardError (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN CHAR16 *ErrMsg
)
-/*++
-
-Routine Description:
-
- Display error message
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
-// GC_TODO: ErrMsg - add argument and description to function comment
{
ConsoleIn->KeyboardErr = TRUE;
@@ -826,30 +791,24 @@ Returns: //
}
-VOID
-EFIAPI
-KeyboardTimerHandler (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-
-Routine Description:
-
+/**
Timer event handler: read a series of scancodes from 8042
and put them into memory scancode buffer.
it read as much scancodes to either fill
the memory buffer or empty the keyboard buffer.
It is registered as running under TPL_NOTIFY
-Arguments:
-
- Event - The timer event
- Context - A KEYBOARD_CONSOLE_IN_DEV pointer
+ @param Event - The timer event
+ @param Context - A KEYBOARD_CONSOLE_IN_DEV pointer
-Returns:
+**/
+VOID
+EFIAPI
+KeyboardTimerHandler (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
---*/
{
UINT8 Data;
EFI_TPL OldTpl;
@@ -942,6 +901,17 @@ Returns: return ;
}
+/**
+ Read several bytes from the scancode buffer without removing them.
+ This function is called to see if there are enough bytes of scancode
+ representing a single key.
+
+ @param Count - Number of bytes to be read
+ @param Buf - Store the results
+
+ @retval EFI_SUCCESS success to scan the keyboard code
+ @retval EFI_NOT_READY invalid parameter
+**/
STATIC
EFI_STATUS
GetScancodeBufHead (
@@ -949,27 +919,6 @@ GetScancodeBufHead ( IN UINT32 Count,
OUT UINT8 *Buf
)
-/*++
-
-Routine Description:
-
- Read several bytes from the scancode buffer without removing them.
- This function is called to see if there are enough bytes of scancode
- representing a single key.
-
-Arguments:
-
- Count - Number of bytes to be read
- Buf - Store the results
-
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
-// GC_TODO: EFI_NOT_READY - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
UINT32 Index;
UINT32 Pos;
@@ -1005,6 +954,17 @@ Returns: return EFI_SUCCESS;
}
+/**
+
+ Read & remove several bytes from the scancode buffer.
+ This function is usually called after GetScancodeBufHead()
+
+ @param Count - Number of bytes to be read
+ @param Buf - Store the results
+
+ @retval EFI_SUCCESS success to scan the keyboard code
+ @retval EFI_NOT_READY invalid parameter
+**/
STATIC
EFI_STATUS
PopScancodeBufHead (
@@ -1012,26 +972,6 @@ PopScancodeBufHead ( IN UINT32 Count,
OUT UINT8 *Buf
)
-/*++
-
-Routine Description:
-
- Read & remove several bytes from the scancode buffer.
- This function is usually called after GetScancodeBufHead()
-
-Arguments:
-
- Count - Number of bytes to be read
- Buf - Store the results
-
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
-// GC_TODO: EFI_NOT_READY - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
UINT32 Index;
@@ -1068,28 +1008,22 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Read key value
+
+ @param ConsoleIn - Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data - Pointer to outof buffer for keeping key value
+
+ @retval EFI_TIMEOUT Status resigter time out
+ @retval EFI_SUCCESS Success to read keyboard
+
+**/
EFI_STATUS
KeyboardRead (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
OUT UINT8 *Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINT32 TimeOut;
UINT32 RegFilled;
@@ -1117,29 +1051,22 @@ Returns: return EFI_SUCCESS;
}
+/**
+ write key to keyboard
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data value wanted to be written
+
+ @retval EFI_TIMEOUT - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+
+**/
STATIC
EFI_STATUS
KeyboardWrite (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINT32 TimeOut;
UINT32 RegEmptied;
@@ -1170,30 +1097,22 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Issue keyboard command
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data The buff holding the command
+
+ @retval EFI_TIMEOUT Keyboard is not ready to issuing
+ @retval EFI_SUCCESS Success to issue keyboard command
+
+**/
STATIC
EFI_STATUS
KeyboardCommand (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINT32 TimeOut;
UINT32 RegEmptied;
@@ -1241,32 +1160,24 @@ Returns: return EFI_SUCCESS;
}
+/**
+ wait for a specific value to be presented on
+ 8042 Data register by keyboard and then read it,
+ used in keyboard commands ack
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Value the value wanted to be waited.
+
+ @retval EFI_TIMEOUT Fail to get specific value in given time
+ @retval EFI_SUCCESS Success to get specific value in given time.
+
+**/
STATIC
EFI_STATUS
KeyboardWaitForValue (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Value
)
-/*++
-
-Routine Description:
-
- wait for a specific value to be presented on
- 8042 Data register by keyboard and then read it,
- used in keyboard commands ack
-
-Arguments:
-
- ConsoleIn - The KEYBOARD_CONSOLE_IN_DEV instance pointer
- Value - The value to be waited for
-
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: EFI_SUCCESS - add return value to function comment
-// GC_TODO: EFI_TIMEOUT - add return value to function comment
{
UINT8 Data;
UINT32 TimeOut;
@@ -1324,23 +1235,19 @@ Returns: }
-EFI_STATUS
-UpdateStatusLights (
- IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
- )
-/*++
-
-Routine Description:
-
+/**
Show keyboard status lights according to
indicators in ConsoleIn.
-Arguments:
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return status
-Returns:
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
+**/
+EFI_STATUS
+UpdateStatusLights (
+ IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
+ )
{
EFI_STATUS Status;
UINT8 Command;
@@ -1381,28 +1288,21 @@ Returns: return Status;
}
-EFI_STATUS
-KeyGetchar (
- IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
- )
-/*++
-
-Routine Description:
-
+/**
Get scancode from scancode buffer
and translate into EFI-scancode and unicode defined by EFI spec
The function is always called in TPL_NOTIFY
-Arguments:
-
- ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
+ @param ConsoleIn KEYBOARD_CONSOLE_IN_DEV instance pointer
-Returns:
+ @retval EFI_NOT_READY - Input from console not ready yet.
+ @retval EFI_SUCCESS - Function executed successfully.
- EFI_NOT_READY - Input from console not ready yet.
- EFI_SUCCESS - Function executed successfully.
-
---*/
+**/
+EFI_STATUS
+KeyGetchar (
+ IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
+ )
{
EFI_STATUS Status;
UINT8 ScanCode;
@@ -1740,32 +1640,22 @@ Returns: return EFI_SUCCESS;
}
-EFI_STATUS
-InitKeyboard (
- IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
- IN BOOLEAN ExtendedVerification
- )
-/*++
-
-Routine Description:
-
+/**
Perform 8042 controller and keyboard Initialization
If ExtendedVerification is TRUE, do additional test for
the keyboard interface
-Arguments:
-
- ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
- ExtendedVerification - indicates a thorough initialization
+ @param ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
+ @param ExtendedVerification - indicates a thorough initialization
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
+ @retval EFI_DEVICE_ERROR Fail to init keyboard
+ @retval EFI_SUCCESS Success to init keyboard
+**/
+EFI_STATUS
+InitKeyboard (
+ IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
+ IN BOOLEAN ExtendedVerification
+ )
{
EFI_STATUS Status;
EFI_STATUS Status1;
@@ -2086,26 +1976,18 @@ Done: }
-EFI_STATUS
-DisableKeyboard (
- IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
- )
-/*++
-
-Routine Description:
-
+/**
Disable the keyboard interface of the 8042 controller
-Arguments:
-
- ConsoleIn - the device instance
-
-Returns:
+ @param ConsoleIn - the device instance
- EFI_STATUS
+ @return status of issuing disable command
---*/
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
+**/
+EFI_STATUS
+DisableKeyboard (
+ IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
+ )
{
EFI_STATUS Status;
@@ -2170,3 +2052,4 @@ CheckKeyboardConnect ( return TRUE;
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c index 71cf8eed03..17bbcc3136 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c @@ -45,54 +45,48 @@ KeyboardCheckForKey ( IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This
);
+/**
+ @param RegsiteredData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was registered.
+ @param InputData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
+
+ @retval TRUE - Key be pressed matches a registered key.
+ @retval FALSE - Match failed.
+
+**/
STATIC
BOOLEAN
IsKeyRegistered (
IN EFI_KEY_DATA *RegsiteredData,
IN EFI_KEY_DATA *InputData
)
-/*++
-
-Routine Description:
+;
-Arguments:
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
- RegsiteredData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was registered.
- InputData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was pressed.
+
+ @param ConsoleInDev - Ps2 Keyboard private structure
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
-Returns:
- TRUE - Key be pressed matches a registered key.
- FLASE - Match failed.
---*/
-;
+ @retval EFI_SUCCESS - The keystroke information was returned.
+ @retval EFI_NOT_READY - There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ hardware errors.
+ @retval EFI_INVALID_PARAMETER - KeyData is NULL.
+
+**/
STATIC
EFI_STATUS
KeyboardReadKeyStrokeWorker (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev,
OUT EFI_KEY_DATA *KeyData
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
-
- Arguments:
- ConsoleInDev - Ps2 Keyboard private structure
- KeyData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was pressed.
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
- hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
---*/
{
EFI_STATUS Status;
EFI_TPL OldTpl;
@@ -161,29 +155,23 @@ KeyboardReadKeyStrokeWorker ( return EFI_SUCCESS;
}
+/**
+ logic reset keyboard
+ Implement SIMPLE_TEXT_IN.Reset()
+ Perform 8042 controller and keyboard initialization
+
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param ExtendedVerification Indicate that the driver may perform a more
+ exhaustive verification operation of the device during
+ reset, now this par is ignored in this driver
+
+**/
EFI_STATUS
EFIAPI
KeyboardEfiReset (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- Implement SIMPLE_TEXT_IN.Reset()
- Perform 8042 controller and keyboard initialization
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: ExtendedVerification - add argument and description to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -251,29 +239,21 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Implement SIMPLE_TEXT_IN.ReadKeyStroke().
+ Retrieve key values for driver user.
+
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param Key The output buffer for key value
+
+ @retval EFI_SUCCESS success to read key stroke
+**/
EFI_STATUS
EFIAPI
KeyboardReadKeyStroke (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
OUT EFI_INPUT_KEY *Key
)
-/*++
-
-Routine Description:
-
- Implement SIMPLE_TEXT_IN.ReadKeyStroke().
- Retrieve key values for driver user.
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Key - add argument and description to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_NOT_READY - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -290,26 +270,20 @@ Returns: }
+/**
+ Event notification function for SIMPLE_TEXT_IN.WaitForKey event
+ Signal the event if there is key available
+
+ @param Event the event object
+ @param Context waitting context
+
+**/
VOID
EFIAPI
KeyboardWaitForKey (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- Event notification function for SIMPLE_TEXT_IN.WaitForKey event
- Signal the event if there is key available
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: Event - add argument and description to function comment
-// GC_TODO: Context - add argument and description to function comment
{
EFI_TPL OldTpl;
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -343,25 +317,17 @@ Returns: return ;
}
+/**
+ Check keyboard for given key value
+
+ @param This Point to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+
+ @retval EFI_SUCCESS success check keyboard value
+**/
EFI_STATUS
KeyboardCheckForKey (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -377,28 +343,25 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Judge whether is a registed key
+
+ @param RegsiteredData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was registered.
+ @param InputData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
+
+ @retval TRUE - Key be pressed matches a registered key.
+ @retval FLASE - Match failed.
+
+**/
STATIC
BOOLEAN
IsKeyRegistered (
IN EFI_KEY_DATA *RegsiteredData,
IN EFI_KEY_DATA *InputData
)
-/*++
-
-Routine Description:
-
-Arguments:
-
- RegsiteredData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was registered.
- InputData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was pressed.
-Returns:
- TRUE - Key be pressed matches a registered key.
- FLASE - Match failed.
-
---*/
{
ASSERT (RegsiteredData != NULL && InputData != NULL);
@@ -423,24 +386,21 @@ Returns: }
+/**
+ Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
+ Signal the event if there is key available
+
+ @param Event event object
+ @param Context waiting context
+
+**/
VOID
EFIAPI
KeyboardWaitForKeyEx (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
- Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
- Signal the event if there is key available
-
-Arguments:
-
-Returns:
-
---*/
{
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -449,27 +409,24 @@ Returns: }
+/**
+ Reset the input device and optionaly run diagnostics
+
+ @param This - Protocol instance pointer.
+ @param ExtendedVerification - Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS - The device was reset.
+ @retval EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+**/
EFI_STATUS
EFIAPI
KeyboardEfiResetEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description:
- Reset the input device and optionaly run diagnostics
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -498,31 +455,29 @@ KeyboardEfiResetEx ( return EFI_SUCCESS;
}
-EFI_STATUS
-EFIAPI
-KeyboardReadKeyStrokeEx (
- IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- OUT EFI_KEY_DATA *KeyData
- )
-/*++
-
- Routine Description:
+/**
Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call.
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
+
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ @retval EFI_SUCCESS - The keystroke information was returned.
+ @retval EFI_NOT_READY - There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
+ @retval EFI_INVALID_PARAMETER - KeyData is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+KeyboardReadKeyStrokeEx (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ OUT EFI_KEY_DATA *KeyData
+ )
---*/
{
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -535,30 +490,27 @@ KeyboardReadKeyStrokeEx ( }
+/**
+ Set certain state for the input device.
+
+ @param This - Protocol instance pointer.
+ @param KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ state for the input device.
+
+ @retval EFI_SUCCESS - The device state was set successfully.
+ @retval EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not have the setting adjusted.
+ @retval EFI_UNSUPPORTED - The device does not have the ability to set its state.
+ @retval EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+
+**/
EFI_STATUS
EFIAPI
KeyboardSetState (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
)
-/*++
- Routine Description:
- Set certain state for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
- state for the input device.
-
- Returns:
- EFI_SUCCESS - The device state was set successfully.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
- not have the setting adjusted.
- EFI_UNSUPPORTED - The device does not have the ability to set its state.
- EFI_INVALID_PARAMETER - KeyToggleState is NULL.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -619,6 +571,22 @@ Exit: return Status;
}
+
+/**
+ Register a notification function for a particular keystroke for the input device.
+
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ information data for the key that was pressed.
+ @param KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ @param NotifyHandle - Points to the unique handle assigned to the registered notification.
+
+ @retval EFI_SUCCESS - The notification function was registered successfully.
+ @retval EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
+ @retval EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+**/
EFI_STATUS
EFIAPI
KeyboardRegisterKeyNotify (
@@ -627,25 +595,6 @@ KeyboardRegisterKeyNotify ( IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
)
-/*++
-
- Routine Description:
- Register a notification function for a particular keystroke for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
- information data for the key that was pressed.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
-
- Returns:
- EFI_SUCCESS - The notification function was registered successfully.
- EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -720,27 +669,24 @@ Exit: }
+/**
+ Remove a registered notification function from a particular keystroke.
+
+ @param This - Protocol instance pointer.
+ @param NotificationHandle - The handle of the notification function being unregistered.
+
+
+ @retval EFI_SUCCESS - The notification function was unregistered successfully.
+ @retval EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
+ @retval EFI_NOT_FOUND - Can not find the matching entry in database.
+
+**/
EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
)
-/*++
-
- Routine Description:
- Remove a registered notification function from a particular keystroke.
-
- Arguments:
- This - Protocol instance pointer.
- NotificationHandle - The handle of the notification function being unregistered.
-
- Returns:
- EFI_SUCCESS - The notification function was unregistered successfully.
- EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c index 359d031ad2..0d4a87db91 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c @@ -62,6 +62,16 @@ EFI_DRIVER_BINDING_PROTOCOL gKeyboardControllerDriver = { NULL
};
+/**
+ Test controller is a keyboard Controller
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver's controller
+ @param RemainingDevicePath children device path
+
+ @retval EFI_UNSUPPORTED controller is not floppy disk
+ @retval EFI_SUCCESS controller is floppy disk
+**/
EFI_STATUS
EFIAPI
KbdControllerDriverSupported (
@@ -69,20 +79,6 @@ KbdControllerDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
- ControllerDriver Protocol Method
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: RemainingDevicePath - add argument and description to function comment
{
EFI_STATUS Status;
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -120,6 +116,15 @@ Returns: return Status;
}
+/**
+ Create KEYBOARD_CONSOLE_IN_DEV instance on controller.
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver controller handle
+ @param RemainingDevicePath Children's device path
+
+ @retval whether success to create floppy control instance.
+**/
EFI_STATUS
EFIAPI
KbdControllerDriverStart (
@@ -127,19 +132,6 @@ KbdControllerDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: RemainingDevicePath - add argument and description to function comment
-// GC_TODO: EFI_INVALID_PARAMETER - add return value to function comment
{
EFI_STATUS Status;
EFI_STATUS Status1;
@@ -388,6 +380,20 @@ ErrorExit: return Status;
}
+/**
+ Stop this driver on ControllerHandle. Support stoping any child handles
+ created by this driver.
+
+ @param This Protocol instance pointer.
+ @param ControllerHandle Handle of device to stop driver on
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
+ children is zero stop the entire bus driver.
+ @param ChildHandleBuffer List of Child Handles to Stop.
+
+ @retval EFI_SUCCESS This driver is removed ControllerHandle
+ @retval other This driver was not removed from this device
+
+**/
EFI_STATUS
EFIAPI
KbdControllerDriverStop (
@@ -396,20 +402,6 @@ KbdControllerDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
- Routine Description:
-
- Arguments:
-
- Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: NumberOfChildren - add argument and description to function comment
-// GC_TODO: ChildHandleBuffer - add argument and description to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
@@ -517,25 +509,16 @@ KbdControllerDriverStop ( return EFI_SUCCESS;
}
+/**
+ Free the waiting key notify list.
+
+ @param ListHead Pointer to list head
+**/
STATIC
EFI_STATUS
KbdFreeNotifyList (
IN OUT LIST_ENTRY *ListHead
)
-/*++
-
-Routine Description:
-
-Arguments:
-
- ListHead - The list head
-
-Returns:
-
- EFI_SUCCESS - Free the notify list successfully
- EFI_INVALID_PARAMETER - ListHead is invalid.
-
---*/
{
KEYBOARD_CONSOLE_IN_EX_NOTIFY *NotifyNode;
@@ -591,3 +574,4 @@ InitializePs2Keyboard( return Status;
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h index 1eb2c5491c..7953b2bc74 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h @@ -131,28 +131,22 @@ extern EFI_GUID gSimpleTextInExNotifyGuid; //
// Driver entry point
//
+/**
+ The user Entry Point for module Ps2Keyboard. The user code starts with this function.
+
+ @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.
+
+**/
EFI_STATUS
EFIAPI
InstallPs2KeyboardDriver (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ImageHandle - GC_TODO: add argument description
- SystemTable - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
#define KEYBOARD_8042_DATA_REGISTER 0x60
@@ -191,233 +185,170 @@ Returns: //
// Other functions that are used among .c files
//
+/**
+ Show keyboard status lights according to
+ indicators in ConsoleIn.
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return status
+**/
EFI_STATUS
UpdateStatusLights (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- Show keyboard status light for ScrollLock, NumLock and CapsLock
- according to indicators in ConsoleIn.
-
-Arguments:
-
- ConsoleIn - driver private structure
+;
-Returns:
+/**
+ write key to keyboard
- EFI_SUCCESS - Show the status light successfully.
- EFI_TIMEOUT - Timeout when operating read/write on registers.
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data value wanted to be written
---*/
-;
+ @retval EFI_TIMEOUT - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+**/
EFI_STATUS
KeyboardRead (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
OUT UINT8 *Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
+;
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
+/**
+ Get scancode from scancode buffer
+ and translate into EFI-scancode and unicode defined by EFI spec
+ The function is always called in TPL_NOTIFY
-Returns:
+ @param ConsoleIn KEYBOARD_CONSOLE_IN_DEV instance pointer
- GC_TODO: add return values
-
---*/
-;
+ @retval EFI_NOT_READY - Input from console not ready yet.
+ @retval EFI_SUCCESS - Function executed successfully.
+**/
EFI_STATUS
KeyGetchar (
IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Perform 8042 controller and keyboard Initialization
+ If ExtendedVerification is TRUE, do additional test for
+ the keyboard interface
---*/
-;
+ @param ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
+ @param ExtendedVerification - indicates a thorough initialization
+ @retval EFI_DEVICE_ERROR Fail to init keyboard
+ @retval EFI_SUCCESS Success to init keyboard
+**/
EFI_STATUS
InitKeyboard (
IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- ExtendedVerification - GC_TODO: add argument description
+;
-Returns:
+/**
+ Disable the keyboard interface of the 8042 controller
- GC_TODO: add return values
+ @param ConsoleIn - the device instance
---*/
-;
+ @return status of issuing disable command
+**/
EFI_STATUS
DisableKeyboard (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Timer event handler: read a series of scancodes from 8042
+ and put them into memory scancode buffer.
+ it read as much scancodes to either fill
+ the memory buffer or empty the keyboard buffer.
+ It is registered as running under TPL_NOTIFY
---*/
-;
+ @param Event - The timer event
+ @param Context - A KEYBOARD_CONSOLE_IN_DEV pointer
+**/
VOID
EFIAPI
KeyboardTimerHandler (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- Event - GC_TODO: add argument description
- Context - GC_TODO: add argument description
+;
-Returns:
+/**
+ logic reset keyboard
+ Implement SIMPLE_TEXT_IN.Reset()
+ Perform 8042 controller and keyboard initialization
- GC_TODO: add return values
-
---*/
-;
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param ExtendedVerification Indicate that the driver may perform a more
+ exhaustive verification operation of the device during
+ reset, now this par is ignored in this driver
+**/
EFI_STATUS
EFIAPI
KeyboardEfiReset (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- ExtendedVerification - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Implement SIMPLE_TEXT_IN.ReadKeyStroke().
+ Retrieve key values for driver user.
---*/
-;
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param Key The output buffer for key value
+ @retval EFI_SUCCESS success to read key stroke
+**/
EFI_STATUS
EFIAPI
KeyboardReadKeyStroke (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
OUT EFI_INPUT_KEY *Key
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- Key - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Event notification function for SIMPLE_TEXT_IN.WaitForKey event
+ Signal the event if there is key available
---*/
-;
+ @param Event the event object
+ @param Context waitting context
+**/
VOID
EFIAPI
KeyboardWaitForKey (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- Event - GC_TODO: add argument description
- Context - GC_TODO: add argument description
+;
-Returns:
+/**
+ Read status register
- GC_TODO: add return values
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
---*/
-;
+ @return value in status register
+**/
UINT8
KeyReadStatusRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
/**
@@ -437,106 +368,106 @@ CheckKeyboardConnect ( )
;
+/**
+ Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
+ Signal the event if there is key available
+
+ @param Event event object
+ @param Context waiting context
+
+**/
VOID
EFIAPI
KeyboardWaitForKeyEx (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
- Signal the event if there is key available
-
-Arguments:
-
-Returns:
-
---*/
;
//
// Simple Text Input Ex protocol function prototypes
//
+/**
+ Reset the input device and optionaly run diagnostics
+
+ @param This - Protocol instance pointer.
+ @param ExtendedVerification - Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS - The device was reset.
+ @retval EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+**/
EFI_STATUS
EFIAPI
KeyboardEfiResetEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
+;
- Routine Description:
- Reset the input device and optionaly run diagnostics
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
---*/
-;
+ @retval EFI_SUCCESS - The keystroke information was returned.
+ @retval EFI_NOT_READY - There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ hardware errors.
+ @retval EFI_INVALID_PARAMETER - KeyData is NULL.
+**/
EFI_STATUS
EFIAPI
KeyboardReadKeyStrokeEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
OUT EFI_KEY_DATA *KeyData
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
+;
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was pressed.
+/**
+ Set certain state for the input device.
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
- hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
+ @param This - Protocol instance pointer.
+ @param KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ state for the input device.
---*/
-;
+ @retval EFI_SUCCESS - The device state was set successfully.
+ @retval EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not have the setting adjusted.
+ @retval EFI_UNSUPPORTED - The device does not have the ability to set its state.
+ @retval EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+**/
EFI_STATUS
EFIAPI
KeyboardSetState (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
)
-/*++
-
- Routine Description:
- Set certain state for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
- state for the input device.
-
- Returns:
- EFI_SUCCESS - The device state was set successfully.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
- not have the setting adjusted.
- EFI_UNSUPPORTED - The device does not have the ability to set its state.
- EFI_INVALID_PARAMETER - KeyToggleState is NULL.
-
---*/
;
+/**
+ Register a notification function for a particular keystroke for the input device.
+
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ information data for the key that was pressed.
+ @param KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ @param NotifyHandle - Points to the unique handle assigned to the registered notification.
+
+ @retval EFI_SUCCESS - The notification function was registered successfully.
+ @retval EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
+ @retval EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+**/
EFI_STATUS
EFIAPI
KeyboardRegisterKeyNotify (
@@ -545,48 +476,26 @@ KeyboardRegisterKeyNotify ( IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
)
-/*++
+;
- Routine Description:
- Register a notification function for a particular keystroke for the input device.
+/**
+ Remove a registered notification function from a particular keystroke.
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
- information data for the key that was pressed.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
+ @param This - Protocol instance pointer.
+ @param NotificationHandle - The handle of the notification function being unregistered.
- Returns:
- EFI_SUCCESS - The notification function was registered successfully.
- EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+ @retval EFI_SUCCESS - The notification function was unregistered successfully.
+ @retval EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
+ @retval EFI_NOT_FOUND - Can not find the matching entry in database.
---*/
-;
-
+**/
EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
)
-/*++
-
- Routine Description:
- Remove a registered notification function from a particular keystroke.
-
- Arguments:
- This - Protocol instance pointer.
- NotificationHandle - The handle of the notification function being unregistered.
-
- Returns:
- EFI_SUCCESS - The notification function was unregistered successfully.
- EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.c index 895c1c25a5..60614fb9e1 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.c @@ -19,26 +19,18 @@ UINT8 SampleRateTbl[MAX_SR] = { 0xa, 0x14, 0x28, 0x3c, 0x50, 0x64, 0xc8 }; UINT8 ResolutionTbl[MAX_CMR] = { 0, 1, 2, 3 };
+/**
+ Issue self test command via IsaIo interface.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return EFI_SUCCESS Success to do keyboard self testing.
+ @return others Fail to do keyboard self testing.
+**/
EFI_STATUS
KbcSelfTest (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
UINT8 Data;
@@ -88,25 +80,17 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Issue command to enable keyboard AUX functionality.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcEnableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
//
// Send 8042 enable mouse command
@@ -114,25 +98,17 @@ Returns: return Out8042Command (IsaIo, ENABLE_AUX);
}
+/**
+ Issue command to disable keyboard AUX functionality.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcDisableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
//
// Send 8042 disable mouse command
@@ -140,25 +116,17 @@ Returns: return Out8042Command (IsaIo, DISABLE_AUX);
}
+/**
+ Issue command to enable keyboard.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcEnableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
//
// Send 8042 enable keyboard command
@@ -166,25 +134,17 @@ Returns: return Out8042Command (IsaIo, ENABLE_KB);
}
+/**
+ Issue command to disable keyboard.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcDisableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
//
// Send 8042 disable keyboard command
@@ -192,27 +152,19 @@ Returns: return Out8042Command (IsaIo, DISABLE_KB);
}
+/**
+ Issue command to check keyboard status.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param KeyboardEnable return whether keyboard is enable.
+
+ @return Status of command issuing.
+**/
EFI_STATUS
CheckKbStatus (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
OUT BOOLEAN *KeyboardEnable
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- KeyboardEnable - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
UINT8 Data;
@@ -241,27 +193,17 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Issue command to reset keyboard.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseReset (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
UINT8 Data;
@@ -296,27 +238,19 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Issue command to set mouse's sample rate
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param SampleRate value of sample rate
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseSetSampleRate (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SR SampleRate
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- SampleRate - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_STATUS Status;
@@ -333,27 +267,19 @@ Returns: return Status;
}
+/**
+ Issue command to set mouse's resolution.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Resolution value of resolution
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseSetResolution (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_RE Resolution
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Resolution - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_STATUS Status;
@@ -370,27 +296,19 @@ Returns: return Status;
}
+/**
+ Issue command to set mouse's scaling.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Scaling value of scaling
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseSetScaling (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SF Scaling
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Scaling - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
UINT8 Command;
@@ -402,25 +320,17 @@ Returns: return Out8042AuxCommand (IsaIo, Command, FALSE);
}
+/**
+ Issue command to enable Ps2 mouse.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseEnable (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
//
// Send auxiliary command to enable mouse
@@ -428,26 +338,20 @@ Returns: return Out8042AuxCommand (IsaIo, ENABLE_CMD, FALSE);
}
-EFI_STATUS
-PS2MouseGetPacket (
- PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev
- )
-/*++
-
-Routine Description:
-
+/**
Get mouse packet . Only care first 3 bytes
-Arguments:
+ @param MouseDev Pointer of PS2 Mouse Private Data Structure
- MouseDev - Pointer of PS2 Mouse Private Data Structure
+ @retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet
+ @retval EFI_SUCCESS The data packet is gotten successfully.
-Returns:
-
- EFI_NOT_READY - Mouse Device not ready to input data packet, or some error happened during getting the packet
- EFI_SUCCESS - The data packet is gotten successfully.
+**/
+EFI_STATUS
+PS2MouseGetPacket (
+ PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev
+ )
---*/
{
EFI_STATUS Status;
BOOLEAN KeyboardEnable;
@@ -569,6 +473,16 @@ Returns: }
}
+/**
+ Read data via IsaIo protocol with given number.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Buffer Buffer receive data of mouse
+ @param BufSize The size of buffer
+ @param State Check input or read data
+
+ @return status of reading mouse data.
+**/
EFI_STATUS
PS2MouseRead (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
@@ -576,24 +490,6 @@ PS2MouseRead ( IN OUT UINTN *BufSize,
IN UINTN State
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Buffer - GC_TODO: add argument description
- BufSize - GC_TODO: add argument description
- State - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_STATUS Status;
UINTN BytesRead;
@@ -634,30 +530,24 @@ Returns: *BufSize = BytesRead;
return Status;
}
+
//
// 8042 I/O function
//
+/**
+ I/O work flow of outing 8042 command.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Command I/O command.
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042Command (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Command
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Command - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
UINT8 Data;
@@ -683,27 +573,20 @@ Returns: return EFI_SUCCESS;
}
+/**
+ I/O work flow of outing 8042 data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Data Data value
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042Data (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
UINT8 temp;
@@ -726,28 +609,20 @@ Returns: return EFI_SUCCESS;
}
+/**
+ I/O work flow of in 8042 data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Data Data value
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
In8042Data (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN OUT UINT8 *Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINTN Delay;
UINT8 temp;
@@ -777,32 +652,22 @@ Returns: return EFI_SUCCESS;
}
+/**
+ I/O work flow of outing 8042 Aux command.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Command Aux I/O command
+ @param Resend Whether need resend the Aux command.
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042AuxCommand (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Command,
IN BOOLEAN Resend
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Command - GC_TODO: add argument description
- Resend - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_DEVICE_ERROR - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
UINT8 Data;
@@ -869,27 +734,20 @@ Returns: return EFI_SUCCESS;
}
+/**
+ I/O work flow of outing 8042 Aux data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Command Aux I/O command
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042AuxData (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
UINT8 Temp;
@@ -922,27 +780,20 @@ Returns: return EFI_SUCCESS;
}
+/**
+ I/O work flow of in 8042 Aux data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Data Buffer holding return value.
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
In8042AuxData (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN OUT UINT8 *Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
EFI_STATUS Status;
@@ -959,26 +810,19 @@ Returns: return EFI_SUCCESS;
}
+
+/**
+ Check keyboard controller status, if it is output buffer full and for auxiliary device
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @retval EFI_SUCCESS Keyboard controller is ready
+ @retval EFI_NOT_READY Keyboard controller is not ready
+**/
EFI_STATUS
CheckForInput (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- EFI_NOT_READY - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINT8 Data;
@@ -994,28 +838,20 @@ Returns: return EFI_SUCCESS;
}
+/**
+ I/O work flow to wait input buffer empty in given time.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Timeout Wating time.
+
+ @retval EFI_TIMEOUT if input is still not empty in given time.
+ @retval EFI_SUCCESS input is empty.
+**/
EFI_STATUS
WaitInputEmpty (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINTN Timeout
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Timeout - GC_TODO: add argument description
-
-Returns:
-
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINTN Delay;
UINT8 Data;
@@ -1043,12 +879,21 @@ Returns: return EFI_SUCCESS;
}
+/**
+ I/O work flow to wait output buffer full in given time.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Timeout given time
+
+ @retval EFI_TIMEOUT output is not full in given time
+ @retval EFI_SUCCESS output is full in given time.
+**/
EFI_STATUS
WaitOutputFull (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINTN Timeout
)
-/*++
+/**
Routine Description:
@@ -1064,7 +909,7 @@ Returns: EFI_TIMEOUT - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
UINTN Delay;
UINT8 Data;
@@ -1092,3 +937,4 @@ Returns: return EFI_SUCCESS;
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.h b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.h index 869ac01992..0a91465501 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.h +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.h @@ -1,6 +1,5 @@ /**@file
PS2 Mouse Communication Interface
-
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -102,266 +101,184 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // 0 - output buffer empty
// 1 - keyboard controller data in output buffer
//
+
+/**
+ Issue self test command via IsaIo interface.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return EFI_SUCCESS Success to do keyboard self testing.
+ @return others Fail to do keyboard self testing.
+**/
EFI_STATUS
KbcSelfTest (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to enable keyboard AUX functionality.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcEnableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to disable keyboard AUX functionality.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcDisableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to enable keyboard.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcEnableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to disable keyboard.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
KbcDisableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to check keyboard status.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param KeyboardEnable return whether keyboard is enable.
+
+ @return Status of command issuing.
+**/
EFI_STATUS
CheckKbStatus (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
OUT BOOLEAN *KeyboardEnable
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- KeyboardEnable - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to reset keyboard.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseReset (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to set mouse's sample rate
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param SampleRate value of sample rate
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseSetSampleRate (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SR SampleRate
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- SampleRate - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to set mouse's resolution.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Resolution value of resolution
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseSetResolution (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_RE Resolution
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Resolution - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to set mouse's scaling.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Scaling value of scaling
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseSetScaling (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SF Scaling
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
- Scaling - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Issue command to enable Ps2 mouse.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @return Status of command issuing.
+**/
EFI_STATUS
PS2MouseEnable (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- IsaIo - GC_TODO: add argument description
+;
-Returns:
+/**
+ Get mouse packet . Only care first 3 bytes
- GC_TODO: add return values
+ @param MouseDev Pointer of PS2 Mouse Private Data Structure
---*/
-;
+ @retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet
+ @retval EFI_SUCCESS The data packet is gotten successfully.
+**/
EFI_STATUS
PS2MouseGetPacket (
PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- MouseDev - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
+/**
+ Read data via IsaIo protocol with given number.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Buffer Buffer receive data of mouse
+ @param BufSize The size of buffer
+ @param State Check input or read data
+
+ @return status of reading mouse data.
+**/
EFI_STATUS
PS2MouseRead (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
@@ -373,24 +290,61 @@ PS2MouseRead ( //
// 8042 I/O function
//
+/**
+ I/O work flow of outing 8042 command.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Command I/O command.
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042Command (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Command
);
+/**
+ I/O work flow of in 8042 data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Data Data value
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
In8042Data (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN OUT UINT8 *Data
);
+/**
+ I/O work flow of outing 8042 data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Data Data value
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042Data (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Data
);
+/**
+ I/O work flow of outing 8042 Aux command.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Command Aux I/O command
+ @param Resend Whether need resend the Aux command.
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042AuxCommand (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
@@ -398,29 +352,73 @@ Out8042AuxCommand ( IN BOOLEAN Resend
);
+/**
+ I/O work flow of in 8042 Aux data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Data Buffer holding return value.
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
In8042AuxData (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN OUT UINT8 *Data
);
+/**
+ I/O work flow of outing 8042 Aux data.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Command Aux I/O command
+
+ @retval EFI_SUCCESS Success to excute I/O work flow
+ @retval EFI_TIMEOUT Keyboard controller time out.
+**/
EFI_STATUS
Out8042AuxData (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Data
);
+/**
+ Check keyboard controller status, if it is output buffer full and for auxiliary device
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+
+ @retval EFI_SUCCESS Keyboard controller is ready
+ @retval EFI_NOT_READY Keyboard controller is not ready
+**/
EFI_STATUS
CheckForInput (
IN EFI_ISA_IO_PROTOCOL *IsaIo
);
+/**
+ I/O work flow to wait input buffer empty in given time.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Timeout Wating time.
+
+ @retval EFI_TIMEOUT if input is still not empty in given time.
+ @retval EFI_SUCCESS input is empty.
+**/
EFI_STATUS
WaitInputEmpty (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINTN Timeout
);
+/**
+ I/O work flow to wait output buffer full in given time.
+
+ @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
+ @param Timeout given time
+
+ @retval EFI_TIMEOUT output is not full in given time
+ @retval EFI_SUCCESS output is full in given time.
+**/
EFI_STATUS
WaitOutputFull (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c index 930b49fe9a..55ebf95351 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c @@ -28,6 +28,20 @@ EFI_DRIVER_BINDING_PROTOCOL gPS2MouseAbsolutePointerDriver = { NULL
};
+/**
+ Test to see if this driver supports ControllerHandle. Any ControllerHandle
+ than contains a IsaIo protocol can be supported.
+
+ @param This Protocol instance pointer.
+ @param ControllerHandle Handle of device to test
+ @param RemainingDevicePath Optional parameter use to pick a specific child
+ device to start.
+
+ @retval EFI_SUCCESS This driver supports this device
+ @retval EFI_ALREADY_STARTED This driver is already running on this device
+ @retval other This driver does not support this device
+
+**/
EFI_STATUS
EFIAPI
PS2MouseAbsolutePointerDriverSupported (
@@ -35,20 +49,6 @@ PS2MouseAbsolutePointerDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
- ControllerDriver Protocol Method
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: RemainingDevicePath - add argument and description to function comment
{
EFI_STATUS Status;
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -108,6 +108,21 @@ Returns: return Status;
}
+/**
+ Start this driver on ControllerHandle by opening a IsaIo
+ protocol, creating PS2_MOUSE_ABSOLUTE_POINTER_DEV device and install gEfiAbsolutePointerProtocolGuid
+ finnally.
+
+ @param This Protocol instance pointer.
+ @param ControllerHandle Handle of device to bind driver to
+ @param RemainingDevicePath Optional parameter use to pick a specific child
+ device to start.
+
+ @retval EFI_SUCCESS This driver is added to ControllerHandle
+ @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
+ @retval other This driver does not support this device
+
+**/
EFI_STATUS
EFIAPI
PS2MouseAbsolutePointerDriverStart (
@@ -115,21 +130,6 @@ PS2MouseAbsolutePointerDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
- Start protocol interfaces for the mouse device handles.
-
-Arguments:
- This - Protocol instance pointer.
- Controller - Handle of device to bind driver to.
- RemainingDevicePath - Not used.
-
-Returns:
- EFI_SUCCESS - This driver is added to DeviceHandle.
- other - Errors occurred.
-
---*/
{
EFI_STATUS Status;
EFI_STATUS EmptyStatus;
@@ -385,6 +385,20 @@ ErrorExit: return Status;
}
+/**
+ Stop this driver on ControllerHandle. Support stoping any child handles
+ created by this driver.
+
+ @param This Protocol instance pointer.
+ @param ControllerHandle Handle of device to stop driver on
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
+ children is zero stop the entire bus driver.
+ @param ChildHandleBuffer List of Child Handles to Stop.
+
+ @retval EFI_SUCCESS This driver is removed ControllerHandle
+ @retval other This driver was not removed from this device
+
+**/
EFI_STATUS
EFIAPI
PS2MouseAbsolutePointerDriverStop (
@@ -393,21 +407,6 @@ PS2MouseAbsolutePointerDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
- Routine Description:
-
- Arguments:
-
- Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: NumberOfChildren - add argument and description to function comment
-// GC_TODO: ChildHandleBuffer - add argument and description to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointerProtocol;
@@ -486,29 +485,23 @@ PS2MouseAbsolutePointerDriverStop ( return EFI_SUCCESS;
}
+/**
+ Reset the Mouse and do BAT test for it, if ExtendedVerification isTRUE and there is a mouse device connectted to system
+
+ @param This - Pointer of simple pointer Protocol.
+ @param ExtendedVerification - Whether configure mouse parameters. True: do; FALSE: skip.
+
+
+ @retval EFI_SUCCESS - The command byte is written successfully.
+ @retval EFI_DEVICE_ERROR - Errors occurred during reseting keyboard.
+
+**/
EFI_STATUS
EFIAPI
MouseAbsolutePointerReset (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- Reset the Mouse and do BAT test for it, if ExtendedVerification isTRUE and there is a mouse device connectted to system
-
-Arguments:
-
- This - Pointer of simple pointer Protocol.
- ExtendedVerification - Whether configure mouse parameters. True: do; FALSE: skip.
-
-Returns:
-
- EFI_SUCCESS - The command byte is written successfully.
- EFI_DEVICE_ERROR - Errors occurred during reseting keyboard.
-
---*/
{
EFI_STATUS Status;
PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev;
@@ -608,26 +601,20 @@ Exit: return Status;
}
-BOOLEAN
-CheckMouseAbsolutePointerConnect (
- IN PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev
- )
-/*++
-
-Routine Description:
-
+/**
Check whether there is Ps/2 mouse device in system
-Arguments:
-
- PS2_MOUSE_DEV - Mouse Private Data Structure
+ @param PS2_MOUSE_DEV - Mouse Private Data Structure
-Returns:
+ @retval TRUE - Keyboard in System.
+ @retval FALSE - Keyboard not in System.
- TRUE - Keyboard in System.
- FALSE - Keyboard not in System.
+**/
+BOOLEAN
+CheckMouseAbsolutePointerConnect (
+ IN PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev
+ )
---*/
{
EFI_STATUS Status;
@@ -639,30 +626,22 @@ Returns: return FALSE;
}
+/**
+ Get and Clear mouse status.
+
+ @param This - Pointer of simple pointer Protocol.
+ @param State - Output buffer holding status.
+
+ @retval EFI_INVALID_PARAMETER Output buffer is invalid.
+ @retval EFI_NOT_READY Mouse is not changed status yet.
+ @retval EFI_SUCCESS Mouse status is changed and get successful.
+**/
EFI_STATUS
EFIAPI
MouseAbsolutePointerGetState (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN OUT EFI_ABSOLUTE_POINTER_STATE *State
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- State - GC_TODO: add argument description
-
-Returns:
-
- EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
- EFI_NOT_READY - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev;
EFI_TPL OldTpl;
@@ -693,24 +672,22 @@ Returns: return EFI_SUCCESS;
}
-VOID
-EFIAPI
-MouseAbsolutePointerWaitForInput (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-
-Routine Description:
+/**
Event notification function for SIMPLE_POINTER.WaitForInput event
Signal the event if there is input from mouse
-Arguments:
+ @param Event event object
+ @param Context event context
-Returns:
+**/
---*/
+VOID
+EFIAPI
+MouseAbsolutePointerWaitForInput (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
// GC_TODO: Event - add argument and description to function comment
// GC_TODO: Context - add argument and description to function comment
{
@@ -728,29 +705,21 @@ Returns: }
+/**
+ Event notification function for TimerEvent event
+ If mouse device is connected to system, try to get the mouse packet data
+
+ @param Event - TimerEvent in PS2_MOUSE_DEV
+ @param Context - Pointer to PS2_MOUSE_DEV structure
+
+**/
VOID
EFIAPI
PollMouseAbsolutePointer(
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- Event notification function for TimerEvent event
- If mouse device is connected to system, try to get the mouse packet data
-
-Arguments:
-
- Event - TimerEvent in PS2_MOUSE_DEV
- Context - Pointer to PS2_MOUSE_DEV structure
-Returns:
-
- None
-
---*/
{
PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev;
@@ -797,3 +766,4 @@ InitializePs2MouseAbsolutePointer( return Status;
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.c index 679179ddd0..4236d70702 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.c @@ -23,7 +23,7 @@ EFI_STATUS KbcSelfTest (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -38,7 +38,7 @@ Returns: EFI_DEVICE_ERROR - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
UINT8 Data;
@@ -92,7 +92,7 @@ EFI_STATUS KbcEnableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -106,7 +106,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
//
// Send 8042 enable mouse command
@@ -118,7 +118,7 @@ EFI_STATUS KbcDisableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -132,7 +132,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
//
// Send 8042 disable mouse command
@@ -144,7 +144,7 @@ EFI_STATUS KbcEnableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -158,7 +158,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
//
// Send 8042 enable keyboard command
@@ -170,7 +170,7 @@ EFI_STATUS KbcDisableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -184,7 +184,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
//
// Send 8042 disable keyboard command
@@ -197,7 +197,7 @@ CheckKbStatus ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
OUT BOOLEAN *KeyboardEnable
)
-/*++
+/**
Routine Description:
@@ -212,7 +212,7 @@ Returns: EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
UINT8 Data;
@@ -245,7 +245,7 @@ EFI_STATUS PS2MouseReset (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -261,7 +261,7 @@ Returns: EFI_DEVICE_ERROR - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
UINT8 Data;
@@ -301,7 +301,7 @@ PS2MouseSetSampleRate ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SR SampleRate
)
-/*++
+/**
Routine Description:
@@ -316,7 +316,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
EFI_STATUS Status;
@@ -338,7 +338,7 @@ PS2MouseSetResolution ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_RE Resolution
)
-/*++
+/**
Routine Description:
@@ -353,7 +353,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
EFI_STATUS Status;
@@ -375,7 +375,7 @@ PS2MouseSetScaling ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SF Scaling
)
-/*++
+/**
Routine Description:
@@ -390,7 +390,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
UINT8 Command;
@@ -406,7 +406,7 @@ EFI_STATUS PS2MouseEnable (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -420,7 +420,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
//
// Send auxiliary command to enable mouse
@@ -432,7 +432,7 @@ EFI_STATUS PS2MouseGetPacket (
PS2_MOUSE_DEV *MouseDev
)
-/*++
+/**
Routine Description:
@@ -447,7 +447,7 @@ Returns: EFI_NOT_READY - Mouse Device not ready to input data packet, or some error happened during getting the packet
EFI_SUCCESS - The data packet is gotten successfully.
---*/
+**/
{
EFI_STATUS Status;
BOOLEAN KeyboardEnable;
@@ -576,7 +576,7 @@ PS2MouseRead ( IN OUT UINTN *BufSize,
IN UINTN State
)
-/*++
+/**
Routine Description:
@@ -593,7 +593,7 @@ Returns: GC_TODO: add return values
---*/
+**/
{
EFI_STATUS Status;
UINTN BytesRead;
@@ -642,7 +642,7 @@ Out8042Command ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Command
)
-/*++
+/**
Routine Description:
@@ -657,7 +657,7 @@ Returns: EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
UINT8 Data;
@@ -688,7 +688,7 @@ Out8042Data ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Data
)
-/*++
+/**
Routine Description:
@@ -703,7 +703,7 @@ Returns: EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
UINT8 temp;
@@ -731,7 +731,7 @@ In8042Data ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN OUT UINT8 *Data
)
-/*++
+/**
Routine Description:
@@ -747,7 +747,7 @@ Returns: EFI_TIMEOUT - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
UINTN Delay;
UINT8 temp;
@@ -783,7 +783,7 @@ Out8042AuxCommand ( IN UINT8 Command,
IN BOOLEAN Resend
)
-/*++
+/**
Routine Description:
@@ -802,7 +802,7 @@ Returns: EFI_DEVICE_ERROR - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
UINT8 Data;
@@ -874,7 +874,7 @@ Out8042AuxData ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINT8 Data
)
-/*++
+/**
Routine Description:
@@ -889,7 +889,7 @@ Returns: EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
UINT8 Temp;
@@ -927,7 +927,7 @@ In8042AuxData ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN OUT UINT8 *Data
)
-/*++
+/**
Routine Description:
@@ -942,7 +942,7 @@ Returns: EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
@@ -963,7 +963,7 @@ EFI_STATUS CheckForInput (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -978,7 +978,7 @@ Returns: EFI_NOT_READY - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
UINT8 Data;
@@ -999,7 +999,7 @@ WaitInputEmpty ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINTN Timeout
)
-/*++
+/**
Routine Description:
@@ -1015,7 +1015,7 @@ Returns: EFI_TIMEOUT - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
UINTN Delay;
UINT8 Data;
@@ -1048,7 +1048,7 @@ WaitOutputFull ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN UINTN Timeout
)
-/*++
+/**
Routine Description:
@@ -1064,7 +1064,7 @@ Returns: EFI_TIMEOUT - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
UINTN Delay;
UINT8 Data;
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.h b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.h index 3180d26680..4bba9d2488 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.h +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.h @@ -106,7 +106,7 @@ EFI_STATUS KbcSelfTest (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -120,14 +120,14 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
KbcEnableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -141,14 +141,14 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
KbcDisableAux (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -162,14 +162,14 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
KbcEnableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -183,14 +183,14 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
KbcDisableKb (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -204,7 +204,7 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -212,7 +212,7 @@ CheckKbStatus ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
OUT BOOLEAN *KeyboardEnable
)
-/*++
+/**
Routine Description:
@@ -227,14 +227,14 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
PS2MouseReset (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -248,7 +248,7 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -256,7 +256,7 @@ PS2MouseSetSampleRate ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SR SampleRate
)
-/*++
+/**
Routine Description:
@@ -271,7 +271,7 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -279,7 +279,7 @@ PS2MouseSetResolution ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_RE Resolution
)
-/*++
+/**
Routine Description:
@@ -294,7 +294,7 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -302,7 +302,7 @@ PS2MouseSetScaling ( IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN MOUSE_SF Scaling
)
-/*++
+/**
Routine Description:
@@ -317,14 +317,14 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
PS2MouseEnable (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
-/*++
+/**
Routine Description:
@@ -338,14 +338,14 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
PS2MouseGetPacket (
PS2_MOUSE_DEV *MouseDev
)
-/*++
+/**
Routine Description:
@@ -359,7 +359,7 @@ Returns: GC_TODO: add return values
---*/
+**/
;
EFI_STATUS
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c index e500180597..53ce99e6ab 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c @@ -35,7 +35,7 @@ PS2MouseDriverSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
+/**
Routine Description:
@@ -45,7 +45,7 @@ Arguments: Returns:
---*/
+**/
// GC_TODO: This - add argument and description to function comment
// GC_TODO: Controller - add argument and description to function comment
// GC_TODO: RemainingDevicePath - add argument and description to function comment
@@ -115,7 +115,7 @@ PS2MouseDriverStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
+/**
Routine Description:
Start protocol interfaces for the mouse device handles.
@@ -129,7 +129,7 @@ Returns: EFI_SUCCESS - This driver is added to DeviceHandle.
other - Errors occurred.
---*/
+**/
{
EFI_STATUS Status;
EFI_STATUS EmptyStatus;
@@ -390,7 +390,7 @@ PS2MouseDriverStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
+/**
Routine Description:
@@ -398,7 +398,7 @@ PS2MouseDriverStop ( Returns:
---*/
+**/
// GC_TODO: This - add argument and description to function comment
// GC_TODO: Controller - add argument and description to function comment
// GC_TODO: NumberOfChildren - add argument and description to function comment
@@ -489,7 +489,7 @@ MouseReset ( IN EFI_SIMPLE_POINTER_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
+/**
Routine Description:
@@ -505,7 +505,7 @@ Returns: EFI_SUCCESS - The command byte is written successfully.
EFI_DEVICE_ERROR - Errors occurred during reseting keyboard.
---*/
+**/
{
EFI_STATUS Status;
PS2_MOUSE_DEV *MouseDev;
@@ -609,7 +609,7 @@ BOOLEAN CheckMouseConnect (
IN PS2_MOUSE_DEV *MouseDev
)
-/*++
+/**
Routine Description:
@@ -624,7 +624,7 @@ Returns: TRUE - Keyboard in System.
FALSE - Keyboard not in System.
---*/
+**/
{
EFI_STATUS Status;
@@ -642,7 +642,7 @@ MouseGetState ( IN EFI_SIMPLE_POINTER_PROTOCOL *This,
IN OUT EFI_SIMPLE_POINTER_STATE *State
)
-/*++
+/**
Routine Description:
@@ -659,7 +659,7 @@ Returns: EFI_NOT_READY - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
---*/
+**/
{
PS2_MOUSE_DEV *MouseDev;
EFI_TPL OldTpl;
@@ -695,7 +695,7 @@ MouseWaitForInput ( IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
+/**
Routine Description:
@@ -706,7 +706,7 @@ Arguments: Returns:
---*/
+**/
// GC_TODO: Event - add argument and description to function comment
// GC_TODO: Context - add argument and description to function comment
{
@@ -730,7 +730,7 @@ PollMouse ( IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
+/**
Routine Description:
@@ -746,7 +746,7 @@ Returns: None
---*/
+**/
{
PS2_MOUSE_DEV *MouseDev;
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c index 8cd5acfc00..13d459b864 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c @@ -22,7 +22,7 @@ PciOperateRegister ( IN UINT8 Operation,
OUT UINT16 *PtrCommand
)
-/*++
+/**
Routine Description:
@@ -32,7 +32,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Command - add argument and description to function comment
// TODO: Offset - add argument and description to function comment
@@ -82,7 +82,7 @@ BOOLEAN PciCapabilitySupport (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -92,7 +92,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
{
@@ -110,7 +110,7 @@ LocateCapabilityRegBlock ( IN OUT UINT8 *Offset,
OUT UINT8 *NextRegBlock OPTIONAL
)
-/*++
+/**
Routine Description:
Locate cap reg.
@@ -125,7 +125,7 @@ Returns: None
---*/
+**/
// TODO: EFI_UNSUPPORTED - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.h index 248aa6132e..b6f877b974 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.h @@ -69,7 +69,7 @@ PciOperateRegister ( IN UINT8 Operation,
OUT UINT16 *PtrCommand
)
-/*++
+/**
Routine Description:
@@ -87,14 +87,14 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
PciCapabilitySupport (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -108,7 +108,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -118,7 +118,7 @@ LocateCapabilityRegBlock ( IN OUT UINT8 *Offset,
OUT UINT8 *NextRegBlock OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -135,7 +135,7 @@ Returns: TODO: add return values
---*/
+**/
;
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c index d19ee04bf4..f37da70425 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c @@ -25,7 +25,7 @@ EFI_STATUS InitializePciDevicePool (
VOID
)
-/*++
+/**
Routine Description:
@@ -37,7 +37,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
InitializeListHead (&gPciDevicePool);
@@ -49,7 +49,7 @@ EFI_STATUS InsertRootBridge (
PCI_IO_DEVICE *RootBridge
)
-/*++
+/**
Routine Description:
@@ -63,7 +63,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -77,7 +77,7 @@ InsertPciDevice ( PCI_IO_DEVICE *Bridge,
PCI_IO_DEVICE *PciDeviceNode
)
-/*++
+/**
Routine Description:
@@ -92,7 +92,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -106,7 +106,7 @@ EFI_STATUS DestroyRootBridge (
IN PCI_IO_DEVICE *RootBridge
)
-/*++
+/**
Routine Description:
@@ -119,7 +119,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
DestroyPciDeviceTree (RootBridge);
@@ -133,7 +133,7 @@ EFI_STATUS FreePciDevice (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -148,7 +148,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -172,7 +172,7 @@ EFI_STATUS DestroyPciDeviceTree (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -187,7 +187,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
LIST_ENTRY *CurrentLink;
@@ -218,7 +218,7 @@ EFI_STATUS DestroyRootBridgeByHandle (
EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -234,7 +234,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
{
@@ -270,7 +270,7 @@ RegisterPciDevice ( IN PCI_IO_DEVICE *PciIoDevice,
OUT EFI_HANDLE *Handle OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -289,7 +289,7 @@ Returns: EFI_SUCCESS - The PCI device is successfully registered.
Others - An error occurred when registering the PCI device.
---*/
+**/
{
EFI_STATUS Status;
VOID *PlatformOpRomBuffer;
@@ -440,7 +440,7 @@ RemoveAllPciDeviceOnBridge ( EFI_HANDLE RootBridgeHandle,
PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -455,7 +455,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -495,7 +495,7 @@ DeRegisterPciDevice ( IN EFI_HANDLE Controller,
IN EFI_HANDLE Handle
)
-/*++
+/**
Routine Description:
@@ -512,7 +512,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -639,7 +639,7 @@ StartPciDevicesOnBridge ( IN OUT UINT8 *NumberOfChildren,
IN OUT EFI_HANDLE *ChildHandleBuffer
)
-/*++
+/**
Routine Description:
@@ -657,7 +657,7 @@ Returns: None
---*/
+**/
// TODO: EFI_NOT_READY - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_UNSUPPORTED - add return value to function comment
@@ -810,7 +810,7 @@ EFI_STATUS StartPciDevices (
IN EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -824,7 +824,7 @@ Returns: None
---*/
+**/
{
PCI_IO_DEVICE *RootBridge;
EFI_HANDLE ThisHostBridge;
@@ -862,7 +862,7 @@ PCI_IO_DEVICE * CreateRootBridge (
IN EFI_HANDLE RootBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -874,7 +874,7 @@ Returns: None
---*/
+**/
{
EFI_STATUS Status;
@@ -956,7 +956,7 @@ PCI_IO_DEVICE * GetRootBridgeByHandle (
EFI_HANDLE RootBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -969,7 +969,7 @@ Returns: None
---*/
+**/
{
PCI_IO_DEVICE *RootBridgeDev;
LIST_ENTRY *CurrentLink;
@@ -994,7 +994,7 @@ PciDeviceExisted ( IN PCI_IO_DEVICE *Bridge,
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -1007,7 +1007,7 @@ Returns: None
---*/
+**/
{
PCI_IO_DEVICE *Temp;
@@ -1039,7 +1039,7 @@ PCI_IO_DEVICE * ActiveVGADeviceOnTheSameSegment (
IN PCI_IO_DEVICE *VgaDevice
)
-/*++
+/**
Routine Description:
@@ -1051,7 +1051,7 @@ Returns: None
---*/
+**/
{
LIST_ENTRY *CurrentLink;
PCI_IO_DEVICE *Temp;
@@ -1081,7 +1081,7 @@ PCI_IO_DEVICE * ActiveVGADeviceOnTheRootBridge (
IN PCI_IO_DEVICE *RootBridge
)
-/*++
+/**
Routine Description:
@@ -1093,7 +1093,7 @@ Returns: None
---*/
+**/
{
LIST_ENTRY *CurrentLink;
PCI_IO_DEVICE *Temp;
@@ -1133,7 +1133,7 @@ GetHpcPciAddress ( IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,
OUT UINT64 *PciAddress
)
-/*++
+/**
Routine Description:
@@ -1147,7 +1147,7 @@ Returns: None
---*/
+**/
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -1222,7 +1222,7 @@ GetHpcPciAddressFromRootBridge ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath,
OUT UINT64 *PciAddress
)
-/*++
+/**
Routine Description:
@@ -1236,7 +1236,7 @@ Returns: None
---*/
+**/
// TODO: RootBridge - add argument and description to function comment
// TODO: RemainingDevicePath - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.h index b32dfe214a..75707fdd10 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.h @@ -18,7 +18,7 @@ EFI_STATUS InitializePciDevicePool (
VOID
)
-/*++
+/**
Routine Description:
@@ -32,14 +32,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
InsertRootBridge (
PCI_IO_DEVICE *RootBridge
)
-/*++
+/**
Routine Description:
@@ -53,7 +53,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -61,7 +61,7 @@ InsertPciDevice ( PCI_IO_DEVICE *Bridge,
PCI_IO_DEVICE *PciDeviceNode
)
-/*++
+/**
Routine Description:
@@ -76,14 +76,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
DestroyRootBridge (
IN PCI_IO_DEVICE *RootBridge
)
-/*++
+/**
Routine Description:
@@ -97,14 +97,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
DestroyPciDeviceTree (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -118,14 +118,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
DestroyRootBridgeByHandle (
EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -139,7 +139,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -148,7 +148,7 @@ RegisterPciDevice ( IN PCI_IO_DEVICE *PciIoDevice,
OUT EFI_HANDLE *Handle OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -164,7 +164,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -172,7 +172,7 @@ RemoveAllPciDeviceOnBridge ( EFI_HANDLE RootBridgeHandle,
PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -187,7 +187,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -195,7 +195,7 @@ DeRegisterPciDevice ( IN EFI_HANDLE Controller,
IN EFI_HANDLE Handle
)
-/*++
+/**
Routine Description:
@@ -210,7 +210,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -221,7 +221,7 @@ StartPciDevicesOnBridge ( IN OUT UINT8 *NumberOfChildren,
IN OUT EFI_HANDLE *ChildHandleBuffer
)
-/*++
+/**
Routine Description:
@@ -239,14 +239,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
StartPciDevices (
IN EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -260,14 +260,14 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
CreateRootBridge (
IN EFI_HANDLE RootBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -281,14 +281,14 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
GetRootBridgeByHandle (
EFI_HANDLE RootBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -302,14 +302,14 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
RootBridgeExisted (
IN EFI_HANDLE RootBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -323,7 +323,7 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
@@ -331,7 +331,7 @@ PciDeviceExisted ( IN PCI_IO_DEVICE *Bridge,
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -346,14 +346,14 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
ActiveVGADeviceOnTheSameSegment (
IN PCI_IO_DEVICE *VgaDevice
)
-/*++
+/**
Routine Description:
@@ -367,14 +367,14 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
ActiveVGADeviceOnTheRootBridge (
IN PCI_IO_DEVICE *RootBridge
)
-/*++
+/**
Routine Description:
@@ -388,7 +388,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -397,7 +397,7 @@ GetHpcPciAddress ( IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,
OUT UINT64 *PciAddress
)
-/*++
+/**
Routine Description:
@@ -413,7 +413,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -422,7 +422,7 @@ GetHpcPciAddressFromRootBridge ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath,
OUT UINT64 *PciAddress
)
-/*++
+/**
Routine Description:
@@ -438,14 +438,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
FreePciDevice (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -459,7 +459,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.c index f05c5b198c..93f58ed3ec 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.c @@ -18,7 +18,7 @@ EFI_STATUS InitializePciDriverOverrideInstance (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -30,7 +30,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -44,7 +44,7 @@ GetDriver ( IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This,
IN OUT EFI_HANDLE *DriverImageHandle
)
-/*++
+/**
Routine Description:
@@ -56,7 +56,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: DriverImageHandle - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -108,7 +108,7 @@ AddDriver ( IN PCI_IO_DEVICE *PciIoDevice,
IN EFI_HANDLE DriverImageHandle
)
-/*++
+/**
Routine Description:
@@ -120,7 +120,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: DriverImageHandle - add argument and description to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.h index 5806f2702b..013d74a9dd 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.h @@ -32,7 +32,7 @@ EFI_STATUS InitializePciDriverOverrideInstance (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -46,7 +46,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -54,7 +54,7 @@ AddDriver ( IN PCI_IO_DEVICE *PciIoDevice,
IN EFI_HANDLE DriverImageHandle
)
-/*++
+/**
Routine Description:
@@ -69,7 +69,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -78,7 +78,7 @@ GetDriver ( IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This,
IN OUT EFI_HANDLE *DriverImageHandle
)
-/*++
+/**
Routine Description:
@@ -93,7 +93,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c index d64a6018e1..9e68da8afe 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c @@ -21,7 +21,7 @@ EFI_STATUS PciEnumerator (
IN EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -34,7 +34,7 @@ Returns: None
---*/
+**/
// TODO: Controller - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -139,7 +139,7 @@ PciRootBridgeEnumerator ( IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,
IN PCI_IO_DEVICE *RootBridgeDev
)
-/*++
+/**
Routine Description:
@@ -149,7 +149,7 @@ Returns: None
---*/
+**/
// TODO: PciResAlloc - add argument and description to function comment
// TODO: RootBridgeDev - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -252,7 +252,7 @@ ProcessOptionRom ( IN UINT64 RomBase,
IN UINT64 MaxLength
)
-/*++
+/**
Routine Description:
@@ -264,7 +264,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: RomBase - add argument and description to function comment
// TODO: MaxLength - add argument and description to function comment
@@ -307,7 +307,7 @@ PciAssignBusNumber ( IN UINT8 StartBusNumber,
OUT UINT8 *SubBusNumber
)
-/*++
+/**
Routine Description:
@@ -319,7 +319,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: StartBusNumber - add argument and description to function comment
// TODO: SubBusNumber - add argument and description to function comment
@@ -456,7 +456,7 @@ DetermineRootBridgeAttributes ( IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,
IN PCI_IO_DEVICE *RootBridgeDev
)
-/*++
+/**
Routine Description:
@@ -469,7 +469,7 @@ Returns: None
---*/
+**/
// TODO: PciResAlloc - add argument and description to function comment
// TODO: RootBridgeDev - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -518,7 +518,7 @@ UINT64 GetMaxOptionRomSize (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -530,7 +530,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
{
LIST_ENTRY *CurrentLink;
@@ -586,7 +586,7 @@ EFI_STATUS PciHostBridgeDeviceAttribute (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -598,7 +598,7 @@ Returns: None
---*/
+**/
// TODO: PciResAlloc - add argument and description to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -642,7 +642,7 @@ GetResourceAllocationStatus ( OUT UINT64 *Mem64ResStatus,
OUT UINT64 *PMem64ResStatus
)
-/*++
+/**
Routine Description:
@@ -654,7 +654,7 @@ Returns: None
---*/
+**/
// TODO: AcpiConfig - add argument and description to function comment
// TODO: IoResStatus - add argument and description to function comment
// TODO: Mem32ResStatus - add argument and description to function comment
@@ -728,7 +728,7 @@ EFI_STATUS RejectPciDevice (
IN PCI_IO_DEVICE *PciDevice
)
-/*++
+/**
Routine Description:
@@ -740,7 +740,7 @@ Returns: None
---*/
+**/
// TODO: PciDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_ABORTED - add return value to function comment
@@ -809,7 +809,7 @@ BOOLEAN IsRejectiveDevice (
IN PCI_RESOURCE_NODE *PciResNode
)
-/*++
+/**
Routine Description:
@@ -821,7 +821,7 @@ Returns: None
---*/
+**/
// TODO: PciResNode - add argument and description to function comment
{
PCI_IO_DEVICE *Temp;
@@ -864,7 +864,7 @@ GetLargerConsumerDevice ( IN PCI_RESOURCE_NODE *PciResNode1,
IN PCI_RESOURCE_NODE *PciResNode2
)
-/*++
+/**
Routine Description:
@@ -876,7 +876,7 @@ Returns: None
---*/
+**/
// TODO: PciResNode1 - add argument and description to function comment
// TODO: PciResNode2 - add argument and description to function comment
{
@@ -906,7 +906,7 @@ PCI_RESOURCE_NODE * GetMaxResourceConsumerDevice (
IN PCI_RESOURCE_NODE *ResPool
)
-/*++
+/**
Routine Description:
@@ -918,7 +918,7 @@ Returns: None
---*/
+**/
// TODO: ResPool - add argument and description to function comment
{
PCI_RESOURCE_NODE *Temp;
@@ -966,7 +966,7 @@ PciHostBridgeAdjustAllocation ( IN UINT64 Mem64ResStatus,
IN UINT64 PMem64ResStatus
)
-/*++
+/**
Routine Description:
@@ -978,7 +978,7 @@ Returns: None
---*/
+**/
// TODO: IoPool - add argument and description to function comment
// TODO: Mem32Pool - add argument and description to function comment
// TODO: PMem32Pool - add argument and description to function comment
@@ -1108,7 +1108,7 @@ ConstructAcpiResourceRequestor ( IN PCI_RESOURCE_NODE *PMem64Node,
OUT VOID **pConfig
)
-/*++
+/**
Routine Description:
@@ -1118,7 +1118,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: IoNode - add argument and description to function comment
// TODO: Mem32Node - add argument and description to function comment
@@ -1354,7 +1354,7 @@ GetResourceBase ( OUT UINT64 *Mem64Base,
OUT UINT64 *PMem64Base
)
-/*++
+/**
Routine Description:
@@ -1364,7 +1364,7 @@ Returns: None
---*/
+**/
// TODO: pConfig - add argument and description to function comment
// TODO: IoBase - add argument and description to function comment
// TODO: Mem32Base - add argument and description to function comment
@@ -1448,7 +1448,7 @@ EFI_STATUS PciBridgeEnumerator (
IN PCI_IO_DEVICE *BridgeDev
)
-/*++
+/**
Routine Description:
@@ -1458,7 +1458,7 @@ Returns: None
---*/
+**/
// TODO: BridgeDev - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1512,7 +1512,7 @@ EFI_STATUS PciBridgeResourceAllocator (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -1522,7 +1522,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1676,7 +1676,7 @@ GetResourceBaseFromBridge ( OUT UINT64 *Mem64Base,
OUT UINT64 *PMem64Base
)
-/*++
+/**
Routine Description:
@@ -1686,7 +1686,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: IoBase - add argument and description to function comment
// TODO: Mem32Base - add argument and description to function comment
@@ -1766,7 +1766,7 @@ NotifyPhase ( IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase
)
-/*++
+/**
Routine Description:
@@ -1776,7 +1776,7 @@ Returns: None
---*/
+**/
// TODO: PciResAlloc - add argument and description to function comment
// TODO: Phase - add argument and description to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
@@ -1850,7 +1850,7 @@ PreprocessController ( IN UINT8 Func,
IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase
)
-/*++
+/**
Routine Description:
@@ -1860,7 +1860,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: Bus - add argument and description to function comment
// TODO: Device - add argument and description to function comment
@@ -1959,7 +1959,7 @@ PciHotPlugRequestNotify ( IN OUT UINT8 *NumberOfChildren,
IN OUT EFI_HANDLE * ChildHandleBuffer
)
-/*++
+/**
Routine Description:
@@ -1978,7 +1978,7 @@ Returns: Status code.
---*/
+**/
// TODO: RemainingDevicePath - add argument and description to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -2078,7 +2078,7 @@ BOOLEAN SearchHostBridgeHandle (
IN EFI_HANDLE RootBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -2088,7 +2088,7 @@ Returns: None
---*/
+**/
// TODO: RootBridgeHandle - add argument and description to function comment
{
EFI_HANDLE HostBridgeHandle;
@@ -2126,7 +2126,7 @@ EFI_STATUS AddHostBridgeEnumerator (
IN EFI_HANDLE HostBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -2136,7 +2136,7 @@ Returns: None
---*/
+**/
// TODO: HostBridgeHandle - add argument and description to function comment
// TODO: EFI_ABORTED - add return value to function comment
// TODO: EFI_ABORTED - add return value to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.h index 20e0f7eae9..3ed98f85f5 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.h @@ -21,7 +21,7 @@ EFI_STATUS PciEnumerator (
IN EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -35,7 +35,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -43,7 +43,7 @@ PciRootBridgeEnumerator ( IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,
IN PCI_IO_DEVICE *RootBridgeDev
)
-/*++
+/**
Routine Description:
@@ -58,7 +58,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -67,7 +67,7 @@ ProcessOptionRom ( IN UINT64 RomBase,
IN UINT64 MaxLength
)
-/*++
+/**
Routine Description:
@@ -83,7 +83,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -92,7 +92,7 @@ PciAssignBusNumber ( IN UINT8 StartBusNumber,
OUT UINT8 *SubBusNumber
)
-/*++
+/**
Routine Description:
@@ -108,7 +108,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -116,7 +116,7 @@ DetermineRootBridgeAttributes ( IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,
IN PCI_IO_DEVICE *RootBridgeDev
)
-/*++
+/**
Routine Description:
@@ -131,14 +131,14 @@ Returns: TODO: add return values
---*/
+**/
;
UINT64
GetMaxOptionRomSize (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -152,14 +152,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciHostBridgeDeviceAttribute (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -173,7 +173,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -185,7 +185,7 @@ GetResourceAllocationStatus ( OUT UINT64 *Mem64ResStatus,
OUT UINT64 *PMem64ResStatus
)
-/*++
+/**
Routine Description:
@@ -204,14 +204,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
RejectPciDevice (
IN PCI_IO_DEVICE *PciDevice
)
-/*++
+/**
Routine Description:
@@ -225,14 +225,14 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
IsRejectiveDevice (
IN PCI_RESOURCE_NODE *PciResNode
)
-/*++
+/**
Routine Description:
@@ -246,7 +246,7 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_RESOURCE_NODE *
@@ -254,7 +254,7 @@ GetLargerConsumerDevice ( IN PCI_RESOURCE_NODE *PciResNode1,
IN PCI_RESOURCE_NODE *PciResNode2
)
-/*++
+/**
Routine Description:
@@ -269,14 +269,14 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_RESOURCE_NODE *
GetMaxResourceConsumerDevice (
IN PCI_RESOURCE_NODE *ResPool
)
-/*++
+/**
Routine Description:
@@ -290,7 +290,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -306,7 +306,7 @@ PciHostBridgeAdjustAllocation ( IN UINT64 Mem64ResStatus,
IN UINT64 PMem64ResStatus
)
-/*++
+/**
Routine Description:
@@ -329,7 +329,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -342,7 +342,7 @@ ConstructAcpiResourceRequestor ( IN PCI_RESOURCE_NODE *PMem64Node,
OUT VOID **pConfig
)
-/*++
+/**
Routine Description:
@@ -362,7 +362,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -374,7 +374,7 @@ GetResourceBase ( OUT UINT64 *Mem64Base,
OUT UINT64 *PMem64Base
)
-/*++
+/**
Routine Description:
@@ -393,14 +393,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciBridgeEnumerator (
IN PCI_IO_DEVICE *BridgeDev
)
-/*++
+/**
Routine Description:
@@ -414,14 +414,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciBridgeResourceAllocator (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -435,7 +435,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -447,7 +447,7 @@ GetResourceBaseFromBridge ( OUT UINT64 *Mem64Base,
OUT UINT64 *PMem64Base
)
-/*++
+/**
Routine Description:
@@ -466,14 +466,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciHostBridgeP2CProcess (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -487,7 +487,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -495,7 +495,7 @@ NotifyPhase ( IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase
)
-/*++
+/**
Routine Description:
@@ -510,7 +510,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -521,7 +521,7 @@ PreprocessController ( IN UINT8 Func,
IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase
)
-/*++
+/**
Routine Description:
@@ -539,7 +539,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -552,7 +552,7 @@ PciHotPlugRequestNotify ( IN OUT UINT8 *NumberOfChildren,
IN OUT EFI_HANDLE * ChildHandleBuffer
)
-/*++
+/**
Routine Description:
@@ -571,14 +571,14 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
SearchHostBridgeHandle (
IN EFI_HANDLE RootBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -592,14 +592,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
AddHostBridgeEnumerator (
IN EFI_HANDLE HostBridgeHandle
)
-/*++
+/**
Routine Description:
@@ -613,7 +613,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 0a5292e796..2aa85c5856 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -25,7 +25,7 @@ PciDevicePresent ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -37,7 +37,7 @@ Returns: None
---*/
+**/
// TODO: PciRootBridgeIo - add argument and description to function comment
// TODO: Pci - add argument and description to function comment
// TODO: Bus - add argument and description to function comment
@@ -92,7 +92,7 @@ PciPciDeviceInfoCollector ( IN PCI_IO_DEVICE *Bridge,
UINT8 StartBusNumber
)
-/*++
+/**
Routine Description:
@@ -102,7 +102,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: StartBusNumber - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -210,7 +210,7 @@ PciSearchDevice ( IN UINT8 Func,
OUT PCI_IO_DEVICE **PciDevice
)
-/*++
+/**
Routine Description:
@@ -229,7 +229,7 @@ Returns: Status code.
---*/
+**/
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -339,7 +339,7 @@ GatherDeviceInfo ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -349,7 +349,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: Pci - add argument and description to function comment
// TODO: Bus - add argument and description to function comment
@@ -409,7 +409,7 @@ GatherPpbInfo ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -419,7 +419,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: Pci - add argument and description to function comment
// TODO: Bus - add argument and description to function comment
@@ -543,7 +543,7 @@ GatherP2CInfo ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -553,7 +553,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: Pci - add argument and description to function comment
// TODO: Bus - add argument and description to function comment
@@ -614,7 +614,7 @@ CreatePciDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -624,7 +624,7 @@ Returns: None
---*/
+**/
// TODO: ParentDevicePath - add argument and description to function comment
// TODO: PciIoDevice - add argument and description to function comment
{
@@ -652,7 +652,7 @@ BarExisted ( OUT UINT32 *BarLengthValue,
OUT UINT32 *OriginalBarValue
)
-/*++
+/**
Routine Description:
@@ -670,7 +670,7 @@ Returns: EFI_NOT_FOUND - The bar don't exist.
EFI_SUCCESS - The bar exist.
---*/
+**/
{
EFI_PCI_IO_PROTOCOL *PciIo;
UINT32 OriginalValue;
@@ -726,7 +726,7 @@ PciTestSupportedAttribute ( IN UINT16 *OldCommand,
IN UINT16 *OldBridgeControl
)
-/*++
+/**
Routine Description:
@@ -736,7 +736,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Command - add argument and description to function comment
// TODO: BridgeControl - add argument and description to function comment
@@ -809,7 +809,7 @@ PciSetDeviceAttribute ( IN UINT16 BridgeControl,
IN UINTN Option
)
-/*++
+/**
Routine Description:
Set the supported or current attributes of a PCI device
@@ -822,9 +822,9 @@ PciSetDeviceAttribute ( Returns:
---*/
+**/
-/*++
+/**
Routine Description:
@@ -838,7 +838,7 @@ Returns: EFI_SUCCESS Always success
---*/
+**/
{
UINT64 Attributes;
@@ -925,7 +925,7 @@ GetFastBackToBackSupport ( IN PCI_IO_DEVICE *PciIoDevice,
IN UINT8 StatusIndex
)
-/*++
+/**
Routine Description:
@@ -937,7 +937,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: StatusIndex - add argument and description to function comment
// TODO: EFI_UNSUPPORTED - add return value to function comment
@@ -973,7 +973,7 @@ EFI_STATUS ProcessOptionRomLight (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -986,7 +986,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1022,7 +1022,7 @@ EFI_STATUS DetermineDeviceAttribute (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -1034,7 +1034,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1201,7 +1201,7 @@ EFI_STATUS UpdatePciInfo (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -1213,7 +1213,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_UNSUPPORTED - add return value to function comment
{
@@ -1359,7 +1359,7 @@ SetNewAlign ( IN UINT64 *Alignment,
IN UINT64 NewAlignment
)
-/*++
+/**
Routine Description:
@@ -1371,7 +1371,7 @@ Returns: None
---*/
+**/
// TODO: Alignment - add argument and description to function comment
// TODO: NewAlignment - add argument and description to function comment
{
@@ -1438,7 +1438,7 @@ PciParseBar ( IN UINTN Offset,
IN UINTN BarIndex
)
-/*++
+/**
Routine Description:
@@ -1448,7 +1448,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Offset - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -1628,7 +1628,7 @@ EFI_STATUS InitializePciDevice (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -1641,7 +1641,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1666,7 +1666,7 @@ EFI_STATUS InitializePpb (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -1676,7 +1676,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1719,7 +1719,7 @@ EFI_STATUS InitializeP2C (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -1729,7 +1729,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1769,7 +1769,7 @@ CreatePciIoDevice ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -1779,7 +1779,7 @@ Returns: None
---*/
+**/
// TODO: PciRootBridgeIo - add argument and description to function comment
// TODO: Pci - add argument and description to function comment
// TODO: Bus - add argument and description to function comment
@@ -1862,7 +1862,7 @@ EFI_STATUS PciEnumeratorLight (
IN EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -1876,7 +1876,7 @@ Returns: None
---*/
+**/
// TODO: Controller - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -1985,7 +1985,7 @@ PciGetBusRange ( OUT UINT16 *MaxBus,
OUT UINT16 *BusRange
)
-/*++
+/**
Routine Description:
@@ -2002,7 +2002,7 @@ Returns: Status Code.
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
{
@@ -2034,7 +2034,7 @@ EFI_STATUS StartManagingRootBridge (
IN PCI_IO_DEVICE *RootBridgeDev
)
-/*++
+/**
Routine Description:
@@ -2045,7 +2045,7 @@ Returns: None
---*/
+**/
// TODO: RootBridgeDev - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -2088,7 +2088,7 @@ BOOLEAN IsPciDeviceRejected (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -2101,7 +2101,7 @@ Returns: TRUE This device should be rejected
FALSE This device shouldn't be rejected
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
{
EFI_STATUS Status;
@@ -2209,7 +2209,7 @@ ResetAllPpbBusNumber ( IN PCI_IO_DEVICE *Bridge,
IN UINT8 StartBusNumber
)
-/*++
+/**
Routine Description:
@@ -2224,7 +2224,7 @@ Returns: EFI_SUCCESS - TODO: Add description for return value
---*/
+**/
{
EFI_STATUS Status;
PCI_TYPE00 Pci;
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h index a9c49b2c92..b7b467298c 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h @@ -23,7 +23,7 @@ PciDevicePresent ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -41,7 +41,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -49,7 +49,7 @@ PciPciDeviceInfoCollector ( IN PCI_IO_DEVICE *Bridge,
UINT8 StartBusNumber
)
-/*++
+/**
Routine Description:
@@ -64,7 +64,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -76,7 +76,7 @@ PciSearchDevice ( UINT8 Func,
PCI_IO_DEVICE **PciDevice
)
-/*++
+/**
Routine Description:
@@ -95,7 +95,7 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
@@ -106,7 +106,7 @@ GatherDeviceInfo ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -124,7 +124,7 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
@@ -135,7 +135,7 @@ GatherPpbInfo ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -153,7 +153,7 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
@@ -164,7 +164,7 @@ GatherP2CInfo ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -182,7 +182,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_DEVICE_PATH_PROTOCOL *
@@ -190,7 +190,7 @@ CreatePciDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -205,7 +205,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -215,7 +215,7 @@ BarExisted ( OUT UINT32 *BarLengthValue,
OUT UINT32 *OriginalBarValue
)
-/*++
+/**
Routine Description:
@@ -232,7 +232,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -243,7 +243,7 @@ PciTestSupportedAttribute ( IN UINT16 *OldCommand,
IN UINT16 *OldBridgeControl
)
-/*++
+/**
Routine Description:
@@ -261,7 +261,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -271,7 +271,7 @@ PciSetDeviceAttribute ( IN UINT16 BridgeControl,
IN UINTN Option
)
-/*++
+/**
Routine Description:
@@ -288,7 +288,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -296,7 +296,7 @@ GetFastBackToBackSupport ( IN PCI_IO_DEVICE *PciIoDevice,
IN UINT8 StatusIndex
)
-/*++
+/**
Routine Description:
@@ -311,14 +311,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
DetermineDeviceAttribute (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -332,14 +332,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
UpdatePciInfo (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -353,7 +353,7 @@ Returns: TODO: add return values
---*/
+**/
;
VOID
@@ -361,7 +361,7 @@ SetNewAlign ( IN UINT64 *Alignment,
IN UINT64 NewAlignment
)
-/*++
+/**
Routine Description:
@@ -376,7 +376,7 @@ Returns: TODO: add return values
---*/
+**/
;
UINTN
@@ -385,7 +385,7 @@ PciParseBar ( IN UINTN Offset,
IN UINTN BarIndex
)
-/*++
+/**
Routine Description:
@@ -401,14 +401,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
InitializePciDevice (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -422,14 +422,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
InitializePpb (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -443,14 +443,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
InitializeP2C (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -464,7 +464,7 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_IO_DEVICE *
@@ -475,7 +475,7 @@ CreatePciIoDevice ( UINT8 Device,
UINT8 Func
)
-/*++
+/**
Routine Description:
@@ -493,14 +493,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciEnumeratorLight (
IN EFI_HANDLE Controller
)
-/*++
+/**
Routine Description:
@@ -514,7 +514,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -524,7 +524,7 @@ PciGetBusRange ( OUT UINT16 *MaxBus,
OUT UINT16 *BusRange
)
-/*++
+/**
Routine Description:
@@ -541,14 +541,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
StartManagingRootBridge (
IN PCI_IO_DEVICE *RootBridgeDev
)
-/*++
+/**
Routine Description:
@@ -562,14 +562,14 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
IsPciDeviceRejected (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -583,7 +583,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c index 0883d0d2dd..ee95864f1b 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c @@ -26,7 +26,7 @@ PciHPCInitialized ( IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
+/**
Routine Description:
@@ -36,7 +36,7 @@ Returns: None
---*/
+**/
// TODO: Event - add argument and description to function comment
// TODO: Context - add argument and description to function comment
{
@@ -52,7 +52,7 @@ EfiCompareDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2
)
-/*++
+/**
Routine Description:
@@ -62,7 +62,7 @@ Returns: None
---*/
+**/
// TODO: DevicePath1 - add argument and description to function comment
// TODO: DevicePath2 - add argument and description to function comment
{
@@ -87,7 +87,7 @@ EFI_STATUS InitializeHotPlugSupport (
VOID
)
-/*++
+/**
Routine Description:
@@ -97,7 +97,7 @@ Returns: None
---*/
+**/
// TODO: EFI_UNSUPPORTED - add return value to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -153,7 +153,7 @@ IsRootPciHotPlugBus ( IN EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath,
OUT UINTN *HpIndex
)
-/*++
+/**
Routine Description:
@@ -166,7 +166,7 @@ Returns: None
---*/
+**/
// TODO: HpbDevicePath - add argument and description to function comment
{
UINTN Index;
@@ -191,7 +191,7 @@ IsRootPciHotPlugController ( IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,
OUT UINTN *HpIndex
)
-/*++
+/**
Routine Description:
@@ -204,7 +204,7 @@ Returns: None
---*/
+**/
{
UINTN Index;
@@ -228,7 +228,7 @@ CreateEventForHpc ( IN UINTN HpIndex,
OUT EFI_EVENT *Event
)
-/*++
+/**
Routine Description:
@@ -238,7 +238,7 @@ Returns: None
---*/
+**/
// TODO: HpIndex - add argument and description to function comment
// TODO: Event - add argument and description to function comment
{
@@ -263,7 +263,7 @@ EFI_STATUS AllRootHPCInitialized (
IN UINTN TimeoutInMicroSeconds
)
-/*++
+/**
Routine Description:
@@ -274,7 +274,7 @@ Returns: EFI_SUCCESS - All root hpc's initialization is finished before the timeout
EFI_TIMEOUT - Time out
---*/
+**/
{
UINT32 Delay;
UINTN Index;
@@ -309,7 +309,7 @@ EFI_STATUS IsSHPC (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -319,7 +319,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -356,7 +356,7 @@ EFI_STATUS GetResourcePaddingForHpb (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -366,7 +366,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
@@ -409,7 +409,7 @@ EFI_STATUS IsPciHotPlugBus (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -419,7 +419,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.h index 182afd1ff6..c1d74a3086 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.h @@ -38,7 +38,7 @@ PciHPCInitialized ( IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
+/**
Routine Description:
@@ -53,7 +53,7 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
@@ -61,7 +61,7 @@ EfiCompareDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2
)
-/*++
+/**
Routine Description:
@@ -76,14 +76,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
InitializeHotPlugSupport (
VOID
)
-/*++
+/**
Routine Description:
@@ -97,14 +97,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
IsPciHotPlugBus (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -118,7 +118,7 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
@@ -126,7 +126,7 @@ IsRootPciHotPlugBus ( IN EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath,
OUT UINTN *HpIndex
)
-/*++
+/**
Routine Description:
@@ -141,7 +141,7 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
@@ -149,7 +149,7 @@ IsRootPciHotPlugController ( IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,
OUT UINTN *HpIndex
)
-/*++
+/**
Routine Description:
@@ -164,7 +164,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -172,7 +172,7 @@ CreateEventForHpc ( IN UINTN HpIndex,
OUT EFI_EVENT *Event
)
-/*++
+/**
Routine Description:
@@ -187,14 +187,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
AllRootHPCInitialized (
IN UINTN TimeoutInMicroSeconds
)
-/*++
+/**
Routine Description:
@@ -207,14 +207,14 @@ Returns: EFI_SUCCESS - All root hpc's initialization is finished before the timeout
EFI_TIMEOUT - Time out
---*/
+**/
;
EFI_STATUS
IsSHPC (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -228,14 +228,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
GetResourcePaddingForHpb (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -249,7 +249,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c index 765cf4c87a..79ebe5fabd 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -66,7 +66,7 @@ ReportErrorStatusCode ( IN PCI_IO_DEVICE *PciIoDevice,
IN EFI_STATUS_CODE_VALUE Code
)
-/*++
+/**
Routine Description:
@@ -78,7 +78,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Code - add argument and description to function comment
{
@@ -93,7 +93,7 @@ EFI_STATUS InitializePciIoInstance (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -105,7 +105,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -122,7 +122,7 @@ PciIoVerifyBarAccess ( IN UINTN Count,
UINT64 *Offset
)
-/*++
+/**
Routine Description:
@@ -134,7 +134,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
// TODO: Type - add argument and description to function comment
@@ -193,7 +193,7 @@ PciIoVerifyConfigAccess ( IN UINTN Count,
IN UINT64 *Offset
)
-/*++
+/**
Routine Description:
@@ -205,7 +205,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: Count - add argument and description to function comment
@@ -258,7 +258,7 @@ PciIoPollMem ( IN UINT64 Delay,
OUT UINT64 *Result
)
-/*++
+/**
Routine Description:
@@ -270,7 +270,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -330,7 +330,7 @@ PciIoPollIo ( IN UINT64 Delay,
OUT UINT64 *Result
)
-/*++
+/**
Routine Description:
@@ -342,7 +342,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -396,7 +396,7 @@ PciIoMemRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -408,7 +408,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -457,7 +457,7 @@ PciIoMemWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -469,7 +469,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -518,7 +518,7 @@ PciIoIoRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -530,7 +530,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -579,7 +579,7 @@ PciIoIoWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -591,7 +591,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -639,7 +639,7 @@ PciIoConfigRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -651,7 +651,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: Offset - add argument and description to function comment
@@ -694,7 +694,7 @@ PciIoConfigWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -706,7 +706,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: Offset - add argument and description to function comment
@@ -751,7 +751,7 @@ PciIoCopyMem ( IN UINT64 SrcOffset,
IN UINTN Count
)
-/*++
+/**
Routine Description:
@@ -763,7 +763,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Width - add argument and description to function comment
// TODO: DestBarIndex - add argument and description to function comment
@@ -831,7 +831,7 @@ PciIoMap ( OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
)
-/*++
+/**
Routine Description:
@@ -843,7 +843,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Operation - add argument and description to function comment
// TODO: HostAddress - add argument and description to function comment
@@ -892,7 +892,7 @@ PciIoUnmap ( IN EFI_PCI_IO_PROTOCOL *This,
IN VOID *Mapping
)
-/*++
+/**
Routine Description:
@@ -904,7 +904,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Mapping - add argument and description to function comment
{
@@ -935,7 +935,7 @@ PciIoAllocateBuffer ( OUT VOID **HostAddress,
IN UINT64 Attributes
)
-/*++
+/**
Routine Description:
@@ -947,7 +947,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Type - add argument and description to function comment
// TODO: MemoryType - add argument and description to function comment
@@ -993,7 +993,7 @@ PciIoFreeBuffer ( IN UINTN Pages,
IN VOID *HostAddress
)
-/*++
+/**
Routine Description:
@@ -1005,7 +1005,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Pages - add argument and description to function comment
// TODO: HostAddress - add argument and description to function comment
@@ -1033,7 +1033,7 @@ EFIAPI PciIoFlush (
IN EFI_PCI_IO_PROTOCOL *This
)
-/*++
+/**
Routine Description:
@@ -1045,7 +1045,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
{
EFI_STATUS Status;
@@ -1072,7 +1072,7 @@ PciIoGetLocation ( OUT UINTN *Device,
OUT UINTN *Function
)
-/*++
+/**
Routine Description:
@@ -1084,7 +1084,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Segment - add argument and description to function comment
// TODO: Bus - add argument and description to function comment
@@ -1115,7 +1115,7 @@ CheckBarType ( UINT8 BarIndex,
PCI_BAR_TYPE BarType
)
-/*++
+/**
Routine Description:
@@ -1127,7 +1127,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
// TODO: BarType - add argument and description to function comment
@@ -1166,7 +1166,7 @@ ModifyRootBridgeAttributes ( IN UINT64 Attributes,
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation
)
-/*++
+/**
Routine Description:
@@ -1178,7 +1178,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Attributes - add argument and description to function comment
// TODO: Operation - add argument and description to function comment
@@ -1244,7 +1244,7 @@ SupportPaletteSnoopAttributes ( IN PCI_IO_DEVICE *PciIoDevice,
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation
)
-/*++
+/**
Routine Description:
@@ -1256,7 +1256,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Operation - add argument and description to function comment
// TODO: EFI_UNSUPPORTED - add return value to function comment
@@ -1372,7 +1372,7 @@ PciIoAttributes ( IN UINT64 Attributes,
OUT UINT64 *Result OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -1383,7 +1383,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Operation - add argument and description to function comment
// TODO: Attributes - add argument and description to function comment
@@ -1666,7 +1666,7 @@ PciIoGetBarAttributes ( OUT UINT64 *Supports, OPTIONAL
OUT VOID **Resources OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -1677,7 +1677,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
// TODO: Supports - add argument and description to function comment
@@ -1830,7 +1830,7 @@ PciIoSetBarAttributes ( IN OUT UINT64 *Offset,
IN OUT UINT64 *Length
)
-/*++
+/**
Routine Description:
@@ -1841,7 +1841,7 @@ Returns: None
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Attributes - add argument and description to function comment
// TODO: BarIndex - add argument and description to function comment
@@ -1905,7 +1905,7 @@ UpStreamBridgesAttributes ( IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
IN UINT64 Attributes
)
-/*++
+/**
Routine Description:
@@ -1915,7 +1915,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: Operation - add argument and description to function comment
// TODO: Attributes - add argument and description to function comment
@@ -1946,7 +1946,7 @@ PciDevicesOnTheSamePath ( IN PCI_IO_DEVICE *PciDevice1,
IN PCI_IO_DEVICE *PciDevice2
)
-/*++
+/**
Routine Description:
@@ -1956,7 +1956,7 @@ Returns: None
---*/
+**/
// TODO: PciDevice1 - add argument and description to function comment
// TODO: PciDevice2 - add argument and description to function comment
{
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.h index 2713b72eae..6c6d739c62 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.h @@ -19,7 +19,7 @@ EFI_STATUS InitializePciIoInstance (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -33,7 +33,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -45,7 +45,7 @@ PciIoVerifyBarAccess ( IN UINTN Count,
UINT64 *Offset
)
-/*++
+/**
Routine Description:
@@ -64,7 +64,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -74,7 +74,7 @@ PciIoVerifyConfigAccess ( IN UINTN Count,
IN UINT64 *Offset
)
-/*++
+/**
Routine Description:
@@ -91,7 +91,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -106,7 +106,7 @@ PciIoPollMem ( IN UINT64 Delay,
OUT UINT64 *Result
)
-/*++
+/**
Routine Description:
@@ -127,7 +127,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -142,7 +142,7 @@ PciIoPollIo ( IN UINT64 Delay,
OUT UINT64 *Result
)
-/*++
+/**
Routine Description:
@@ -163,7 +163,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -176,7 +176,7 @@ PciIoMemRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -195,7 +195,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -208,7 +208,7 @@ PciIoMemWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -227,7 +227,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -240,7 +240,7 @@ PciIoIoRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -259,7 +259,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -272,7 +272,7 @@ PciIoIoWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -291,7 +291,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -303,7 +303,7 @@ PciIoConfigRead ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -321,7 +321,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -333,7 +333,7 @@ PciIoConfigWrite ( IN UINTN Count,
IN OUT VOID *Buffer
)
-/*++
+/**
Routine Description:
@@ -351,7 +351,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -365,7 +365,7 @@ PciIoCopyMem ( IN UINT64 SrcOffset,
IN UINTN Count
)
-/*++
+/**
Routine Description:
@@ -385,7 +385,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -398,7 +398,7 @@ PciIoMap ( OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
)
-/*++
+/**
Routine Description:
@@ -417,7 +417,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -426,7 +426,7 @@ PciIoUnmap ( IN EFI_PCI_IO_PROTOCOL *This,
IN VOID *Mapping
)
-/*++
+/**
Routine Description:
@@ -441,7 +441,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -454,7 +454,7 @@ PciIoAllocateBuffer ( OUT VOID **HostAddress,
IN UINT64 Attributes
)
-/*++
+/**
Routine Description:
@@ -473,7 +473,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -483,7 +483,7 @@ PciIoFreeBuffer ( IN UINTN Pages,
IN VOID *HostAddress
)
-/*++
+/**
Routine Description:
@@ -499,7 +499,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -507,7 +507,7 @@ EFIAPI PciIoFlush (
IN EFI_PCI_IO_PROTOCOL *This
)
-/*++
+/**
Routine Description:
@@ -521,7 +521,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -533,7 +533,7 @@ PciIoGetLocation ( OUT UINTN *Device,
OUT UINTN *Function
)
-/*++
+/**
Routine Description:
@@ -551,7 +551,7 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
@@ -560,7 +560,7 @@ CheckBarType ( UINT8 BarIndex,
PCI_BAR_TYPE BarType
)
-/*++
+/**
Routine Description:
@@ -576,7 +576,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -585,7 +585,7 @@ ModifyRootBridgeAttributes ( IN UINT64 Attributes,
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation
)
-/*++
+/**
Routine Description:
@@ -601,7 +601,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -609,7 +609,7 @@ SupportPaletteSnoopAttributes ( IN PCI_IO_DEVICE *PciIoDevice,
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation
)
-/*++
+/**
Routine Description:
@@ -624,7 +624,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -635,7 +635,7 @@ PciIoAttributes ( IN UINT64 Attributes,
OUT UINT64 *Result OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -652,7 +652,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -663,7 +663,7 @@ PciIoGetBarAttributes ( OUT UINT64 *Supports, OPTIONAL
OUT VOID **Resources OPTIONAL
)
-/*++
+/**
Routine Description:
@@ -680,7 +680,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -692,7 +692,7 @@ PciIoSetBarAttributes ( IN OUT UINT64 *Offset,
IN OUT UINT64 *Length
)
-/*++
+/**
Routine Description:
@@ -710,7 +710,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -719,7 +719,7 @@ UpStreamBridgesAttributes ( IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
IN UINT64 Attributes
)
-/*++
+/**
Routine Description:
@@ -735,7 +735,7 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
@@ -743,7 +743,7 @@ PciDevicesOnTheSamePath ( IN PCI_IO_DEVICE *PciDevice1,
IN PCI_IO_DEVICE *PciDevice2
)
-/*++
+/**
Routine Description:
@@ -758,7 +758,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c index d35fe0d042..ed4588f842 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -26,7 +26,7 @@ VOID InstallHotPlugRequestProtocol (
IN EFI_STATUS *Status
)
-/*++
+/**
Routine Description:
@@ -37,7 +37,7 @@ Returns: None
---*/
+**/
{
EFI_HANDLE Handle;
@@ -58,7 +58,7 @@ VOID InstallPciHotplugGuid (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -70,7 +70,7 @@ Returns: None
---*/
+**/
{
EFI_STATUS Status;
@@ -94,7 +94,7 @@ VOID UninstallPciHotplugGuid (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -106,7 +106,7 @@ Returns: None
---*/
+**/
{
EFI_STATUS Status;
@@ -140,7 +140,7 @@ VOID GetBackPcCardBar (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -153,7 +153,7 @@ Returns: None
---*/
+**/
{
UINT32 Address;
@@ -227,7 +227,7 @@ RemoveRejectedPciDevices ( EFI_HANDLE RootBridgeHandle,
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -241,7 +241,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
PCI_IO_DEVICE *Temp;
@@ -316,7 +316,7 @@ EFI_STATUS PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -326,7 +326,7 @@ Returns: None
---*/
+**/
// TODO: PciResAlloc - add argument and description to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
@@ -689,7 +689,7 @@ EFI_STATUS PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -703,7 +703,7 @@ Returns: EFI Status.
---*/
+**/
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
@@ -1224,7 +1224,7 @@ PciScanBus_WithoutHotPlugDeviceSupport ( OUT UINT8 *SubBusNumber,
OUT UINT8 *PaddedBusRange
)
-/*++
+/**
Routine Description:
@@ -1236,7 +1236,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: StartBusNumber - add argument and description to function comment
// TODO: SubBusNumber - add argument and description to function comment
@@ -1409,7 +1409,7 @@ PciScanBus_WithHotPlugDeviceSupport ( OUT UINT8 *SubBusNumber,
OUT UINT8 *PaddedBusRange
)
-/*++
+/**
Routine Description:
@@ -1426,7 +1426,7 @@ Returns: None
---*/
+**/
// TODO: EFI_DEVICE_ERROR - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1704,7 +1704,7 @@ EFI_STATUS PciRootBridgeP2CProcess (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -1716,7 +1716,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1782,7 +1782,7 @@ EFI_STATUS PciHostBridgeP2CProcess (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -1792,7 +1792,7 @@ Returns: None
---*/
+**/
// TODO: PciResAlloc - add argument and description to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -1833,7 +1833,7 @@ EFI_STATUS PciHostBridgeEnumerator (
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -1848,7 +1848,7 @@ Returns: None
---*/
+**/
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.h index 868943a6d2..b8dc2a61f3 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.h @@ -53,7 +53,7 @@ void InstallHotPlugRequestProtocol (
IN EFI_STATUS *Status
)
-/*++
+/**
Routine Description:
@@ -67,14 +67,14 @@ Returns: TODO: add return values
---*/
+**/
;
VOID
InstallPciHotplugGuid (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -88,14 +88,14 @@ Returns: TODO: add return values
---*/
+**/
;
VOID
UninstallPciHotplugGuid (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -109,14 +109,14 @@ Returns: TODO: add return values
---*/
+**/
;
VOID
GetBackPcCardBar (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -130,7 +130,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -138,7 +138,7 @@ RemoveRejectedPciDevices ( EFI_HANDLE RootBridgeHandle,
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -153,14 +153,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciHostBridgeResourceAllocator (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -174,7 +174,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -196,7 +196,7 @@ PciScanBus ( OUT UINT8 *SubBusNumber,
OUT UINT8 *PaddedBusRange
)
-/*++
+/**
Routine Description:
@@ -213,7 +213,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -238,7 +238,7 @@ EFI_STATUS PciRootBridgeP2CProcess (
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -252,14 +252,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciHostBridgeP2CProcess (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -273,14 +273,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciHostBridgeEnumerator (
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
)
-/*++
+/**
Routine Description:
@@ -294,7 +294,7 @@ Returns: TODO: add return values
---*/
+**/
;
/**
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c index 05339f3afb..bf087821c5 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c @@ -34,7 +34,7 @@ EFI_STATUS GetOpRomInfo (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -42,7 +42,7 @@ Arguments: Returns:
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_NOT_FOUND - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -130,7 +130,7 @@ LoadOpRomImage ( IN PCI_IO_DEVICE *PciDevice,
IN UINT64 RomBase
)
-/*++
+/**
Routine Description:
@@ -140,7 +140,7 @@ Arguments: Returns:
---*/
+**/
// TODO: PciDevice - add argument and description to function comment
// TODO: RomBase - add argument and description to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
@@ -314,7 +314,7 @@ RomDecode ( IN UINT32 RomBar,
IN BOOLEAN Enable
)
-/*++
+/**
Routine Description:
@@ -322,7 +322,7 @@ Arguments: Returns:
---*/
+**/
// TODO: PciDevice - add argument and description to function comment
// TODO: RomBarIndex - add argument and description to function comment
// TODO: RomBar - add argument and description to function comment
@@ -399,7 +399,7 @@ EFI_STATUS ProcessOpRomImage (
PCI_IO_DEVICE *PciDevice
)
-/*++
+/**
Routine Description:
@@ -412,7 +412,7 @@ Returns: EFI Status.
---*/
+**/
{
UINT8 Indicator;
UINT32 ImageSize;
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.h index 752708d1a5..e06edd4c17 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.h @@ -18,7 +18,7 @@ EFI_STATUS GetOpRomInfo (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -32,7 +32,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -40,7 +40,7 @@ LoadOpRomImage ( IN PCI_IO_DEVICE *PciDevice,
IN UINT64 RomBase
)
-/*++
+/**
Routine Description:
@@ -55,7 +55,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -65,7 +65,7 @@ RomDecode ( IN UINT32 RomBar,
IN BOOLEAN Enable
)
-/*++
+/**
Routine Description:
@@ -82,14 +82,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
ProcessOpRomImage (
PCI_IO_DEVICE *PciDevice
)
-/*++
+/**
Routine Description:
@@ -103,7 +103,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.c index 338cfe9824..0cbbb36880 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.c @@ -17,7 +17,7 @@ EFI_STATUS ResetPowerManagementFeature (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -31,7 +31,7 @@ Returns: None
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_UNSUPPORTED - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.h index 6853e4f2ac..1239eed2ec 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.h @@ -18,7 +18,7 @@ EFI_STATUS ResetPowerManagementFeature (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -32,7 +32,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c index 1db77d15ae..1521065780 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c @@ -20,7 +20,7 @@ SkipVGAAperture ( OUT UINT64 *Start,
IN UINT64 Length
)
-/*++
+/**
Routine Description:
@@ -32,7 +32,7 @@ Returns: None
---*/
+**/
// TODO: Start - add argument and description to function comment
// TODO: Length - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -62,7 +62,7 @@ SkipIsaAliasAperture ( OUT UINT64 *Start,
IN UINT64 Length
)
-/*++
+/**
Routine Description:
@@ -74,7 +74,7 @@ Returns: None
---*/
+**/
// TODO: Start - add argument and description to function comment
// TODO: Length - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -106,7 +106,7 @@ InsertResourceNode ( PCI_RESOURCE_NODE *Bridge,
PCI_RESOURCE_NODE *ResNode
)
-/*++
+/**
Routine Description:
@@ -119,7 +119,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: ResNode - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -159,7 +159,7 @@ MergeResourceTree ( PCI_RESOURCE_NODE *Res,
BOOLEAN TypeMerge
)
-/*++
+/**
Routine Description:
@@ -177,7 +177,7 @@ Returns: None
---*/
+**/
// TODO: Dst - add argument and description to function comment
// TODO: Res - add argument and description to function comment
// TODO: TypeMerge - add argument and description to function comment
@@ -208,7 +208,7 @@ EFI_STATUS CalculateApertureIo16 (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -221,7 +221,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -349,7 +349,7 @@ EFI_STATUS CalculateResourceAperture (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -362,7 +362,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -464,7 +464,7 @@ GetResourceFromDevice ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -474,7 +474,7 @@ Returns: None
---*/
+**/
// TODO: PciDev - add argument and description to function comment
// TODO: IoNode - add argument and description to function comment
// TODO: Mem32Node - add argument and description to function comment
@@ -617,7 +617,7 @@ CreateResourceNode ( IN PCI_BAR_TYPE ResType,
IN PCI_RESOURCE_USAGE ResUsage
)
-/*++
+/**
Routine Description:
@@ -629,7 +629,7 @@ Returns: None
---*/
+**/
// TODO: PciDev - add argument and description to function comment
// TODO: Length - add argument and description to function comment
// TODO: Alignment - add argument and description to function comment
@@ -677,7 +677,7 @@ CreateResourceMap ( IN PCI_RESOURCE_NODE *Mem64Node,
IN PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -690,7 +690,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: IoNode - add argument and description to function comment
// TODO: Mem32Node - add argument and description to function comment
@@ -932,7 +932,7 @@ ResourcePaddingPolicy ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -952,7 +952,7 @@ Returns: None
---*/
+**/
// TODO: EFI_SUCCESS - add return value to function comment
{
//
@@ -981,7 +981,7 @@ DegradeResource ( IN PCI_RESOURCE_NODE *Mem64Node,
IN PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -997,7 +997,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: Mem32Node - add argument and description to function comment
// TODO: PMem32Node - add argument and description to function comment
@@ -1083,7 +1083,7 @@ BridgeSupportResourceDecode ( IN PCI_IO_DEVICE *Bridge,
IN UINT32 Decode
)
-/*++
+/**
Routine Description:
@@ -1098,9 +1098,9 @@ Returns: TODO: add return values
---*/
+**/
{
- /*++
+ /**
Routine Description:
@@ -1110,7 +1110,7 @@ Returns: None
---*/
+**/
if ((Bridge->Decodes) & Decode) {
return TRUE;
}
@@ -1123,7 +1123,7 @@ ProgramResource ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -1136,7 +1136,7 @@ Returns: None
---*/
+**/
// TODO: Base - add argument and description to function comment
// TODO: Bridge - add argument and description to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
@@ -1184,7 +1184,7 @@ ProgramBar ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Node
)
-/*++
+/**
Routine Description:
@@ -1194,7 +1194,7 @@ Returns: None
---*/
+**/
// TODO: Base - add argument and description to function comment
// TODO: Node - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -1274,7 +1274,7 @@ ProgramPpbApperture ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Node
)
-/*++
+/**
Routine Description:
@@ -1284,7 +1284,7 @@ Returns: None
---*/
+**/
// TODO: Base - add argument and description to function comment
// TODO: Node - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -1456,7 +1456,7 @@ ProgrameUpstreamBridgeForRom ( IN UINT32 OptionRomBase,
IN BOOLEAN Enable
)
-/*++
+/**
Routine Description:
@@ -1464,7 +1464,7 @@ Arguments: Returns:
---*/
+**/
// TODO: PciDevice - add argument and description to function comment
// TODO: OptionRomBase - add argument and description to function comment
// TODO: Enable - add argument and description to function comment
@@ -1510,7 +1510,7 @@ BOOLEAN ResourceRequestExisted (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -1522,7 +1522,7 @@ Returns: None
---*/
+**/
{
if (Bridge != NULL) {
if (!IsListEmpty (&Bridge->ChildList) || Bridge->Length != 0) {
@@ -1538,7 +1538,7 @@ InitializeResourcePool ( PCI_RESOURCE_NODE *ResourcePool,
PCI_BAR_TYPE ResourceType
)
-/*++
+/**
Routine Description:
@@ -1548,7 +1548,7 @@ Returns: None
---*/
+**/
// TODO: ResourcePool - add argument and description to function comment
// TODO: ResourceType - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -1576,7 +1576,7 @@ GetResourceMap ( PCI_RESOURCE_NODE *Mem64Pool,
PCI_RESOURCE_NODE *PMem64Pool
)
-/*++
+/**
Routine Description:
@@ -1586,7 +1586,7 @@ Returns: None
---*/
+**/
// TODO: PciDev - add argument and description to function comment
// TODO: IoBridge - add argument and description to function comment
// TODO: Mem32Bridge - add argument and description to function comment
@@ -1691,7 +1691,7 @@ EFI_STATUS DestroyResourceTree (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -1701,7 +1701,7 @@ Returns: None
---*/
+**/
// TODO: Bridge - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
@@ -1733,7 +1733,7 @@ RecordReservedResource ( IN PCI_BAR_TYPE ResType,
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -1743,7 +1743,7 @@ Returns: None
---*/
+**/
// TODO: Base - add argument and description to function comment
// TODO: Length - add argument and description to function comment
// TODO: ResType - add argument and description to function comment
@@ -1777,7 +1777,7 @@ ResourcePaddingForCardBusBridge ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -1787,7 +1787,7 @@ Returns: None
---*/
+**/
// TODO: PciDev - add argument and description to function comment
// TODO: IoNode - add argument and description to function comment
// TODO: Mem32Node - add argument and description to function comment
@@ -1880,7 +1880,7 @@ ProgramP2C ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Node
)
-/*++
+/**
Routine Description:
@@ -1890,7 +1890,7 @@ Returns: None
---*/
+**/
// TODO: Base - add argument and description to function comment
// TODO: Node - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
@@ -2127,7 +2127,7 @@ ApplyResourcePadding ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -2137,7 +2137,7 @@ Returns: None
---*/
+**/
// TODO: PciDev - add argument and description to function comment
// TODO: IoNode - add argument and description to function comment
// TODO: Mem32Node - add argument and description to function comment
@@ -2291,7 +2291,7 @@ VOID GetResourcePaddingPpb (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -2305,7 +2305,7 @@ Returns: None
---*/
+**/
{
if (gPciHotPlugInit) {
if (PciIoDevice->ResourcePaddingDescriptors == NULL) {
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h index 34a7787196..87d0b9146e 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.h @@ -64,7 +64,7 @@ SkipVGAAperture ( OUT UINT64 *Start,
IN UINT64 Length
)
-/*++
+/**
Routine Description:
@@ -79,7 +79,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -87,7 +87,7 @@ SkipIsaAliasAperture ( OUT UINT64 *Start,
IN UINT64 Length
)
-/*++
+/**
Routine Description:
@@ -102,7 +102,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -110,7 +110,7 @@ InsertResourceNode ( PCI_RESOURCE_NODE *Bridge,
PCI_RESOURCE_NODE *ResNode
)
-/*++
+/**
Routine Description:
@@ -125,7 +125,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -134,7 +134,7 @@ MergeResourceTree ( PCI_RESOURCE_NODE *Res,
BOOLEAN TypeMerge
)
-/*++
+/**
Routine Description:
@@ -150,14 +150,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
CalculateApertureIo16 (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -171,14 +171,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
CalculateResourceAperture (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -192,7 +192,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -204,7 +204,7 @@ GetResourceFromDevice ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -223,7 +223,7 @@ Returns: TODO: add return values
---*/
+**/
;
PCI_RESOURCE_NODE *
@@ -235,7 +235,7 @@ CreateResourceNode ( IN PCI_BAR_TYPE ResType,
IN PCI_RESOURCE_USAGE ResUsage
)
-/*++
+/**
Routine Description:
@@ -254,7 +254,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -266,7 +266,7 @@ CreateResourceMap ( IN PCI_RESOURCE_NODE *Mem64Node,
IN PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -285,7 +285,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -297,7 +297,7 @@ ResourcePaddingPolicy ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -316,7 +316,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -327,7 +327,7 @@ DegradeResource ( IN PCI_RESOURCE_NODE *Mem64Node,
IN PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -345,7 +345,7 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
@@ -353,7 +353,7 @@ BridgeSupportResourceDecode ( IN PCI_IO_DEVICE *Bridge,
IN UINT32 Decode
)
-/*++
+/**
Routine Description:
@@ -368,7 +368,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -376,7 +376,7 @@ ProgramResource ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -391,7 +391,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -399,7 +399,7 @@ ProgramBar ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Node
)
-/*++
+/**
Routine Description:
@@ -414,7 +414,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -422,7 +422,7 @@ ProgramPpbApperture ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Node
)
-/*++
+/**
Routine Description:
@@ -437,7 +437,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -446,7 +446,7 @@ ProgrameUpstreamBridgeForRom ( IN UINT32 OptionRomBase,
IN BOOLEAN Enable
)
-/*++
+/**
Routine Description:
@@ -462,14 +462,14 @@ Returns: TODO: add return values
---*/
+**/
;
BOOLEAN
ResourceRequestExisted (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -483,7 +483,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -491,7 +491,7 @@ InitializeResourcePool ( PCI_RESOURCE_NODE *ResourcePool,
PCI_BAR_TYPE ResourceType
)
-/*++
+/**
Routine Description:
@@ -506,7 +506,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -523,7 +523,7 @@ GetResourceMap ( PCI_RESOURCE_NODE *Mem64Pool,
PCI_RESOURCE_NODE *PMem64Pool
)
-/*++
+/**
Routine Description:
@@ -547,14 +547,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
DestroyResourceTree (
IN PCI_RESOURCE_NODE *Bridge
)
-/*++
+/**
Routine Description:
@@ -568,7 +568,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -578,7 +578,7 @@ RecordReservedResource ( IN PCI_BAR_TYPE ResType,
IN PCI_IO_DEVICE *Bridge
)
-/*++
+/**
Routine Description:
@@ -595,7 +595,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -607,7 +607,7 @@ ResourcePaddingForCardBusBridge ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -626,7 +626,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -634,7 +634,7 @@ ProgramP2C ( IN UINT64 Base,
IN PCI_RESOURCE_NODE *Node
)
-/*++
+/**
Routine Description:
@@ -649,7 +649,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -661,7 +661,7 @@ ApplyResourcePadding ( PCI_RESOURCE_NODE *Mem64Node,
PCI_RESOURCE_NODE *PMem64Node
)
-/*++
+/**
Routine Description:
@@ -680,14 +680,14 @@ Returns: TODO: add return values
---*/
+**/
;
VOID
GetResourcePaddingPpb (
IN PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -701,7 +701,7 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
@@ -709,7 +709,7 @@ ResetAllPpbBusNumber ( IN PCI_IO_DEVICE *Bridge,
IN UINT8 StartBusNumber
)
-/*++
+/**
Routine Description:
@@ -724,7 +724,7 @@ Returns: None
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c index 6c97601c1f..18ee0a89fa 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c @@ -39,7 +39,7 @@ PciRomAddImageMapping ( IN UINT64 RomAddress,
IN UINT64 RomLength
)
-/*++
+/**
Routine Description:
@@ -59,7 +59,7 @@ Returns: TODO: add return values
---*/
+**/
{
EFI_PCI_ROM_IMAGE_MAPPING *TempMapping;
@@ -98,7 +98,7 @@ PciRomGetRomResourceFromPciOptionRomTable ( IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo,
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -106,7 +106,7 @@ Arguments: Returns:
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: PciRootBridgeIo - add argument and description to function comment
// TODO: PciIoDevice - add argument and description to function comment
@@ -152,7 +152,7 @@ EFI_STATUS PciRomGetImageMapping (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -160,7 +160,7 @@ Arguments: Returns:
---*/
+**/
// TODO: PciIoDevice - add argument and description to function comment
// TODO: EFI_SUCCESS - add return value to function comment
{
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.h b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.h index c161920bd4..9cb9966c85 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.h +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciRomTable.h @@ -25,7 +25,7 @@ PciRomAddImageMapping ( IN UINT64 RomAddress,
IN UINT64 RomLength
)
-/*++
+/**
Routine Description:
@@ -45,7 +45,7 @@ Returns: TODO: add return values
---*/
+**/
;
@@ -55,7 +55,7 @@ PciRomGetRomResourceFromPciOptionRomTable ( IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo,
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -71,14 +71,14 @@ Returns: TODO: add return values
---*/
+**/
;
EFI_STATUS
PciRomGetImageMapping (
PCI_IO_DEVICE *PciIoDevice
)
-/*++
+/**
Routine Description:
@@ -92,7 +92,7 @@ Returns: TODO: add return values
---*/
+**/
;
#endif
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.c index 94f29157e8..0569982191 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/pcibus.c @@ -45,7 +45,7 @@ PciBusEntryPoint ( IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-/*++
+/**
Routine Description:
@@ -62,7 +62,7 @@ Returns: EFI_SUCCESS
EFI_DEVICE_ERROR
---*/
+**/
// TODO: ImageHandle - add argument and description to function comment
// TODO: SystemTable - add argument and description to function comment
{
@@ -99,7 +99,7 @@ PciBusDriverBindingSupported ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
+/**
Routine Description:
@@ -115,7 +115,7 @@ Returns: EFI_SUCCESS
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Controller - add argument and description to function comment
// TODO: RemainingDevicePath - add argument and description to function comment
@@ -193,7 +193,7 @@ PciBusDriverBindingStart ( IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
+/**
Routine Description:
@@ -208,7 +208,7 @@ Arguments: Returns:
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Controller - add argument and description to function comment
// TODO: RemainingDevicePath - add argument and description to function comment
@@ -262,7 +262,7 @@ PciBusDriverBindingStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
+/**
Routine Description:
@@ -279,7 +279,7 @@ Arguments: Returns:
---*/
+**/
// TODO: This - add argument and description to function comment
// TODO: Controller - add argument and description to function comment
// TODO: NumberOfChildren - add argument and description to function comment
diff --git a/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.c b/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.c index 4ebcc7ccc5..3b4a5e4fe9 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.c +++ b/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.c @@ -42,7 +42,7 @@ PciVgaMiniPortDriverEntryPoint ( IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-/*++
+/**
Routine Description:
Driver Entry Point.
@@ -52,7 +52,7 @@ PciVgaMiniPortDriverEntryPoint ( Returns:
EFI_STATUS
---*/
+**/
{
return EfiLibInstallDriverBindingComponentName2 (
ImageHandle,
|