]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatform/ArmPlatformLib: Introduced ArmPlatformPeiBootAction()
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 10 May 2013 12:49:10 +0000 (12:49 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 10 May 2013 12:49:10 +0000 (12:49 +0000)
This function allows platform to do any specific actions prior to
the start the PEI phase.
For instance, this function could be used by some platforms to initialize clocks that
are required at the early stage of the PEI phase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14347 6f19259b-4bc3-4df7-8a09-765794883524

19 files changed:
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Helper.S
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Helper.asm
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/Arm/RTSMHelper.S
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/Arm/RTSMHelper.asm
ArmPlatformPkg/Library/ArmPlatformLibNull/Arm/ArmPlatformHelper.S
ArmPlatformPkg/Library/ArmPlatformLibNull/Arm/ArmPlatformHelper.asm
ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S
ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm
ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S
ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm
BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S
BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.asm
BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardLib.inf

index 847509f9d2d180740fd644ff12f94dcb19c46de4..3baad66431c88d96de8b6227e993d1687a82734f 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-//  Copyright (c) 2012, ARM Limited. All rights reserved.\r
+//  Copyright (c) 2012-2013, 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
@@ -15,8 +15,9 @@
 #include <Library/ArmLib.h>\r
 \r
 .text \r
-.align 3\r
+.align 2\r
 \r
+GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
 GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
 GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
 \r
@@ -47,3 +48,6 @@ ASM_PFX(ArmPlatformIsPrimaryCore):
   moveq r0, #1\r
   movne r0, #0\r
   bx    lr\r
+\r
+ASM_PFX(ArmPlatformPeiBootAction):\r
+  bx    lr\r
index 6d35182a275ccc03c7cf775493f1f14c61f81670..55b211ea12e0e93685806396beb0484d67e59c32 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-//  Copyright (c) 2012, ARM Limited. All rights reserved.\r
+//  Copyright (c) 2012-2013, 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
   INCLUDE AsmMacroIoLib.inc\r
 \r
+  EXPORT  ArmPlatformPeiBootAction\r
   EXPORT  ArmPlatformGetCorePosition\r
   EXPORT  ArmPlatformIsPrimaryCore\r
 \r
   IMPORT  _gPcd_FixedAtBuild_PcdArmPrimaryCore\r
   IMPORT  _gPcd_FixedAtBuild_PcdArmPrimaryCoreMask\r
   \r
-  PRESERVE8\r
-  AREA    ArmPlatformNullHelper, CODE, READONLY\r
+  AREA    ArmRealViewEbHelper, CODE, READONLY\r
 \r
 //UINTN\r
 //ArmPlatformGetCorePosition (\r
@@ -52,5 +52,8 @@ ArmPlatformIsPrimaryCore FUNCTION
   bx    lr\r
   ENDFUNC\r
 \r
-  END\r
+ArmPlatformPeiBootAction FUNCTION\r
+  bx    lr\r
+  ENDFUNC\r
 \r
+  END\r
index a8fe3b4ce34be05f84cd29efd276fe310b74911c..a97ee41c4a9f0ff093267e5fe81c8904fe9754fe 100644 (file)
@@ -1,5 +1,5 @@
 #/* @file\r
-#  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+#  Copyright (c) 2011-2013, 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
@@ -32,6 +32,8 @@
   MemoryAllocationLib\r
 \r
 [Sources.common]\r
+  ArmRealViewEbHelper.asm  | RVCT\r
+  ArmRealViewEbHelper.S    | GCC\r
   ArmRealViewEb.c\r
   ArmRealViewEbMem.c\r
   ArmRealViewEbHelper.asm | RVCT\r
index 09cfc827a175323e26f118fddbe086c12888a382..b560f56c51352ba1f61f35c2ae83949ef17620c0 100644 (file)
 #include <ArmPlatform.h>\r
 \r
 .text \r
-.align 3\r
+.align 2\r
 \r
+GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
 GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
 GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
 \r
+ASM_PFX(ArmPlatformPeiBootAction):\r
+  bx    lr\r
+\r
 //UINTN\r
 //ArmPlatformGetCorePosition (\r
 //  IN UINTN MpId\r
index 1b5474b5f243db20caf0e1310417cbb0d5345b19..0ae95f5dbd5a2d876daa3238d5e37be148e42c9e 100644 (file)
 \r
   INCLUDE AsmMacroIoLib.inc\r
 \r
+  EXPORT  ArmPlatformPeiBootAction\r
   EXPORT  ArmPlatformGetCorePosition\r
   EXPORT  ArmPlatformIsPrimaryCore\r
 \r
   PRESERVE8\r
   AREA    CTA15A7Helper, CODE, READONLY\r
 \r
+ArmPlatformPeiBootAction FUNCTION\r
+  bx    lr\r
+  ENDFUNC\r
+\r
 //UINTN\r
 //ArmPlatformGetCorePosition (\r
 //  IN UINTN MpId\r
index 5a44eb5f70fa4f47d17ddd056153a4768bb8ae33..d160a4fc913e84adb7bfe8c29af6394df0a3a228 100644 (file)
@@ -1,5 +1,5 @@
 #/* @file\r
-#  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+#  Copyright (c) 2011-2013, 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
@@ -37,6 +37,8 @@
   SerialPortLib\r
 \r
 [Sources.common]\r
+  CTA9x4Helper.asm    | RVCT\r
+  CTA9x4Helper.S      | GCC\r
   CTA9x4.c\r
   CTA9x4Mem.c\r
   CTA9x4Helper.S   | GCC\r
index fc7312b6f1809a28c7a6e7efc2b111d8e4bcd73d..e12b8cd4e9439f8206e08e2b53fed16a0a7e5a1f 100644 (file)
@@ -17,8 +17,8 @@
 .text\r
 .align 2\r
 \r
+GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
 GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
-GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)\r
 GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
 \r
 GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)\r
