mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/ArmPlatformGlobalVariableLib: Fixed calculation of GlobalVariableBase
Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13248 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3f305c063a
commit
f463bb00ad
|
@ -34,7 +34,7 @@ ArmPlatformGetGlobalVariable (
|
|||
// Ensure the Global Variable Size have been initialized
|
||||
ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));
|
||||
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize) + VariableOffset;
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);
|
||||
|
||||
if (VariableSize == 4) {
|
||||
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
||||
|
@ -57,7 +57,7 @@ ArmPlatformSetGlobalVariable (
|
|||
// Ensure the Global Variable Size have been initialized
|
||||
ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));
|
||||
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize) + VariableOffset;
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);
|
||||
|
||||
if (VariableSize == 4) {
|
||||
WriteUnaligned32 ((UINT32*)(GlobalVariableBase + VariableOffset), *(UINT32*)Variable);
|
||||
|
|
|
@ -31,7 +31,7 @@ ArmPlatformGetGlobalVariable (
|
|||
// Ensure the Global Variable Size have been initialized
|
||||
ASSERT (VariableOffset < PcdGet32 (PcdSecGlobalVariableSize));
|
||||
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresSecStackBase) + PcdGet32 (PcdCPUCoreSecPrimaryStackSize) - PcdGet32 (PcdSecGlobalVariableSize) + VariableOffset;
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresSecStackBase) + PcdGet32 (PcdCPUCoreSecPrimaryStackSize) - PcdGet32 (PcdSecGlobalVariableSize);
|
||||
|
||||
if (VariableSize == 4) {
|
||||
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
||||
|
@ -54,7 +54,7 @@ ArmPlatformSetGlobalVariable (
|
|||
// Ensure the Global Variable Size have been initialized
|
||||
ASSERT (VariableOffset < PcdGet32 (PcdSecGlobalVariableSize));
|
||||
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresSecStackBase) + PcdGet32 (PcdCPUCoreSecPrimaryStackSize) - PcdGet32 (PcdSecGlobalVariableSize) + VariableOffset;
|
||||
GlobalVariableBase = PcdGet32 (PcdCPUCoresSecStackBase) + PcdGet32 (PcdCPUCoreSecPrimaryStackSize) - PcdGet32 (PcdSecGlobalVariableSize);
|
||||
|
||||
if (VariableSize == 4) {
|
||||
WriteUnaligned32 ((UINT32*)(GlobalVariableBase + VariableOffset), *(UINT32*)Variable);
|
||||
|
|
Loading…
Reference in New Issue