aboutsummaryrefslogtreecommitdiff
path: root/hal.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-05-24 15:44:36 -0400
committerPaul Selkirk <paul@psgd.org>2016-05-24 15:47:56 -0400
commit7f38fc4fb28d62f8ffe40ccb4a2329a4da12a2c1 (patch)
tree04bf23d95beda0890a39070a59b0fe87dee4c24c /hal.h
parent1fe3c1370d668afd68b9c3b6d0e9480bf3700a7e (diff)
Add mkmif
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.