@@ -56,4 +56,7 @@ ASM_PFX(ArmPlatformGetCorePosition):
   and   r0, r0, #ARM_CORE_MASK\r
   bx    lr\r
 \r
+ASM_PFX(ArmPlatformPeiBootAction):\r
+  bx    lr\r
+\r
 ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r
index c2db346723a778b311edcb533408bfcd438afac1..9508cedd84e7024fc1051353e99a41b459a6ce7d 100644 (file)
@@ -18,6 +18,7 @@
 \r
   INCLUDE AsmMacroIoLib.inc\r
 \r
+  EXPORT  ArmPlatformPeiBootAction\r
   EXPORT  ArmPlatformIsPrimaryCore\r
   EXPORT  ArmPlatformGetPrimaryCoreMpId\r
   EXPORT  ArmPlatformGetCorePosition\r
@@ -62,4 +63,8 @@ ArmPlatformGetCorePosition FUNCTION
   bx    lr\r
   ENDFUNC\r
 \r
+ArmPlatformPeiBootAction FUNCTION\r
+  bx    lr\r
+  ENDFUNC\r
+\r
   END\r
index 1c256af2412d87b6722aa0b5804bc7c934f8f6ec..95006c5f250df1d2ad41759934afa92abd1347e1 100644 (file)
 #include <Library/ArmLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <AutoGen.h>\r
+#include "AsmMacroIoLib.inc"\r
 \r
 #include <Chipset/ArmCortexA9.h>\r
 \r
 .text\r
 .align 2\r
 \r
+GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
 GCC_ASM_EXPORT(ArmGetCpuCountPerCluster)\r
 GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
 GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)\r
@@ -30,6 +32,9 @@ GCC_ASM_EXPORT(ArmPlatformGetCorePosition)
 GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)\r
 GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)\r
 \r
+ASM_PFX(ArmPlatformPeiBootAction):\r
+  bx    lr\r
+\r
 # IN None\r
 # OUT r0 = SCU Base Address\r
 ASM_PFX(ArmGetScuBaseAddress):\r
@@ -37,7 +42,7 @@ ASM_PFX(ArmGetScuBaseAddress):
   # the Configuration BAR as a stack is not necessary setup. The SCU is at the\r
   # offset 0x0000 from the Private Memory Region.\r
   mrc   p15, 4, r0, c15, c0, 0\r
-  bx  lr\r
+  bx    lr\r
 \r
 //UINTN\r
 //ArmPlatformGetPrimaryCoreMpId (\r
index 02b9f0f4a7f0aa149a0c93fad63ecdebf0a3f7b0..5befec31ef477c7d64aff4b54bd4246cc7201aaf 100644 (file)
@@ -22,6 +22,7 @@
 \r
   INCLUDE AsmMacroIoLib.inc\r
 \r
+  EXPORT    ArmPlatformPeiBootAction\r
   EXPORT    ArmGetCpuCountPerCluster\r
   EXPORT    ArmPlatformIsPrimaryCore\r
   EXPORT    ArmPlatformGetPrimaryCoreMpId\r
 \r
   AREA RTSMHelper, CODE, READONLY\r
 \r
