aboutsummaryrefslogtreecommitdiff
path: root/hal_internal.h
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-09-23 01:00:10 -0400
committerRob Austein <sra@hactrn.net>2016-09-23 01:00:10 -0400
commit3b2363827922c2af2b56cd817fde5c6b5480e00d (patch)
tree387c593d3b7433b48113bfd287cead0b31ab1a6f /hal_internal.h
parent95b79e109be2c7d85ed965e5dcf190420ae7be19 (diff)
Use subsectors instead of sectors in keystore.
Diffstat (limited to 'hal_internal.h')
-rw-r--r--hal_internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/hal_internal.h b/hal_internal.h
index ade908f..2318748 100644
--- a/hal_internal.h
+++ b/hal_internal.h
@@ -69,6 +69,20 @@ inline uint32_t htonl(uint32_t w)
#endif
/*
+ * Static memory allocation on start-up. Don't use this except where
+ * really necessary. By design, there's no way to free this, we don't
+ * want to have to manage a heap. Intent is just to allow allocation
+ * things like the large-ish ks_index arrays used by ks_flash.c from a
+ * memory source external to the executable image file (eg, from the
+ * secondary SDRAM chip on the Cryptech Alpha board).
+ *
+ * We shouldn't need this except on the HSM, so for now we don't bother
+ * with implementing a version of this based on malloc() or sbrk().
+ */
+
+extern void *hal_allocate_static_memory(const size_t size);
+
+/*
* Longest hash block and digest we support at the moment.
*/