summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorzliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-31 11:38:47 +0000
committerzliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-31 11:38:47 +0000
commit3e3c809fc1f41e8e25995d68bd121c22eb3bc0b5 (patch)
tree806101ec748cd64f7a4055e7a148fa0ce99711f3 /MdeModulePkg
parent3431f363371a54b9e1e219de41d0c10a93139524 (diff)
downloadedk2-3e3c809fc1f41e8e25995d68bd121c22eb3bc0b5.zip
edk2-3e3c809fc1f41e8e25995d68bd121c22eb3bc0b5.tar.gz
edk2-3e3c809fc1f41e8e25995d68bd121c22eb3bc0b5.tar.bz2
Roll back the updating of 4646 as it will cause the Richford SoftSDV boot failure
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4648 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Pei/Memory/MemoryServices.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
index 3be63fb..e2b2ccc 100644
--- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
+++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
@@ -115,23 +115,16 @@ Returns:
UINT64 EfiFreeMemorySize;
EFI_PHYSICAL_ADDRESS PhysicalAddressOfOldHob;
- if (MemoryLength > (MAX_ADDRESS - MemoryBegin + 1))
- return EFI_INVALID_PARAMETER;
-
-
DEBUG ((EFI_D_INFO, "PeiInstallPeiMemory MemoryBegin 0x%LX, MemoryLength 0x%LX\n", MemoryBegin, MemoryLength));
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
PrivateData->SwitchStackSignal = TRUE;
PrivateData->PeiMemoryInstalled = TRUE;
+
+ PrivateData->StackBase = MemoryBegin;
- //
- // Ensure the stack base is in page alignment
- //
- PrivateData->StackBase = ((UINTN)MemoryBegin + (EFI_PAGE_SIZE - 1)) & EFI_PAGE_SIZE;
-
- PeiStackSize = (RShiftU64 (MemoryLength, 1) + (EFI_PAGE_SIZE - 1)) & EFI_PAGE_SIZE;
+ PeiStackSize = RShiftU64 (MemoryLength, 1);
if (PEI_STACK_SIZE > PeiStackSize) {
PrivateData->StackSize = PeiStackSize;
} else {
@@ -140,7 +133,7 @@ Returns:
OldHandOffHob = PrivateData->HobList.HandoffInformationTable;
- PrivateData->HobList.Raw = (VOID *)((UINTN)(PrivateData->StackBase + PrivateData->StackSize));
+ PrivateData->HobList.Raw = (VOID *)((UINTN)(MemoryBegin + PrivateData->StackSize));
NewHandOffHob = PrivateData->HobList.HandoffInformationTable;
PhysicalAddressOfOldHob = (EFI_PHYSICAL_ADDRESS) (UINTN) OldHandOffHob;