summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMichael Ryleev <gmar@google.com>2015-03-26 22:31:25 -0400
committerStephen Wolfe <swolfe@nvidia.com>2018-07-27 17:12:44 -0400
commitcb7f0c33bd6733dab9f76adaaa1eeea77065054c (patch)
tree9ffb4171a31376961dbae26315f84e23434a1d05 /include/linux
parent751a57f1e20223d403ec77ab33e797d486e7d256 (diff)
trusty: add couple non-secure memory related helper routines
trusty_encode_page_info - encodes page physical address, memory type and other attributes into architecture specific structure that can be parsed by secure side. trusty_call32_mem_buf - can be used by drivers to make specified smc call with physicaly contigues memory buffer as an argument. Memory buffer info in retrieved by trusty_encode_page_info and along with buffer size is encoded into series of 32-bit smc call parameters. Change-Id: Iae155c0eff0bb6269be1abbe53ee42f27a1c23f5 Signed-off-by: Michael Ryleev <gmar@google.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/trusty/trusty.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/trusty/trusty.h b/include/linux/trusty/trusty.h
index abb77f1db..d084d9d68 100644
--- a/include/linux/trusty/trusty.h
+++ b/include/linux/trusty/trusty.h
@@ -16,6 +16,9 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/trusty/sm_err.h> 18#include <linux/trusty/sm_err.h>
19#include <linux/device.h>
20#include <linux/pagemap.h>
21
19 22
20#ifdef CONFIG_TRUSTY 23#ifdef CONFIG_TRUSTY
21s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2); 24s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2);
@@ -53,4 +56,16 @@ int trusty_call_notifier_register(struct device *dev,
53int trusty_call_notifier_unregister(struct device *dev, 56int trusty_call_notifier_unregister(struct device *dev,
54 struct notifier_block *n); 57 struct notifier_block *n);
55const char *trusty_version_str_get(struct device *dev); 58const char *trusty_version_str_get(struct device *dev);
59
60struct ns_mem_page_info {
61 uint64_t attr;
62};
63
64int trusty_encode_page_info(struct ns_mem_page_info *inf,
65 struct page *page, pgprot_t pgprot);
66
67int trusty_call32_mem_buf(struct device *dev, u32 smcnr,
68 struct page *page, u32 size,
69 pgprot_t pgprot);
70
56#endif 71#endif