security: tlk_driver: use ARM's DEN0028 v0.9 spec to define SMCs
authorVarun Wadekar <vwadekar@nvidia.com>
Tue, 19 Nov 2013 06:45:20 +0000 (11:45 +0530)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 4 Dec 2013 04:04:43 +0000 (20:04 -0800)
commit3f2221cc49a7d8084a78e2b8ae9110d8f9d39fbc
tree06a5ac42cefe344bebe4e1ca4e3b9a614cd501c3
parent159d4bdb5bb5a3aefa4f77442b232c812584267d
security: tlk_driver: use ARM's DEN0028 v0.9 spec to define SMCs

Use Trusted Application calls (0x30000000-0x31000000) and Trusted
OS calls (0x32000000-0x3F000000) from the spec.

Trusted App calls are used to Open/Close session and launch a new operation.
Trusted OS calls are used to talk with the TLK for IRQ handling, FS
handling, VPR settings, logger init, etc.

SMCs that are interrupted return a special status code to the NS world.
Modify our tlk_driver to look for that status and send a restart
SMC (value = 60 << 24) when received.

Also removed save/restore of registers across SMC calls. This restore
buffer was stored in r3 and expected to persist across the SMC. This
saving/restoring isn't necessary and adds undesired overhead.

Change-Id: I0b59604dfe2c4e3f4673797d756422cd7d5b64a3
Signed-off-by: Scott Long <scottl@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/332791
GVS: Gerrit_Virtual_Submit
security/tlk_driver/ote_comms.c
security/tlk_driver/ote_irq.S
security/tlk_driver/ote_protocol.h