chore(app/common): random service maps shared page if necessary

Previously, the random number service required its caller to map shared
page before invoking the service. This commit removes that requirement.

The service now automatically maps the shared page if it is not already
mapped by the caller, and unmaps it afterward. This change simplifies
the API and improves robustness by reducing dependency on the caller's
setup.

This commit also adds the optimization that the service passes the
caller app's shared page as target buffer for the random app's stub,
instead of a buffer allocated on the stack. This makes the extra memcpy
unnecessary.

Change-Id: I23f2b5c21dff4d2ec090a4bd6bf60ad0e25ad3f2
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
1 file changed