xen/arm: add generic TEE mediator framework
authorVolodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Tue, 11 Jun 2019 18:46:17 +0000 (18:46 +0000)
committerJulien Grall <julien.grall@arm.com>
Wed, 19 Jun 2019 10:53:18 +0000 (11:53 +0100)
commit637d7a395b9d8bc0f0c47137665e1f18e41d83a7
tree785db55c32553936d87420e1e652cbe6761feb5f
parent260acc521db4c29df4aa9b7a67f42cf967871fd3
xen/arm: add generic TEE mediator framework

This patch adds basic framework for TEE mediators. Guests can't talk
to TEE directly, we need some entity that will intercept request
and decide what to do with them. "TEE mediator" is a such entity.

This is how it works: user can build XEN with multiple TEE mediators
(see the next patches, where OP-TEE mediator is introduced).
TEE mediator register self with REGISTER_TEE_MEDIATOR() macro in the
same way, as device drivers use DT_DEVICE_START()/DT_DEVICE_END()
macros.

At run-time, during initialization, framework calls probe() function
for each available mediator driver to find which TEE is installed
on the platform. Then generic vSMC handler will call selected mediator
when it intercept SMC/HVC that belongs to TEE OS or TEE application.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
12 files changed:
MAINTAINERS
xen/arch/arm/Kconfig
xen/arch/arm/Makefile
xen/arch/arm/domain.c
xen/arch/arm/setup.c
xen/arch/arm/tee/Makefile [new file with mode: 0644]
xen/arch/arm/tee/tee.c [new file with mode: 0644]
xen/arch/arm/vsmc.c
xen/arch/arm/xen.lds.S
xen/include/asm-arm/domain.h
xen/include/asm-arm/tee/tee.h [new file with mode: 0644]
xen/include/public/arch-arm.h