]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuIoPei/CpuIoPei.c
UefiCpuPkg: Clean up source files
[mirror_edk2.git] / UefiCpuPkg / CpuIoPei / CpuIoPei.c
index c94abe8e007666018586e700b1a593cc8af85f41..30d2ae968219b02caa3489c56dc9dd17233b5e95 100644 (file)
 /** @file\r
   Produces the CPU I/O PPI.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 \r
-**/\r
-\r
-#include <PiDxe.h>\r
-\r
-#include <Ppi/CpuIo.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/IoLib.h>\r
-#include <Library/PeiServicesLib.h>\r
-\r
-#define MAX_IO_PORT_ADDRESS   0xFFFF\r
-\r
-//\r
-// Function Prototypes\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceRead (\r
-  IN  CONST EFI_PEI_SERVICES    **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI  *This,\r
-  IN  EFI_PEI_CPU_IO_PPI_WIDTH  Width,\r
-  IN  UINT64                    Address,\r
-  IN  UINTN                     Count,\r
-  OUT VOID                      *Buffer\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceWrite (\r
-  IN CONST EFI_PEI_SERVICES    **PeiServices,\r
-  IN CONST EFI_PEI_CPU_IO_PPI  *This,\r
-  IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,\r
-  IN UINT64                    Address,\r
-  IN UINTN                     Count,\r
-  IN VOID                      *Buffer\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceRead (\r
-  IN  CONST EFI_PEI_SERVICES    **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI  *This,\r
-  IN  EFI_PEI_CPU_IO_PPI_WIDTH  Width,\r
-  IN  UINT64                    Address,\r
-  IN  UINTN                     Count,\r
-  OUT VOID                      *Buffer\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceWrite (\r
-  IN CONST EFI_PEI_SERVICES    **PeiServices,\r
-  IN CONST EFI_PEI_CPU_IO_PPI  *This,\r
-  IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,\r
-  IN UINT64                    Address,\r
-  IN UINTN                     Count,\r
-  IN VOID                      *Buffer\r
-  );\r
-\r
-UINT8\r
-EFIAPI\r
-CpuIoRead8 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-UINT16\r
-EFIAPI\r
-CpuIoRead16 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-UINT32\r
-EFIAPI\r
-CpuIoRead32 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-UINT64\r
-EFIAPI\r
-CpuIoRead64 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-CpuIoWrite8 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT8                       Data\r
-  );\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
 \r
-VOID\r
-EFIAPI\r
-CpuIoWrite16 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT16                      Data\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-CpuIoWrite32 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT32                      Data\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-CpuIoWrite64 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT64                      Data\r
-  );\r
-\r
-UINT8\r
-EFIAPI\r
-CpuMemRead8 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-UINT16\r
-EFIAPI\r
-CpuMemRead16 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-UINT32\r
-EFIAPI\r
-CpuMemRead32 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-UINT64\r
-EFIAPI\r
-CpuMemRead64 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-CpuMemWrite8 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT8                       Data\r
-  );\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-VOID\r
-EFIAPI\r
-CpuMemWrite16 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT16                      Data\r
-  );\r
+**/\r
 \r
-VOID\r
-EFIAPI\r
-CpuMemWrite32 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT32                      Data\r
-  );\r
+#include "CpuIoPei.h"\r
 \r
-VOID\r
-EFIAPI\r
-CpuMemWrite64 (\r
-  IN  CONST EFI_PEI_SERVICES      **PeiServices,\r
-  IN  CONST EFI_PEI_CPU_IO_PPI    *This,\r
-  IN  UINT64                      Address,\r
-  IN  UINT64                      Data\r
-  );\r
-  \r
 //\r
 // Instance of CPU I/O PPI\r
 //\r
@@ -244,7 +54,7 @@ EFI_PEI_PPI_DESCRIPTOR gPpiList = {
   &gEfiPeiCpuIoPpiInstalledGuid,\r
   NULL\r
 };\r
-  \r
+\r
 //\r
 // Lookup table for increment values based on transfer widths\r
 //\r
