summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authorEugene Cohen <eugene@hp.com>2013-09-10 10:10:56 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-09-10 10:10:56 +0000
commit1bc3923d08d96a1be657aa9b3b331824a48421b8 (patch)
tree083f10a6e86049ae5d035d219332ac452604865f /ArmPkg
parente8326a006ac55997001e46a73f3aa14bf4c4a999 (diff)
downloadedk2-platforms-1bc3923d08d96a1be657aa9b3b331824a48421b8.tar.xz
ArmPkg/CpuDxe: Exception Handling SP Adjust
The exception handling support code appears to adjust the stack pointer in the wrong direction. It decrements the stack pointer by 0x60, but this should be an increment (add) for the downward-growing stack. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14646 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.S2
-rw-r--r--ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.asm2
2 files changed, 2 insertions, 2 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.S b/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.S
index 948ad69946..612ca02c7b 100644
--- a/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.S
+++ b/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.S
@@ -242,7 +242,7 @@ NoAdjustNeeded:
str R5, [SP, #0x3c] @ Store it in EFI_SYSTEM_CONTEXT_ARM.PC
- sub R1, SP, #0x60 @ We pused 0x60 bytes on the stack
+ add R1, SP, #0x60 @ We pushed 0x60 bytes on the stack
str R1, [SP, #0x34] @ Store it in EFI_SYSTEM_CONTEXT_ARM.SP
@ R0 is ExceptionType
diff --git a/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.asm b/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.asm
index c3f494ae37..780e1f7cd3 100644
--- a/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.asm
+++ b/ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.asm
@@ -237,7 +237,7 @@ NoAdjustNeeded
str R5, [SP, #0x3c] ; Store it in EFI_SYSTEM_CONTEXT_ARM.PC
- sub R1, SP, #0x60 ; We pused 0x60 bytes on the stack
+ add R1, SP, #0x60 ; We pushed 0x60 bytes on the stack
str R1, [SP, #0x34] ; Store it in EFI_SYSTEM_CONTEXT_ARM.SP
; R0 is ExceptionType