summaryrefslogtreecommitdiff
path: root/include/plat
diff options
context:
space:
mode:
authorManish V Badarkhe <Manish.Badarkhe@arm.com>2021-10-20 22:06:40 +0100
committerManish V Badarkhe <Manish.Badarkhe@arm.com>2021-12-08 13:08:17 +0000
commitcf21064ec8a1889f64de48e30e38285227d27745 (patch)
treeff342f2bb067e29a9bef5f9ce4fa07d41058ef58 /include/plat
parent0628fe3fff7f66c92a5ae0a545996bc3f3daba82 (diff)
downloadarm-trusted-firmware-cf21064ec8a1889f64de48e30e38285227d27745.tar.gz
feat(fvp): measure critical data
Implemented a platform function 'plat_mboot_measure_critical_data' to measure critical data and record its measurement using the Event Log driver. 'bl2_plat_mboot_finish' function invokes this platform function immediately after populating the critical data. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ia198295c6e07ab26d436eab1ff90df2cf28303af
Diffstat (limited to 'include/plat')
-rw-r--r--include/plat/common/common_def.h8
-rw-r--r--include/plat/common/platform.h10
2 files changed, 18 insertions, 0 deletions
diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h
index 14ae603b9..632f1229c 100644
--- a/include/plat/common/common_def.h
+++ b/include/plat/common/common_def.h
@@ -85,4 +85,12 @@
#endif /* BL2_IN_XIP_MEM */
#endif /* SEPARATE_CODE_AND_RODATA */
+#if MEASURED_BOOT
+/*
+ * Start critical data Ids from 2^32/2 reserving Ids from 0 to (2^32/2 - 1)
+ * for Images, It is a critical data Id base for all platforms.
+ */
+#define CRITICAL_DATA_ID_BASE U(0x80000000)
+#endif /* MEASURED_BOOT */
+
#endif /* COMMON_DEF_H */
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index 3fa63f555..9a61b502c 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -124,12 +124,22 @@ int plat_try_next_boot_source(void);
#if MEASURED_BOOT
int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data);
+int plat_mboot_measure_critical_data(unsigned int critical_data_id,
+ const void *base,
+ size_t size);
#else
static inline int plat_mboot_measure_image(unsigned int image_id __unused,
image_info_t *image_data __unused)
{
return 0;
}
+static inline int plat_mboot_measure_critical_data(
+ unsigned int critical_data_id __unused,
+ const void *base __unused,
+ size_t size __unused)
+{
+ return 0;
+}
#endif /* MEASURED_BOOT */
/*******************************************************************************