aboutsummaryrefslogtreecommitdiff
path: root/hal.h
diff options
context:
space:
mode:
Diffstat (limited to 'hal.h')
-rw-r--r--hal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/hal.h b/hal.h
index ee97e8a..5021020 100644
--- a/hal.h
+++ b/hal.h
@@ -93,6 +93,9 @@
#define MODEXPS6_NAME "modexps6"
#define MODEXPS6_VERSION "0.10"
+#define MKMIF_NAME "mkmif "
+#define MKMIF_VERSION "0.10"
+
/*
* C API error codes. Defined in this form so we can keep the tokens
* and error strings together. See errorstrings.c.
@@ -345,6 +348,18 @@ extern hal_error_t hal_modexp(const hal_core_t *core,
const uint8_t * const mod, const size_t mod_len, /* Modulus */
uint8_t * result, const size_t result_len);
+/*
+ * Master Key Memory Interface
+ */
+
+extern hal_error_t hal_mkmif_init(const hal_core_t *core);
+extern hal_error_t hal_mkmif_set_clockspeed(const hal_core_t *core, const uint32_t divisor);
+extern hal_error_t hal_mkmif_get_clockspeed(const hal_core_t *core, uint32_t *divisor);
+extern hal_error_t hal_mkmif_write(const hal_core_t *core, uint32_t addr, const uint8_t *buf, size_t len);
+extern hal_error_t hal_mkmif_write_word(const hal_core_t *core, uint32_t addr, const uint32_t data);
+extern hal_error_t hal_mkmif_read(const hal_core_t *core, uint32_t addr, uint8_t *buf, size_t len);
+extern hal_error_t hal_mkmif_read_word(const hal_core_t *core, uint32_t addr, uint32_t *data);
+
/*
* Key types and curves, used in various places.