]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/Dxe/Gcd/gcd.c
I fixed following bugs.
[mirror_edk2.git] / EdkModulePkg / Core / Dxe / Gcd / gcd.c
index 73037edb24d4268c7d530abc83741802368e7b70..208c05a0157b3305d9f59c32dea9f11472aaea1d 100644 (file)
@@ -1094,7 +1094,7 @@ Returns:
     //\r
     if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchBottomUp ||\r
         GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown     ) {\r
-      MaxAddress = *BaseAddress - 1;\r
+      MaxAddress = *BaseAddress;\r
     } else {\r
       MaxAddress = Entry->EndAddress;\r
     }\r
@@ -1103,7 +1103,7 @@ Returns:
     // Verify that the list of descriptors are unallocated memory matching GcdMemoryType.\r
     //\r
     if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown ||\r
-        GcdAllocateType == EfiGcdAllocateAnySearchTopDown           ) {\r
+        GcdAllocateType == EfiGcdAllocateAnySearchTopDown ) {\r
       Link = Map->BackLink;\r
     } else {\r
       Link = Map->ForwardLink;\r