aboutsummaryrefslogtreecommitdiff
path: root/eim
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2015-04-27 14:22:22 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2015-04-27 14:22:22 +0200
commit07e3a0f3c71134fe9ce4f375cf7a6fd9ad297f45 (patch)
treeb4d6a2dbd13e2c87d5ff1077db4e9e2abedd3099 /eim
parentbd45dddc38d7e7de45d80cf482c265ec3ae57cfd (diff)
(1) Fixed the symbol names for the csprng name and version. (2) Adding segment for math cores and added first addresses for modexp core.
Diffstat (limited to 'eim')
-rw-r--r--eim/sw/cryptech_memory_map.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/eim/sw/cryptech_memory_map.h b/eim/sw/cryptech_memory_map.h
index 463aa7b..dfa0f0a 100644
--- a/eim/sw/cryptech_memory_map.h
+++ b/eim/sw/cryptech_memory_map.h
@@ -59,6 +59,7 @@
#define SEGMENT_OFFSET_HASHES BASE_ADDR + (1 * SEGMENT_SIZE)
#define SEGMENT_OFFSET_RNGS BASE_ADDR + (2 * SEGMENT_SIZE)
#define SEGMENT_OFFSET_CIPHERS BASE_ADDR + (3 * SEGMENT_SIZE)
+#define SEGMENT_OFFSET_MATH BASE_ADDR + (4 * SEGMENT_SIZE)
// addresses and codes common to all cores
@@ -244,9 +245,35 @@
#define ROSC_ENTROPY_NAME1 " ent";
#define ROSC_ENTROPY_VERSION "0.10";
-#define CSPRNG_ENTROPY_NAME0 "cspr";
-#define CSPRNG_ENTROPY_NAME1 "ng ";
-#define CSPRNG_ENTROPY_VERSION "0.50";
+#define CSPRNG_NAME0 "cspr";
+#define CSPRNG_NAME1 "ng ";
+#define CSPRNG_VERSION "0.50";
+
+
+// -----------------------------------------------------------------
+// MATH segment.
+// -----------------------------------------------------------------
+#define MATH_CORE_SIZE ADDR(0x100)
+
+// addresses and codes for the MATH cores */
+#define MODEXP_ADDR_BASE SEGMENT_OFFSET_MATH + (0x00 * MATH_CORE_SIZE)
+#define MODEXP_ADDR_NAME0 MODEXP_ADDR_BASE + ADDR_NAME0
+#define MODEXP_ADDR_NAME1 MODEXP_ADDR_BASE + ADDR_NAME1
+#define MODEXP_ADDR_VERSION MODEXP_ADDR_BASE + ADDR_VERSION
+#define MODEXP_ADDR_CTRL MODEXP_ADDR_BASE + ADDR(0x08)
+#define MODEXP_CTRL_INIT 1
+#define MODEXP_CTRL_NEXT 2
+#define MODEXP_ADDR_STATUS MODEXP_ADDR_BASE + ADDR(0x09)
+
+#define MODEXP_ADDR_DELAY MODEXP_ADDR_BASE + ADDR(0x13)
+#define MODEXP_STATUS_READY 1
+
+#define MODEXP_MODULUS_LENGTH MODEXP_ADDR_BASE + ADDR(0x20)
+#define MODEXP_EXPONENT_LENGTH MODEXP_ADDR_BASE + ADDR(0x21)
+
+#define MODEXP_NAME0 "mode";
+#define MODEXP_NAME1 "xp ";
+#define MODEXP_VERSION "0.50";
//======================================================================