mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
arm/acpi: TPM2 ACPI table support
Add a TPM2 ACPI table if a TPM2.0 sysbus device has been dynamically instantiated. Signed-off-by: Eric Auger <eric.auger@redhat.com> Message-Id: <20200601095737.32671-4-eric.auger@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
4338416064
commit
80bde69353
3 changed files with 12 additions and 2 deletions
|
@ -1885,17 +1885,18 @@ void build_tpm2(GArray *table_data, BIOSLinker *linker, GArray *tcpalog)
|
|||
unsigned log_addr_offset =
|
||||
(char *)&tpm2_ptr->log_area_start_address - table_data->data;
|
||||
uint8_t start_method_params[12] = {};
|
||||
TPMIf *tpmif = tpm_find();
|
||||
|
||||
/* platform class */
|
||||
build_append_int_noprefix(table_data, TPM2_ACPI_CLASS_CLIENT, 2);
|
||||
/* reserved */
|
||||
build_append_int_noprefix(table_data, 0, 2);
|
||||
if (TPM_IS_TIS_ISA(tpm_find())) {
|
||||
if (TPM_IS_TIS_ISA(tpmif) || TPM_IS_TIS_SYSBUS(tpmif)) {
|
||||
/* address of control area */
|
||||
build_append_int_noprefix(table_data, 0, 8);
|
||||
/* start method */
|
||||
build_append_int_noprefix(table_data, TPM2_START_METHOD_MMIO, 4);
|
||||
} else if (TPM_IS_CRB(tpm_find())) {
|
||||
} else if (TPM_IS_CRB(tpmif)) {
|
||||
build_append_int_noprefix(table_data, TPM_CRB_ADDR_CTRL, 8);
|
||||
build_append_int_noprefix(table_data, TPM2_START_METHOD_CRB, 4);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue