fvp_common_measured_boot.c 913 B

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