xref: /rk3399_ARM-atf/drivers/measured_boot/event_log/event_log.mk (revision 14db963fd3ad73888a2f709e1602e6bf7614db93)
1d89bec83SSandrine Bailleux#
2d89bec83SSandrine Bailleux# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
3d89bec83SSandrine Bailleux#
4d89bec83SSandrine Bailleux# SPDX-License-Identifier: BSD-3-Clause
5d89bec83SSandrine Bailleux#
6d89bec83SSandrine Bailleux
7d89bec83SSandrine Bailleux# Default log level to dump the event log (LOG_LEVEL_INFO)
8d89bec83SSandrine BailleuxEVENT_LOG_LEVEL         ?= 40
9d89bec83SSandrine Bailleux
10d89bec83SSandrine Bailleux# TPM hash algorithm.
11d89bec83SSandrine Bailleux# SHA-256 (or stronger) is required for all devices that are TPM 2.0 compliant.
12d89bec83SSandrine BailleuxTPM_HASH_ALG			:=	sha256
13d89bec83SSandrine Bailleux
14d89bec83SSandrine Bailleuxifeq (${TPM_HASH_ALG}, sha512)
15d89bec83SSandrine Bailleux    TPM_ALG_ID			:=	TPM_ALG_SHA512
16d89bec83SSandrine Bailleux    TCG_DIGEST_SIZE		:=	64U
17d89bec83SSandrine Bailleuxelse ifeq (${TPM_HASH_ALG}, sha384)
18d89bec83SSandrine Bailleux    TPM_ALG_ID			:=	TPM_ALG_SHA384
19d89bec83SSandrine Bailleux    TCG_DIGEST_SIZE		:=	48U
20d89bec83SSandrine Bailleuxelse
21d89bec83SSandrine Bailleux    TPM_ALG_ID			:=	TPM_ALG_SHA256
22d89bec83SSandrine Bailleux    TCG_DIGEST_SIZE		:=	32U
23*14db963fSManish V Badarkheendif #TPM_HASH_ALG
24d89bec83SSandrine Bailleux
25*14db963fSManish V Badarkhe# Set definitions for Measured Boot driver.
26d89bec83SSandrine Bailleux$(eval $(call add_defines,\
27d89bec83SSandrine Bailleux    $(sort \
28d89bec83SSandrine Bailleux        TPM_ALG_ID \
29d89bec83SSandrine Bailleux        TCG_DIGEST_SIZE \
30d89bec83SSandrine Bailleux        EVENT_LOG_LEVEL \
31d89bec83SSandrine Bailleux)))
32d89bec83SSandrine Bailleux
33d89bec83SSandrine BailleuxMEASURED_BOOT_SRC_DIR	:= drivers/measured_boot/event_log/
34d89bec83SSandrine Bailleux
35d89bec83SSandrine BailleuxMEASURED_BOOT_SOURCES	:= ${MEASURED_BOOT_SRC_DIR}event_log.c		\
36d89bec83SSandrine Bailleux			   ${MEASURED_BOOT_SRC_DIR}event_print.c
37d89bec83SSandrine Bailleux
38d89bec83SSandrine BailleuxBL2_SOURCES		+= ${MEASURED_BOOT_SOURCES}
3948ba0345SManish V BadarkheBL1_SOURCES             += ${MEASURED_BOOT_SOURCES}
40