Skip to content
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

ArmPlatformPkg/PeilessSec: get rid of _SetSVCMode #10880

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leiflindholm
Copy link
Member

First spotted the _SetSVCMode symbol in the ModuleEntryPoint.S during
review of an unrelated PR. This is clearly bogus since there is no SVC
mode in AArch64, and there is indeed no actual code associated with the
symbol.

Then looked at the AArch32 version, which does update the CPSR to

  • Set SVC mode

  • Mask FIQ and IRQ exceptions
    but this is the expected mode for entering edk2 anyway, so my guess
    is this change is irrelevant for any current users.
    So delete it and see if anyone notices.

  • Breaking change?

    • Potentially, if there are any 32-bit Arm users relying on the existing behaviour.

How This Was Tested

Compile-tested only, we know it's a NOP in normal use on AArch32.

AArch64 has no SVC mode, this was clearly copied from the AArch32
version, so drop it.

Signed-off-by: Leif Lindholm <[email protected]>
_SetSVCMode sits shortly after _ModuleEntryPoint, to switch into SVC mode
and mask FIQ and IRQ exceptions (making it badly named to boot).

But this should always be the state we start executing in, so most
likely this is another remnant of a time when the edk2 image also
contained Secure Monitor code, which has not been supported for some
time now.

Delete the whole stanza and see if anything breaks.

Signed-off-by: Leif Lindholm <[email protected]>
@github-actions github-actions bot added the impact:breaking-change This change breaks existing APIs impacting build or boot. label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:breaking-change This change breaks existing APIs impacting build or boot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants