]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/ArmPlatformLib: Removed 'ArmPlatformIsMemoryInitialized' function
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Sep 2011 23:04:06 +0000 (23:04 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Sep 2011 23:04:06 +0000 (23:04 +0000)
'ArmPlatformInitializeBootMemory' function can check if the memory has already
been initialized.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12414 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S [deleted file]
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm [deleted file]
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbLib.inf
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbSecLib.inf
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressSecLib.inf
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S [deleted file]
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm [deleted file]
ArmPlatformPkg/Include/Library/ArmPlatformLib.h
ArmPlatformPkg/Sec/SecEntryPoint.S
ArmPlatformPkg/Sec/SecEntryPoint.asm

diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S
deleted file mode 100644 (file)
index e48770e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//\r
-//  Copyright (c) 2011, 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
-//  which accompanies this distribution.  The full text of the license may be found at        \r
-//  http://opensource.org/licenses/bsd-license.php                                            \r
-//\r
-//  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-//  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-//\r
-//\r
-\r
-#include <AsmMacroIoLib.h>\r
-#include <Base.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/ArmPlatformLib.h>\r
-#include <ArmPlatform.h>\r
-#include <AutoGen.h>\r
-\r
-.text\r
-.align 3\r
-\r
-GCC_ASM_EXPORT(ArmPlatformIsMemoryInitialized)\r
-\r
-/**\r
-  Called at the early stage of the Boot phase to know if the memory has already been initialized\r
-\r
-  Running the code from the reset vector does not mean we start from cold boot. In some case, we\r
-  can go through this code with the memory already initialized.\r
-  Because this function is called at the early stage, the implementation must not use the stack.\r
-  Its implementation must probably done in assembly to ensure this requirement.\r
-\r
-  @return   Return the condition value into the 'Z' flag\r
-\r
-**/\r
-ASM_PFX(ArmPlatformIsMemoryInitialized):\r
-  // Check if the memory has been already mapped, if so skipped the memory initialization\r
-  LoadConstantToReg (ARM_EB_SYSCTRL, r0)\r
-  ldr   r0, [r0, #0]\r
-  \r
-  // 0x200 (BIT9): This read-only bit returns the remap status.\r
-  and   r0, r0, #0x200\r
-  tst   r0, #0x200\r
-  bx   lr\r
-    \r
-ASM_FUNCTION_REMOVE_IF_UNREFERENCED
\ No newline at end of file
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.asm
deleted file mode 100644 (file)
index b72fc6f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//\r
-//  Copyright (c) 2011, 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
-//  which accompanies this distribution.  The full text of the license may be found at\r
-//  http://opensource.org/licenses/bsd-license.php\r
-//\r
-//  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-//  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-//\r
-\r
-#include <AsmMacroIoLib.h>\r
-#include <Base.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/ArmPlatformLib.h>\r
-#include <ArmPlatform.h>\r
-#include <AutoGen.h>\r
-\r
-  INCLUDE AsmMacroIoLib.inc\r
-  \r
-  EXPORT  ArmPlatformIsMemoryInitialized\r
-  \r
-  PRESERVE8\r
-  AREA    ArmRealViewEbHelper, CODE, READONLY\r
-\r
-/**\r
-  Called at the early stage of the Boot phase to know if the memory has already been initialized\r
-\r
-  Running the code from the reset vector does not mean we start from cold boot. In some case, we\r
-  can go through this code with the memory already initialized.\r
-  Because this function is called at the early stage, the implementation must not use the stack.\r
-  Its implementation must probably done in assembly to ensure this requirement.\r
-\r
-  @return   Return the condition value into the 'Z' flag\r
-\r
-**/\r
-ArmPlatformIsMemoryInitialized\r
-  // Check if the memory has been already mapped, if so skipped the memory initialization\r
-  LoadConstantToReg (ARM_EB_SYSCTRL, r0)\r
-  ldr   r0, [r0, #0]\r
-  \r
-  // 0x200 (BIT9): This read-only bit returns the remap status.\r
-  and   r0, r0, #0x200\r
-  tst   r0, #0x200\r
-  bx   lr\r
-  END\r
index 3682f6b7c2c40aba6185cc5bae79a40eda3f88ba..a73ba2c8ae2821907c1c43ad874291189a23dcd6 100644 (file)
@@ -34,8 +34,6 @@
 [Sources.common]\r
   ArmRealViewEb.c\r
   ArmRealViewEbMem.c\r
-  ArmRealViewEbHelper.asm   | RVCT\r
-  ArmRealViewEbHelper.S     | GCC\r
 \r
 [FeaturePcd]\r
   gEmbeddedTokenSpaceGuid.PcdCacheEnable\r
index 17df8100a441b4f215107837ddf034a762713193..d59fbfdfe8756f65e3603666ad871bfc8f6dcec7 100644 (file)
@@ -33,8 +33,6 @@
 [Sources.common]\r
   ArmRealViewEb.c\r
   ArmRealViewEbSec.c\r
-  ArmRealViewEbHelper.asm   | RVCT\r
-  ArmRealViewEbHelper.S     | GCC\r
   ArmRealViewEbBoot.asm     | RVCT\r
   ArmRealViewEbBoot.S       | GCC\r
 \r
index d3867ae931ceb4e1d2fb1d2aad6da13beda404e5..239a25bd48345ae0e0c1519780da08540c66f04d 100644 (file)
@@ -39,8 +39,6 @@
 [Sources.common]
   CTA9x4.c
   CTA9x4Mem.c
-  CTA9x4Helper.asm   | RVCT
-  CTA9x4Helper.S     | GCC
 
 [FeaturePcd]
   gEmbeddedTokenSpaceGuid.PcdCacheEnable
index 8674f7923b5686509e134b8b26dee2047493619c..6d6dd3899968138863abaccdc83e5af9a19079d0 100644 (file)
@@ -41,8 +41,6 @@
 [Sources.common]\r
   CTA9x4Sec.c\r
   CTA9x4.c\r
-  CTA9x4Helper.asm   | RVCT\r
-  CTA9x4Helper.S     | GCC\r
   CTA9x4Boot.asm     | RVCT\r
   CTA9x4Boot.S       | GCC\r
 \r
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S
deleted file mode 100644 (file)
index b66b051..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//\r
-//  Copyright (c) 2011, 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
-//  which accompanies this distribution.  The full text of the license may be found at\r
-//  http://opensource.org/licenses/bsd-license.php\r
-//\r
-//  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-//  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-//\r
-\r
-#include <AsmMacroIoLib.h>\r
-#include <Base.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/ArmPlatformLib.h>\r
-#include <ArmPlatform.h>\r
-#include <AutoGen.h>\r
-\r
-.text\r
-.align 3\r
-\r
-GCC_ASM_EXPORT(ArmPlatformIsMemoryInitialized)\r
-\r
-/**\r
-  Called at the early stage of the Boot phase to know if the memory has already been initialized\r
-\r
-  Running the code from the reset vector does not mean we start from cold boot. In some case, we\r
-  can go through this code with the memory already initialized.\r
-  Because this function is called at the early stage, the implementation must not use the stack.\r
-  Its implementation must probably done in assembly to ensure this requirement.\r
-\r
-  @return   Return the condition value into the 'Z' flag\r
-\r
-**/\r
-ASM_PFX(ArmPlatformIsMemoryInitialized):\r
-  // Check if the memory has been already mapped, if so skipped the memory initialization\r
-  LoadConstantToReg (ARM_VE_SYS_CFGRW1_REG ,r0)\r
-  ldr   r0, [r0, #0]\r
-  \r
-  // 0x40000000 = Value of Physical Configuration Switch SW[0]\r
-  and   r0, r0, #0x40000000\r
-  tst   r0, #0x40000000\r
-  bx   lr\r
-\r
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm
deleted file mode 100644 (file)
index 4404cd2..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//\r
-//  Copyright (c) 2011, 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
-//  which accompanies this distribution.  The full text of the license may be found at\r
-//  http://opensource.org/licenses/bsd-license.php\r
-//\r
-//  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-//  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-//\r
-//\r
-\r
-#include <AsmMacroIoLib.h>\r
-#include <Base.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/ArmPlatformLib.h>\r
-#include <ArmPlatform.h>\r
-#include <AutoGen.h>\r
-\r
-  INCLUDE AsmMacroIoLib.inc\r
-\r
-  EXPORT  ArmPlatformIsMemoryInitialized\r
-\r
-  PRESERVE8\r
-  AREA    CTA9x4Helper, CODE, READONLY\r
-\r
-/**\r
-  Called at the early stage of the Boot phase to know if the memory has already been initialized\r
-\r
-  Running the code from the reset vector does not mean we start from cold boot. In some case, we\r
-  can go through this code with the memory already initialized.\r
-  Because this function is called at the early stage, the implementation must not use the stack.\r
-  Its implementation must probably done in assembly to ensure this requirement.\r
-\r
-  @return   Return the condition value into the 'Z' flag\r
-\r
-**/\r
-ArmPlatformIsMemoryInitialized\r
-  // Check if the memory has been already mapped, if so skipped the memory initialization\r
-  LoadConstantToReg (ARM_VE_SYS_CFGRW1_REG ,r0)\r
-  ldr   r0, [r0, #0]\r
-  \r
-  // 0x40000000 = Value of Physical Configuration Switch SW[0]\r
-  and   r0, r0, #0x40000000\r
-  tst   r0, #0x40000000\r
-  bx   lr\r
-    \r
index b2667416e1f9a78f7cc041e646986f0138d24466..c14af9abfa9458a34b349001d8e081f5b7790339 100644 (file)
@@ -41,19 +41,6 @@ typedef struct {
   UINT64                       NumberOfBytes;
 } ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR;
 
-/**
-  Called at the early stage of the Boot phase to know if the memory has already been initialized
-
-  Running the code from the reset vector does not mean we start from cold boot. In some case, we
-  can go through this code with the memory already initialized.
-  Because this function is called at the early stage, the implementation must not use the stack.
-  Its implementation must probably done in assembly to ensure this requirement.
-
-  @return   Return the condition value into the 'Z' flag
-
-**/
-VOID ArmPlatformIsMemoryInitialized(VOID);
-
 /**
   Initialize the memory where the initial stacks will reside
 
index f8599393cbc1249fe5e58dde40f5554f35d2171c..5d83bf1ee791abfb050239715e247ab7591137bc 100644 (file)
@@ -31,7 +31,6 @@ GCC_ASM_EXPORT(_ModuleEntryPoint)
 #global functions referenced by this module\r
 GCC_ASM_IMPORT(CEntryPoint)\r
 GCC_ASM_IMPORT(ArmPlatformSecBootAction)\r
-GCC_ASM_IMPORT(ArmPlatformIsMemoryInitialized)\r
 GCC_ASM_IMPORT(ArmPlatformInitializeBootMemory)\r
 GCC_ASM_IMPORT(ArmDisableInterrupts)\r
 GCC_ASM_IMPORT(ArmDisableCachesAndMmu)\r
@@ -83,10 +82,7 @@ _WaitForEnabledScu:
 #endif\r
   \r
 _InitMem:\r
-  bl    ASM_PFX(ArmPlatformIsMemoryInitialized)\r
-  bne   _SetupStack\r
-  \r
-  # Initialize Init Memory\r
+  // Initialize Init Boot Memory\r
   bl    ASM_PFX(ArmPlatformInitializeBootMemory)\r
 \r
   # Only Primary CPU could run this line (the secondary cores have jumped from _IdentifyCpu to _SetupStack)\r
index 472abde7f2655d2cdb7a1953ad3bfd4aebb860a5..e85d6ce609029dda8e06968c0dadcd45c19868d5 100644 (file)
@@ -21,7 +21,6 @@
   
   IMPORT  CEntryPoint
   IMPORT  ArmPlatformSecBootAction
-  IMPORT  ArmPlatformIsMemoryInitialized
   IMPORT  ArmPlatformInitializeBootMemory
   IMPORT  ArmDisableInterrupts
   IMPORT  ArmDisableCachesAndMmu
@@ -76,10 +75,7 @@ _WaitForEnabledScu
 #endif
   
 _InitMem
-  bl    ArmPlatformIsMemoryInitialized
-  bne   _SetupStack
-  
-  // Initialize Init Memory
+  // Initialize Init Boot Memory
   bl    ArmPlatformInitializeBootMemory
 
   // Only Primary CPU could run this line (the secondary cores have jumped from _IdentifyCpu to _SetupStack)