+++ /dev/null
-//\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
+++ /dev/null
-//\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
[Sources.common]\r
ArmRealViewEb.c\r
ArmRealViewEbMem.c\r
- ArmRealViewEbHelper.asm | RVCT\r
- ArmRealViewEbHelper.S | GCC\r
\r
[FeaturePcd]\r
gEmbeddedTokenSpaceGuid.PcdCacheEnable\r
[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
[Sources.common]
CTA9x4.c
CTA9x4Mem.c
- CTA9x4Helper.asm | RVCT
- CTA9x4Helper.S | GCC
[FeaturePcd]
gEmbeddedTokenSpaceGuid.PcdCacheEnable
[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
+++ /dev/null
-//\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
+++ /dev/null
-//\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
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
#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
#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
IMPORT CEntryPoint
IMPORT ArmPlatformSecBootAction
- IMPORT ArmPlatformIsMemoryInitialized
IMPORT ArmPlatformInitializeBootMemory
IMPORT ArmDisableInterrupts
IMPORT ArmDisableCachesAndMmu
#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)