summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorZhen Kong <zkong@codeaurora.org>2015-12-02 23:40:16 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:13:51 -0700
commitdeb62ed21a20b42e2b98daa14850ef95428bef1f (patch)
tree838c6a45b7beeb36db5e005ad8d24768528eb993 /include/uapi
parent894269ca16bc63052973b17198dde1bf4fc58373 (diff)
qseecom: make change to support sg list entry number larger than 512
qseecom_send_modfd_cmd_64 converts non-contiguous ION memory fd to scatter-gather physical address list, and supports up to 512 SG list entries. Now, 512 is not enough if client wants to send large data in a fragmented system. In this change, if SG list entry number is larger than 512, we will allocate a new contiguous kernel buffer, then save all SG entries into this new buffer. Change-Id: Id90eefb98b63bf16db755dae8e1482e448090f47 Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/qseecom.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/uapi/linux/qseecom.h b/include/uapi/linux/qseecom.h
index 4bdd7035bbf0..5c5761d690dd 100644
--- a/include/uapi/linux/qseecom.h
+++ b/include/uapi/linux/qseecom.h
@@ -233,6 +233,24 @@ struct qseecom_sg_entry_64bit {
uint32_t len;
} __attribute__ ((packed));
+/*
+ * sg list buf format version
+ * 1: Legacy format to support only 512 SG list entries
+ * 2: new format to support > 512 entries
+ */
+#define QSEECOM_SG_LIST_BUF_FORMAT_VERSION_1 1
+#define QSEECOM_SG_LIST_BUF_FORMAT_VERSION_2 2
+
+struct qseecom_sg_list_buf_hdr_64bit {
+ struct qseecom_sg_entry_64bit blank_entry; /* must be all 0 */
+ uint32_t version; /* sg list buf format version */
+ uint64_t new_buf_phys_addr; /* PA of new buffer */
+ uint32_t nents_total; /* Total number of SG entries */
+} __attribute__ ((packed));
+
+#define QSEECOM_SG_LIST_BUF_HDR_SZ_64BIT \
+ sizeof(struct qseecom_sg_list_buf_hdr_64bit)
+
#define MAX_CE_PIPE_PAIR_PER_UNIT 3
#define INVALID_CE_INFO_UNIT_NUM 0xffffffff