cmp r0, #ARM_CPU_EVENT_BOOT_MEM_INIT\r
// The SCU enabled is the event to tell us the Init Boot Memory is initialized\r
bx lr\r
- b CArmCpuSynchronizeWait\r
+ b ASM_PFX(CArmCpuSynchronizeWait)\r
\r
\r
#if 0\r
cmp r0, #ARM_CPU_EVENT_BOOT_MEM_INIT\r
// The SCU enabled is the event to tell us the Init Boot Memory is initialized\r
beq ArmWaitScuEnabled\r
- b CArmCpuSynchronizeWait\r
+ b ASM_PFX(CArmCpuSynchronizeWait)\r
\r
// IN None\r
// OUT r0 = SCU Base Address\r
cmp r0, #ARM_CPU_EVENT_BOOT_MEM_INIT\r
// The SCU enabled is the event to tell us the Init Boot Memory is initialized\r
beq ArmWaitGicDistributorEnabled\r
- b CArmCpuSynchronizeWait\r
+ bx ASM_PFX(CArmCpuSynchronizeWait)\r
\r
// IN None\r
ArmWaitGicDistributorEnabled:\r
- LoadConstantToReg (_gPcd_FixedAtBuild_PcdGicDistributorBase, r0)\r
+ LoadConstantToReg (ASM_PFX(_gPcd_FixedAtBuild_PcdGicDistributorBase), r0)\r
ldr r0, [r0]\r
_WaitGicDistributor:\r
ldr r1, [r0, #ARM_GIC_ICDDCR]\r
ASM_PFX(ArmCpuSynchronizeWait):\r
cmp r0, #ARM_CPU_EVENT_BOOT_MEM_INIT\r
// The SCU enabled is the event to tell us the Init Boot Memory is initialized\r
- beq ArmWaitScuEnabled\r
- b CArmCpuSynchronizeWait\r
+ beq ASM_PFX(ArmWaitScuEnabled)\r
+ b ASM_PFX(CArmCpuSynchronizeWait)\r
\r
// IN None\r
// OUT r0 = SCU Base Address\r
add r0, r0, #A9_SCU_CONTROL_OFFSET\r
ldr r0, [r0]\r
cmp r0, #1\r
- bne ArmWaitScuEnabled\r
+ bne ASM_PFX(ArmWaitScuEnabled)\r
bx lr\r
.long (_Data) ; \\r
1:\r
\r
+// Convert the (ClusterId,CoreId) into a Core Position\r
+// We assume there are 4 cores per cluster\r
+#define GetCorePositionInStack(Pos, MpId, Tmp) \\r
+ lsr Pos, MpId, #6 ; \\r
+ and Tmp, MpId, #3 ; \\r
+ add Pos, Pos, Tmp\r
+\r
+// Reserve a region at the top of the Primary Core stack\r
+// for Global variables for the XIP phase\r
+#define SetPrimaryStack(StackTop, GlobalSize, Tmp) \\r
+ and Tmp, GlobalSize, #7 ; \\r
+ rsbne Tmp, Tmp, #8 ; \\r
+ add GlobalSize, GlobalSize, Tmp ; \\r
+ sub sp, StackTop, GlobalSize\r
+\r
\r
#elif defined (__GNUC__)\r
\r
\r
if (EndValue != NULL) {\r
// Timer counts down to 0x0\r
- *EndValue = 0xFFFFFFFFFFFFFFFF;;\r
+ *EndValue = 0xFFFFFFFFFFFFFFFFUL;\r
}\r
\r
return (UINT64)ArmArchTimerGetTimerFreq ();\r
\r
GCC:*_*_ARM_PLATFORM_FLAGS == -mcpu=cortex-a9 -mfpu=neon -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4\r
\r
- XCODE:*_*_ARM_PLATFORM_FLAGS == -mcpu=cortex-a9 -mfpu=neon -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4\r
+ XCODE:*_*_ARM_PLATFORM_FLAGS == -march=armv7-a -mfpu=neon -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4\r
\r
################################################################################\r
#\r
GCC:*_*_ARM_PLATFORM_FLAGS == -mcpu=cortex-a9 -mfpu=neon -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM
- XCODE:*_*_ARM_PLATFORM_FLAGS == -mcpu=cortex-a9 -mfpu=neon -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM
+ XCODE:*_*_ARM_PLATFORM_FLAGS == -march=armv7-a -mfpu=neon -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include -I$(WORKSPACE)/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM
################################################################################
#
_GetStackBase:\r
// Compute Base of Normal stacks for CPU Cores\r
// Is it MpCore system\r
- bl ArmIsMpCore\r
+ bl ASM_PFX(ArmIsMpCore)\r
cmp r0, #0\r
// Case it is not an MP Core system. Just setup the primary core\r
beq _SetupUnicoreStack\r
blx ASM_PFX(ArmPlatformSecBootAction)\r
\r
// Set VBAR to the start of the exception vectors in Secure Mode\r
- ldr r0, =SecVectorTable\r
+ LoadConstantToReg (ASM_PFX(SecVectorTable), r0)\r
bl ASM_PFX(ArmWriteVBar)\r
\r
_IdentifyCpu:\r