Commit Graph

11 Commits

Author SHA1 Message Date
Ramesh Masavarapu
eb6e934098 msm: tzcom: Vote for DFAB clock.
The secure processor does not have the capability to vote
for the DFAB clock. The vote for DFAB clock in HLOS ensures
that the secure processor does not freeze.

CRs-fixed: 335852
Change-Id: I8c003299c30efce2e391b8da168f691e850ce763
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2012-03-15 10:00:53 -07:00
Mona Hossain
67e1cbe2e9 tzcom: Unload tzapp on closing the device handle
In a scenario where the client application crashes, tzapps is left
running on the secure domain.  When a client application crashes,
the tzapp (loaded during open) needs to be unloaded to clean off
the tzapps state machine.

Change-Id: If0a14667c5d49e066bd777c2b1389915595f32aa
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
2012-02-13 19:52:49 -08:00
Mona Hossain
6e2e26984f tzcom: Add support for modifying specific fields in cmd_buf
Allow client to send information to replace a specific field of
the cmd buffer with the physical address.  This is done via a new
IOCTL, TZCOM_IOCTL_SEND_CMD_FD_REQ, which is used to import the
ion fd handle. This IOCTL takes in a new send_cmd_fd_op_req
structure that has the same format as send-cmd_op_req with a
new field added: an array of ion handles (ifd_data.fd) and
cmd_buf_offset.

The client sends in an array of ion fd handle along with the
offset to the command buffer field.

This new IOCTL allows a client to send information regarding
which field(s) (at cmd_buf_offset) in the cmd_buf to replace.
These field(s) are replaced with the physical addr of the
buffer addressed by the respective ifd_data.fd handle.

Change-Id: If210013d46e24776fe6f5c6aa257505b3b1e6e00
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
2012-01-13 19:02:53 -08:00
Stephen Boyd
700819df8a tzcom: Rename playrdy to tzapps
Also fix a pil_put() bug while we're at it.

CRs-Fixed: 307844
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-05 10:28:02 -07:00
Sachin Shah
545fbfa16e tzcom: Set buffer address to NULL when alloc fails
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-04 17:13:34 -07:00
Sachin Shah
d7e02d4d60 tzcom: Implement abort and cleanup of driver
Add a new IOCTL call to the driver to properly
abort all threads blocked on wait queues. Updated
release call for proper cleanup.

CRs-fixed: 303637, 304152
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:21:33 -07:00
Sachin Shah
bae4ec0ec5 tzcom: Add more error checks and safe operations
Use safe list iterator where needed, check return
value for scm_call and add condition check for
different input buffer lengths.

Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:21:08 -07:00
Sachin Shah
f0b51cd8ba tzcom: Turn some debug messages to error and warning
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:15:45 -07:00
Sachin Shah
f3b54abcce tzcom: Fix resp calculation
Response buffer is always an offset in input shared buffer.
Can't rely on the sb_in_rsp_addr as that value is not filled
from TZ side. This also makes it consitent with the response
buffer calculation in tzcom_send_cmd().

Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:15:19 -07:00
Sachin Shah
c3f8dd345d tzcom: Zero out input shared buffer
- Zero out SB input buffer after a request is
  successfully fulfilled to meet security
  requirements.
- Remove redundant check for response length.

Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:15:18 -07:00
Bryan Huntsman
3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00