Debian Codegraph @

drivers/measured_boot/event_log/event_log.mk

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