ArmPlatformPkg/PrePeiCore: Reserve some memory on the top of the stack for Global Variables in XIP code

The size of this memory is controlled by a PCD. The Global Variable in this regsion are defined by their offset.

This memory region can be use to store the PEI Services Table Pointer.
Update the PeiServicesTablePointerLib to use this region instead of PcdPeiServicePtrAddr.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11803 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin
2011-06-11 12:03:00 +00:00
parent 936eff09c3
commit 47a8e12fe1
10 changed files with 56 additions and 28 deletions

View File

@@ -39,7 +39,7 @@ SetPeiServicesTablePointer (
UINTN *PeiPtrLoc;
ASSERT (PeiServicesTablePointer != NULL);
PeiPtrLoc = (UINTN *)(UINTN)PcdGet32(PcdPeiServicePtrAddr);
PeiPtrLoc = (UINTN *)(UINTN)(PcdGet32 (PcdCPUCoresNonSecStackBase) + (PcdGet32 (PcdCPUCoresNonSecStackSize) / 2) - PcdGet32 (PcdPeiServicePtrGlobalOffset));
*PeiPtrLoc = (UINTN)PeiServicesTablePointer;
}
@@ -63,7 +63,7 @@ GetPeiServicesTablePointer (
{
UINTN *PeiPtrLoc;
PeiPtrLoc = (UINTN *)(UINTN)PcdGet32(PcdPeiServicePtrAddr);
PeiPtrLoc = (UINTN *)(UINTN)(PcdGet32 (PcdCPUCoresNonSecStackBase) + (PcdGet32 (PcdCPUCoresNonSecStackSize) / 2) - PcdGet32 (PcdPeiServicePtrGlobalOffset));
return (CONST EFI_PEI_SERVICES **)*PeiPtrLoc;
}