]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/ModuleEntryPoint.asm
ArmPlatformPkg: Fixed ArmRealViewEb & BeagleBoard builds
[mirror_edk2.git] / ArmPlatformPkg / PrePi / ModuleEntryPoint.asm
index e6b2d71361aee107d6514f50a1645ceb466b9c31..0c7299a995fb1b7c8f25bf182ccc1f31722f0b25 100644 (file)
@@ -36,7 +36,7 @@ _ModuleEntryPoint
 \r
 _SetSVCMode\r
   // Enter SVC mode, Disable FIQ and IRQ\r
-  mov     r1, #0x13|0x80|0x40\r
+  mov     r1, #0x13 :OR: 0x80 :OR: 0x40\r
   msr     CPSR_c, r1\r
 \r
 // Check if we can install the stack at the top of the System Memory or if we need\r
@@ -53,7 +53,7 @@ _SetupStackPosition
   LoadConstantToReg (FixedPcdGet32(PcdFdBaseAddress), r2)\r
   LoadConstantToReg (FixedPcdGet32(PcdFdSize), r3)\r
   sub   r3, r3, #1\r
-  add   r3, r3, r2      // r4 = FdTop = PcdFdBaseAddress + PcdFdSize\r
+  add   r3, r3, r2      // r3 = FdTop = PcdFdBaseAddress + PcdFdSize\r
 \r
   // UEFI Memory Size (stacks are allocated in this region)\r
   LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryUefiRegionSize), r4)\r
@@ -108,7 +108,8 @@ _GetStackBaseMpCore
   // Stack for the primary core = PrimaryCoreStack\r
   LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2)\r
   sub   r7, r1, r2\r
-  // Stack for the secondary core = Number of Cluster * (4 Core per cluster) * SecondaryStackSize\r
+\r
+  // Stack for the secondary core = Number of Clusters * (4 Cores per cluster) * SecondaryStackSize\r
   LoadConstantToReg (FixedPcdGet32(PcdClusterCount), r2)\r
   lsl   r2, r2, #2\r
   LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r3)\r
@@ -119,7 +120,7 @@ _GetStackBaseMpCore
   LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2)\r
   add   r1, r7, r2\r
 \r
-  // r7 = The base of the MpCore Stacks\r
+  // r7 = The base of the MpCore Stacks (primary stack + cluster_count * 4 * secondary stacks)\r
   // r1 = The base of the secondary Stacks = Top of the Primary stack\r
 \r
   // Is it the Primary Core ?\r
@@ -131,7 +132,7 @@ _SetupSecondaryCoreStack
   // r1 = The base of the secondary Stacks\r
 \r
   // Get the position of the cores (ClusterId * 4) + CoreId\r
-  GetCorePositionInStack(r0, r5, r4)\r
+  GetCorePositionFromMpId(r0, r5, r4)\r
   // The stack starts at the top of the stack region. Add '1' to the Core Position to get the top of the stack\r
   add   r0, r0, #1\r
   // Get the offset for the Secondary Stack\r