aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-09-23 01:00:25 -0400
committerRob Austein <sra@hactrn.net>2016-09-23 01:00:25 -0400
commit2dc81c98924db865be038476ecc8ce92c186efa7 (patch)
tree9e168d7e54fc30c18bd7b98e646446f4460b0f6c /projects
parentfb931dbd29d899a7e9523ee1ea6e11d263b9ad7e (diff)
Use subsectors instead of sectors in keystore.
Diffstat (limited to 'projects')
-rw-r--r--projects/cli-test/cli-test.c20
-rw-r--r--projects/hsm/hsm.c8
2 files changed, 28 insertions, 0 deletions
diff --git a/projects/cli-test/cli-test.c b/projects/cli-test/cli-test.c
index d04371b..17b85cd 100644
--- a/projects/cli-test/cli-test.c
+++ b/projects/cli-test/cli-test.c
@@ -67,3 +67,23 @@ main()
/* NOT REACHED */
Error_Handler();
}
+
+
+/*
+ * Dummy to solve link problem. Not obvious to me that a program
+ * called "cli-test" should be duplicating all of the HSM keystore
+ * logic, let alone that it should be doing it badly, but, whatever.
+ *
+ * We could just copy the sdram_malloc() code from hsm.c, but since
+ * one of the other commands linked into cli-test goes merrily stomping
+ * all over the entire SDRAM chip, that might not work out so well.
+ *
+ * Issue deferred until somebody cares.
+ */
+
+#warning hal_allocate_static_memory() stubbed out in cli-test, see source code
+
+void *hal_allocate_static_memory(const size_t size)
+{
+ return NULL;
+}
diff --git a/projects/hsm/hsm.c b/projects/hsm/hsm.c
index 862e718..ac0f23a 100644
--- a/projects/hsm/hsm.c
+++ b/projects/hsm/hsm.c
@@ -217,6 +217,14 @@ static uint8_t *sdram_malloc(size_t size)
return p;
}
+/* Implement static memory allocation for libhal over sdram_malloc().
+ * Once again, there's only alloc, not free. */
+
+void *hal_allocate_static_memory(const size_t size)
+{
+ return sdram_malloc(size);
+}
+
#if NUM_RPC_TASK > 1
/* Critical section start/end, currently used just for hal_core_alloc/_free.
*/