aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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";
//======================================================================