qemu-devel
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: [Qemu-devel] [PATCH] pc: cleanup and convert TMP ACPI device descrip
From
:
Stefan Berger
Subject
:
Re: [Qemu-devel] [PATCH] pc: cleanup and convert TMP ACPI device description to AML API
Date
:
Tue, 9 Jun 2015 06:40:48 -0400
Igor Mammedov <address@hidden> wrote on 06/08/2015 11:31:53 PM:
> From: Igor Mammedov <address@hidden>
> To: address@hidden
> Cc: address@hidden, Stefan Berger/Watson/address@hidden
> Date: 06/08/2015 11:32 PM
> Subject: [PATCH] pc: cleanup and convert TMP ACPI device descriptionto AML API
>
> remove some code duplication in acpi-build.c and drop 5
> ASL and binary blobs files with TPM ACPI device description,
> replacing them with 1 small hunk written in AML API.
>
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> hw/i386/Makefile.objs | 3 +-
> hw/i386/acpi-build.c | 40 ++++++---------
> hw/i386/ssdt-tpm-common.dsl | 36 -------------
> hw/i386/ssdt-tpm.dsl | 29 -----------
> hw/i386/ssdt-tpm.hex.generated | 109
> ----------------------------------------
> hw/i386/ssdt-tpm2.dsl | 29 -----------
> hw/i386/ssdt-tpm2.hex.generated | 109
> ----------------------------------------
> 7 files changed, 16 insertions(+), 339 deletions(-)
> delete mode 100644 hw/i386/ssdt-tpm-common.dsl
> delete mode 100644 hw/i386/ssdt-tpm.dsl
> delete mode 100644 hw/i386/ssdt-tpm.hex.generated
> delete mode 100644 hw/i386/ssdt-tpm2.dsl
> delete mode 100644 hw/i386/ssdt-tpm2.hex.generated
>
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index 0be5d97..bd4f147 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -8,8 +8,7 @@ obj-$(CONFIG_XEN) += ../xenpv/ xen/
> obj-y += kvmvapic.o
> obj-y += acpi-build.o
> hw/i386/acpi-build.o: hw/i386/acpi-build.c \
> - hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex \
> - hw/i386/ssdt-tpm.hex hw/i386/ssdt-tpm2.hex
> + hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex
>
> iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
> ; then echo "$(2)"; else echo "$(3)"; fi ;)
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 5593e41..c5f559e 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -433,9 +433,6 @@ build_madt(GArray *table_data, GArray *linker,
> AcpiCpuInfo *cpu,
> table_data->len - madt_start, 1);
> }
>
> -#include "hw/i386/ssdt-tpm.hex"
> -#include "hw/i386/ssdt-tpm2.hex"
> -
> /* Assign BSEL property to all buses. In the future, this can be changed
> * to only assign to buses that support hotplug.
> */
> @@ -1329,6 +1326,19 @@ build_ssdt(GArray *table_data, GArray *linker,
> Aml *scope = aml_scope("PCI0");
> /* Scan all PCI buses. Generate tables to support hotplug. */
> build_append_pci_bus_devices(scope, bus,
> pm->pcihp_bridge_en);
> +
> + if (misc->tpm_version != TPM_VERSION_UNSPEC) {
> + dev = aml_device("ISA.TPM");
> + aml_append(dev, aml_name_decl("_HID",
> aml_eisaid("PNP0C31")));
> + aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
> + crs = aml_resource_template();
> + aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
> + TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
> + aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ));
> + aml_append(dev, aml_name_decl("_CRS", crs));
> + aml_append(scope, dev);
> + }
> +
> aml_append(sb_scope, scope);
Once we add the _DSM to it from the link below, it will become longer and maybe also more complicated. So I would put it into its own function already?
http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg05353.html
My preference would be to wait until that _DSM has been added to it.
reply via email to
[
Prev in Thread
]
Current Thread
[
Next in Thread
]
[Qemu-devel] [PATCH] pc: cleanup and convert TMP ACPI device description to AML API
,
Igor Mammedov
,
2015/06/08
Re: [Qemu-devel] [PATCH] pc: cleanup and convert TMP ACPI device description to AML API
,
Stefan Berger
<=
Re: [Qemu-devel] [PATCH] pc: cleanup and convert TMP ACPI device description to AML API
,
Michael S. Tsirkin
,
2015/06/21
Prev by Date:
Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user
Next by Date:
Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user
Previous by thread:
[Qemu-devel] [PATCH] pc: cleanup and convert TMP ACPI device description to AML API
Next by thread:
Re: [Qemu-devel] [PATCH] pc: cleanup and convert TMP ACPI device description to AML API
Index(es):
Date
Thread