trusty: save/restore FPU registers in world switch
authorAijun Sun <aijun.sun@spreadtrum.com>
Tue, 19 Sep 2017 08:52:08 +0000 (16:52 +0800)
committerAijun Sun <aijun.sun@spreadtrum.com>
Tue, 19 Sep 2017 11:20:48 +0000 (19:20 +0800)
commitab609e1a76399969f8318360ea3fff30687c9638
tree595f29d23a824aed9ab12025102030af753905ad
parent1cde9b94fad9b778688cfec478b6d1b9f162b146
trusty: save/restore FPU registers in world switch

Currently, Trusty OS/LK implemented FPU context switch in internal
thread switch but does not implement the proper mechanism for world
switch. This commit just simply saves/restores FPU registes in world
switch to prevent FPU context from being currupted when Trusty OS uses
VFP in its applications.

It should be noted that the macro *CTX_INCLUDE_FPREGS* must be defined
in trusty.mk if Trusty OS uses VFP

Signed-off-by: Aijun Sun <aijun.sun@spreadtrum.com>
services/spd/trusty/trusty.c