efi/tpm: Pass correct address to memblock_reserve
authorJerry Snitselaar <jsnitsel@redhat.com>
Sat, 22 Oct 2022 15:23:52 +0000 (08:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:15:35 +0000 (18:15 +0100)
commitbdc118249698ff0aba0fa266a422e02279293007
treecaa0be3ebeeab038a3d8155783af2806ff7ff850
parent3a4d6f165eacfa127bf9a2cfaef6df0d1c1d5c82
efi/tpm: Pass correct address to memblock_reserve

[ Upstream commit f4cd18c5b2000df0c382f6530eeca9141ea41faf ]

memblock_reserve() expects a physical address, but the address being
passed for the TPM final events log is what was returned from
early_memremap(). This results in something like the following:

[    0.000000] memblock_reserve: [0xffffffffff2c0000-0xffffffffff2c00e4] efi_tpm_eventlog_init+0x324/0x370

Pass the address from efi like what is done for the TPM events log.

Fixes: c46f3405692d ("tpm: Reserve the TPM final events table")
Cc: Matthew Garrett <mjg59@google.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Bartosz Szczepanek <bsz@semihalf.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/efi/tpm.c