dice_prot_env.mk 689 B

1234567891011121314151617181920212223242526272829
  1. #
  2. # Copyright (c) 2024, Arm Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Hash algorithm for DICE Protection Environment
  7. # SHA-256 (or stronger) is required.
  8. DPE_HASH_ALG := sha256
  9. ifeq (${DPE_HASH_ALG}, sha512)
  10. DPE_ALG_ID := DPE_ALG_SHA512
  11. DPE_DIGEST_SIZE := 64U
  12. else ifeq (${DPE_HASH_ALG}, sha384)
  13. DPE_ALG_ID := DPE_ALG_SHA384
  14. DPE_DIGEST_SIZE := 48U
  15. else
  16. DPE_ALG_ID := DPE_ALG_SHA256
  17. DPE_DIGEST_SIZE := 32U
  18. endif #DPE_HASH_ALG
  19. # Set definitions for DICE Protection Environment
  20. $(eval $(call add_defines,\
  21. $(sort \
  22. DPE_ALG_ID \
  23. DPE_DIGEST_SIZE \
  24. )))
  25. DPE_SOURCES += drivers/measured_boot/rse/dice_prot_env.c