diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-18 22:02:20 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-18 22:02:20 +0000 |
commit | ca8afbca68b65864770e13a486a6718d5b9fea8e (patch) | |
tree | 5c688d037d2e6442e7c032aa4477e99a512d3a89 /ArmPlatformPkg | |
parent | 8c454d9800a128b75b9156918c378dcb2baa22c0 (diff) | |
download | edk2-platforms-ca8afbca68b65864770e13a486a6718d5b9fea8e.tar.xz |
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
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r-- | ArmPlatformPkg/ArmPlatformPkg.dec | 4 | ||||
-rw-r--r-- | ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec index 22605dcc92..833ddce5c5 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dec +++ b/ArmPlatformPkg/ArmPlatformPkg.dec @@ -73,8 +73,8 @@ gArmPlatformTokenSpaceGuid.PcdPeiGlobalVariableSize|0x4|UINT32|0x00000016 # PeiServicePtr and HobListPtr shares the same location in the PEI Global Variable list # PeiServicePtr is only valid with PEI Core and HobListPtr only when the PEI Core is skipped. - gArmPlatformTokenSpaceGuid.PcdPeiServicePtrGlobalOffset|0x4|UINT32|0x00000017 - gArmPlatformTokenSpaceGuid.PcdHobListPtrGlobalOffset|0x4|UINT32|0x00000018 + gArmPlatformTokenSpaceGuid.PcdPeiServicePtrGlobalOffset|0x0|UINT32|0x00000017 + gArmPlatformTokenSpaceGuid.PcdHobListPtrGlobalOffset|0x0|UINT32|0x00000018 # # ARM Primecells diff --git a/ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c index 8a47e8d8a7..0e6755d3aa 100644 --- a/ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c +++ b/ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c @@ -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;
}
|