aboutsummaryrefslogtreecommitdiff
path: root/verilog_constants.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2020-04-28 12:11:49 -0400
committerPaul Selkirk <paul@psgd.org>2020-04-29 11:48:37 -0400
commit401965f1e9f74b43c88477d2ff6ac4d6c62ab5a8 (patch)
tree5e534ba8dd169a961abc5ec8643da54f5744efc5 /verilog_constants.h
parent6f8ac4f72ef2fb003038293a62e47edf6c962b36 (diff)
The new keywrap core now talks directly to the MKM, so I split the code
that talks to that core out of aes_keywrap.c. The HSM will now be built with just the keywrap core, with no user access to aes or mkmif.
Diffstat (limited to 'verilog_constants.h')
-rw-r--r--verilog_constants.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/verilog_constants.h b/verilog_constants.h
index 9ed84d4..4588c20 100644
--- a/verilog_constants.h
+++ b/verilog_constants.h
@@ -344,12 +344,17 @@
#define MKMIF_ADDR_EMEM_DATA (0x20)
/*
- * AES Keywrap core
+ * AES Keywrap core, with Master Key Memory Interface
*/
+#define KEYWRAP_CTRL_READ (4)
+#define KEYWRAP_CTRL_WRITE (8)
+
#define KEYWRAP_ADDR_CONFIG (0x0a)
#define KEYWRAP_CONFIG_ENCDEC (1)
#define KEYWRAP_CONFIG_KEYLEN (2)
+#define KEYWRAP_CONFIG_MKS (4)
+#define KEYWRAP_CONFIG_MKK (8)
#define KEYWRAP_ADDR_RLEN (0x0c)
#define KEYWRAP_ADDR_A0 (0x0e)
@@ -364,6 +369,8 @@
#define KEYWRAP_ADDR_KEY6 (0x16)
#define KEYWRAP_ADDR_KEY7 (0x17)
+#define KEYWRAP_ADDR_MSTATUS (0x20)
+
#define KEYWRAP_ADDR_R_DATA (0x800)
#define KEYWRAP_LEN_R_DATA (0x800)