]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit.
authorLeif Lindholm <leif.lindholm@linaro.org>
Tue, 11 Nov 2014 00:43:03 +0000 (00:43 +0000)
committeroliviermartin <oliviermartin@Edk2>
Tue, 11 Nov 2014 00:43:03 +0000 (00:43 +0000)
Some AArch64 platforms have RAM and flash devices >4GB.
Update some additional Pcd entries to 64-bit, and change
the corresponding PcdGet32 calls to PcdGet64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16325 6f19259b-4bc3-4df7-8a09-765794883524

20 files changed:
ArmPkg/ArmPkg.dec
ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.c
ArmPlatformPkg/ArmPlatformPkg.dec
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbSecLibRTSM/ArmRealViewEbSec.c
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/RTSMFoundationSec.c
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/RTSMSec.c
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c
ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformPeiLib/PlatformPeiLib.c
ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Pei/PeiArmPlatformGlobalVariableLib.c
ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.c
ArmPlatformPkg/Library/ArmPlatformSecLibNull/ArmPlatformLibNullSec.c
ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.c
ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
ArmPlatformPkg/PlatformPei/PlatformPeiLib.c
ArmPlatformPkg/PrePeiCore/MainMPCore.c
ArmPlatformPkg/PrePeiCore/MainUniCore.c
ArmPlatformPkg/PrePeiCore/PrePeiCore.c
ArmPlatformPkg/Sec/Sec.c
BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c

index 2a1947b9ca42f54188456b678ff95096b5ecc3e7..e5e7c0a97ad308d379bb61c2728168ea5f6fa83d 100644 (file)
   #\r
   # ARM Secure Firmware PCDs\r
   #\r
   #\r
   # ARM Secure Firmware PCDs\r
   #\r
-  gArmTokenSpaceGuid.PcdSecureFdBaseAddress|0|UINT32|0x00000015\r
+  gArmTokenSpaceGuid.PcdSecureFdBaseAddress|0|UINT64|0x00000015\r
   gArmTokenSpaceGuid.PcdSecureFdSize|0|UINT32|0x00000016\r
   gArmTokenSpaceGuid.PcdSecureFdSize|0|UINT32|0x00000016\r
-  gArmTokenSpaceGuid.PcdSecureFvBaseAddress|0x0|UINT32|0x0000002F\r
+  gArmTokenSpaceGuid.PcdSecureFvBaseAddress|0x0|UINT64|0x0000002F\r
   gArmTokenSpaceGuid.PcdSecureFvSize|0x0|UINT32|0x00000030\r
 \r
   #\r
   # ARM Normal (or Non Secure) Firmware PCDs\r
   #\r
   gArmTokenSpaceGuid.PcdSecureFvSize|0x0|UINT32|0x00000030\r
 \r
   #\r
   # ARM Normal (or Non Secure) Firmware PCDs\r
   #\r
-  gArmTokenSpaceGuid.PcdFdBaseAddress|0|UINT32|0x0000002B\r
+  gArmTokenSpaceGuid.PcdFdBaseAddress|0|UINT64|0x0000002B\r
   gArmTokenSpaceGuid.PcdFdSize|0|UINT32|0x0000002C\r
   gArmTokenSpaceGuid.PcdFdSize|0|UINT32|0x0000002C\r
-  gArmTokenSpaceGuid.PcdFvBaseAddress|0|UINT32|0x0000002D\r
+  gArmTokenSpaceGuid.PcdFvBaseAddress|0|UINT64|0x0000002D\r
   gArmTokenSpaceGuid.PcdFvSize|0|UINT32|0x0000002E\r
 \r
   #\r
   gArmTokenSpaceGuid.PcdFvSize|0|UINT32|0x0000002E\r
 \r
   #\r