+ArmPlatformPeiBootAction FUNCTION\r
+  bx    lr\r
+  ENDFUNC\r
+\r
 // IN None\r
 // OUT r0 = SCU Base Address\r
 ArmGetScuBaseAddress FUNCTION\r
index e6f2a9e3801ccf83e07b5160a27fd6df5ed36750..49f3fde66722d56ac7fd982b7ad742ffc4797f82 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-//  Copyright (c) 2012, ARM Limited. All rights reserved.\r
+//  Copyright (c) 2012-2013, 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
@@ -15,8 +15,9 @@
 #include <Library/ArmLib.h>\r
 \r
 .text \r
-.align 3\r
+.align 2\r
 \r
+GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
 GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
 GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)\r
 GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
@@ -24,6 +25,9 @@ GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
 GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)\r
 GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)\r
 \r
+ASM_PFX(ArmPlatformPeiBootAction):\r
+  bx    lr\r
+\r
 //UINTN\r
 //ArmPlatformGetCorePosition (\r
 //  IN UINTN MpId\r
index 84f1ee35bfe009927c506a80fff5e6e98a03c9be..6047ca25c49cdf53ca60ecadb4c9119b7d3c22a4 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-//  Copyright (c) 2012, ARM Limited. All rights reserved.\r
+//  Copyright (c) 2012-2013, 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
@@ -16,6 +16,7 @@
 \r
   INCLUDE AsmMacroIoLib.inc\r
 \r
+  EXPORT  ArmPlatformPeiBootAction\r
   EXPORT  ArmPlatformGetCorePosition\r
   EXPORT  ArmPlatformGetPrimaryCoreMpId\r
   EXPORT  ArmPlatformIsPrimaryCore\r
   PRESERVE8\r
   AREA    ArmPlatformNullHelper, CODE, READONLY\r
 \r
+ArmPlatformPeiBootAction FUNCTION\r
+  bx    lr\r
+  ENDFUNC\r
+\r
 //UINTN\r
 //ArmPlatformGetCorePosition (\r
 //  IN UINTN MpId\r
index 3b463eabee35150985fde70392a9956332ddc60d..af4350b0cb75ba097ef379badb6aea577bf3849d 100644 (file)
@@ -23,11 +23,15 @@ GCC_ASM_IMPORT(CEntryPoint)
 GCC_ASM_IMPORT(ArmPlatformGetCorePosition)\r
 GCC_ASM_IMPORT(ArmPlatformIsPrimaryCore)\r
 GCC_ASM_IMPORT(ArmReadMpidr)\r
+GCC_ASM_IMPORT(ArmPlatformPeiBootAction)\r
 GCC_ASM_EXPORT(_ModuleEntryPoint)\r
 \r
 StartupAddr: .word    CEntryPoint\r
 \r
 ASM_PFX(_ModuleEntryPoint):\r
+  // Do early platform specific actions\r
+  bl    ASM_PFX(ArmPlatformPeiBootAction)\r
+\r
   // Identify CPU ID\r
   bl    ASM_PFX(ArmReadMpidr)\r
   // Keep a copy of the MpId register value\r
index 1510fb84d03936c0ae28139309a3a064a42e8ded..be1a767696b46dc5151db36f898632edb9374003 100644 (file)
@@ -22,6 +22,7 @@
   IMPORT  ArmPlatformGetCorePosition\r
   IMPORT  ArmPlatformIsPrimaryCore\r
   IMPORT  ArmReadMpidr\r
+  IMPORT  ArmPlatformPeiBootAction\r
   EXPORT  _ModuleEntryPoint\r
   \r
   PRESERVE8\r
@@ -30,6 +31,9 @@
 StartupAddr        DCD      CEntryPoint\r
 \r
 _ModuleEntryPoint\r
+  // Do early platform specific actions\r
+  bl    ArmPlatformPeiBootAction\r
+\r
   // Identify CPU ID\r
   bl    ArmReadMpidr\r
   // Keep a copy of the MpId register value\r
index da654c7a35c486839bdf766b419e78a2617094d2..3d4e1e927920a102dbd6a053ce05303bcd1d2567 100644 (file)
@@ -24,6 +24,7 @@
 GCC_ASM_IMPORT(CEntryPoint)\r
 GCC_ASM_IMPORT(ArmPlatformIsPrimaryCore)\r
 GCC_ASM_IMPORT(ArmReadMpidr)\r
