feat(app/common): add yield support

This patch introduces ability for apps to yield to RMM
using APP_YIELD_CALL svc. RMM can then resume the el0 app
by restoring the context and a helper function app_resume()
is introduced for this.

The existing app_run() function is refactored so that common
parts can be reused for app_resume(). A new flag `exit_flag`
is introduced to help rmm stubs to distinguish yield from regular
app exit.

Note that the return from app_run() is only valid in case
of a regular exit from apps. Hence asserts are added to enforce this
assumption. This may need to be reworked when EL0 apps can
be preempted by interrupts.

Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I540a30bbe80d54c5bc168694cd6a2af1ffb8032d
14 files changed