event_log.mk 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #
  2. # Copyright (c) 2020-2022, Arm Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Default log level to dump the event log (LOG_LEVEL_INFO)
  7. EVENT_LOG_LEVEL ?= 40
  8. # Measured Boot hash algorithm.
  9. # SHA-256 (or stronger) is required for all devices that are TPM 2.0 compliant.
  10. ifdef TPM_HASH_ALG
  11. $(warning "TPM_HASH_ALG is deprecated. Please use MBOOT_EL_HASH_ALG instead.")
  12. MBOOT_EL_HASH_ALG := ${TPM_HASH_ALG}
  13. else
  14. MBOOT_EL_HASH_ALG := sha256
  15. endif
  16. ifeq (${MBOOT_EL_HASH_ALG}, sha512)
  17. TPM_ALG_ID := TPM_ALG_SHA512
  18. TCG_DIGEST_SIZE := 64U
  19. else ifeq (${MBOOT_EL_HASH_ALG}, sha384)
  20. TPM_ALG_ID := TPM_ALG_SHA384
  21. TCG_DIGEST_SIZE := 48U
  22. else
  23. TPM_ALG_ID := TPM_ALG_SHA256
  24. TCG_DIGEST_SIZE := 32U
  25. endif #MBOOT_EL_HASH_ALG
  26. # Set definitions for Measured Boot driver.
  27. $(eval $(call add_defines,\
  28. $(sort \
  29. TPM_ALG_ID \
  30. TCG_DIGEST_SIZE \
  31. EVENT_LOG_LEVEL \
  32. )))
  33. EVENT_LOG_SRC_DIR := drivers/measured_boot/event_log/
  34. EVENT_LOG_SOURCES := ${EVENT_LOG_SRC_DIR}event_log.c \
  35. ${EVENT_LOG_SRC_DIR}event_print.c