aboutsummaryrefslogtreecommitdiffstats
path: root/security/tf_driver/tf_conn.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /security/tf_driver/tf_conn.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'security/tf_driver/tf_conn.h')
-rw-r--r--security/tf_driver/tf_conn.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/security/tf_driver/tf_conn.h b/security/tf_driver/tf_conn.h
new file mode 100644
index 00000000000..8bed16f19d5
--- /dev/null
+++ b/security/tf_driver/tf_conn.h
@@ -0,0 +1,106 @@
1/**
2 * Copyright (c) 2011 Trusted Logic S.A.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17 * MA 02111-1307 USA
18 */
19
20#ifndef __TF_CONN_H__
21#define __TF_CONN_H__
22
23#include "tf_defs.h"
24
25/*
26 * Returns a pointer to the connection referenced by the
27 * specified file.
28 */
29static inline struct tf_connection *tf_conn_from_file(
30 struct file *file)
31{
32 return file->private_data;
33}
34
35int tf_validate_shmem_and_flags(u32 shmem, u32 shmem_size, u32 flags);
36
37int tf_map_shmem(
38 struct tf_connection *connection,
39 u32 buffer,
40 /* flags for read-write access rights on the memory */
41 u32 flags,
42 bool in_user_space,
43 u32 descriptors[TF_MAX_COARSE_PAGES],
44 u32 *buffer_start_offset,
45 u32 buffer_size,
46 struct tf_shmem_desc **shmem_desc,
47 u32 *descriptor_count);
48
49void tf_unmap_shmem(
50 struct tf_connection *connection,
51 struct tf_shmem_desc *shmem_desc,
52 u32 full_cleanup);
53
54/*----------------------------------------------------------------------------
55 * Connection operations to the Secure World
56 *----------------------------------------------------------------------------*/
57
58int tf_create_device_context(
59 struct tf_connection *connection);
60
61int tf_destroy_device_context(
62 struct tf_connection *connection);
63
64int tf_open_client_session(
65 struct tf_connection *connection,
66 union tf_command *command,
67 union tf_answer *answer);
68
69int tf_close_client_session(
70 struct tf_connection *connection,
71 union tf_command *command,
72 union tf_answer *answer);
73
74int tf_register_shared_memory(
75 struct tf_connection *connection,
76 union tf_command *command,
77 union tf_answer *answer);
78
79int tf_release_shared_memory(
80 struct tf_connection *connection,
81 union tf_command *command,
82 union tf_answer *answer);
83
84int tf_invoke_client_command(
85 struct tf_connection *connection,
86 union tf_command *command,
87 union tf_answer *answer);
88
89int tf_cancel_client_command(
90 struct tf_connection *connection,
91 union tf_command *command,
92 union tf_answer *answer);
93
94/*----------------------------------------------------------------------------
95 * Connection initialization and cleanup operations
96 *----------------------------------------------------------------------------*/
97
98int tf_open(struct tf_device *dev,
99 struct file *file,
100 struct tf_connection **connection);
101
102void tf_close(
103 struct tf_connection *connection);
104
105
106#endif /* !defined(__TF_CONN_H__) */