@@ -293,9 +103,9 @@ UINT8 mOutStride[] = {
   @retval EFI_SUCCESS            The parameters for this request pass the checks.\r
   @retval EFI_INVALID_PARAMETER  Width is invalid for this EFI system.\r
   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED        The address range specified by Address, Width, \r
+  @retval EFI_UNSUPPORTED        The address range specified by Address, Width,\r
                                  and Count is not valid for this EFI system.\r
-                                 \r
+\r
 **/\r
 EFI_STATUS\r
 CpuIoCheckParameter (\r
@@ -319,7 +129,7 @@ CpuIoCheckParameter (
   //\r
   // Check to see if Width is in the valid range\r
   //\r
-  if (Width < 0 || Width >= EfiPeiCpuIoWidthMaximum) {\r
+  if ((UINT32)Width >= EfiPeiCpuIoWidthMaximum) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -338,20 +148,20 @@ CpuIoCheckParameter (
   if (!MmioOperation && (Width == EfiPeiCpuIoWidthUint64)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
-  // Check to see if any address associated with this transfer exceeds the maximum \r
+  // Check to see if any address associated with this transfer exceeds the maximum\r
   // allowed address.  The maximum address implied by the parameters passed in is\r
   // Address + Size * Count.  If the following condition is met, then the transfer\r
   // is not supported.\r
   //\r
   //    Address + Size * Count > (MmioOperation ? MAX_ADDRESS : MAX_IO_PORT_ADDRESS) + 1\r
   //\r
-  // Since MAX_ADDRESS can be the maximum integer value supported by the CPU and Count \r
+  // Since MAX_ADDRESS can be the maximum integer value supported by the CPU and Count\r
   // can also be the maximum integer value supported by the CPU, this range\r
   // check must be adjusted to avoid all overflow conditions.\r
-  //   \r
-  // The following form of the range check is equivalent but assumes that \r
+  //\r
+  // The following form of the range check is equivalent but assumes that\r
   // MAX_ADDRESS and MAX_IO_PORT_ADDRESS are of the form (2^n - 1).\r
   //\r
   Limit = (MmioOperation ? MAX_ADDRESS : MAX_IO_PORT_ADDRESS);\r
@@ -359,7 +169,7 @@ CpuIoCheckParameter (
     if (Address > Limit) {\r
       return EFI_UNSUPPORTED;\r
     }\r
-  } else {  \r
+  } else {\r
     MaxCount = RShiftU64 (Limit, Width);\r
     if (MaxCount < (Count - 1)) {\r
       return EFI_UNSUPPORTED;\r
@@ -368,7 +178,7 @@ CpuIoCheckParameter (
       return EFI_UNSUPPORTED;\r
     }\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -386,7 +196,7 @@ CpuIoCheckParameter (
   @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_INVALID_PARAMETER  Width is invalid for this EFI system.\r
   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED        The address range specified by Address, Width, \r
+  @retval EFI_UNSUPPORTED        The address range specified by Address, Width,\r
                                  and Count is not valid for this EFI system.\r
 \r
 **/\r
@@ -460,7 +270,7 @@ CpuMemoryServiceRead (
   @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_INVALID_PARAMETER  Width is invalid for this EFI system.\r
   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED        The address range specified by Address, Width, \r
+  @retval EFI_UNSUPPORTED        The address range specified by Address, Width,\r
                                  and Count is not valid for this EFI system.\r
 \r
 **/\r
@@ -534,7 +344,7 @@ CpuMemoryServiceWrite (
   @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_INVALID_PARAMETER  Width is invalid for this EFI system.\r
   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED        The address range specified by Address, Width, \r
+  @retval EFI_UNSUPPORTED        The address range specified by Address, Width,\r
                                  and Count is not valid for this EFI system.\r
 \r
 **/\r
@@ -567,6 +377,31 @@ CpuIoServiceRead (
   InStride = mInStride[Width];\r
   OutStride = mOutStride[Width];\r
   OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);\r
+\r
+  //\r
+  // Fifo operations supported for (mInStride[Width] == 0)\r
+  //\r
+  if (InStride == 0) {\r
+    switch (OperationWidth) {\r
+    case EfiPeiCpuIoWidthUint8:\r
+      IoReadFifo8 ((UINTN)Address, Count, Buffer);\r
+      return EFI_SUCCESS;\r
+    case EfiPeiCpuIoWidthUint16:\r
+      IoReadFifo16 ((UINTN)Address, Count, Buffer);\r
+      return EFI_SUCCESS;\r
+    case EfiPeiCpuIoWidthUint32:\r
+      IoReadFifo32 ((UINTN)Address, Count, Buffer);\r
+      return EFI_SUCCESS;\r
+    default:\r
+      //\r
+      // The CpuIoCheckParameter call above will ensure that this\r
+      // path is not taken.\r
+      //\r
+      ASSERT (FALSE);\r
+      break;\r
+    }\r
+  }\r
+\r
   Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);\r
   for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
     if (OperationWidth == EfiPeiCpuIoWidthUint8) {\r
@@ -603,7 +438,7 @@ CpuIoServiceRead (
   @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_INVALID_PARAMETER  Width is invalid for this EFI system.\r
   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
-  @retval EFI_UNSUPPORTED        The address range specified by Address, Width, \r
+  @retval EFI_UNSUPPORTED        The address range specified by Address, Width,\r
                                  and Count is not valid for this EFI system.\r
 \r
 **/\r
@@ -639,6 +474,31 @@ CpuIoServiceWrite (
   InStride = mInStride[Width];\r
   OutStride = mOutStride[Width];\r
   OperationWidth = (EFI_PEI_CPU_IO_PPI_WIDTH) (Width & 0x03);\r
+\r
+  //\r
+  // Fifo operations supported for (mInStride[Width] == 0)\r
+  //\r
+  if (InStride == 0) {\r
+    switch (OperationWidth) {\r
+    case EfiPeiCpuIoWidthUint8:\r
+      IoWriteFifo8 ((UINTN)Address, Count, Buffer);\r
+      return EFI_SUCCESS;\r
+    case EfiPeiCpuIoWidthUint16:\r
+      IoWriteFifo16 ((UINTN)Address, Count, Buffer);\r
+      return EFI_SUCCESS;\r
+    case EfiPeiCpuIoWidthUint32:\r
+      IoWriteFifo32 ((UINTN)Address, Count, Buffer);\r
+      return EFI_SUCCESS;\r
+    default:\r
+      //\r
+      // The CpuIoCheckParameter call above will ensure that this\r
+      // path is not taken.\r
+      //\r
+      ASSERT (FALSE);\r
+      break;\r
+    }\r
+  }\r
+\r
   Aligned = (BOOLEAN)(((UINTN)Buffer & (mInStride[OperationWidth] - 1)) == 0x00);\r
   for (Uint8Buffer = (UINT8 *)Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
     if (OperationWidth == EfiPeiCpuIoWidthUint8) {\r
@@ -657,14 +517,14 @@ CpuIoServiceWrite (
       }\r
     }\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
   8-bit I/O read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -685,7 +545,7 @@ CpuIoRead8 (
 /**\r
   16-bit I/O read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -707,7 +567,7 @@ CpuIoRead16 (
 /**\r
   32-bit I/O read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -729,7 +589,7 @@ CpuIoRead32 (
 /**\r
   64-bit I/O read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -751,7 +611,7 @@ CpuIoRead64 (
 /**\r
   8-bit I/O write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -773,7 +633,7 @@ CpuIoWrite8 (
 /**\r
   16-bit I/O write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -795,7 +655,7 @@ CpuIoWrite16 (
 /**\r
   32-bit I/O write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -817,7 +677,7 @@ CpuIoWrite32 (
 /**\r
   64-bit I/O write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -839,7 +699,7 @@ CpuIoWrite64 (
 /**\r
   8-bit memory read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -861,7 +721,7 @@ CpuMemRead8 (
 /**\r
   16-bit memory read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -883,7 +743,7 @@ CpuMemRead16 (
 /**\r
   32-bit memory read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -905,7 +765,7 @@ CpuMemRead32 (
 /**\r
   64-bit memory read operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -927,7 +787,7 @@ CpuMemRead64 (
 /**\r
   8-bit memory write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -949,7 +809,7 @@ CpuMemWrite8 (
 /**\r
   16-bit memory write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -971,7 +831,7 @@ CpuMemWrite16 (
 /**\r
   32-bit memory write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -993,7 +853,7 @@ CpuMemWrite32 (
 /**\r
   64-bit memory write operations.\r
 \r
-  @param[in] PeiServices  An indirect pointer to the PEI Services Table published \r
+  @param[in] PeiServices  An indirect pointer to the PEI Services Table published\r
                           by the PEI Foundation.\r
   @param[in] This         Pointer to local data for the interface.\r
   @param[in] Address      The physical address of the access.\r
@@ -1018,7 +878,7 @@ CpuMemWrite64 (
   This function is the Entry point of the CPU I/O PEIM which installs CpuIoPpi.\r
 \r
   @param[in]  FileHandle   Pointer to image file handle.\r
-  @param[in]  PeiServices  Pointer to PEI Services Table   \r
+  @param[in]  PeiServices  Pointer to PEI Services Table\r
 \r
   @retval EFI_SUCCESS  CPU I/O PPI successfully installed\r
 \r
@@ -1036,12 +896,12 @@ CpuIoInitialize (
   // Register so it will be automatically shadowed to memory\r
   //\r
   Status = PeiServicesRegisterForShadow (FileHandle);\r
-  \r
+\r
   //\r
   // Make CpuIo pointer in PeiService table point to gCpuIoPpi\r
   //\r
   (*((EFI_PEI_SERVICES **)PeiServices))->CpuIo = &gCpuIoPpi;\r
-  \r
+\r
   if (Status == EFI_ALREADY_STARTED) {\r
     //\r
     // Shadow completed and running from memory\r
@@ -1051,6 +911,6 @@ CpuIoInitialize (
     Status = PeiServicesInstallPpi (&gPpiList);\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r