diff options
author | Harry Liebel <Harry.Liebel@arm.com> | 2013-07-18 19:06:52 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-07-18 19:06:52 +0000 |
commit | 1bc8326695a2181cb5934c3dfb01b0a26c4096a0 (patch) | |
tree | 759dbcb62f7e0222f5962b9228a72a6d170b215b /ArmPlatformPkg/Library/ArmPlatformStackLib/Arm/ArmPlatformStackLib.S | |
parent | 93deac7e25a9adc43ea314e829ec50502ce5c39e (diff) | |
download | edk2-1bc8326695a2181cb5934c3dfb01b0a26c4096a0.tar.gz edk2-1bc8326695a2181cb5934c3dfb01b0a26c4096a0.tar.bz2 edk2-1bc8326695a2181cb5934c3dfb01b0a26c4096a0.zip |
ArmPlatformPkg: Added Aarch64 support
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14489 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Library/ArmPlatformStackLib/Arm/ArmPlatformStackLib.S')
-rw-r--r-- | ArmPlatformPkg/Library/ArmPlatformStackLib/Arm/ArmPlatformStackLib.S | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ArmPlatformPkg/Library/ArmPlatformStackLib/Arm/ArmPlatformStackLib.S b/ArmPlatformPkg/Library/ArmPlatformStackLib/Arm/ArmPlatformStackLib.S index 94660c97fe..34fab31dd4 100644 --- a/ArmPlatformPkg/Library/ArmPlatformStackLib/Arm/ArmPlatformStackLib.S +++ b/ArmPlatformPkg/Library/ArmPlatformStackLib/Arm/ArmPlatformStackLib.S @@ -1,5 +1,5 @@ //
-// Copyright (c) 2012, ARM Limited. All rights reserved.
+// Copyright (c) 2012-2013, ARM Limited. All rights reserved.
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -38,12 +38,12 @@ ASM_PFX(ArmPlatformStackSet): // Identify Stack
// Mask for ClusterId|CoreId
LoadConstantToReg (0xFFFF, r4)
- and r1, r1, r4
+ and r1, r1, r4
// Is it the Primary Core ?
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r4)
- ldr r4, [r4]
+ ldr r4, [r4]
cmp r1, r4
- beq ASM_PFX(ArmPlatformStackSetPrimary)
+ beq ASM_PFX(ArmPlatformStackSetPrimary)
bne ASM_PFX(ArmPlatformStackSetSecondary)
//VOID
@@ -54,19 +54,19 @@ ASM_PFX(ArmPlatformStackSet): // IN UINTN SecondaryStackSize
// );
ASM_PFX(ArmPlatformStackSetPrimary):
- mov r4, lr
+ mov r4, lr
// Add stack of primary stack to StackBase
- add r0, r0, r2
+ add r0, r0, r2
// Compute SecondaryCoresCount * SecondaryCoreStackSize
LoadConstantToReg (_gPcd_FixedAtBuild_PcdCoreCount, r1)
- ldr r1, [r1]
- sub r1, #1
- mul r3, r3, r1
+ ldr r1, [r1]
+ sub r1, #1
+ mul r3, r3, r1
// Set Primary Stack ((StackBase + PrimaryStackSize) + (SecondaryCoresCount * SecondaryCoreStackSize))
- add sp, r0, r3
+ add sp, r0, r3
bx r4
@@ -78,29 +78,29 @@ ASM_PFX(ArmPlatformStackSetPrimary): // IN UINTN SecondaryStackSize
// );
ASM_PFX(ArmPlatformStackSetSecondary):
- mov r4, lr
+ mov r4, lr
mov sp, r0
// Get Core Position
- mov r0, r1
+ mov r0, r1
bl ASM_PFX(ArmPlatformGetCorePosition)
- mov r5, r0
+ mov r5, r0
// Get Primary Core Position
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)
- ldr r0, [r0]
+ ldr r0, [r0]
bl ASM_PFX(ArmPlatformGetCorePosition)
// Get Secondary Core Position. We should get consecutive secondary stack number from 1...(CoreCount-1)
- cmp r5, r0
+ cmp r5, r0
subhi r5, r5, #1
- add r5, r5, #1
+ add r5, r5, #1
// Compute top of the secondary stack
- mul r3, r3, r5
+ mul r3, r3, r5
// Set stack
- add sp, sp, r3
+ add sp, sp, r3
bx r4
|