summaryrefslogtreecommitdiff
path: root/src/drivers/intel/fsp2_0/include/fsp/memory_init.h
diff options
context:
space:
mode:
authorPhilipp Deppenwiese <zaolin@das-labor.org>2018-02-27 22:14:34 +0100
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2018-07-17 17:40:33 +0000
commit80961af4b6888ff31aacaae0753969db4a8fb734 (patch)
treee34d36a3a65601327fdc973864c1b465d3f842b8 /src/drivers/intel/fsp2_0/include/fsp/memory_init.h
parentd29c81d51314806f17e0b49cb57f0d620bde783c (diff)
downloadcoreboot-80961af4b6888ff31aacaae0753969db4a8fb734.tar.xz
security/vboot: Add interface for FSP 2.0 mrc caching
* Move vboot/tpm specific implementation to vboot. * Only call functions if CONFIG_FSP2_0_USES_TPM_MRC_HASH is set. * Preparation for software hash function support, no logic changed. Change-Id: I41a458186c7981adaf3fea8974adec2ca8668f14 Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org> Reviewed-on: https://review.coreboot.org/24904 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0/include/fsp/memory_init.h')
-rw-r--r--src/drivers/intel/fsp2_0/include/fsp/memory_init.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/include/fsp/memory_init.h b/src/drivers/intel/fsp2_0/include/fsp/memory_init.h
new file mode 100644
index 0000000000..05ea440275
--- /dev/null
+++ b/src/drivers/intel/fsp2_0/include/fsp/memory_init.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Facebook Inc
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _FSP2_0_MEMORY_INIT_H_
+#define _FSP2_0_MEMORY_INIT_H_
+
+#include <types.h>
+
+/*
+ * Updates mrc cache hash if it differs.
+ */
+void mrc_cache_update_hash(const uint8_t *data, size_t size);
+
+/*
+ * Verifies mrc cache hash which is stored somewhere.
+ * return 1 verification was successful and 0 for error.
+ */
+int mrc_cache_verify_hash(const uint8_t *data, size_t size);
+
+#endif /* _FSP2_0_MEMORY_INIT_H_ */