diff options
author | Mark A. Allyn <mark.a.allyn@intel.com> | 2012-02-10 17:52:42 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-10 22:09:57 +0400 |
commit | aca58ec828af52516816ec48e75a78f043e508c7 (patch) | |
tree | 692420f6bf84998593f6f9df62b14a8c94d28e18 /drivers/staging/sep/sep_driver_api.h | |
parent | ffcf12810ca11891deb580d166af13fae294fe2e (diff) | |
download | linux-aca58ec828af52516816ec48e75a78f043e508c7.tar.xz |
staging: sep: Basic infrastructure for SEP DMA access to non CPU regions
[This is picked out of the differences between the upstream driver and
the staging driver. I'm resolving the differences as a series of updates -AC]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sep/sep_driver_api.h')
-rw-r--r-- | drivers/staging/sep/sep_driver_api.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/staging/sep/sep_driver_api.h b/drivers/staging/sep/sep_driver_api.h index 78a4b69d3fd8..8b797d5388bb 100644 --- a/drivers/staging/sep/sep_driver_api.h +++ b/drivers/staging/sep/sep_driver_api.h @@ -61,7 +61,9 @@ enum hash_stage { HASH_INIT, HASH_UPDATE, HASH_FINISH, - HASH_DIGEST + HASH_DIGEST, + HASH_FINUP_DATA, + HASH_FINUP_FINISH }; /* @@ -205,6 +207,7 @@ struct sep_lli_entry { */ struct sep_fastcall_hdr { u32 magic; + u32 secure_dma; u32 msg_len; u32 num_dcbs; }; @@ -231,6 +234,8 @@ struct sep_dma_context { u32 dmatables_len; /* size of input data */ u32 input_data_len; + /* secure dma use (for imr memory restriced area in output */ + bool secure_dma; struct sep_dma_resource dma_res_arr[SEP_MAX_NUM_SYNC_DMA_OPS]; /* Scatter gather for kernel crypto */ struct scatterlist *src_sg; @@ -317,6 +322,7 @@ ssize_t sep_activate_dcb_dmatables_context(struct sep_device *sep, * @tail_block_size: u32; for size of tail block * @isapplet: bool; to indicate external app * @is_kva: bool; kernel buffer; only used for kernel crypto module + * @secure_dma; indicates whether this is secure_dma using IMR * * This function prepares the linked DMA tables and puts the * address for the linked list of tables inta a DCB (data control @@ -332,6 +338,7 @@ int sep_prepare_input_output_dma_table_in_dcb(struct sep_device *sep, u32 tail_block_size, bool isapplet, bool is_kva, + bool secure_dma, struct sep_dcblock *dcb_region, void **dmatables_region, struct sep_dma_context **dma_ctx, @@ -386,4 +393,10 @@ int sep_wait_transaction(struct sep_device *sep); struct sep_device; +#define SEP_IOCPREPAREDCB_SECURE_DMA \ + _IOW(SEP_IOC_MAGIC_NUMBER, 38, struct build_dcb_struct) + +#define SEP_IOCFREEDCB_SECURE_DMA \ + _IO(SEP_IOC_MAGIC_NUMBER, 39) + #endif |