aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorXianglai Li <lixianglai@loongson.cn>2024-06-24 11:23:00 +0800
committerSong Gao <gaosong@loongson.cn>2024-07-12 09:41:18 +0800
commit0aca736433dcb56f365fe8a18ed1b969ca247304 (patch)
tree4cd7cc1e92d76e4d2c9b215beabe286c535b87e7 /hw
parent5e21b1317f900a574d85e0890ba156078964ba2c (diff)
downloadqemu-0aca736433dcb56f365fe8a18ed1b969ca247304.zip
qemu-0aca736433dcb56f365fe8a18ed1b969ca247304.tar.gz
qemu-0aca736433dcb56f365fe8a18ed1b969ca247304.tar.bz2
hw/loongarch: Change the tpm support by default
Add devices that support tpm by default, Fixed incomplete tpm acpi table information. Signed-off-by: Xianglai Li <lixianglai@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240624032300.999157-1-lixianglai@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'hw')
-rw-r--r--hw/loongarch/Kconfig1
-rw-r--r--hw/loongarch/acpi-build.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig
index 90a0dba..89be737 100644
--- a/hw/loongarch/Kconfig
+++ b/hw/loongarch/Kconfig
@@ -8,6 +8,7 @@ config LOONGARCH_VIRT
imply VIRTIO_VGA
imply PCI_DEVICES
imply NVDIMM
+ imply TPM_TIS_SYSBUS
select SERIAL
select VIRTIO_PCI
select PLATFORM_BUS
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index af45ce5..72bfc35 100644
--- a/hw/loongarch/acpi-build.c
+++ b/hw/loongarch/acpi-build.c
@@ -646,6 +646,9 @@ void loongarch_acpi_setup(LoongArchVirtMachineState *lvms)
build_state, tables.rsdp,
ACPI_BUILD_RSDP_FILE);
+ fw_cfg_add_file(lvms->fw_cfg, ACPI_BUILD_TPMLOG_FILE, tables.tcpalog->data,
+ acpi_data_len(tables.tcpalog));
+
qemu_register_reset(acpi_build_reset, build_state);
acpi_build_reset(build_state);
vmstate_register(NULL, 0, &vmstate_acpi_build, build_state);