[Cryptech-Commits] [sw/stm32] 02/02: Merge branch 'hashsig'

git at cryptech.is git at cryptech.is
Wed Jul 25 06:01:07 UTC 2018


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch master
in repository sw/stm32.

commit f424af5cfc62bf4e0902831591a303b02e31a1ca
Merge: 49939b9 7e6a9f7
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Tue Jul 24 22:55:19 2018 -0400

    Merge branch 'hashsig'

 projects/cli-test/cli-test.c |  6 +++
 projects/hsm/hsm.c           | 91 ++++++++++++++++++++++++++++++++------------
 projects/hsm/mgmt-keystore.c | 16 ++++++++
 spiflash_n25q128.c           |  2 +-
 task.c                       | 22 ++++++++++-
 task.h                       |  1 +
 6 files changed, 111 insertions(+), 27 deletions(-)

diff --cc projects/hsm/hsm.c
index 64529f6,c9d8d28..29509e8
--- a/projects/hsm/hsm.c
+++ b/projects/hsm/hsm.c
@@@ -106,7 -99,7 +99,7 @@@ typedef struct rpc_buffer_s 
  } rpc_buffer_t;
  
  /* RPC input (requst) buffers */
--static rpc_buffer_t ibufs[NUM_RPC_TASK];
++static rpc_buffer_t *ibufs;
  
  /* ibuf queue structure */
  typedef struct {
@@@ -431,9 -455,9 +461,13 @@@ int main(void
          Error_Handler();
  
      /* Initialize the ibuf queues. */
++    ibufs = (rpc_buffer_t *)sdram_malloc(NUM_RPC_TASK * sizeof(rpc_buffer_t));
++    if (ibufs == NULL)
++        Error_Handler();
++    memset(ibufs, 0, NUM_RPC_TASK * sizeof(rpc_buffer_t));
      memset(&ibuf_waiting, 0, sizeof(ibuf_waiting));
      memset(&ibuf_ready, 0, sizeof(ibuf_ready));
--    for (size_t i = 0; i < sizeof(ibufs)/sizeof(ibufs[0]); ++i)
++    for (size_t i = 0; i < NUM_RPC_TASK; ++i)
          ibuf_put(&ibuf_waiting, &ibufs[i]);
  
      /* Create the rpc dispatch worker tasks. */



More information about the Commits mailing list