index 9fbaeaf430e749bf1f0f2b5f5b5147b0f55edb1a..fe5fd5500c9b6eae1291301cc5c2bf1a0c3a1544 100644 (file)
@@ -296,7 +296,7 @@ InitializeDebugAgent (
     //\r
     // Get the Sec or PrePeiCore module (defined as SEC type module)\r
     //\r
     //\r
     // Get the Sec or PrePeiCore module (defined as SEC type module)\r
     //\r
-    Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdSecureFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
+    Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet64 (PcdSecureFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
     if (!EFI_ERROR(Status)) {\r
       Status = GetImageContext (FfsHeader,&ImageContext);\r
       if (!EFI_ERROR(Status)) {\r
     if (!EFI_ERROR(Status)) {\r
       Status = GetImageContext (FfsHeader,&ImageContext);\r
       if (!EFI_ERROR(Status)) {\r
@@ -307,7 +307,7 @@ InitializeDebugAgent (
     //\r
     // Get the PrePi or PrePeiCore module (defined as SEC type module)\r
     //\r
     //\r
     // Get the PrePi or PrePeiCore module (defined as SEC type module)\r
     //\r
-    Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
+    Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet64 (PcdFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
     if (!EFI_ERROR(Status)) {\r
       Status = GetImageContext (FfsHeader,&ImageContext);\r
       if (!EFI_ERROR(Status)) {\r
     if (!EFI_ERROR(Status)) {\r
       Status = GetImageContext (FfsHeader,&ImageContext);\r
       if (!EFI_ERROR(Status)) {\r
@@ -318,7 +318,7 @@ InitializeDebugAgent (
     //\r
     // Get the PeiCore module (defined as PEI_CORE type module)\r
     //\r
     //\r
     // Get the PeiCore module (defined as PEI_CORE type module)\r
     //\r
-    Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_PEI_CORE, &FfsHeader);\r
+    Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet64 (PcdFvBaseAddress), EFI_FV_FILETYPE_PEI_CORE, &FfsHeader);\r
     if (!EFI_ERROR(Status)) {\r
       Status = GetImageContext (FfsHeader,&ImageContext);\r
       if (!EFI_ERROR(Status)) {\r
     if (!EFI_ERROR(Status)) {\r
       Status = GetImageContext (FfsHeader,&ImageContext);\r
       if (!EFI_ERROR(Status)) {\r
index 20c3c04ccbf6737268e56e176b3aa769a93fb426..b9f38b674700ba1fc2fe52b110856044811727af 100644 (file)
@@ -70,7 +70,7 @@
   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecSecondaryStackSize|0x1000|UINT32|0x00000006\r
 \r
   # Stack for CPU Cores in Non Secure Mode\r
   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecSecondaryStackSize|0x1000|UINT32|0x00000006\r
 \r
   # Stack for CPU Cores in Non Secure Mode\r
-  gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0|UINT32|0x00000009\r
+  gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0|UINT64|0x00000009\r
   gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x10000|UINT32|0x00000037\r
   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x1000|UINT32|0x0000000A\r
 \r
   gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x10000|UINT32|0x00000037\r
   gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x1000|UINT32|0x0000000A\r
 \r
index 14d8c81b1bb334f10b83a9435da03ed762543b9d..e09e33a5e251588309ced674c012a46f15aed489 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
@@ -73,5 +73,6 @@ ArmPlatformSecExtraAction (
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
-  *JumpAddress = PcdGet32(PcdFvBaseAddress);\r
+  *JumpAddress = (UINTN)PcdGet64 (PcdFvBaseAddress);\r
 }\r
 }\r
+\r
index a0b98d0990aa33c80f901f18fc5741f8b4ddeb63..bae6d0b1df0fd8464cecf8d7edd6ed3402b0777f 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
 /** @file\r
 *\r
-*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
@@ -67,5 +67,5 @@ ArmPlatformSecExtraAction (
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
-  *JumpAddress = PcdGet32(PcdFvBaseAddress);\r
+  *JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
 }\r
 }\r
index f5176eac90f41d90c2f7d2edc458c1487d4ab941..9023715ab065c70479ba56479128897d3fb40bd4 100644 (file)
@@ -96,5 +96,5 @@ ArmPlatformSecExtraAction (
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
-  *JumpAddress = PcdGet32(PcdFvBaseAddress);\r
+  *JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
 }\r
 }\r
index 7961b0524e11060640fb9404aac85bef9cef9215..aa4ced4582e8cfe3566542a80a592964d538d2e5 100644 (file)
@@ -181,9 +181,9 @@ ArmPlatformInitializeSystemMemory (
   //\r
   ASSERT (NewSize >= SIZE_128MB);\r
   ASSERT (\r
   //\r
   ASSERT (NewSize >= SIZE_128MB);\r
   ASSERT (\r
-    (((UINT64)PcdGet32 (PcdFdBaseAddress) +\r
+    (((UINT64)PcdGet64 (PcdFdBaseAddress) +\r
       (UINT64)PcdGet32 (PcdFdSize)) <= NewBase) ||\r
       (UINT64)PcdGet32 (PcdFdSize)) <= NewBase) ||\r
-    ((UINT64)PcdGet32 (PcdFdBaseAddress) >= (NewBase + NewSize)));\r
+    ((UINT64)PcdGet64 (PcdFdBaseAddress) >= (NewBase + NewSize)));\r
 }\r
 \r
 VOID\r
 }\r
 \r
 VOID\r
index 41d506cf717ff44bb3b589590a62a7bf6487aaff..af0d6e87da9f31fa7e9880e112f59983001a85b1 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *  Copyright (c) 2014, Linaro Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  Copyright (c) 2014, Linaro Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
@@ -41,7 +41,7 @@ PlatformPeim (
   CopyMem (NewBase, Base, FdtSize);\r
   PcdSet64 (PcdDeviceTreeBaseAddress, (UINT64)(UINTN)NewBase);\r
 \r
   CopyMem (NewBase, Base, FdtSize);\r
   PcdSet64 (PcdDeviceTreeBaseAddress, (UINT64)(UINTN)NewBase);\r
 \r
-  BuildFvHob (PcdGet32(PcdFvBaseAddress), PcdGet32(PcdFvSize));\r
+  BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize));\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
index df3e12944db1305dbf2169f2d8da0dc3a7ea6cac..2ffbdbedd864bae4889adec73c17acf4f8ac217c 100644 (file)
@@ -34,7 +34,7 @@ ArmPlatformGetGlobalVariable (
   // Ensure the Global Variable Size have been initialized\r
   ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));\r
 \r
   // Ensure the Global Variable Size have been initialized\r
   ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));\r
 \r
-  GlobalVariableBase = PcdGet32 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);\r
+  GlobalVariableBase = PcdGet64 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);\r
 \r
   if (VariableSize == 4) {\r
     *(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));\r
 \r
   if (VariableSize == 4) {\r
     *(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));\r
@@ -57,7 +57,7 @@ ArmPlatformSetGlobalVariable (
   // Ensure the Global Variable Size have been initialized\r
   ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));\r
 \r
   // Ensure the Global Variable Size have been initialized\r
   ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));\r
 \r
-  GlobalVariableBase = PcdGet32 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);\r
+  GlobalVariableBase = PcdGet64 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);\r
 \r
   if (VariableSize == 4) {\r
     WriteUnaligned32 ((UINT32*)(GlobalVariableBase + VariableOffset), *(UINT32*)Variable);\r
 \r
   if (VariableSize == 4) {\r
     WriteUnaligned32 ((UINT32*)(GlobalVariableBase + VariableOffset), *(UINT32*)Variable);\r
@@ -78,7 +78,7 @@ ArmPlatformGetGlobalVariableAddress (
   // Ensure the Global Variable Size have been initialized\r
   ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));\r
 \r
   // Ensure the Global Variable Size have been initialized\r
   ASSERT (VariableOffset < PcdGet32 (PcdPeiGlobalVariableSize));\r
 \r
-  GlobalVariableBase = PcdGet32 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);\r
+  GlobalVariableBase = PcdGet64 (PcdCPUCoresStackBase) + PcdGet32 (PcdCPUCorePrimaryStackSize) - PcdGet32 (PcdPeiGlobalVariableSize);\r
 \r
   return (VOID*)(GlobalVariableBase + VariableOffset);\r
 }\r
 \r
   return (VOID*)(GlobalVariableBase + VariableOffset);\r
 }\r
index 02cbb00daf479f5b7e4376dca02c69328b08f3a4..41af1836e16f305274c001a23929a49405c3899c 100644 (file)
@@ -19,8 +19,8 @@
 #include <Library/PcdLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
 #include <Library/PcdLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
-#define IS_XIP() (((UINT32)PcdGet32 (PcdFdBaseAddress) > (UINT32)(PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize))) || \\r
-                  ((PcdGet32 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < PcdGet64 (PcdSystemMemoryBase)))\r
+#define IS_XIP() (((UINT32)PcdGet64 (PcdFdBaseAddress) > (UINT32)(PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize))) || \\r
+                  ((PcdGet64 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < PcdGet64 (PcdSystemMemoryBase)))\r
 \r
 // Declared by ArmPlatformPkg/PrePi Module\r
 extern UINTN mGlobalVariableBase;\r
 \r
 // Declared by ArmPlatformPkg/PrePi Module\r
 extern UINTN mGlobalVariableBase;\r
index fc04977b5c1aa2b34dd3f01d42129c0f18238097..0e5529f75fdcda468aaed5fdfb6b09c52fb4a4e9 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
@@ -70,5 +70,5 @@ ArmPlatformSecExtraAction (
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
   OUT UINTN*        JumpAddress\r
   )\r
 {\r
-  *JumpAddress = PcdGet32(PcdFvBaseAddress);\r
+  *JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
 }\r
 }\r
index 1e1b1ea64da987faef057d6a69a92f1c0c1a3217..a452e38751ee31803959f9e779a55459b1e2d3bf 100755 (executable)
@@ -35,7 +35,7 @@ NonSecureWaitForFirmware (
   UINTN InterruptId;\r
 \r
   // The secondary cores will execute the firmware once wake from WFI.\r
   UINTN InterruptId;\r
 \r
   // The secondary cores will execute the firmware once wake from WFI.\r
-  SecondaryStart = (VOID (*)())PcdGet32 (PcdFvBaseAddress);\r
+  SecondaryStart = (VOID (*)())(UINTN)PcdGet64 (PcdFvBaseAddress);\r
 \r
   ArmCallWFI ();\r
 \r
 \r
   ArmCallWFI ();\r
 \r
@@ -69,6 +69,7 @@ ArmPlatformSecExtraAction (
 {\r
   CHAR8           Buffer[100];\r
   UINTN           CharCount;\r
 {\r
   CHAR8           Buffer[100];\r
   UINTN           CharCount;\r
+  UINTN*          StartAddress;\r
 \r
   if (FeaturePcdGet (PcdStandalone) == FALSE) {\r
 \r
 \r
   if (FeaturePcdGet (PcdStandalone) == FALSE) {\r
 \r
@@ -77,7 +78,7 @@ ArmPlatformSecExtraAction (
     //\r
 \r
     if (ArmPlatformIsPrimaryCore (MpId)) {\r
     //\r
 \r
     if (ArmPlatformIsPrimaryCore (MpId)) {\r
-      UINTN*   StartAddress = (UINTN*)PcdGet32(PcdFvBaseAddress);\r
+      StartAddress = (UINTN*)(UINTN)PcdGet64 (PcdFvBaseAddress);\r
 \r
       // Patch the DRAM to make an infinite loop at the start address\r
       *StartAddress = 0xEAFFFFFE; // opcode for while(1)\r
 \r
       // Patch the DRAM to make an infinite loop at the start address\r
       *StartAddress = 0xEAFFFFFE; // opcode for while(1)\r
@@ -85,7 +86,7 @@ ArmPlatformSecExtraAction (
       CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Waiting for firmware at 0x%08X ...\n\r",StartAddress);\r
       SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
 \r
       CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Waiting for firmware at 0x%08X ...\n\r",StartAddress);\r
       SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
 \r
-      *JumpAddress = PcdGet32(PcdFvBaseAddress);\r
+      *JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
     } else {\r
       // When the primary core is stopped by the hardware debugger to copy the firmware\r
       // into DRAM. The secondary cores are still running. As soon as the first bytes of\r
     } else {\r
       // When the primary core is stopped by the hardware debugger to copy the firmware\r
       // into DRAM. The secondary cores are still running. As soon as the first bytes of\r
@@ -104,10 +105,10 @@ ArmPlatformSecExtraAction (
 \r
     if (ArmPlatformIsPrimaryCore (MpId)) {\r
       // Signal the secondary cores they can jump to PEI phase\r
 \r
     if (ArmPlatformIsPrimaryCore (MpId)) {\r
       // Signal the secondary cores they can jump to PEI phase\r
-      ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E, PcdGet32 (PcdGicSgiIntId));\r
+      ArmGicSendSgiTo (PcdGet32 (PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E, PcdGet32 (PcdGicSgiIntId));\r
 \r
       // To enter into Non Secure state, we need to make a return from exception\r
 \r
       // To enter into Non Secure state, we need to make a return from exception\r
-      *JumpAddress = PcdGet32(PcdFvBaseAddress);\r
+      *JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
     } else {\r
       // We wait for the primary core to finish to initialize the System Memory. Otherwise the secondary\r
       // cores would make crash the system by setting their stacks in DRAM before the primary core has not\r
     } else {\r
       // We wait for the primary core to finish to initialize the System Memory. Otherwise the secondary\r
       // cores would make crash the system by setting their stacks in DRAM before the primary core has not\r
@@ -115,6 +116,6 @@ ArmPlatformSecExtraAction (
       *JumpAddress = (UINTN)NonSecureWaitForFirmware;\r
     }\r
   } else {\r
       *JumpAddress = (UINTN)NonSecureWaitForFirmware;\r
     }\r
   } else {\r
-    *JumpAddress = PcdGet32(PcdFvBaseAddress);\r
+    *JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
   }\r
 }\r
   }\r
 }\r
index 0214897d8b5cdecfa0c8cffb9e089a0b835f90ca..577b288400fbfd87f0de72438c3aebd49dcc9230 100755 (executable)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
 /** @file\r
 *\r
-*  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
@@ -102,33 +102,33 @@ MemoryPeim (
   );\r
 \r
   SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemoryBase) + (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemorySize);\r
   );\r
 \r
   SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemoryBase) + (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemorySize);\r
-  FdTop = (EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdBaseAddress) + (EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdSize);\r
+  FdTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFdBaseAddress) + (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFdSize);\r
 \r
   // EDK2 does not have the concept of boot firmware copied into DRAM. To avoid the DXE\r
   // core to overwrite this area we must mark the region with the attribute non-present\r
 \r
   // EDK2 does not have the concept of boot firmware copied into DRAM. To avoid the DXE\r
   // core to overwrite this area we must mark the region with the attribute non-present\r
-  if ((PcdGet32 (PcdFdBaseAddress) >= PcdGet64 (PcdSystemMemoryBase)) && (FdTop <= SystemMemoryTop)) {\r
+  if ((PcdGet64 (PcdFdBaseAddress) >= PcdGet64 (PcdSystemMemoryBase)) && (FdTop <= SystemMemoryTop)) {\r
     Found = FALSE;\r
 \r
     // Search for System Memory Hob that contains the firmware\r
     NextHob.Raw = GetHobList ();\r
     while ((NextHob.Raw = GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, NextHob.Raw)) != NULL) {\r
       if ((NextHob.ResourceDescriptor->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) &&\r
     Found = FALSE;\r
 \r
     // Search for System Memory Hob that contains the firmware\r
     NextHob.Raw = GetHobList ();\r
     while ((NextHob.Raw = GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, NextHob.Raw)) != NULL) {\r
       if ((NextHob.ResourceDescriptor->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) &&\r
-          (PcdGet32(PcdFdBaseAddress) >= NextHob.ResourceDescriptor->PhysicalStart) &&\r
+          (PcdGet64 (PcdFdBaseAddress) >= NextHob.ResourceDescriptor->PhysicalStart) &&\r
           (FdTop <= NextHob.ResourceDescriptor->PhysicalStart + NextHob.ResourceDescriptor->ResourceLength))\r
       {\r
         ResourceAttributes = NextHob.ResourceDescriptor->ResourceAttribute;\r
         ResourceLength = NextHob.ResourceDescriptor->ResourceLength;\r
         ResourceTop = NextHob.ResourceDescriptor->PhysicalStart + ResourceLength;\r
 \r
           (FdTop <= NextHob.ResourceDescriptor->PhysicalStart + NextHob.ResourceDescriptor->ResourceLength))\r
       {\r
         ResourceAttributes = NextHob.ResourceDescriptor->ResourceAttribute;\r
         ResourceLength = NextHob.ResourceDescriptor->ResourceLength;\r
         ResourceTop = NextHob.ResourceDescriptor->PhysicalStart + ResourceLength;\r
 \r
-        if (PcdGet32(PcdFdBaseAddress) == NextHob.ResourceDescriptor->PhysicalStart) {\r
+        if (PcdGet64 (PcdFdBaseAddress) == NextHob.ResourceDescriptor->PhysicalStart) {\r
           if (SystemMemoryTop == FdTop) {\r
             NextHob.ResourceDescriptor->ResourceAttribute = ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT;\r
           } else {\r
             // Create the System Memory HOB for the firmware with the non-present attribute\r
             BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,\r
                                         ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT,\r
           if (SystemMemoryTop == FdTop) {\r
             NextHob.ResourceDescriptor->ResourceAttribute = ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT;\r
           } else {\r
             // Create the System Memory HOB for the firmware with the non-present attribute\r
             BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,\r
                                         ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT,\r
-                                        PcdGet32(PcdFdBaseAddress),\r
-                                        PcdGet32(PcdFdSize));\r
+                                        PcdGet64 (PcdFdBaseAddress),\r
+                                        PcdGet32 (PcdFdSize));\r
 \r
             // Top of the FD is system memory available for UEFI\r
             NextHob.ResourceDescriptor->PhysicalStart += PcdGet32(PcdFdSize);\r
 \r
             // Top of the FD is system memory available for UEFI\r
             NextHob.ResourceDescriptor->PhysicalStart += PcdGet32(PcdFdSize);\r
@@ -138,11 +138,11 @@ MemoryPeim (
           // Create the System Memory HOB for the firmware with the non-present attribute\r
           BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,\r
                                       ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT,\r
           // Create the System Memory HOB for the firmware with the non-present attribute\r
           BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,\r
                                       ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT,\r
-                                      PcdGet32(PcdFdBaseAddress),\r
-                                      PcdGet32(PcdFdSize));\r
+                                      PcdGet64 (PcdFdBaseAddress),\r
+                                      PcdGet32 (PcdFdSize));\r
 \r
           // Update the HOB\r
 \r
           // Update the HOB\r
-          NextHob.ResourceDescriptor->ResourceLength = PcdGet32(PcdFdBaseAddress) - NextHob.ResourceDescriptor->PhysicalStart;\r
+          NextHob.ResourceDescriptor->ResourceLength = PcdGet64 (PcdFdBaseAddress) - NextHob.ResourceDescriptor->PhysicalStart;\r
 \r
           // If there is some memory available on the top of the FD then create a HOB\r
           if (FdTop < NextHob.ResourceDescriptor->PhysicalStart + ResourceLength) {\r
 \r
           // If there is some memory available on the top of the FD then create a HOB\r
           if (FdTop < NextHob.ResourceDescriptor->PhysicalStart + ResourceLength) {\r
index 587c4b5ce3a3fa87db1127ca15ea3bbdcb1a2ef5..bc1ab2fef1509346fc5275f630a244f8386ab8b0 100755 (executable)
@@ -116,7 +116,7 @@ InitializeMemory (
 \r
   SystemMemoryBase = (UINTN)PcdGet64 (PcdSystemMemoryBase);\r
   SystemMemoryTop = SystemMemoryBase + (UINTN)PcdGet64 (PcdSystemMemorySize);\r
 \r
   SystemMemoryBase = (UINTN)PcdGet64 (PcdSystemMemoryBase);\r
   SystemMemoryTop = SystemMemoryBase + (UINTN)PcdGet64 (PcdSystemMemorySize);\r
-  FdBase = (UINTN)PcdGet32 (PcdFdBaseAddress);\r
+  FdBase = (UINTN)PcdGet64 (PcdFdBaseAddress);\r
   FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize);\r
 \r
   //\r
   FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize);\r
 \r
   //\r
index 508b10dbd3b17e8f95c078d8e512262d310f7d1a..a27b168e2ef01afcb1af5807ab67626ecb0e056d 100755 (executable)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
@@ -24,7 +24,7 @@ PlatformPeim (
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
-  BuildFvHob (PcdGet32(PcdFvBaseAddress), PcdGet32(PcdFvSize));\r
+  BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize));\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
index d40594f83508e4f997aaeafb4dcb077df69d5d47..a86f739fd15575b45910e22324f892a38c889b05 100644 (file)
@@ -131,7 +131,7 @@ PrimaryMain (
   // Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at\r
   // the base of the primary core stack\r
   PpiListSize = ALIGN_VALUE(PpiListSize, 0x4);\r
   // Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at\r
   // the base of the primary core stack\r
   PpiListSize = ALIGN_VALUE(PpiListSize, 0x4);\r
-  TemporaryRamBase = (UINTN)PcdGet32 (PcdCPUCoresStackBase) + PpiListSize;\r
+  TemporaryRamBase = (UINTN)PcdGet64 (PcdCPUCoresStackBase) + PpiListSize;\r
   TemporaryRamSize = (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) - PpiListSize;\r
 \r
   // Make sure the size is 8-byte aligned. Once divided by 2, the size should be 4-byte aligned\r
   TemporaryRamSize = (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) - PpiListSize;\r
 \r
   // Make sure the size is 8-byte aligned. Once divided by 2, the size should be 4-byte aligned\r
@@ -144,7 +144,7 @@ PrimaryMain (
   // Note also:  HOBs (pei temp ram) MUST be above stack\r
   //\r
   SecCoreData.DataSize               = sizeof(EFI_SEC_PEI_HAND_OFF);\r
   // Note also:  HOBs (pei temp ram) MUST be above stack\r
   //\r
   SecCoreData.DataSize               = sizeof(EFI_SEC_PEI_HAND_OFF);\r
-  SecCoreData.BootFirmwareVolumeBase = (VOID *)(UINTN)PcdGet32 (PcdFvBaseAddress);\r
+  SecCoreData.BootFirmwareVolumeBase = (VOID *)(UINTN)PcdGet64 (PcdFvBaseAddress);\r
   SecCoreData.BootFirmwareVolumeSize = PcdGet32 (PcdFvSize);\r
   SecCoreData.TemporaryRamBase       = (VOID *)TemporaryRamBase; // We run on the primary core (and so we use the first stack)\r
   SecCoreData.TemporaryRamSize       = TemporaryRamSize;\r
   SecCoreData.BootFirmwareVolumeSize = PcdGet32 (PcdFvSize);\r
   SecCoreData.TemporaryRamBase       = (VOID *)TemporaryRamBase; // We run on the primary core (and so we use the first stack)\r
   SecCoreData.TemporaryRamSize       = TemporaryRamSize;\r
index b437ad6510eabbe278fcef2aaf70cb28b108848b..6317f178cae578517eed9e3a86ff44b63c086e1e 100644 (file)
@@ -40,7 +40,7 @@ PrimaryMain (
   // Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at\r
   // the base of the primary core stack\r
   PpiListSize = ALIGN_VALUE(PpiListSize, 0x4);\r
   // Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at\r
   // the base of the primary core stack\r
   PpiListSize = ALIGN_VALUE(PpiListSize, 0x4);\r
-  TemporaryRamBase = (UINTN)PcdGet32 (PcdCPUCoresStackBase) + PpiListSize;\r
+  TemporaryRamBase = (UINTN)PcdGet64 (PcdCPUCoresStackBase) + PpiListSize;\r
   TemporaryRamSize = (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) - PpiListSize;\r
 \r
   // Make sure the size is 8-byte aligned. Once divided by 2, the size should be 4-byte aligned\r
   TemporaryRamSize = (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) - PpiListSize;\r
 \r
   // Make sure the size is 8-byte aligned. Once divided by 2, the size should be 4-byte aligned\r
@@ -53,7 +53,7 @@ PrimaryMain (
   // Note also:  HOBs (pei temp ram) MUST be above stack\r
   //\r
   SecCoreData.DataSize               = sizeof(EFI_SEC_PEI_HAND_OFF);\r
   // Note also:  HOBs (pei temp ram) MUST be above stack\r
   //\r
   SecCoreData.DataSize               = sizeof(EFI_SEC_PEI_HAND_OFF);\r
-  SecCoreData.BootFirmwareVolumeBase = (VOID *)(UINTN)PcdGet32 (PcdFvBaseAddress);\r
+  SecCoreData.BootFirmwareVolumeBase = (VOID *)(UINTN)PcdGet64 (PcdFvBaseAddress);\r
   SecCoreData.BootFirmwareVolumeSize = PcdGet32 (PcdFvSize);\r
   SecCoreData.TemporaryRamBase       = (VOID *)TemporaryRamBase; // We run on the primary core (and so we use the first stack)\r
   SecCoreData.TemporaryRamSize       = TemporaryRamSize;\r
   SecCoreData.BootFirmwareVolumeSize = PcdGet32 (PcdFvSize);\r
   SecCoreData.TemporaryRamBase       = (VOID *)TemporaryRamBase; // We run on the primary core (and so we use the first stack)\r
   SecCoreData.TemporaryRamSize       = TemporaryRamSize;\r
index 93d7e1c4c0b18708d1b4d8f231fc02c599615ac2..43ae40de2f245b695adfe102bbd0354f4c4bb9e4 100644 (file)
@@ -53,7 +53,7 @@ CreatePpiList (
   ArmPlatformGetPlatformPpiList (&PlatformPpiListSize, &PlatformPpiList);\r
 \r
   // Copy the Common and Platform PPis in Temporrary Memory\r
   ArmPlatformGetPlatformPpiList (&PlatformPpiListSize, &PlatformPpiList);\r
 \r
   // Copy the Common and Platform PPis in Temporrary Memory\r
-  ListBase = PcdGet32 (PcdCPUCoresStackBase);\r
+  ListBase = PcdGet64 (PcdCPUCoresStackBase);\r
   CopyMem ((VOID*)ListBase, gCommonPpiTable, sizeof(gCommonPpiTable));\r
   CopyMem ((VOID*)(ListBase + sizeof(gCommonPpiTable)), PlatformPpiList, PlatformPpiListSize);\r
 \r
   CopyMem ((VOID*)ListBase, gCommonPpiTable, sizeof(gCommonPpiTable));\r
   CopyMem ((VOID*)(ListBase + sizeof(gCommonPpiTable)), PlatformPpiList, PlatformPpiListSize);\r
 \r
@@ -154,7 +154,7 @@ PrePeiCoreGetGlobalVariableMemory (
 {\r
   ASSERT (GlobalVariableBase != NULL);\r
 \r
 {\r
   ASSERT (GlobalVariableBase != NULL);\r
 \r
-  *GlobalVariableBase = (UINTN)PcdGet32 (PcdCPUCoresStackBase) +\r
+  *GlobalVariableBase = (UINTN)PcdGet64 (PcdCPUCoresStackBase) +\r
                         (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) -\r
                         (UINTN)PcdGet32 (PcdPeiGlobalVariableSize);\r
 \r
                         (UINTN)PcdGet32 (PcdCPUCorePrimaryStackSize) -\r
                         (UINTN)PcdGet32 (PcdPeiGlobalVariableSize);\r
 \r
index 15584f19010764a693da873f9999c8d573cea614..7127395e61447bc3d650a78f2324353cc71c8b92 100644 (file)
@@ -123,7 +123,7 @@ CEntryPoint (
     copy_cpsr_into_spsr ();\r
 \r
     // Call the Platform specific function to execute additional actions if required\r
     copy_cpsr_into_spsr ();\r
 \r
     // Call the Platform specific function to execute additional actions if required\r
-    JumpAddress = PcdGet32 (PcdFvBaseAddress);\r
+    JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
     ArmPlatformSecExtraAction (MpId, &JumpAddress);\r
 \r
     NonTrustedWorldTransition (MpId, JumpAddress);\r
     ArmPlatformSecExtraAction (MpId, &JumpAddress);\r
 \r
     NonTrustedWorldTransition (MpId, JumpAddress);\r
@@ -167,7 +167,7 @@ TrustedWorldInitialization (
   }\r
 \r
   // Call the Platform specific function to execute additional actions if required\r
   }\r
 \r
   // Call the Platform specific function to execute additional actions if required\r
-  JumpAddress = PcdGet32 (PcdFvBaseAddress);\r
+  JumpAddress = PcdGet64 (PcdFvBaseAddress);\r
   ArmPlatformSecExtraAction (MpId, &JumpAddress);\r
 \r
   // Initialize architecture specific security policy\r
   ArmPlatformSecExtraAction (MpId, &JumpAddress);\r
 \r
   // Initialize architecture specific security policy\r
index 7b0949e0434a4e4e99b7032edfc26ef316ffdfd5..6b7879b02bd68bee209e4946b31b6066a0c58ce5 100644 (file)
@@ -125,7 +125,7 @@ LibResetSystem (
   switch (ResetType) {\r
   case EfiResetWarm:\r
     //Perform warm reset of the system by jumping to the begining of the FV\r
   switch (ResetType) {\r
   case EfiResetWarm:\r
     //Perform warm reset of the system by jumping to the begining of the FV\r
-    StartOfFv = (CALL_STUB)(UINTN)PcdGet32(PcdFvBaseAddress);\r
+    StartOfFv = (CALL_STUB)(UINTN)PcdGet64 (PcdFvBaseAddress);\r
     StartOfFv ();\r
     break;\r
   case EfiResetCold:\r
     StartOfFv ();\r
     break;\r
   case EfiResetCold:\r