Skip to content

ArmPkg: StMM: Use x24 register to store stack address #11027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2025

Conversation

mgamal
Copy link

@mgamal mgamal commented May 1, 2025

Description

Now that the use of 18 registers for FF-A is supported. Registers from x0-x17 can be used by FF-A to return call results. StMM also uses registers x19-x23 to store SPMC boot information.

Use the x24 register to store the stack address instead of x12 to avoid it being clobbered by FF-A calls.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Tested running rust-spmc as an EL-1 SPMC

Integration Instructions

N/A

@mgamal mgamal force-pushed the stmm_fix_stack_address_register branch from 7fb3e89 to 976ff4a Compare June 24, 2025 13:44
Now that the use of 18 registers for FF-A is supported. Registers
from x0-x17 can be used by FF-A to return call results. StMM also uses
registers x19-x23 to store SPMC boot information.

Use the x24 register to store the stack address instead of x12
to avoid it being clobbered by FF-A calls.

Signed-off-by: Mohamed Gamal Morsy <[email protected]>
@mgamal mgamal force-pushed the stmm_fix_stack_address_register branch from 976ff4a to 8f92f67 Compare June 24, 2025 14:07
@mgamal mgamal changed the title ArmPkg: StMM: Use x29 register to store stack address ArmPkg: StMM: Use x24 register to store stack address Jun 24, 2025
@leiflindholm leiflindholm added the push Auto push patch series in PR if all checks pass label Jun 25, 2025
@mergify mergify bot merged commit e0852f7 into tianocore:master Jun 25, 2025
130 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants