summaryrefslogtreecommitdiffstats
path: root/src/usr/secureboot/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/secureboot/base')
-rw-r--r--src/usr/secureboot/base/securerom.C16
-rw-r--r--src/usr/secureboot/base/securerom.H8
2 files changed, 24 insertions, 0 deletions
diff --git a/src/usr/secureboot/base/securerom.C b/src/usr/secureboot/base/securerom.C
index 48b4255cd..82a72c185 100644
--- a/src/usr/secureboot/base/securerom.C
+++ b/src/usr/secureboot/base/securerom.C
@@ -84,6 +84,14 @@ errlHndl_t hashBlob(void * i_blob, size_t i_size, SHA512_t io_buf)
}
+/*
+ * @brief Externally available hardware hash key function
+ */
+void getHwHashKeys(sha2_hash_t o_hash)
+{
+ return Singleton<SecureROM>::instance().getHwHashKeys(o_hash);
+}
+
}; //end SECUREBOOT namespace
@@ -546,6 +554,14 @@ errlHndl_t SecureROM::getHwHashKeys()
}
/**
+ * @brief Retrieve the internal hardware hash key from secure ROM object.
+ */
+void SecureROM::getHwHashKeys(sha2_hash_t o_hash)
+{
+ memcpy(o_hash, iv_hash_key, sizeof(sha2_hash_t));
+}
+
+/**
* @brief Static instance function for testcase only
*/
SecureROM& SecureROM::getInstance()
diff --git a/src/usr/secureboot/base/securerom.H b/src/usr/secureboot/base/securerom.H
index ad12a5a8a..cd5688cc4 100644
--- a/src/usr/secureboot/base/securerom.H
+++ b/src/usr/secureboot/base/securerom.H
@@ -157,6 +157,14 @@ class SecureROM
*/
errlHndl_t hashBlob(void * i_blob, size_t i_size, SHA512_t io_buf);
+ /**
+ * @brief Retrieve the internal hardware hash key from secure ROM
+ * object.
+ *
+ * @param[out] o_hash Reference to the sha2_hash_t array to copy the
+ * hash to.
+ */
+ void getHwHashKeys(sha2_hash_t o_hash);
protected:
OpenPOWER on IntegriCloud