Repository navigation
[REBASE & FF] Follow AAPCS in AArch64 Exception Handler - #1914
Merged
Merged
Conversation
The current AArch64 stack trace calculated the new FP/LR but it didn't return them and so the upper level function would see the PC didn't change and stop walking the stack. This would not process past the common exception handler. With this fix, the stack is walked back to the Patina entry point. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
edk2 updated the AArch64 exception handler in tianocore/edk2#13007 to follow AAPCS. The Patina one was based on the edk2 exception handler, so this updates it to also ensure AAPCS is followed. This doesn't affect HW or SW debuggers or the stacktrace, but it can affect crash dumps, which patina does not currently support, but may in the future. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Contributor
✅ QEMU Validation PassedAll QEMU validation jobs completed successfully.
Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/39994716189 Boot Time to EFI Shell
Dependencies
This comment was automatically generated by the Patina QEMU PR Validation Post workflow. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
vineelko
approved these changes
Oct 23, 2026
kuqin12
approved these changes
Oct 23, 2026
os-d
enabled auto-merge (rebase)
October 23, 2026 17:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AArch64 stacktrace: Fix Stack Unwind
The current AArch64 stack trace calculated the new FP/LR but it didn't return them and so the upper level function would see the PC didn't change and stop walking the stack. This would not process past the common exception handler. With this fix, the stack is walked back to the Patina entry point.
Follow AAPCS in AArch64 Exception Handler
edk2 updated the AArch64 exception handler in tianocore/edk2#13007 to follow AAPCS. The Patina one was based on the edk2 exception handler, so this updates it to also ensure AAPCS is followed.
This doesn't affect HW or SW debuggers or the stacktrace, but it can affect crash dumps, which patina does not currently support, but may in the future.
How This Was Tested
Tested on QemuArmVirt with the QEMU debugger, Patina debugger, and with the stack trace.
Integration Instructions
N/A.