diff options
author | Madhukar Pappireddy <madhukar.pappireddy@arm.com> | 2022-03-03 20:23:39 +0100 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2022-03-03 20:23:39 +0100 |
commit | 6a185d89f6fac101b3ce5af0f56baabc5072c1e1 (patch) | |
tree | eeef3c277754f892a95eec4cebac11429446e2e0 | |
parent | 9edbad6e741afee5f8c7e3a0603350f3fef82575 (diff) | |
parent | 3913795ee5daae5fb2770c1ff153ba2dc5ab9a61 (diff) |
Merge "feat(cactus): save and restore GP x0-x4 on entry"
-rw-r--r-- | spm/cactus/aarch64/cactus_entrypoint.S | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spm/cactus/aarch64/cactus_entrypoint.S b/spm/cactus/aarch64/cactus_entrypoint.S index 1541063..5d9f9f0 100644 --- a/spm/cactus/aarch64/cactus_entrypoint.S +++ b/spm/cactus/aarch64/cactus_entrypoint.S @@ -22,6 +22,12 @@ func cactus_entrypoint /* Entry reason is primary EC cold boot */ mov x19, #1 secondary_cold_entry: + /* Saving parameter registers to temporary registers. */ + mov x10, x1 + mov x11, x2 + mov x12, x3 + mov x13, x4 + /* Entry reason is secondary EC cold boot */ mrs x0, mpidr_el1 bl platform_get_core_pos @@ -77,5 +83,13 @@ pie_fixup: /* Jump to the C entrypoint (it does not return) */ 0: mov x0, x19 + + /* Restoring parameter registers before jumping to cactus_main. */ + mov x1, x10 + mov x2, x11 + mov x3, x12 + mov x4, x13 + + /* And jump to the C entrypoint. */ b cactus_main endfunc cactus_entrypoint |