ArmPlatformPkg: Changed the reference base of the PI Global Pointer Offset

Before the PI Global Pointer Offsets were refered to the top of the Global Pointer region (negative offset).
After this commit the Global Pointer Offset are relative to the base of the Global Pointer region.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12172 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin
2011-08-18 22:02:20 +00:00
parent 8c454d9800
commit ca8afbca68
2 changed files with 10 additions and 4 deletions

View File

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