]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / ArmPkg / Library / UncachedMemoryAllocationLib / UncachedMemoryAllocationLib.c
index a24300312e240f48468203897407cb9232c5459a..1209b926c1f7970a1640ed55511657f32a2f6a9a 100644 (file)
@@ -3,7 +3,7 @@
   a buffer.\r
 \r
   Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
-  \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
 \r
 VOID *\r
 UncachedInternalAllocatePages (\r
-  IN EFI_MEMORY_TYPE  MemoryType,  \r
+  IN EFI_MEMORY_TYPE  MemoryType,\r
   IN UINTN            Pages\r
   );\r
 \r
 VOID *\r
 UncachedInternalAllocateAlignedPages (\r
-  IN EFI_MEMORY_TYPE  MemoryType,  \r
+  IN EFI_MEMORY_TYPE  MemoryType,\r
   IN UINTN            Pages,\r
   IN UINTN            Alignment\r
   );\r
-  \r
-  \r
+\r
+\r
 \r
 //\r
 // Assume all of memory has the same cache attributes, unless we do our magic\r
@@ -60,16 +60,16 @@ AddPagesToList (
   )\r
 {\r
   FREE_PAGE_NODE  *NewNode;\r
-  \r
+\r
   NewNode = AllocatePool (sizeof (LIST_ENTRY));\r
   if (NewNode == NULL) {\r
     ASSERT (FALSE);\r
     return;\r
   }\r
-  \r
+\r
   NewNode->Allocation = Allocation;\r
   NewNode->Pages      = Pages;\r
-  \r
+\r
   InsertTailList (&mPageList, &NewNode->Link);\r
 }\r
 \r
