]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/SmmMemLib/SmmMemLib.c
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Library / SmmMemLib / SmmMemLib.c
index db55a1a6c15063cdd42c0290e50d95f3f3ac9828..8c78a0b426f2fd5a0effa7cb6d26002945a583d1 100644 (file)
@@ -6,7 +6,7 @@
   all SMRAM range via SMM_ACCESS2_PROTOCOL, including the range for firmware (like SMM Core\r
   and SMM driver) and/or specific dedicated hardware.\r
 \r
-  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -86,9 +86,9 @@ SmmMemLibInternalCalculateMaximumSupportAddress (
   if (PhysicalAddressBits > 48) {\r
     PhysicalAddressBits = 48;\r
   }\r
-  \r
+\r
   //\r
-  // Save the maximum support address in one global variable  \r
+  // Save the maximum support address in one global variable\r
   //\r
   mSmmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);\r
   DEBUG ((EFI_D_INFO, "mSmmMemLibInternalMaximumSupportAddress = 0x%lx\n", mSmmMemLibInternalMaximumSupportAddress));\r
@@ -111,7 +111,7 @@ SmmIsBufferOutsideSmmValid (
   )\r
 {\r
   UINTN  Index;\r
-  \r
+\r
   //\r
   // Check override.\r
   // NOTE: (B:0->L:4G) is invalid for IA32, but (B:1->L:4G-1)/(B:4G-1->L:1) is valid.\r
@@ -131,7 +131,7 @@ SmmIsBufferOutsideSmmValid (
       ));\r
     return FALSE;\r
   }\r
-  \r
+\r
   for (Index = 0; Index < mSmmMemLibInternalSmramCount; Index ++) {\r
     if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) ||\r
         ((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) {\r
@@ -157,7 +157,7 @@ SmmIsBufferOutsideSmmValid (
   if (mSmmReadyToLock) {\r
     EFI_MEMORY_DESCRIPTOR          *MemoryMap;\r
     BOOLEAN                        InValidCommunicationRegion;\r
-    \r
+\r
     InValidCommunicationRegion = FALSE;\r
     MemoryMap = mMemoryMap;\r
     for (Index = 0; Index < mMemoryMapEntryCount; Index++) {\r
@@ -222,7 +222,7 @@ SmmCopyMemToSmram (
   If the check passes, it copies memory and returns EFI_SUCCESS.\r
   If the check fails, it returns EFI_SECURITY_VIOLATION.\r
   The implementation must be reentrant.\r
-  \r
+\r
   @param  DestinationBuffer   The pointer to the destination buffer of the memory copy.\r
   @param  SourceBuffer        The pointer to the source buffer of the memory copy.\r
   @param  Length              The number of bytes to copy from SourceBuffer to DestinationBuffer.\r
@@ -255,7 +255,7 @@ SmmCopyMemFromSmram (
   If the check passes, it copies memory and returns EFI_SUCCESS.\r
   If the check fails, it returns EFI_SECURITY_VIOLATION.\r
   The implementation must be reentrant, and it must handle the case where source buffer overlaps destination buffer.\r
-  \r
+\r
   @param  DestinationBuffer   The pointer to the destination buffer of the memory copy.\r
   @param  SourceBuffer        The pointer to the source buffer of the memory copy.\r
   @param  Length              The number of bytes to copy from SourceBuffer to DestinationBuffer.\r
@@ -292,11 +292,11 @@ SmmCopyMem (
   It checks if target buffer is valid per processor architecture and not overlap with SMRAM.\r
   If the check passes, it fills memory and returns EFI_SUCCESS.\r
   If the check fails, it returns EFI_SECURITY_VIOLATION.\r
-  \r
+\r
   @param  Buffer    The memory to set.\r
   @param  Length    The number of bytes to set.\r
   @param  Value     The value with which to fill Length bytes of Buffer.\r
-  \r
+\r
   @retval EFI_SECURITY_VIOLATION The Buffer is invalid per processor architecture or overlap with SMRAM.\r
   @retval EFI_SUCCESS            Memory is set.\r
 \r
@@ -359,7 +359,7 @@ SmmLibInternalEndOfDxeNotify (
   do {\r
     Status = gBS->AllocatePool (EfiBootServicesData, MemoryMapSize, (VOID **)&MemoryMap);\r
     ASSERT (MemoryMap != NULL);\r
-  \r
+\r
     Status = gBS->GetMemoryMap (\r
                &MemoryMapSize,\r
                MemoryMap,\r
@@ -391,7 +391,7 @@ SmmLibInternalEndOfDxeNotify (
     MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize);\r
   }\r
   MemoryMap = MemoryMapStart;\r
-  \r
+\r
   //\r
   // Get Data\r
   //\r
@@ -412,7 +412,7 @@ SmmLibInternalEndOfDxeNotify (
   }\r
   mMemoryMap = SmmMemoryMapStart;\r
   MemoryMap = MemoryMapStart;\r
-  \r
+\r
   gBS->FreePool (MemoryMap);\r
 \r
   return EFI_SUCCESS;\r
@@ -458,7 +458,7 @@ SmmMemLibConstructor (
   EFI_STATUS                    Status;\r
   EFI_SMM_ACCESS2_PROTOCOL      *SmmAccess;\r
   UINTN                         Size;\r
-  \r
+\r
   //\r
   // Get SMRAM information\r
   //\r