]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePeiCore/PrePeiCore.c
ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit.
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / PrePeiCore.c
index 1abefaefd2991027ead3e89f9bdc9d90ea19c62b..43ae40de2f245b695adfe102bbd0354f4c4bb9e4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 *  Main file supporting the transition to PEI Core in Normal World for Versatile Express\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
@@ -53,7 +53,7 @@ CreatePpiList (
   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
@@ -86,8 +86,9 @@ CEntryPoint (
   //\r
 \r
   // Write VBAR - The Exception Vector table must be aligned to its requirement\r
-  //TODO: Fix baseTools to ensure the Exception Vector Table is correctly aligned in AArch64\r
-  //ASSERT(((UINTN)PeiVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);\r
+  // Note: The AArch64 Vector table must be 2k-byte aligned - if this assertion fails ensure\r
+  // 'Align=4K' is defined into your FDF for this module.\r
+  ASSERT (((UINTN)PeiVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);\r
   ArmWriteVBar ((UINTN)PeiVectorTable);\r
 \r
   //Note: The MMU will be enabled by MemoryPeim. Only the primary core will have the MMU on.\r
@@ -140,7 +141,7 @@ PrePeiCoreTemporaryRamSupport (
   // Migrate the temporary memory heap to permanent memory heap.\r
   //\r
   CopyMem (NewHeap, OldHeap, CopySize >> 1);\r
-  \r
+\r
   SecSwitchStack ((UINTN)NewStack - (UINTN)OldStack);\r
 \r
   return EFI_SUCCESS;\r
@@ -153,7 +154,7 @@ PrePeiCoreGetGlobalVariableMemory (
 {\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