@@ -84,12 +84,12 @@ RemovePagesFromList (
   FREE_PAGE_NODE  *OldNode;\r
 \r
   *Pages = 0;\r
-  \r
+\r
   for (Link = mPageList.ForwardLink; Link != &mPageList; Link = Link->ForwardLink) {\r
     OldNode = BASE_CR (Link, FREE_PAGE_NODE, Link);\r
     if (OldNode->Allocation == Allocation) {\r
       *Pages = OldNode->Pages;\r
-      \r
+\r
       RemoveEntryList (&OldNode->Link);\r
       FreePool (OldNode);\r
       return;\r
@@ -119,7 +119,7 @@ ConvertToPhysicalAddress (
 \r
 VOID *\r
 UncachedInternalAllocatePages (\r
-  IN EFI_MEMORY_TYPE  MemoryType,  \r
+  IN EFI_MEMORY_TYPE  MemoryType,\r
   IN UINTN            Pages\r
   )\r
 {\r
@@ -170,7 +170,7 @@ UncachedFreePages (
 \r
 VOID *\r
 UncachedInternalAllocateAlignedPages (\r
-  IN EFI_MEMORY_TYPE  MemoryType,  \r
+  IN EFI_MEMORY_TYPE  MemoryType,\r
   IN UINTN            Pages,\r
   IN UINTN            Alignment\r
   )\r
@@ -187,7 +187,7 @@ UncachedInternalAllocateAlignedPages (
   // Alignment must be a power of two or zero.\r
   //\r
   ASSERT ((Alignment & (Alignment - 1)) == 0);\r
\r
+\r
   if (Pages == 0) {\r
     return NULL;\r
   }\r
@@ -201,7 +201,7 @@ UncachedInternalAllocateAlignedPages (
     // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow.\r
     //\r
     ASSERT (RealPages > Pages);\r
\r
+\r
     Status         = gBS->AllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory);\r
     if (EFI_ERROR (Status)) {\r
       return NULL;\r
@@ -234,16 +234,16 @@ UncachedInternalAllocateAlignedPages (
     }\r
     AlignedMemory  = (UINTN) Memory;\r
   }\r
-  \r
+\r
   Status = gDS->GetMemorySpaceDescriptor (Memory, &Descriptor);\r
   if (!EFI_ERROR (Status)) {\r
     // We are making an assumption that all of memory has the same default attributes\r
     gAttributes = Descriptor.Attributes;\r
   }\r
-  \r
+\r
   Status = gDS->SetMemorySpaceAttributes (Memory, EFI_PAGES_TO_SIZE (Pages), EFI_MEMORY_WC);\r
   ASSERT_EFI_ERROR (Status);\r
-  \r
+\r
   return (VOID *)(UINTN)Memory;\r
 }\r
 \r
@@ -256,13 +256,13 @@ UncachedFreeAlignedPages (
   )\r
 {\r
   EFI_STATUS            Status;\r
-  EFI_PHYSICAL_ADDRESS  Memory; \r
+  EFI_PHYSICAL_ADDRESS  Memory;\r
 \r
   ASSERT (Pages != 0);\r
-  \r
+\r
   Memory = (EFI_PHYSICAL_ADDRESS) (UINTN) Buffer;\r
   Status = gDS->SetMemorySpaceAttributes (Memory, EFI_PAGES_TO_SIZE (Pages), gAttributes);\r
-  \r
+\r
   Status = gBS->FreePages (Memory, Pages);\r
   ASSERT_EFI_ERROR (Status);\r
 }\r
@@ -278,7 +278,7 @@ UncachedInternalAllocateAlignedPool (
   )\r
 {\r
   VOID      *AlignedAddress;\r
-  \r
+\r
   //\r
   // Alignment must be a power of two or zero.\r
   //\r
@@ -287,7 +287,7 @@ UncachedInternalAllocateAlignedPool (
   if (Alignment < EFI_PAGE_SIZE) {\r
     Alignment = EFI_PAGE_SIZE;\r
   }\r
-    \r
+\r
   AlignedAddress = UncachedInternalAllocateAlignedPages (PoolType, EFI_SIZE_TO_PAGES (AllocationSize), Alignment);\r
   if (AlignedAddress == NULL) {\r
     return NULL;\r
@@ -382,7 +382,7 @@ UncachedInternalAllocateAlignedCopyPool (
   )\r
 {\r
   VOID  *Memory;\r
-  \r
+\r
   ASSERT (Buffer != NULL);\r
   ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));\r
 \r
@@ -433,7 +433,7 @@ UncachedFreeAlignedPool (
   )\r
 {\r
   UINTN   Pages;\r
-  \r
+\r
   RemovePagesFromList (Allocation, &Pages);\r
 \r
   UncachedFreePages (Allocation, Pages);\r
@@ -441,7 +441,7 @@ UncachedFreeAlignedPool (
 \r
 VOID *\r
 UncachedInternalAllocatePool (\r
-  IN EFI_MEMORY_TYPE  MemoryType,  \r
+  IN EFI_MEMORY_TYPE  MemoryType,\r
   IN UINTN            AllocationSize\r
   )\r
 {\r
@@ -478,9 +478,9 @@ UncachedAllocateReservedPool (
 \r
 VOID *\r
 UncachedInternalAllocateZeroPool (\r
-  IN EFI_MEMORY_TYPE  PoolType,  \r
+  IN EFI_MEMORY_TYPE  PoolType,\r
   IN UINTN            AllocationSize\r
-  ) \r
+  )\r
 {\r
   VOID  *Memory;\r
 \r
@@ -520,10 +520,10 @@ UncachedAllocateReservedZeroPool (
 \r
 VOID *\r
 UncachedInternalAllocateCopyPool (\r
-  IN EFI_MEMORY_TYPE  PoolType,  \r
+  IN EFI_MEMORY_TYPE  PoolType,\r
   IN UINTN            AllocationSize,\r
   IN CONST VOID       *Buffer\r
-  ) \r
+  )\r
 {\r
   VOID  *Memory;\r
 \r
@@ -535,7 +535,7 @@ UncachedInternalAllocateCopyPool (
      Memory = CopyMem (Memory, Buffer, AllocationSize);\r
   }\r
   return Memory;\r
-} \r
+}\r
 \r
 VOID *\r
 EFIAPI\r