diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-03-01 11:01:00 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-03-01 11:01:00 +0000 |
commit | 27995cd5d6ea40639d6034b8b7cbb84f625f1a4a (patch) | |
tree | 8d8af61ee05b748f80d2f78866a9e9cd1733164b | |
parent | f6c5a29bb9041caf66426ddced7454f9051124eb (diff) | |
download | edk2-27995cd5d6ea40639d6034b8b7cbb84f625f1a4a.tar.gz edk2-27995cd5d6ea40639d6034b8b7cbb84f625f1a4a.tar.bz2 edk2-27995cd5d6ea40639d6034b8b7cbb84f625f1a4a.zip |
ArmPkg: Tidy assembler code
- Fixed typo
- Removed unreachable 'dead' loop
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15277 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S | 3 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S | 10 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S | 2 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm | 8 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePeiCore/AArch64/Helper.S | 3 | ||||
-rw-r--r-- | ArmPlatformPkg/Sec/AArch64/Helper.S | 3 | ||||
-rw-r--r-- | ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S | 5 | ||||
-rw-r--r-- | ArmPlatformPkg/Sec/Arm/Helper.S | 5 |
8 files changed, 12 insertions, 27 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S b/ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S index 981ffd5c3c..a67477df83 100644 --- a/ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S +++ b/ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S @@ -376,6 +376,3 @@ ASM_PFX(AsmCommonExceptionEntry): #undef REG_PAIR
#undef REG_ONE
-
-dead:
- b dead
diff --git a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S index f7cc557245..12e6d0c82b 100644 --- a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S +++ b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S @@ -74,16 +74,16 @@ ASM_PFX(ArmWriteCpacr): ASM_PFX(ArmWriteAuxCr):
EL1_OR_EL2(x1)
1:msr actlr_el1, x0 // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3
- b 3f
+ ret
2:msr actlr_el2, x0 // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3
-3:ret
+ ret
ASM_PFX(ArmReadAuxCr):
EL1_OR_EL2(x1)
1:mrs x0, actlr_el1 // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3
- b 3f
+ ret
2:mrs x0, actlr_el2 // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3
-3:ret
+ ret
ASM_PFX(ArmSetTTBR0):
EL1_OR_EL2_OR_EL3(x1)
@@ -185,7 +185,7 @@ ASM_PFX(ArmWriteScr): ret
ASM_PFX(ArmWriteMVBar):
- msr vbar_el3, x0 // Excpetion Vector Base address for Monitor on EL3
+ msr vbar_el3, x0 // Exception Vector Base address for Monitor on EL3
ret
ASM_PFX(ArmCallWFE):
diff --git a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S index 57b205a7a8..a3de902cc6 100644 --- a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S +++ b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S @@ -87,7 +87,7 @@ ASM_PFX(CPSRMaskInsert): @ on entry, r0 is the mask and r1 is the field to in isb
mov sp, r3 @ restore stack pointer
ldmfd sp!, {r4-r12, lr} @ restore registers
- bx lr @ return (hopefully thumb-safe!) @ return (hopefully thumb-safe!)
+ bx lr @ return (hopefully thumb-safe!)
ASM_PFX(CPSRRead):
mrs r0, cpsr
diff --git a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm index a464e4d86c..cb69f71bc7 100644 --- a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm +++ b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm @@ -171,14 +171,14 @@ ArmWriteMVBar ArmCallWFE
wfe
- blx lr
+ bx lr
ArmCallSEV
sev
- blx lr
+ bx lr
ArmReadSctlr
- mrc p15, 0, R0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data)
- bx lr
+ mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data)
+ bx lr
END
diff --git a/ArmPlatformPkg/PrePeiCore/AArch64/Helper.S b/ArmPlatformPkg/PrePeiCore/AArch64/Helper.S index 14e9cb8d8b..a11cda06d1 100644 --- a/ArmPlatformPkg/PrePeiCore/AArch64/Helper.S +++ b/ArmPlatformPkg/PrePeiCore/AArch64/Helper.S @@ -45,7 +45,4 @@ ASM_PFX(SetupExceptionLevel2): ret
-dead:
- b dead
-
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
diff --git a/ArmPlatformPkg/Sec/AArch64/Helper.S b/ArmPlatformPkg/Sec/AArch64/Helper.S index 4501be54a0..490d3df12d 100644 --- a/ArmPlatformPkg/Sec/AArch64/Helper.S +++ b/ArmPlatformPkg/Sec/AArch64/Helper.S @@ -92,7 +92,4 @@ ASM_PFX(set_non_secure_mode): msr spsr_el3, x0
ret
-dead:
- b dead
-
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
diff --git a/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S b/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S index e678f4c18c..c16ede0831 100644 --- a/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S +++ b/ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S @@ -1,5 +1,5 @@ //
-// Copyright (c) 2011-2013, ARM Limited. All rights reserved.
+// Copyright (c) 2011-2014, 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
@@ -141,6 +141,3 @@ _PrepareArguments: ASM_PFX(JumpToPEI):
LoadConstantToReg (FixedPcdGet32(PcdFvBaseAddress), x0)
blr x0
-
-dead:
- b dead
diff --git a/ArmPlatformPkg/Sec/Arm/Helper.S b/ArmPlatformPkg/Sec/Arm/Helper.S index c99987d3a1..ae4bc44540 100644 --- a/ArmPlatformPkg/Sec/Arm/Helper.S +++ b/ArmPlatformPkg/Sec/Arm/Helper.S @@ -1,5 +1,5 @@ #========================================================================================
-# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2014, 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
@@ -80,8 +80,5 @@ ASM_PFX(set_non_secure_mode): isb
pop { r1 }
bx lr @ return (hopefully thumb-safe!)
-
-dead:
- b dead
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
|