]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/CpuDxe: Exception Handling SP Adjust
authorEugene Cohen <eugene@hp.com>
Tue, 10 Sep 2013 10:10:56 +0000 (10:10 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 10 Sep 2013 10:10:56 +0000 (10:10 +0000)
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

ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.S
ArmPkg/Drivers/CpuDxe/ArmV6/ExceptionSupport.asm

index 948ad69946ea513ae5582ebd54e3bef8d12c1d80..612ca02c7b330875e386c3a48b274868ca96db24 100644 (file)
@@ -242,7 +242,7 @@ NoAdjustNeeded:
 \r
   str       R5, [SP, #0x3c]         @ Store it in EFI_SYSTEM_CONTEXT_ARM.PC\r
   \r
-  sub       R1, SP, #0x60           @ We pused 0x60 bytes on the stack \r
+  add       R1, SP, #0x60           @ We pushed 0x60 bytes on the stack\r
   str       R1, [SP, #0x34]         @ Store it in EFI_SYSTEM_CONTEXT_ARM.SP\r
   \r
                                     @ R0 is ExceptionType \r
index c3f494ae371f6f54fe8a4e4d0df1e1a92b90eff8..780e1f7cd385cc9196fa675c8f23255bc9926509 100644 (file)
@@ -237,7 +237,7 @@ NoAdjustNeeded
 \r
   str       R5, [SP, #0x3c]         ; Store it in EFI_SYSTEM_CONTEXT_ARM.PC\r
   \r
-  sub       R1, SP, #0x60           ; We pused 0x60 bytes on the stack \r
+  add       R1, SP, #0x60           ; We pushed 0x60 bytes on the stack\r
   str       R1, [SP, #0x34]         ; Store it in EFI_SYSTEM_CONTEXT_ARM.SP\r
   \r
                                     ; R0 is ExceptionType \r