]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
Clean up function header comments to match SMM CPU I/O 2 Protocol definition in the...
[mirror_edk2.git] / UefiCpuPkg / CpuIo2Smm / CpuIo2Smm.c
index 64897723e53ed4ec533f3b349d3adcdee83a25b0..30ef9ec8a8c5ee97af6bf30f38918d0927a6266b 100644 (file)
@@ -99,19 +99,19 @@ UINT8 mStride[] = {
 /**\r
   Check parameters to a SMM CPU I/O Protocol service request.\r
 \r
-  @param  Width                 Signifies the width of the I/O or Memory operation.\r
-  @param  Address               The base address of the I/O or Memory operation.\r
-  @param  Count                 The number of I/O or Memory operations to perform.\r
-                                The number of bytes moved is Width size * Count, starting at Address.\r
-  @param  Buffer                For read operations, the destination buffer to store the results.\r
-                                For write operations, the source buffer from which to write data.\r
-  @param  MmioOperation         TRUE for an MMIO operation, FALSE for I/O Port operation.\r
-  \r
-  @retval EFI_SUCCESS           The parameters for this request pass the checks.\r
-  @retval EFI_INVALID_PARAMETER Buffer is NULL or Width is not valid.\r
-  @retval EFI_UNSUPPORTED       The address range specified by Address, Width, and Count exceeds Limit.\r
-                                The Buffer is not aligned for the given Width.\r
-\r
+  @param[in]  MmioOperation  TRUE for an MMIO operation, FALSE for I/O Port operation.\r
+  @param[in]  Width          Signifies the width of the I/O operations.\r
+  @param[in]  Address        The base address of the I/O operations.  The caller is \r
+                             responsible for aligning the Address if required. \r
+  @param[in]  Count          The number of I/O operations to perform.\r
+  @param[out] Buffer         For read operations, the destination buffer to store \r
+                             the results.  For write operations, the source buffer \r
+                             from which to write data.\r
+\r
+  @retval EFI_SUCCESS            The data was read from or written to the device.\r
+  @retval EFI_UNSUPPORTED        The Address is not valid for this system.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+                                 \r
 **/\r
 EFI_STATUS\r
 CpuIoCheckParameter (\r
@@ -189,18 +189,24 @@ CpuIoCheckParameter (
 /**\r
   Reads memory-mapped registers.\r
 \r
-  @param  This                  A pointer to the EFI_SMM_CPU_IO2_PROTOCOL instance.\r
-  @param  Width                 Signifies the width of the I/O or Memory operation.\r
-  @param  Address               The base address of the I/O or Memoryoperation.\r
-  @param  Count                 The number of I/O or Memory operations to perform.\r
-                                The number of bytes moved is Width size * Count, starting at Address.\r
-  @param  Buffer                For read operations, the destination buffer to store the results.\r
-                                For write operations, the source buffer from which to write data.\r
-\r
-  @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
-  @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system.Or Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED       The Buffer is not aligned for the given Width.\r
-                                Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
+  The I/O operations are carried out exactly as requested.  The caller is \r
+  responsible for any alignment and I/O width issues that the bus, device, \r
+  platform, or type of I/O might require.\r
+\r
+  @param[in]  This     The EFI_SMM_CPU_IO2_PROTOCOL instance.\r
+  @param[in]  Width    Signifies the width of the I/O operations.\r
+  @param[in]  Address  The base address of the I/O operations.  The caller is \r
+                       responsible for aligning the Address if required. \r
+  @param[in]  Count    The number of I/O operations to perform.\r
+  @param[out] Buffer   For read operations, the destination buffer to store \r
+                       the results.  For write operations, the source buffer \r
+                       from which to write data.\r
+\r
+  @retval EFI_SUCCESS            The data was read from or written to the device.\r
+  @retval EFI_UNSUPPORTED        The Address is not valid for this system.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a \r
+                                 lack of resources\r
 \r
 **/\r
 EFI_STATUS\r
@@ -243,18 +249,24 @@ CpuMemoryServiceRead (
 /**\r
   Writes memory-mapped registers.\r
 \r
-  @param  This                  A pointer to the EFI_SMM_CPU_IO2_PROTOCOL instance.\r
-  @param  Width                 Signifies the width of the I/O or Memory operation.\r
-  @param  Address               The base address of the I/O or Memoryoperation.\r
-  @param  Count                 The number of I/O or Memory operations to perform.\r
-                                The number of bytes moved is Width size * Count, starting at Address.\r
-  @param  Buffer                For read operations, the destination buffer to store the results.\r
-                                For write operations, the source buffer from which to write data.\r
-\r
-  @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
-  @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system.Or Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED       The Buffer is not aligned for the given Width.\r
-                                Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
+  The I/O operations are carried out exactly as requested.  The caller is \r
+  responsible for any alignment and I/O width issues that the bus, device, \r
+  platform, or type of I/O might require.\r
+\r
+  @param[in]  This     The EFI_SMM_CPU_IO2_PROTOCOL instance.\r
+  @param[in]  Width    Signifies the width of the I/O operations.\r
+  @param[in]  Address  The base address of the I/O operations.  The caller is \r
+                       responsible for aligning the Address if required. \r
+  @param[in]  Count    The number of I/O operations to perform.\r
+  @param[in]  Buffer   For read operations, the destination buffer to store \r
+                       the results.  For write operations, the source buffer \r
+                       from which to write data.\r
+\r
+  @retval EFI_SUCCESS            The data was read from or written to the device.\r
+  @retval EFI_UNSUPPORTED        The Address is not valid for this system.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a \r
+                                 lack of resources\r
 \r
 **/\r
 EFI_STATUS\r
@@ -297,18 +309,24 @@ CpuMemoryServiceWrite (
 /**\r
   Reads I/O registers.\r
 \r
-  @param  This                  A pointer to the EFI_SMM_CPU_IO2_PROTOCOL instance.\r
-  @param  Width                 Signifies the width of the I/O or Memory operation.\r
-  @param  Address               The base address of the I/O or Memoryoperation.\r
-  @param  Count                 The number of I/O or Memory operations to perform.\r
-                                The number of bytes moved is Width size * Count, starting at Address.\r
-  @param  Buffer                For read operations, the destination buffer to store the results.\r
-                                For write operations, the source buffer from which to write data.\r
-\r
-  @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
-  @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system.Or Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED       The Buffer is not aligned for the given Width.\r
-                                Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
+  The I/O operations are carried out exactly as requested.  The caller is \r
+  responsible for any alignment and I/O width issues that the bus, device, \r
+  platform, or type of I/O might require.\r
+\r
+  @param[in]  This     The EFI_SMM_CPU_IO2_PROTOCOL instance.\r
+  @param[in]  Width    Signifies the width of the I/O operations.\r
+  @param[in]  Address  The base address of the I/O operations.  The caller is \r
+                       responsible for aligning the Address if required. \r
+  @param[in]  Count    The number of I/O operations to perform.\r
+  @param[out] Buffer   For read operations, the destination buffer to store \r
+                       the results.  For write operations, the source buffer \r
+                       from which to write data.\r
+\r
+  @retval EFI_SUCCESS            The data was read from or written to the device.\r
+  @retval EFI_UNSUPPORTED        The Address is not valid for this system.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a \r
+                                 lack of resources\r
 \r
 **/\r
 EFI_STATUS\r
@@ -350,18 +368,24 @@ CpuIoServiceRead (
 /**\r
   Write I/O registers.\r
 \r
-  @param  This                  A pointer to the EFI_SMM_CPU_IO2_PROTOCOL instance.\r
-  @param  Width                 Signifies the width of the I/O or Memory operation.\r
-  @param  Address               The base address of the I/O or Memoryoperation.\r
-  @param  Count                 The number of I/O or Memory operations to perform.\r
-                                The number of bytes moved is Width size * Count, starting at Address.\r
-  @param  Buffer                For read operations, the destination buffer to store the results.\r
-                                For write operations, the source buffer from which to write data.\r
-\r
-  @retval EFI_SUCCESS           The data was read from or written to the EFI system.\r
-  @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system.Or Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED       The Buffer is not aligned for the given Width.\r
-                                Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
+  The I/O operations are carried out exactly as requested.  The caller is \r
+  responsible for any alignment and I/O width issues that the bus, device, \r
+  platform, or type of I/O might require.\r
+\r
+  @param[in]  This     The EFI_SMM_CPU_IO2_PROTOCOL instance.\r
+  @param[in]  Width    Signifies the width of the I/O operations.\r
+  @param[in]  Address  The base address of the I/O operations.  The caller is \r
+                       responsible for aligning the Address if required. \r
+  @param[in]  Count    The number of I/O operations to perform.\r
+  @param[in]  Buffer   For read operations, the destination buffer to store \r
+                       the results.  For write operations, the source buffer \r
+                       from which to write data.\r
+\r
+  @retval EFI_SUCCESS            The data was read from or written to the device.\r
+  @retval EFI_UNSUPPORTED        The Address is not valid for this system.\r
+  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a \r
+                                 lack of resources\r
 \r
 **/\r
 EFI_STATUS\r
@@ -406,11 +430,11 @@ CpuIoServiceWrite (
 /**\r
   The module Entry Point SmmCpuIoProtocol driver\r
 \r
-  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
-  @param  SystemTable    A pointer to the EFI System Table.\r
+  @param[in] ImageHandle  The firmware allocated handle for the EFI image.\r
+  @param[in] SystemTable  A pointer to the EFI System Table.\r
 \r
-  @retval EFI_SUCCESS    The entry point is executed successfully.\r
-  @retval Other          Some error occurs when executing this entry point.\r
+  @retval EFI_SUCCESS  The entry point is executed successfully.\r
+  @retval Other        Some error occurs when executing this entry point.\r
 \r
 **/\r
 EFI_STATUS\r