summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Core/Dxe/Gcd/gcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkModulePkg/Core/Dxe/Gcd/gcd.c')
-rw-r--r--EdkModulePkg/Core/Dxe/Gcd/gcd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/EdkModulePkg/Core/Dxe/Gcd/gcd.c b/EdkModulePkg/Core/Dxe/Gcd/gcd.c
index 73037ed..208c05a 100644
--- a/EdkModulePkg/Core/Dxe/Gcd/gcd.c
+++ b/EdkModulePkg/Core/Dxe/Gcd/gcd.c
@@ -1094,7 +1094,7 @@ Returns:
//
if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchBottomUp ||
GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown ) {
- MaxAddress = *BaseAddress - 1;
+ MaxAddress = *BaseAddress;
} else {
MaxAddress = Entry->EndAddress;
}
@@ -1103,7 +1103,7 @@ Returns:
// Verify that the list of descriptors are unallocated memory matching GcdMemoryType.
//
if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown ||
- GcdAllocateType == EfiGcdAllocateAnySearchTopDown ) {
+ GcdAllocateType == EfiGcdAllocateAnySearchTopDown ) {
Link = Map->BackLink;
} else {
Link = Map->ForwardLink;