summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Core/Pei/Memory/MemoryServices.c')
-rw-r--r--MdeModulePkg/Core/Pei/Memory/MemoryServices.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
index c7a06a3c5..10f21d562 100644
--- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
+++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
@@ -1,7 +1,7 @@
/** @file
EFI PEI Core memory services
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -182,7 +182,7 @@ PeiAllocatePages (
//
// Verify that there is sufficient memory to satisfy the allocation
//
- RemainingPages = EFI_SIZE_TO_PAGES ((UINTN) (*FreeMemoryTop - *FreeMemoryBottom));
+ RemainingPages = (UINTN)(*FreeMemoryTop - *FreeMemoryBottom) >> EFI_PAGE_SHIFT;
//
// For page allocation, the overhead sizeof (EFI_HOB_MEMORY_ALLOCATION) needs one extra page.
// So the number of remaining pages needs to be greater than that of the request pages.