AArch32: Rework SMC context save and restore mechanism
Soby Mathew authored
The current SMC context data structure `smc_ctx_t` and related helpers are
optimized for case when SMC call does not result in world switch. This was
the case for SP_MIN and BL1 cold boot flow. But the firmware update usecase
requires world switch as a result of SMC and the current SMC context helpers
were not helping very much in this regard. Therefore this patch does the
following changes to improve this:

1. Add monitor stack pointer, `spmon` to `smc_ctx_t`

The C Runtime stack pointer in monitor mode, `sp_mon` is added to the
SMC context, and the `smc_ctx_t` pointer is cached in `sp_mon` prior
to exit from Monitor mode. This makes is easier to retrieve the
context when the next SMC call happens. As a result of this change,
the SMC context helpers no longer depend on the stack to save and
restore the register.

This aligns it with the context save and restore mechanism in AArch64.

2. Add SCR in `smc_ctx_t`

Adding the SCR register to `smc_ctx_t` m...
b6285d64
Name Last commit Last update
bl1 AArch32: Rework SMC context save and restore mechanism
bl2 Use SPDX license identifiers
bl2u Use SPDX license identifiers
bl31 Merge pull request #927 from jeenu-arm/state-switch
bl32 AArch32: Rework SMC context save and restore mechanism
common Merge pull request #925 from dp-arm/dp/spdx
docs Merge pull request #928 from davidcunado-arm/dc/update_userguide
drivers Use SPDX license identifiers
fdts Fix incorrect copyright notices
include AArch32: Rework SMC context save and restore mechanism
lib Hook up LLVM compiler-rt in the build system
make_helpers Merge pull request #926 from EvanLloyd/win_make_4
plat Add missing SPDX header
services Migrate secure payload dispatchers to new SMC terminology
tools Use SPDX license identifiers
.checkpatch.conf Mandate 'Signed-off-by' line in commit messages
.gitignore gitignore: ignore GNU GLOBAL tag files
Makefile Hook up LLVM compiler-rt in the build system
acknowledgements.md Add Xilinx to acknowledgements file
contributing.md Drop requirement for CLA in contribution.md
dco.txt Drop requirement for CLA in contribution.md
license.md Update year in copyright text to 2014
readme.md readme.md: Add tested Linaro release information for FVPs