rse_measured_boot.mk 812 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Copyright (c) 2022, Arm Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Hash algorithm for measured boot
  7. # SHA-256 (or stronger) is required.
  8. MBOOT_RSE_HASH_ALG := sha256
  9. ifeq (${MBOOT_RSE_HASH_ALG}, sha512)
  10. MBOOT_ALG_ID := MBOOT_ALG_SHA512
  11. MBOOT_DIGEST_SIZE := 64U
  12. else ifeq (${MBOOT_RSE_HASH_ALG}, sha384)
  13. MBOOT_ALG_ID := MBOOT_ALG_SHA384
  14. MBOOT_DIGEST_SIZE := 48U
  15. else
  16. MBOOT_ALG_ID := MBOOT_ALG_SHA256
  17. MBOOT_DIGEST_SIZE := 32U
  18. endif #MBOOT_RSE_HASH_ALG
  19. # Set definitions for Measured Boot driver.
  20. $(eval $(call add_defines,\
  21. $(sort \
  22. MBOOT_ALG_ID \
  23. MBOOT_DIGEST_SIZE \
  24. MBOOT_RSE_BACKEND \
  25. )))
  26. MEASURED_BOOT_SRC_DIR := drivers/measured_boot/rse/
  27. MEASURED_BOOT_SOURCES += ${MEASURED_BOOT_SRC_DIR}rse_measured_boot.c