Skip to content

Commit

Permalink
efi/tpm: Pass correct address to memblock_reserve
Browse files Browse the repository at this point in the history
[ Upstream commit f4cd18c ]

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: c46f340 ("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>
  • Loading branch information
snits authored and gregkh committed Nov 10, 2022
1 parent 3a4d6f1 commit bdc1182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firmware/efi/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int __init efi_tpm_eventlog_init(void)
goto out_calc;
}

memblock_reserve((unsigned long)final_tbl,
memblock_reserve(efi.tpm_final_log,
tbl_size + sizeof(*final_tbl));
efi_tpm_final_log_size = tbl_size;

Expand Down

0 comments on commit bdc1182

Please sign in to comment.