qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Sergio Lopez" <slp@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Bernhard Beschow" <shentey@gmail.com>
Subject: [PATCH v2 6/8] hw/i386/acpi-build: Determine SMI command port just once
Date: Fri,  8 Sep 2023 10:42:32 +0200	[thread overview]
Message-ID: <20230908084234.17642-7-shentey@gmail.com> (raw)
In-Reply-To: <20230908084234.17642-1-shentey@gmail.com>

The SMI command port is currently hardcoded by means of the ACPI_PORT_SMI_CMD
macro. This hardcoding is Intel specific and doesn't match VIA, for example.
There is already the AcpiFadtData::smi_cmd attribute which is used when building
the FADT. Let's also use it when building the DSDT which confines SMI command
port determination to just one place. This allows it to become a property later,
thus resolving the Intel assumption.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/i386/acpi-build.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index c8ac665d36..f9e7291150 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1495,14 +1495,14 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
             aml_append(crs,
                 aml_io(
                        AML_DECODE16,
-                       ACPI_PORT_SMI_CMD,
-                       ACPI_PORT_SMI_CMD,
+                       pm->fadt.smi_cmd,
+                       pm->fadt.smi_cmd,
                        1,
                        2)
             );
             aml_append(dev, aml_name_decl("_CRS", crs));
             aml_append(dev, aml_operation_region("SMIR", AML_SYSTEM_IO,
-                aml_int(ACPI_PORT_SMI_CMD), 2));
+                aml_int(pm->fadt.smi_cmd), 2));
             field = aml_field("SMIR", AML_BYTE_ACC, AML_NOLOCK,
                               AML_WRITE_AS_ZEROS);
             aml_append(field, aml_named_field("SMIC", 8));
-- 
2.42.0



  parent reply	other threads:[~2023-09-08  8:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08  8:42 [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup Bernhard Beschow
2023-09-08  8:42 ` [PATCH v2 1/8] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly Bernhard Beschow
2023-09-08  8:42 ` [PATCH v2 2/8] hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback Bernhard Beschow
2023-09-08  8:42 ` [PATCH v2 3/8] hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method Bernhard Beschow
2023-09-08  8:42 ` [PATCH v2 4/8] hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h" Bernhard Beschow
2023-09-08  8:42 ` [PATCH v2 5/8] hw/i386: Remove now redundant TYPE_ACPI_GED_X86 Bernhard Beschow
2023-09-08  8:42 ` Bernhard Beschow [this message]
2023-09-08  8:42 ` [PATCH v2 7/8] hw/acpi: Trace GPE access in all device models, not just PIIX4 Bernhard Beschow
2023-09-08  8:42 ` [PATCH v2 8/8] hw/acpi/core: Trace enable and status registers of GPE separately Bernhard Beschow
2023-09-19 19:47 ` [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup Bernhard Beschow
2023-09-20  2:42   ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230908084234.17642-7-shentey@gmail.com \
    --to=shentey@gmail.com \
    --cc=anisinha@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=eduardo@habkost.net \
    --cc=imammedo@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=slp@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).