+GCC_ASM_IMPORT(ArmPlatformPeiBootAction)\r
 GCC_ASM_IMPORT(ArmPlatformStackSet)\r
 GCC_ASM_EXPORT(_ModuleEntryPoint)\r
 \r
@@ -31,6 +32,9 @@ StartupAddr: .word    CEntryPoint
 \r
 \r
 ASM_PFX(_ModuleEntryPoint):\r
+  // Do early platform specific actions\r
+  bl    ASM_PFX(ArmPlatformPeiBootAction)\r
+\r
   // Get ID of this CPU in Multicore system\r
   bl    ASM_PFX(ArmReadMpidr)\r
   // Keep a copy of the MpId register value\r
index b78729fbc271d10dee7ce43b2ece85b60da77415..993fccfa47d2e0519305c5e6e57ed59ce66496c9 100644 (file)
@@ -23,6 +23,7 @@
   IMPORT  CEntryPoint\r
   IMPORT  ArmPlatformIsPrimaryCore\r
   IMPORT  ArmReadMpidr\r
+  IMPORT  ArmPlatformPeiBootAction\r
   IMPORT  ArmPlatformStackSet\r
   \r
   EXPORT  _ModuleEntryPoint\r
@@ -33,6 +34,9 @@
 StartupAddr        DCD      CEntryPoint\r
 \r
 _ModuleEntryPoint\r
+  // Do early platform specific actions\r
+  bl    ArmPlatformPeiBootAction\r
+\r
   // Get ID of this CPU in Multicore system\r
   bl    ArmReadMpidr\r
   // Keep a copy of the MpId register value\r
index 29c4b5e8ad97d4ac5eb47c1df5f9fd6e41e481dd..1d0b090774bb3554a003b3f6238ad257206e2338 100644 (file)
@@ -1,5 +1,5 @@
 #\r
-#  Copyright (c) 2012, ARM Limited. All rights reserved.\r
+#  Copyright (c) 2012-2013, 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
@@ -18,6 +18,7 @@
 .align 2\r
 \r
 GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
+GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
 \r
 //UINTN\r
 //ArmPlatformIsPrimaryCore (\r
@@ -28,4 +29,7 @@ ASM_PFX(ArmPlatformIsPrimaryCore):
   mov  r0, #1\r
   bx   lr\r
 \r
+ASM_PFX(ArmPlatformPeiBootAction):\r
+  bx    lr\r
+\r
 ASM_FUNCTION_REMOVE_IF_UNREFERENCED \r
index 35115d014079ac0b3e25d31d48728820ead60c1a..a05747717fba523c54367373d78286597abbc494 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-//  Copyright (c) 2012, ARM Limited. All rights reserved.\r
+//  Copyright (c) 2012-2013, 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
@@ -18,6 +18,7 @@
 \r
   INCLUDE AsmMacroIoLib.inc\r
 \r
+  EXPORT    ArmPlatformPeiBootAction\r
   EXPORT    ArmPlatformIsPrimaryCore\r
 \r
   AREA BeagleBoardHelper, CODE, READONLY\r
@@ -32,5 +33,8 @@ ArmPlatformIsPrimaryCore FUNCTION
   bx   lr\r
   ENDFUNC\r
 \r
-  END\r
+ArmPlatformPeiBootAction FUNCTION\r
+  bx    lr\r
+  ENDFUNC\r
 \r
+  END\r
index 48fab7c66a413d19a127329f94210eca13e54e1c..f3242729b7daa5df526cee796ef4b3cb7a4c7d77 100755 (executable)
@@ -1,5 +1,5 @@
 #/* @file\r
-#  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+#  Copyright (c) 2011-2013, 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
 [LibraryClasses]\r
   IoLib\r
   ArmLib\r
-#  OmapLib\r
   MemoryAllocationLib\r
 \r
 [Sources.common]\r
+  BeagleBoardHelper.asm  | RVCT\r
+  BeagleBoardHelper.S    | GCC\r
   BeagleBoard.c\r
   BeagleBoardMem.c\r
   PadConfiguration.c\r
@@ -42,8 +43,6 @@
   BeagleBoardHelper.S    | GCC\r
   BeagleBoardHelper.asm  | RVCT\r
 \r
-[Protocols]\r
-\r
 [FeaturePcd]\r
   gEmbeddedTokenSpaceGuid.PcdCacheEnable\r
 \r