feat(context-mgmt): introduce EL3/root context

* This patch adds root context procedure to restore/configure
  the registers, which are of importance during EL3 execution.

* EL3/Root context is a simple restore operation that overwrites
  the following bits: (MDCR_EL3.SDD, SCR_EL3.{EA, SIF}, PMCR_EL0.DP
  PSTATE.DIT) while the execution is in EL3.

* It ensures EL3 world maintains its own settings distinct
  from other worlds (NS/Realm/SWd). With this in place, the EL3
  system register settings is no longer influenced by settings of
  incoming worlds. This allows the EL3/Root world to access features
  for its own execution at EL3 (eg: Pauth).

* It should be invoked at cold and warm boot entry paths and also
  at all the possible exception handlers routing to EL3 at runtime.
  Cold and warm boot paths are handled by including setup_el3_context
  function in  "el3_entrypoint_common"  macro, which gets invoked in
  both the entry paths.

* At runtime, el3_context is setup at the stage, while we get prepared
  to enter into EL3 via "prepare_el3_entry" routine.

Change-Id: I5c090978c54a53bc1c119d1bc5fa77cd8813cdc2
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
3 files changed