tpm: Add reserved memory event log
authorEddie James <eajames@linux.ibm.com>
Thu, 26 Jan 2023 21:08:10 +0000 (15:08 -0600)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 13 Feb 2023 08:11:20 +0000 (10:11 +0200)
commit1e2714bb83fc783d58701967391bea242c65eaff
tree239a6ca8dc4433d9728f02ab7ef8e05829d9e6af
parent441b7152729f4a2bdb100135a58625fa0aeb69e4
tpm: Add reserved memory event log

Some platforms may desire to pass the event log up to Linux in the
form of a reserved memory region. In particular, this is desirable
for embedded systems or baseboard management controllers (BMCs)
booting with U-Boot. IBM OpenBMC BMCs will be the first user.
Add support for the reserved memory in the TPM core to find the
region and map it.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
[jarkko: removed spurious dev_info()'s from tpm_read_log_memory_region()]
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
[yang: return -ENOMEM when devm_memremap() fails]
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/eventlog/of.c