aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm/hsm.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-07-10 22:51:47 -0400
committerPaul Selkirk <paul@psgd.org>2016-07-10 22:51:47 -0400
commit26a343971eb6f0e6e055441df353e60e81cf3595 (patch)
tree65e05394ff9807a9e709ce55e63ab46416d3067a /projects/hsm/hsm.c
parent708103998b7005c51fd78fc5563e46dd93fee283 (diff)
Sign/verifiy installable imagesparade_of_half_baked_ideas
Receive the image into sdram, verify the signature before copying to flash. It would be great if worked...
Diffstat (limited to 'projects/hsm/hsm.c')
-rw-r--r--projects/hsm/hsm.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/projects/hsm/hsm.c b/projects/hsm/hsm.c
index 3186bc5..d133c6f 100644
--- a/projects/hsm/hsm.c
+++ b/projects/hsm/hsm.c
@@ -206,28 +206,6 @@ void dispatch_thread(void const *args)
}
osThreadDef_t thread_def[NUM_RPC_TASK];
-/* Allocate memory from SDRAM1. There is only malloc, no free, so we don't
- * worry about fragmentation. */
-static uint8_t *sdram_malloc(size_t size)
-{
- /* end of variables declared with __attribute__((section(".sdram1"))) */
- extern uint8_t _esdram1 __asm ("_esdram1");
- /* end of SDRAM1 section */
- extern uint8_t __end_sdram1 __asm ("__end_sdram1");
-
- static uint8_t *sdram_heap = &_esdram1;
- uint8_t *p = sdram_heap;
-
-#define pad(n) (((n) + 3) & ~3)
- size = pad(size);
-
- if (p + size > &__end_sdram1)
- return NULL;
-
- sdram_heap += size;
- return p;
-}
-
/* The main thread. This does all the setup, and the worker threads handle
* the rest.
*/