aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2022-06-08 09:53:29 -0400
committerMichael S. Tsirkin <mst@redhat.com>2022-06-09 19:32:49 -0400
commit1d7ea915003a2064dc542ffee8d02104a2dee728 (patch)
treec41379f119e199bd7cd925a8eac77c69c0c887ed /hw/i386
parentcde55744e9bcaefe1fbce6194a21bb3b7b9c2ae7 (diff)
downloadqemu-1d7ea915003a2064dc542ffee8d02104a2dee728.zip
qemu-1d7ea915003a2064dc542ffee8d02104a2dee728.tar.gz
qemu-1d7ea915003a2064dc542ffee8d02104a2dee728.tar.bz2
acpi: applesmc: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML
.. and clean up not longer needed conditionals in DSTD build code. applesmc AML will be fetched and included when ISA bridge will build its own AML code (incl. attached devices). Expected AML change: the device under separate _SB.PCI0.ISA scope is moved directly under Device(ISA) node. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20220608135340.3304695-25-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/acpi-build.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index f7f1671..b96705c 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -121,7 +121,6 @@ typedef struct AcpiMiscInfo {
const unsigned char *dsdt_code;
unsigned dsdt_size;
uint16_t pvpanic_port;
- uint16_t applesmc_io_base;
} AcpiMiscInfo;
typedef struct AcpiBuildPciBusHotplugState {
@@ -307,7 +306,6 @@ static void acpi_get_misc_info(AcpiMiscInfo *info)
info->tpm_version = tpm_get_version(tpm_find());
#endif
info->pvpanic_port = pvpanic_port();
- info->applesmc_io_base = applesmc_port();
}
/*
@@ -1800,26 +1798,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
aml_append(dsdt, scope);
}
- if (misc->applesmc_io_base) {
- scope = aml_scope("\\_SB.PCI0.ISA");
- dev = aml_device("SMC");
-
- aml_append(dev, aml_name_decl("_HID", aml_eisaid("APP0001")));
- /* device present, functioning, decoding, not shown in UI */
- aml_append(dev, aml_name_decl("_STA", aml_int(0xB)));
-
- crs = aml_resource_template();
- aml_append(crs,
- aml_io(AML_DECODE16, misc->applesmc_io_base, misc->applesmc_io_base,
- 0x01, APPLESMC_MAX_DATA_LENGTH)
- );
- aml_append(crs, aml_irq_no_flags(6));
- aml_append(dev, aml_name_decl("_CRS", crs));
-
- aml_append(scope, dev);
- aml_append(dsdt, scope);
- }
-
if (misc->pvpanic_port) {
scope = aml_scope("\\_SB.PCI0.ISA");