[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 6/8] hw/i386/acpi-build: Determine SMI command port just once
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 6/8] hw/i386/acpi-build: Determine SMI command port just once |
Date: |
Fri, 8 Sep 2023 10:42:32 +0200 |
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
- [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup, Bernhard Beschow, 2023/09/08
- [PATCH v2 2/8] hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback, Bernhard Beschow, 2023/09/08
- [PATCH v2 3/8] hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method, Bernhard Beschow, 2023/09/08
- [PATCH v2 5/8] hw/i386: Remove now redundant TYPE_ACPI_GED_X86, Bernhard Beschow, 2023/09/08
- [PATCH v2 6/8] hw/i386/acpi-build: Determine SMI command port just once,
Bernhard Beschow <=
- [PATCH v2 4/8] hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h", Bernhard Beschow, 2023/09/08
- [PATCH v2 7/8] hw/acpi: Trace GPE access in all device models, not just PIIX4, Bernhard Beschow, 2023/09/08
- [PATCH v2 8/8] hw/acpi/core: Trace enable and status registers of GPE separately, Bernhard Beschow, 2023/09/08
- [PATCH v2 1/8] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly, Bernhard Beschow, 2023/09/08
- Re: [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup, Bernhard Beschow, 2023/09/19