drivers/crb/tpm: Add new method to retrieve base address
In order to support runtime evaluation of the TPM base address introduce and use a new method for CRB TPMs. Change-Id: I29c81d82947eb2603472a515f9ada598e4f8e6ea Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/88249 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
This commit is contained in:
parent
1e8e5d902a
commit
984c64295b
3 changed files with 13 additions and 1 deletions
|
|
@ -281,7 +281,7 @@ static void acpi_create_tpm2(acpi_header_t *header, void *unused)
|
||||||
tpm2->platform_class = 0;
|
tpm2->platform_class = 0;
|
||||||
if (CONFIG(CRB_TPM)) {
|
if (CONFIG(CRB_TPM)) {
|
||||||
/* Must be set to 7 for CRB Support */
|
/* Must be set to 7 for CRB Support */
|
||||||
tpm2->control_area = CONFIG_CRB_TPM_BASE_ADDRESS + 0x40;
|
tpm2->control_area = crb_tpm_base_address() + 0x40;
|
||||||
tpm2->start_method = 7;
|
tpm2->start_method = 7;
|
||||||
} else {
|
} else {
|
||||||
/* Must be set to 0 for FIFO interface support */
|
/* Must be set to 0 for FIFO interface support */
|
||||||
|
|
|
||||||
|
|
@ -346,3 +346,13 @@ bool crb_tpm_is_active(void)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* crb_tpm_base_address
|
||||||
|
*
|
||||||
|
* Returns the CRB TPM base address.
|
||||||
|
*/
|
||||||
|
uintptr_t crb_tpm_base_address(void)
|
||||||
|
{
|
||||||
|
return CONFIG_CRB_TPM_BASE_ADDRESS;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,3 +68,5 @@ size_t crb_tpm_process_command(const void *tpm2_command, size_t command_size,
|
||||||
bool crb_tpm_is_active(void);
|
bool crb_tpm_is_active(void);
|
||||||
|
|
||||||
tis_sendrecv_fn crb_tis_probe(enum tpm_family *family);
|
tis_sendrecv_fn crb_tis_probe(enum tpm_family *family);
|
||||||
|
|
||||||
|
uintptr_t crb_tpm_base_address(void);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue