[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 55/81] acpi: enumerate SMB bridge automatically along with othe
From: |
Michael S. Tsirkin |
Subject: |
[PULL v3 55/81] acpi: enumerate SMB bridge automatically along with other PCI devices |
Date: |
Sat, 5 Nov 2022 13:18:06 -0400 |
From: Igor Mammedov <imammedo@redhat.com>
to make that happen (bridge sits at _ADR: 0x001F0003),
relax PCI enumeration logic to include devices with *function* > 0
if device has something to say about itself (i.e. has build_dev_aml
callback set).
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20221017102146.2254096-8-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 27 +++------------------------
1 file changed, 3 insertions(+), 24 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index e1483bb11a..916343d8d6 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -448,9 +448,10 @@ static void build_append_pci_bus_devices(Aml
*parent_scope, PCIBus *bus,
/*
* allow describing coldplugged bridges in ACPI even if they are
not
* on function 0, as they are not unpluggable, for all other
devices
- * generate description only for function 0 per slot
+ * generate description only for function 0 per slot, and for other
+ * functions if device on function provides its own AML
*/
- if (func && !bridge_in_acpi) {
+ if (func && !bridge_in_acpi && !get_dev_aml_func(DEVICE(pdev))) {
continue;
}
} else {
@@ -1319,25 +1320,6 @@ static Aml *build_q35_osc_method(bool
enable_native_pcie_hotplug)
return method;
}
-static void build_smb0(Aml *table, int devnr, int func)
-{
- Aml *scope = aml_scope("_SB.PCI0");
- Aml *dev = aml_device("SMB0");
- bool ambiguous;
- Object *obj;
- /*
- * temporarily fish out device hosting SMBUS, build_smb0 will be gone once
- * PCI enumeration will be switched to call_dev_aml_func()
- */
- obj = object_resolve_path_type("", TYPE_ICH9_SMB_DEVICE, &ambiguous);
- assert(obj && !ambiguous);
-
- aml_append(dev, aml_name_decl("_ADR", aml_int(devnr << 16 | func)));
- call_dev_aml_func(DEVICE(obj), dev);
- aml_append(scope, dev);
- aml_append(table, scope);
-}
-
static void build_acpi0017(Aml *table)
{
Aml *dev, *scope, *method;
@@ -1440,9 +1422,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
build_x86_acpi_pci_hotplug(dsdt, pm->pcihp_io_base);
}
build_q35_pci0_int(dsdt);
- if (pcms->smbus) {
- build_smb0(dsdt, ICH9_SMB_DEV, ICH9_SMB_FUNC);
- }
}
if (misc->has_hpet) {
--
MST
- [PULL v3 30/81] hw/pci-bridge/cxl-upstream: Add a CDAT table access DOE, (continued)
- [PULL v3 30/81] hw/pci-bridge/cxl-upstream: Add a CDAT table access DOE, Michael S. Tsirkin, 2022/11/05
- [PULL v3 15/81] acpi/tests/avocado/bits/doc: add a doc file to describe the acpi bits test, Michael S. Tsirkin, 2022/11/05
- [PULL v3 14/81] acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbits, Michael S. Tsirkin, 2022/11/05
- [PULL v3 17/81] hw/smbios: add core_count2 to smbios table type 4, Michael S. Tsirkin, 2022/11/05
- [PULL v3 18/81] bios-tables-test: teach test to use smbios 3.0 tables, Michael S. Tsirkin, 2022/11/05
- [PULL v3 21/81] tests/acpi: update tables for new core count test, Michael S. Tsirkin, 2022/11/05
- [PULL v3 23/81] acpi: fadt: support revision 6.0 of the ACPI specification, Michael S. Tsirkin, 2022/11/05
- [PULL v3 29/81] hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange, Michael S. Tsirkin, 2022/11/05
- [PULL v3 22/81] tests/acpi: virt: allow acpi MADT and FADT changes, Michael S. Tsirkin, 2022/11/05
- [PULL v3 38/81] vhost: expose vhost_virtqueue_start(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 55/81] acpi: enumerate SMB bridge automatically along with other PCI devices,
Michael S. Tsirkin <=
- [PULL v3 58/81] acpi: pc/35: sanitize _GPE declaration order, Michael S. Tsirkin, 2022/11/05
- [PULL v3 19/81] tests/acpi: allow changes for core_count2 test, Michael S. Tsirkin, 2022/11/05
- [PULL v3 24/81] acpi: arm/virt: madt: bump to revision 4 accordingly to ACPI 6.0 Errata A, Michael S. Tsirkin, 2022/11/05
- [PULL v3 27/81] hw/mem/cxl-type3: Add MSIX support, Michael S. Tsirkin, 2022/11/05
- [PULL v3 25/81] tests/acpi: virt: update ACPI MADT and FADT binaries, Michael S. Tsirkin, 2022/11/05
- [PULL v3 31/81] hw/virtio/virtio-iommu-pci: Enforce the device is plugged on the root bus, Michael S. Tsirkin, 2022/11/05
- [PULL v3 34/81] virtio: introduce virtio_queue_enable(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 33/81] virtio: introduce virtio_queue_reset(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 32/81] virtio: introduce __virtio_queue_reset(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 49/81] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors, Michael S. Tsirkin, 2022/11/05