tc_bl1_measured_boot.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2022-2024, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <stdint.h>
  7. #include <drivers/arm/rse_comms.h>
  8. #include <drivers/measured_boot/metadata.h>
  9. #include <drivers/measured_boot/rse/rse_measured_boot.h>
  10. #include <tools_share/zero_oid.h>
  11. #include <plat/arm/common/plat_arm.h>
  12. #include <platform_def.h>
  13. /* Table with platform specific image IDs and metadata. Intentionally not a
  14. * const struct, some members might set by bootloaders during trusted boot.
  15. */
  16. struct rse_mboot_metadata tc_rse_mboot_metadata[] = {
  17. {
  18. .id = FW_CONFIG_ID,
  19. .slot = U(6),
  20. .signer_id_size = SIGNER_ID_MIN_SIZE,
  21. .sw_type = MBOOT_FW_CONFIG_STRING,
  22. .pk_oid = ZERO_OID,
  23. .lock_measurement = true },
  24. {
  25. .id = TB_FW_CONFIG_ID,
  26. .slot = U(7),
  27. .signer_id_size = SIGNER_ID_MIN_SIZE,
  28. .sw_type = MBOOT_TB_FW_CONFIG_STRING,
  29. .pk_oid = ZERO_OID,
  30. .lock_measurement = true },
  31. {
  32. .id = BL2_IMAGE_ID,
  33. .slot = U(8),
  34. .signer_id_size = SIGNER_ID_MIN_SIZE,
  35. .sw_type = MBOOT_BL2_IMAGE_STRING,
  36. .pk_oid = ZERO_OID,
  37. .lock_measurement = true },
  38. {
  39. .id = RSE_MBOOT_INVALID_ID }
  40. };
  41. void bl1_plat_mboot_init(void)
  42. {
  43. /* Initialize the communication channel between AP and RSE */
  44. (void)rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE,
  45. PLAT_RSE_AP_RCV_MHU_BASE);
  46. rse_measured_boot_init(tc_rse_mboot_metadata);
  47. }
  48. void bl1_plat_mboot_finish(void)
  49. {
  50. /* Nothing to do. */
  51. }