diff options
-rw-r--r-- | eim/sw/cryptech_memory_map.h | 19 | ||||
-rw-r--r-- | eim/sw/trng_tester_eim.c | 24 |
2 files changed, 31 insertions, 12 deletions
diff --git a/eim/sw/cryptech_memory_map.h b/eim/sw/cryptech_memory_map.h index 5cf7f42..dd4dc36 100644 --- a/eim/sw/cryptech_memory_map.h +++ b/eim/sw/cryptech_memory_map.h @@ -84,6 +84,15 @@ #define COMM_ADDR_NAME1 COMM_ADDR_BASE + ADDR_NAME1 #define COMM_ADDR_VERSION COMM_ADDR_BASE + ADDR_VERSION +#define NOVENA_BOARD_NAME0 "PVT1"; +#define NOVENA_BOARD_NAME1 " "; +#define NOVENA_BOARD_VERSION "0.10"; + +#define EIM_INTERFACE_NAME0 "eim "; +#define EIM_INTERFACE_NAME1 " "; +#define EIM_INTERFACE_VERSION "0.10"; + + //------------------------------------------------------------------ // Hashes segment. @@ -212,6 +221,16 @@ #define CSPRNG_ADDR_NBLOCKS_LO CSPRNG_ADDR_BASE + ADDR(0x41) #define CSPRNG_ADDR_NBLOCKS_HI CSPRNG_ADDR_BASE + ADDR(0x42) + +#define AVALANCHE_ENTROPY_NAME0 "extn" +#define AVALANCHE_ENTROPY_NAME1 "oise" +#define AVALANCHE_ENTROPY_VERSION "0.10" + +#define ROSC_ENTROPY_NAME0 "rosc"; +#define ROSC_ENTROPY_NAME1 " ent"; +#define ROSC_ENTROPY_VERSION "0.10"; + + //====================================================================== // EOF cryptech_memory_map.h //====================================================================== diff --git a/eim/sw/trng_tester_eim.c b/eim/sw/trng_tester_eim.c index def75ab..03f55bd 100644 --- a/eim/sw/trng_tester_eim.c +++ b/eim/sw/trng_tester_eim.c @@ -62,13 +62,13 @@ int wait_stats = 0; int TC0() { - uint8_t board_name0[4] = "PVT1"; - uint8_t board_name1[4] = " "; - uint8_t board_version[4] = "0.10"; + uint8_t board_name0[4] = NOVENA_BOARD_NAME0; + uint8_t board_name1[4] = NOVENA_BOARD_NAME1; + uint8_t board_version[4] = NOVENA_BOARD_VERSION; - uint8_t comm_name0[4] = "eim "; - uint8_t comm_name1[4] = " "; - uint8_t comm_version[4] = "0.10"; + uint8_t comm_name0[4] = EIM_INTERFACE_NAME0; + uint8_t comm_name1[4] = EIM_INTERFACE_NAME1; + uint8_t comm_version[4] = EIM_INTERFACE_VERSION; uint8_t t[4]; @@ -123,9 +123,9 @@ int TC1(void) /* TC2: Read name and version from avalanche_entropy core. */ int TC2(void) { - uint8_t name0[4] = "extn"; - uint8_t name1[4] = "oise"; - uint8_t version[4] = "0.10"; + uint8_t name0[4] = AVALANCHE_ENTROPY_NAME0; + uint8_t name1[4] = AVALANCHE_ENTROPY_NAME1; + uint8_t version[4] = AVALANCHE_ENTROPY_VERSION; if (!quiet) printf("TC2: Reading name and version words from avalanche_entropy core.\n"); @@ -172,9 +172,9 @@ int TC3(void) /* TC4: Read name and version from rosc_entropy core. */ int TC4(void) { - uint8_t name0[4] = "rosc"; - uint8_t name1[4] = " ent"; - uint8_t version[4] = "0.10"; + uint8_t name0[4] = ROSC_ENTROPY_NAME0; + uint8_t name1[4] = ROSC_ENTROPY_NAME1; + uint8_t version[4] = ROSC_ENTROPY_VERSION; if (!quiet) printf("TC4: Reading name and version words from rosc_entropy core.\n"); |