1 /* 2 * Copyright (c) 2025, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <assert.h> 8 #include <stdint.h> 9 10 #include <plat/arm/common/plat_arm.h> 11 #include <plat/common/platform.h> 12 13 #include <common/desc_image_load.h> 14 #include <drivers/auth/crypto_mod.h> 15 #include <event_measure.h> 16 #include <event_print.h> 17 18 extern event_log_metadata_t juno_event_log_metadata[]; 19 20 int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data) 21 { 22 int err; 23 24 /* Calculate image hash and record data in Event Log */ 25 err = event_log_measure_and_record(image_data->image_base, 26 image_data->image_size, 27 image_id, 28 juno_event_log_metadata); 29 if (err != 0) { 30 ERROR("%s%s image id %u (%i)\n", 31 "Failed to ", "record in event log", image_id, err); 32 return err; 33 } 34 35 return 0; 36 } 37 38 int plat_mboot_measure_key(const void *pk_oid, const void *pk_ptr, 39 size_t pk_len) 40 { 41 return 0; 42 } 43