summaryrefslogtreecommitdiff
path: root/peripheral/keystore/chaabi/libcc54/crys/crys_context_relocation.h
diff options
context:
space:
mode:
authorBruce Beare <bruce.j.beare@intel.com>2016-05-06 20:58:18 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-05-06 20:58:18 +0000
commit2ffeae775dceb2e3540bb43ed0c2246376e2ec48 (patch)
treed52c57f4c96053463410edc396406f3af9724837 /peripheral/keystore/chaabi/libcc54/crys/crys_context_relocation.h
parentde63dd6c2c643c6947ee77df064e6482689f4afd (diff)
parent09bcc11a44d5848b64009a4081de221dc15f3e1c (diff)
downloadintel-2ffeae775dceb2e3540bb43ed0c2246376e2ec48.tar.gz
Reland "chaabi: initial commit for libcc54"
am: 09bcc11a44 * commit '09bcc11a44d5848b64009a4081de221dc15f3e1c': Reland "chaabi: initial commit for libcc54" Change-Id: Ia9aa8329153eba04611a5bf5cd42acdcff7274cd
Diffstat (limited to 'peripheral/keystore/chaabi/libcc54/crys/crys_context_relocation.h')
-rw-r--r--peripheral/keystore/chaabi/libcc54/crys/crys_context_relocation.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/peripheral/keystore/chaabi/libcc54/crys/crys_context_relocation.h b/peripheral/keystore/chaabi/libcc54/crys/crys_context_relocation.h
new file mode 100644
index 0000000..7150ef1
--- /dev/null
+++ b/peripheral/keystore/chaabi/libcc54/crys/crys_context_relocation.h
@@ -0,0 +1,39 @@
+/*******************************************************************
+* (c) Copyright 2011-2012 Discretix Technologies Ltd. *
+* This file is licensed under the terms provided in the file *
+* libcc54/LICENSE in this directory or a parent directory *
+********************************************************************/
+
+/*! \file crys_context_relocation.h
+ * Handle relocation of crypto context in the context buffer given
+ * by the user to assure it does not cross a page boundary
+ */
+
+#ifndef _CRYS_CONTEXT_RELOCATION_H_
+#define _CRYS_CONTEXT_RELOCATION_H_
+
+/*!
+ * Initialize the context offset for a new buffer given to INIT phase
+ *
+ * \param bufferStart The address of the context buffer given by the user
+ * \param bufferSize The size of the user buffer in bytes
+ * \param contextSize The required size (in bytes) of the context
+ *
+ * \return The address of the context within the buffer
+ */
+void *DX_InitUserCtxLocation(void *bufferStart,
+ unsigned long bufferSize,
+ unsigned long contextSize);
+
+/*!
+ * Return the context address in the given buffer
+ * If previous context offset is now crossing a page the context data
+ * would be moved to a good location.
+ *
+ * \param bufferStart The address of the context buffer given by the user
+ *
+ * \return The address of the context within the buffer
+ */
+void *DX_GetUserCtxLocation(void *bufferStart);
+
+#endif /*_CRYS_CONTEXT_RELOCATION_H_*/