Skip to contentSkip to conversation

x86: clean up ACPI PCI code part 2

PATCH In review Igor Mammedov 3 participants 18 messages Oct 17, 2022 – Oct 27, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover x86: clean up ACPI PCI code part 2

Series continues refactoring started at recently merged [1]. It replaces special cases/quirks for ISA/SMB bridges and PCI attached VGA devices with generic AcpiDevAmlIf interface, which allows device to provide its own AML description without need for adhoc plumbing in generic DSDT or PCI enumeration code.

PS:
at the end, \_GPE clean up patches which are not part of AcpiDevAmlIf refactoring but iti's still related to PCI, so I've included them there as well.

1)
https://patchwork.ozlabs.org/project/qemu-devel/list/?series=303856

Igor Mammedov (11):
acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device
descriptors
tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML
automatically
acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus
ennumeration generate AML
tests: acpi: update expected DSDT after ISA bridge is moved directly
under PCI host bridge
tests: acpi: whitelist DSDT before generating ICH9_SMB AML
automatically
acpi: add get_dev_aml_func() helper
acpi: enumerate SMB bridge automatically along with other PCI devices
tests: acpi: update expected blobs
tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup
acpi: pc/35: sanitize _GPE declaration order
tests: acpi: update expected blobs

 hw/display/vga_int.h                  |   2 +
 include/hw/acpi/acpi_aml_interface.h  |  13 +-
 hw/display/acpi-vga-stub.c            |   7 ++
 hw/display/acpi-vga.c                 |  26 ++++
 hw/display/meson.build                |  17 +++
 hw/display/vga-pci.c                  |   4 +
 hw/i386/acpi-build.c                  | 175 +++++---------------------
 hw/isa/lpc_ich9.c                     |  23 ++++
 hw/isa/piix3.c                        |  17 ++-
 tests/data/acpi/pc/DSDT               | Bin 6422 -> 6501 bytes
 tests/data/acpi/pc/DSDT.acpierst      | Bin 6382 -> 6461 bytes
 tests/data/acpi/pc/DSDT.acpihmat      | Bin 7747 -> 7826 bytes
 tests/data/acpi/pc/DSDT.bridge        | Bin 9496 -> 9575 bytes
 tests/data/acpi/pc/DSDT.cphp          | Bin 6886 -> 6965 bytes
 tests/data/acpi/pc/DSDT.dimmpxm       | Bin 8076 -> 8155 bytes
 tests/data/acpi/pc/DSDT.hpbridge      | Bin 6382 -> 6461 bytes
 tests/data/acpi/pc/DSDT.hpbrroot      | Bin 3069 -> 3107 bytes
 tests/data/acpi/pc/DSDT.ipmikcs       | Bin 6494 -> 6573 bytes
 tests/data/acpi/pc/DSDT.memhp         | Bin 7781 -> 7860 bytes
 tests/data/acpi/pc/DSDT.nohpet        | Bin 6280 -> 6359 bytes
 tests/data/acpi/pc/DSDT.numamem       | Bin 6428 -> 6507 bytes
 tests/data/acpi/pc/DSDT.roothp        | Bin 6656 -> 6699 bytes
 tests/data/acpi/q35/DSDT              | Bin 8320 -> 8412 bytes
 tests/data/acpi/q35/DSDT.acpierst     | Bin 8337 -> 8429 bytes
 tests/data/acpi/q35/DSDT.acpihmat     | Bin 9645 -> 9737 bytes
 tests/data/acpi/q35/DSDT.applesmc     | Bin 8366 -> 8458 bytes
 tests/data/acpi/q35/DSDT.bridge       | Bin 11449 -> 11541 bytes
 tests/data/acpi/q35/DSDT.cphp         | Bin 8784 -> 8876 bytes
 tests/data/acpi/q35/DSDT.cxl          | Bin 9646 -> 9738 bytes
 tests/data/acpi/q35/DSDT.dimmpxm      | Bin 9974 -> 10066 bytes
 tests/data/acpi/q35/DSDT.ipmibt       | Bin 8395 -> 8487 bytes
 tests/data/acpi/q35/DSDT.ipmismbus    | Bin 8409 -> 8500 bytes
 tests/data/acpi/q35/DSDT.ivrs         | Bin 8337 -> 8429 bytes
 tests/data/acpi/q35/DSDT.memhp        | Bin 9679 -> 9771 bytes
 tests/data/acpi/q35/DSDT.mmio64       | Bin 9450 -> 9542 bytes
 tests/data/acpi/q35/DSDT.multi-bridge | Bin 8640 -> 8732 bytes
 tests/data/acpi/q35/DSDT.nohpet       | Bin 8178 -> 8270 bytes
 tests/data/acpi/q35/DSDT.numamem      | Bin 8326 -> 8418 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa  | Bin 8421 -> 8513 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12    | Bin 8926 -> 9018 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2     | Bin 8952 -> 9044 bytes
 tests/data/acpi/q35/DSDT.viot         | Bin 9429 -> 9521 bytes
 tests/data/acpi/q35/DSDT.xapic        | Bin 35683 -> 35775 bytes
 43 files changed, 135 insertions(+), 149 deletions(-)
 create mode 100644 hw/display/acpi-vga-stub.c
 create mode 100644 hw/display/acpi-vga.c
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/11 acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

---
 hw/display/vga_int.h       |  2 ++
 hw/display/acpi-vga-stub.c |  7 +++++++
 hw/display/acpi-vga.c      | 26 ++++++++++++++++++++++++++
 hw/display/meson.build     | 17 +++++++++++++++++
 hw/display/vga-pci.c       |  4 ++++
 hw/i386/acpi-build.c       | 26 +-------------------------
 6 files changed, 57 insertions(+), 25 deletions(-)
 create mode 100644 hw/display/acpi-vga-stub.c
 create mode 100644 hw/display/acpi-vga.c
hw/display/vga_int.h +2 -0
index 305e700014..330406ad9c 100644
@@ -30,6 +30,7 @@
 #include "ui/console.h"
 
 #include "hw/display/bochs-vbe.h"
+#include "hw/acpi/acpi_aml_interface.h"
 
 #define ST01_V_RETRACE      0x08
 #define ST01_DISP_ENABLE    0x01
@@ -195,4 +196,5 @@ void pci_std_vga_mmio_region_init(VGACommonState *s,
                                   MemoryRegion *subs,
                                   bool qext, bool edid);
 
+void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope);
 #endif
hw/display/acpi-vga-stub.c new file +7 -0
new file mode 100644
index 0000000000..a9b0ecf76d
@@ -0,0 +1,7 @@
+#include "qemu/osdep.h"
+#include "hw/acpi/acpi_aml_interface.h"
+#include "vga_int.h"
+
+void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope)
+{
+}
hw/display/acpi-vga.c new file +26 -0
new file mode 100644
index 0000000000..f0e9ef1fcf
@@ -0,0 +1,26 @@
+#include "qemu/osdep.h"
+#include "hw/acpi/acpi_aml_interface.h"
+#include "hw/pci/pci.h"
+#include "vga_int.h"
+
+void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope)
+{
+    int s3d = 0;
+    Aml *method;
+
+    if (object_dynamic_cast(OBJECT(adev), "qxl-vga")) {
+        s3d = 3;
+    }
+
+    method = aml_method("_S1D", 0, AML_NOTSERIALIZED);
+    aml_append(method, aml_return(aml_int(0)));
+    aml_append(scope, method);
+
+    method = aml_method("_S2D", 0, AML_NOTSERIALIZED);
+    aml_append(method, aml_return(aml_int(0)));
+    aml_append(scope, method);
+
+    method = aml_method("_S3D", 0, AML_NOTSERIALIZED);
+    aml_append(method, aml_return(aml_int(s3d)));
+    aml_append(scope, method);
+}
hw/display/meson.build +17 -0
index adc53dd8b6..7a725ed80e 100644
@@ -38,10 +38,21 @@ softmmu_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-fb.c'))
 
 specific_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
 
+if (config_all_devices.has_key('CONFIG_VGA_CIRRUS') or
+    config_all_devices.has_key('CONFIG_VGA_PCI') or
+    config_all_devices.has_key('CONFIG_VMWARE_VGA') or
+    config_all_devices.has_key('CONFIG_ATI_VGA')
+   )
+  softmmu_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                      if_false: files('acpi-vga-stub.c'))
+endif
+
 if config_all_devices.has_key('CONFIG_QXL')
   qxl_ss = ss.source_set()
   qxl_ss.add(when: 'CONFIG_QXL', if_true: [files('qxl.c', 'qxl-logger.c', 'qxl-render.c'),
                                            pixman, spice])
+  qxl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                  if_false: files('acpi-vga-stub.c'))
   hw_display_modules += {'qxl': qxl_ss}
 endif
 
@@ -52,6 +63,7 @@ softmmu_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c'))
 
 softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d.c', 'ati_dbg.c'))
 
+
 if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
   virtio_gpu_ss = ss.source_set()
   virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
@@ -87,14 +99,19 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
                     if_true: [files('virtio-vga.c'), pixman])
   virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA',
                     if_true: files('vhost-user-vga.c'))
+  virtio_vga_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                         if_false: files('acpi-vga-stub.c'))
   hw_display_modules += {'virtio-vga': virtio_vga_ss}
 
   virtio_vga_gl_ss = ss.source_set()
   virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', virgl, opengl],
                        if_true: [files('virtio-vga-gl.c'), pixman])
+  virtio_vga_gl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                            if_false: files('acpi-vga-stub.c'))
   hw_display_modules += {'virtio-vga-gl': virtio_vga_gl_ss}
 endif
 
 specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
 
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-vga-stub.c'))
 modules += { 'hw-display': hw_display_modules }
hw/display/vga-pci.c +4 -0
index 3e5bc259f7..9a91de7ed1 100644
@@ -35,6 +35,7 @@
 #include "hw/loader.h"
 #include "hw/display/edid.h"
 #include "qom/object.h"
+#include "hw/acpi/acpi_aml_interface.h"
 
 enum vga_pci_flags {
     PCI_VGA_FLAG_ENABLE_MMIO = 1,
@@ -354,11 +355,13 @@ static void vga_pci_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+    AcpiDevAmlIfClass *adevc = ACPI_DEV_AML_IF_CLASS(klass);
 
     k->vendor_id = PCI_VENDOR_ID_QEMU;
     k->device_id = PCI_DEVICE_ID_QEMU_VGA;
     dc->vmsd = &vmstate_vga_pci;
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
+    adevc->build_dev_aml = build_vga_aml;
 }
 
 static const TypeInfo vga_pci_type_info = {
@@ -369,6 +372,7 @@ static const TypeInfo vga_pci_type_info = {
     .class_init = vga_pci_class_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_CONVENTIONAL_PCI_DEVICE },
+        { TYPE_ACPI_DEV_AML_IF },
         { },
     },
 };
hw/i386/acpi-build.c +1 -25
index 4f54b61904..26932b4e2c 100644
@@ -430,7 +430,6 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
         bool hotpluggbale_slot = false;
         bool bridge_in_acpi = false;
         bool cold_plugged_bridge = false;
-        bool is_vga = false;
 
         if (pdev) {
             pc = PCI_DEVICE_GET_CLASS(pdev);
@@ -440,8 +439,6 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
                 continue;
             }
 
-            is_vga = pc->class_id == PCI_CLASS_DISPLAY_VGA;
-
             /*
              * Cold plugged bridges aren't themselves hot-pluggable.
              * Hotplugged bridges *are* hot-pluggable.
@@ -489,28 +486,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
             aml_append(dev, aml_pci_device_dsm());
         }
 
-        if (is_vga) {
-            /* add VGA specific AML methods */
-            int s3d;
-
-            if (object_dynamic_cast(OBJECT(pdev), "qxl-vga")) {
-                s3d = 3;
-            } else {
-                s3d = 0;
-            }
-
-            method = aml_method("_S1D", 0, AML_NOTSERIALIZED);
-            aml_append(method, aml_return(aml_int(0)));
-            aml_append(dev, method);
-
-            method = aml_method("_S2D", 0, AML_NOTSERIALIZED);
-            aml_append(method, aml_return(aml_int(0)));
-            aml_append(dev, method);
-
-            method = aml_method("_S3D", 0, AML_NOTSERIALIZED);
-            aml_append(method, aml_return(aml_int(s3d)));
-            aml_append(dev, method);
-        }
+        call_dev_aml_func(DEVICE(pdev), dev);
 
         bridge_in_acpi =  cold_plugged_bridge && pcihp_bridge_en;
         if (bridge_in_acpi) {
Signature · 1 line
2.31.1
Reviewed-by on v1 1/11
#2 lore raw

Re: [PATCH 01/11] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

Quoted 1 line · Igor Mammedov

I would add a comment that we do not expect any functional change in any ACPI tables with this change. It's only a refactoring.

Quoted 1 line

Other than the comment above,

Quoted 216 lines
---
 hw/display/vga_int.h       |  2 ++
 hw/display/acpi-vga-stub.c |  7 +++++++
 hw/display/acpi-vga.c      | 26 ++++++++++++++++++++++++++
 hw/display/meson.build     | 17 +++++++++++++++++
 hw/display/vga-pci.c       |  4 ++++
 hw/i386/acpi-build.c       | 26 +-------------------------
 6 files changed, 57 insertions(+), 25 deletions(-)
 create mode 100644 hw/display/acpi-vga-stub.c
 create mode 100644 hw/display/acpi-vga.c
hw/display/vga_int.h +2 -0
index 305e700014..330406ad9c 100644
@@ -30,6 +30,7 @@
 #include "ui/console.h"
 
 #include "hw/display/bochs-vbe.h"
+#include "hw/acpi/acpi_aml_interface.h"
 
 #define ST01_V_RETRACE      0x08
 #define ST01_DISP_ENABLE    0x01
@@ -195,4 +196,5 @@ void pci_std_vga_mmio_region_init(VGACommonState *s,
                                   MemoryRegion *subs,
                                   bool qext, bool edid);
 
+void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope);
 #endif
hw/display/acpi-vga-stub.c new file +7 -0
new file mode 100644
index 0000000000..a9b0ecf76d
@@ -0,0 +1,7 @@
+#include "qemu/osdep.h"
+#include "hw/acpi/acpi_aml_interface.h"
+#include "vga_int.h"
+
+void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope)
+{
+}
hw/display/acpi-vga.c new file +26 -0
new file mode 100644
index 0000000000..f0e9ef1fcf
@@ -0,0 +1,26 @@
+#include "qemu/osdep.h"
+#include "hw/acpi/acpi_aml_interface.h"
+#include "hw/pci/pci.h"
+#include "vga_int.h"
+
+void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope)
+{
+    int s3d = 0;
+    Aml *method;
+
+    if (object_dynamic_cast(OBJECT(adev), "qxl-vga")) {
+        s3d = 3;
+    }
+
+    method = aml_method("_S1D", 0, AML_NOTSERIALIZED);
+    aml_append(method, aml_return(aml_int(0)));
+    aml_append(scope, method);
+
+    method = aml_method("_S2D", 0, AML_NOTSERIALIZED);
+    aml_append(method, aml_return(aml_int(0)));
+    aml_append(scope, method);
+
+    method = aml_method("_S3D", 0, AML_NOTSERIALIZED);
+    aml_append(method, aml_return(aml_int(s3d)));
+    aml_append(scope, method);
+}
hw/display/meson.build +17 -0
index adc53dd8b6..7a725ed80e 100644
@@ -38,10 +38,21 @@ softmmu_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-fb.c'))
 
 specific_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
 
+if (config_all_devices.has_key('CONFIG_VGA_CIRRUS') or
+    config_all_devices.has_key('CONFIG_VGA_PCI') or
+    config_all_devices.has_key('CONFIG_VMWARE_VGA') or
+    config_all_devices.has_key('CONFIG_ATI_VGA')
+   )
+  softmmu_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                      if_false: files('acpi-vga-stub.c'))
+endif
+
 if config_all_devices.has_key('CONFIG_QXL')
   qxl_ss = ss.source_set()
   qxl_ss.add(when: 'CONFIG_QXL', if_true: [files('qxl.c', 'qxl-logger.c', 'qxl-render.c'),
                                            pixman, spice])
+  qxl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                  if_false: files('acpi-vga-stub.c'))
   hw_display_modules += {'qxl': qxl_ss}
 endif
 
@@ -52,6 +63,7 @@ softmmu_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c'))
 
 softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d.c', 'ati_dbg.c'))
 
+
 if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
   virtio_gpu_ss = ss.source_set()
   virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
@@ -87,14 +99,19 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
                     if_true: [files('virtio-vga.c'), pixman])
   virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA',
                     if_true: files('vhost-user-vga.c'))
+  virtio_vga_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                         if_false: files('acpi-vga-stub.c'))
   hw_display_modules += {'virtio-vga': virtio_vga_ss}
 
   virtio_vga_gl_ss = ss.source_set()
   virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', virgl, opengl],
                        if_true: [files('virtio-vga-gl.c'), pixman])
+  virtio_vga_gl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
+                                            if_false: files('acpi-vga-stub.c'))
   hw_display_modules += {'virtio-vga-gl': virtio_vga_gl_ss}
 endif
 
 specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
 
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-vga-stub.c'))
 modules += { 'hw-display': hw_display_modules }
hw/display/vga-pci.c +4 -0
index 3e5bc259f7..9a91de7ed1 100644
@@ -35,6 +35,7 @@
 #include "hw/loader.h"
 #include "hw/display/edid.h"
 #include "qom/object.h"
+#include "hw/acpi/acpi_aml_interface.h"
 
 enum vga_pci_flags {
     PCI_VGA_FLAG_ENABLE_MMIO = 1,
@@ -354,11 +355,13 @@ static void vga_pci_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+    AcpiDevAmlIfClass *adevc = ACPI_DEV_AML_IF_CLASS(klass);
 
     k->vendor_id = PCI_VENDOR_ID_QEMU;
     k->device_id = PCI_DEVICE_ID_QEMU_VGA;
     dc->vmsd = &vmstate_vga_pci;
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
+    adevc->build_dev_aml = build_vga_aml;
 }
 
 static const TypeInfo vga_pci_type_info = {
@@ -369,6 +372,7 @@ static const TypeInfo vga_pci_type_info = {
     .class_init = vga_pci_class_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_CONVENTIONAL_PCI_DEVICE },
+        { TYPE_ACPI_DEV_AML_IF },
         { },
     },
 };
hw/i386/acpi-build.c +1 -26
index 4f54b61904..26932b4e2c 100644
@@ -430,7 +430,6 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
         bool hotpluggbale_slot = false;
         bool bridge_in_acpi = false;
         bool cold_plugged_bridge = false;
-        bool is_vga = false;
 
         if (pdev) {
             pc = PCI_DEVICE_GET_CLASS(pdev);
@@ -440,8 +439,6 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
                 continue;
             }
 
-            is_vga = pc->class_id == PCI_CLASS_DISPLAY_VGA;
-
             /*
              * Cold plugged bridges aren't themselves hot-pluggable.
              * Hotplugged bridges *are* hot-pluggable.
@@ -489,28 +486,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
             aml_append(dev, aml_pci_device_dsm());
         }
 
-        if (is_vga) {
-            /* add VGA specific AML methods */
-            int s3d;
-
-            if (object_dynamic_cast(OBJECT(pdev), "qxl-vga")) {
-                s3d = 3;
-            } else {
-                s3d = 0;
-            }
-
-            method = aml_method("_S1D", 0, AML_NOTSERIALIZED);
-            aml_append(method, aml_return(aml_int(0)));
-            aml_append(dev, method);
-
-            method = aml_method("_S2D", 0, AML_NOTSERIALIZED);
-            aml_append(method, aml_return(aml_int(0)));
-            aml_append(dev, method);
-
-            method = aml_method("_S3D", 0, AML_NOTSERIALIZED);
-            aml_append(method, aml_return(aml_int(s3d)));
-            aml_append(dev, method);
-        }
+        call_dev_aml_func(DEVICE(pdev), dev);
 
         bridge_in_acpi =  cold_plugged_bridge && pcihp_bridge_en;
         if (bridge_in_acpi) {
--

2.31.1

#3 lore raw

PATCH 2/11 tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 34 +++++++++++++++++++++
 1 file changed, 34 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +34 -0
index dfb8523c8b..570b17478e 100644
@@ -1 +1,35 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
+"tests/data/acpi/pc/DSDT.acpierst",
+"tests/data/acpi/pc/DSDT.acpihmat",
+"tests/data/acpi/pc/DSDT.bridge",
+"tests/data/acpi/pc/DSDT.cphp",
+"tests/data/acpi/pc/DSDT.dimmpxm",
+"tests/data/acpi/pc/DSDT.hpbridge",
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/pc/DSDT.ipmikcs",
+"tests/data/acpi/pc/DSDT.memhp",
+"tests/data/acpi/pc/DSDT.nohpet",
+"tests/data/acpi/pc/DSDT.numamem",
+"tests/data/acpi/pc/DSDT.roothp",
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.acpierst",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.applesmc",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.cxl",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.ipmismbus",
+"tests/data/acpi/q35/DSDT.ivrs",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.nohpet",
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
+"tests/data/acpi/q35/DSDT.viot",
+"tests/data/acpi/q35/DSDT.xapic",
Signature · 1 line
2.31.1
#4 lore raw

PATCH 3/11 acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML

In reply to Igor Mammedov

PCI-ISA bridges that are built in PIIX/Q35 are building its own AML using AcpiDevAmlIf interface. Now build_append_pci_bus_devices() gained AcpiDevAmlIf interface support to get AML of devices atached to PCI slots.
So drop ad-hoc build_q35_isa_bridge()/build_piix4_isa_bridge() and let PCI bus enumeration to include PCI-ISA bridge AML when it's enumerated by build_append_pci_bus_devices().

AML change is mostly contextual, which moves whole ISA hierarchy directly under PCI host bridge instead of it being described as separate \SB.PCI0.ISA block.

Note:
If bus/slot that hosts ISA bridge has BSEL set, it will gain new ASUN and _DMS entries (i.e. acpi-index support, but it should not cause any functional change and that is fine from PCI Firmware spec point of view), potentially it's possible to suppress that by adding a flag to PCIDevice but I don't see a reason to do that yet, I'd rather treat bridge just as any other PCI device if it's possible.

---
 hw/i386/acpi-build.c | 75 --------------------------------------------
 hw/isa/lpc_ich9.c    | 23 ++++++++++++++
 hw/isa/piix3.c       | 17 +++++++++-
 3 files changed, 39 insertions(+), 76 deletions(-)
hw/i386/acpi-build.c +0 -75
index 26932b4e2c..e1483bb11a 100644
@@ -435,10 +435,6 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
             pc = PCI_DEVICE_GET_CLASS(pdev);
             dc = DEVICE_GET_CLASS(pdev);
 
-            if (pc->class_id == PCI_CLASS_BRIDGE_ISA) {
-                continue;
-            }
-
             /*
              * Cold plugged bridges aren't themselves hot-pluggable.
              * Hotplugged bridges *are* hot-pluggable.
@@ -1006,7 +1002,6 @@ static void build_piix4_pci0_int(Aml *table)
 {
     Aml *dev;
     Aml *crs;
-    Aml *field;
     Aml *method;
     uint32_t irqs;
     Aml *sb_scope = aml_scope("_SB");
@@ -1015,13 +1010,6 @@ static void build_piix4_pci0_int(Aml *table)
     aml_append(pci0_scope, build_prt(true));
     aml_append(sb_scope, pci0_scope);
 
-    field = aml_field("PCI0.ISA.P40C", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
-    aml_append(field, aml_named_field("PRQ0", 8));
-    aml_append(field, aml_named_field("PRQ1", 8));
-    aml_append(field, aml_named_field("PRQ2", 8));
-    aml_append(field, aml_named_field("PRQ3", 8));
-    aml_append(sb_scope, field);
-
     aml_append(sb_scope, build_irq_status_method());
     aml_append(sb_scope, build_iqcr_method(true));
 
@@ -1125,7 +1113,6 @@ static Aml *build_q35_routing_table(const char *str)
 
 static void build_q35_pci0_int(Aml *table)
 {
-    Aml *field;
     Aml *method;
     Aml *sb_scope = aml_scope("_SB");
     Aml *pci0_scope = aml_scope("PCI0");
@@ -1162,18 +1149,6 @@ static void build_q35_pci0_int(Aml *table)
     aml_append(pci0_scope, method);
     aml_append(sb_scope, pci0_scope);
 
-    field = aml_field("PCI0.ISA.PIRQ", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
-    aml_append(field, aml_named_field("PRQA", 8));
-    aml_append(field, aml_named_field("PRQB", 8));
-    aml_append(field, aml_named_field("PRQC", 8));
-    aml_append(field, aml_named_field("PRQD", 8));
-    aml_append(field, aml_reserved_field(0x20));
-    aml_append(field, aml_named_field("PRQE", 8));
-    aml_append(field, aml_named_field("PRQF", 8));
-    aml_append(field, aml_named_field("PRQG", 8));
-    aml_append(field, aml_named_field("PRQH", 8));
-    aml_append(sb_scope, field);
-
     aml_append(sb_scope, build_irq_status_method());
     aml_append(sb_scope, build_iqcr_method(false));
 
@@ -1238,54 +1213,6 @@ static Aml *build_q35_dram_controller(const AcpiMcfgInfo *mcfg)
     return dev;
 }
 
-static void build_q35_isa_bridge(Aml *table)
-{
-    Aml *dev;
-    Aml *scope;
-    Object *obj;
-    bool ambiguous;
-
-    /*
-     * temporarily fish out isa bridge, build_q35_isa_bridge() will be dropped
-     * once PCI is converted to AcpiDevAmlIf and would be ble to generate
-     * AML for bridge itself
-     */
-    obj = object_resolve_path_type("", TYPE_ICH9_LPC_DEVICE, &ambiguous);
-    assert(obj && !ambiguous);
-
-    scope =  aml_scope("_SB.PCI0");
-    dev = aml_device("ISA");
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0x001F0000)));
-
-    call_dev_aml_func(DEVICE(obj), dev);
-    aml_append(scope, dev);
-    aml_append(table, scope);
-}
-
-static void build_piix4_isa_bridge(Aml *table)
-{
-    Aml *dev;
-    Aml *scope;
-    Object *obj;
-    bool ambiguous;
-
-    /*
-     * temporarily fish out isa bridge, build_piix4_isa_bridge() will be dropped
-     * once PCI is converted to AcpiDevAmlIf and would be ble to generate
-     * AML for bridge itself
-     */
-    obj = object_resolve_path_type("", TYPE_PIIX3_PCI_DEVICE, &ambiguous);
-    assert(obj && !ambiguous);
-
-    scope =  aml_scope("_SB.PCI0");
-    dev = aml_device("ISA");
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0x00010000)));
-
-    call_dev_aml_func(DEVICE(obj), dev);
-    aml_append(scope, dev);
-    aml_append(table, scope);
-}
-
 static void build_x86_acpi_pci_hotplug(Aml *table, uint64_t pcihp_addr)
 {
     Aml *scope;
@@ -1465,7 +1392,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
         aml_append(sb_scope, dev);
         aml_append(dsdt, sb_scope);
 
-        build_piix4_isa_bridge(dsdt);
         if (pm->pcihp_bridge_en || pm->pcihp_root_en) {
             build_x86_acpi_pci_hotplug(dsdt, pm->pcihp_io_base);
         }
@@ -1510,7 +1436,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
 
         aml_append(dsdt, sb_scope);
 
-        build_q35_isa_bridge(dsdt);
         if (pm->pcihp_bridge_en) {
             build_x86_acpi_pci_hotplug(dsdt, pm->pcihp_io_base);
         }
hw/isa/lpc_ich9.c +23 -0
index 4553b5925b..facc3745e4 100644
@@ -806,6 +806,7 @@ static void ich9_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
 
 static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
 {
+    Aml *field;
     BusChild *kid;
     ICH9LPCState *s = ICH9_LPC_DEVICE(adev);
     BusState *bus = BUS(s->isa_bus);
@@ -813,6 +814,28 @@ static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
     /* ICH9 PCI to ISA irq remapping */
     aml_append(scope, aml_operation_region("PIRQ", AML_PCI_CONFIG,
                                            aml_int(0x60), 0x0C));
+    /* Fields declarion has to happen *after* operation region */
+    field = aml_field("PIRQ", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
+    aml_append(field, aml_named_field("PRQA", 8));
+    aml_append(field, aml_named_field("PRQB", 8));
+    aml_append(field, aml_named_field("PRQC", 8));
+    aml_append(field, aml_named_field("PRQD", 8));
+    aml_append(field, aml_reserved_field(0x20));
+    aml_append(field, aml_named_field("PRQE", 8));
+    aml_append(field, aml_named_field("PRQF", 8));
+    aml_append(field, aml_named_field("PRQG", 8));
+    aml_append(field, aml_named_field("PRQH", 8));
+    aml_append(scope, field);
+
+    /* hack: put fields into _SB scope for LNKx to find them */
+    aml_append(scope, aml_alias("PRQA", "\\_SB.PRQA"));
+    aml_append(scope, aml_alias("PRQB", "\\_SB.PRQB"));
+    aml_append(scope, aml_alias("PRQC", "\\_SB.PRQC"));
+    aml_append(scope, aml_alias("PRQD", "\\_SB.PRQD"));
+    aml_append(scope, aml_alias("PRQE", "\\_SB.PRQE"));
+    aml_append(scope, aml_alias("PRQF", "\\_SB.PRQF"));
+    aml_append(scope, aml_alias("PRQG", "\\_SB.PRQG"));
+    aml_append(scope, aml_alias("PRQH", "\\_SB.PRQH"));
 
     QTAILQ_FOREACH(kid, &bus->children, sibling) {
             call_dev_aml_func(DEVICE(kid->child), scope);
hw/isa/piix3.c +16 -1
index 48f9ab1096..d81b385e26 100644
@@ -311,12 +311,27 @@ static void pci_piix3_realize(PCIDevice *dev, Error **errp)
 
 static void build_pci_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
 {
+    Aml *field;
     BusChild *kid;
     BusState *bus = qdev_get_child_bus(DEVICE(adev), "isa.0");
 
     /* PIIX PCI to ISA irq remapping */
     aml_append(scope, aml_operation_region("P40C", AML_PCI_CONFIG,
-                                         aml_int(0x60), 0x04));
+                                           aml_int(0x60), 0x04));
+    /* Fields declarion has to happen *after* operation region */
+    field = aml_field("P40C", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
+    aml_append(field, aml_named_field("PRQ0", 8));
+    aml_append(field, aml_named_field("PRQ1", 8));
+    aml_append(field, aml_named_field("PRQ2", 8));
+    aml_append(field, aml_named_field("PRQ3", 8));
+    aml_append(scope, field);
+
+    /* hack: put fields into _SB scope for LNKx to find them */
+    aml_append(scope, aml_alias("PRQ0", "\\_SB.PRQ0"));
+    aml_append(scope, aml_alias("PRQ1", "\\_SB.PRQ1"));
+    aml_append(scope, aml_alias("PRQ2", "\\_SB.PRQ2"));
+    aml_append(scope, aml_alias("PRQ3", "\\_SB.PRQ3"));
+
     QTAILQ_FOREACH(kid, &bus->children, sibling) {
         call_dev_aml_func(DEVICE(kid->child), scope);
     }
Signature · 1 line
2.31.1
#5 lore raw

PATCH 4/11 tests: acpi: update expected DSDT after ISA bridge is moved directly under PCI host bridge

In reply to Igor Mammedov

example of the change for PC machine with hotplug disabled on root buss (no BSEL case):

- Field (PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
+ Field (S08.P40C, ByteAcc, NoLock, Preserve)

===
- Scope (_SB.PCI0)
- {
- Device (ISA)
- {
- Name (_ADR, 0x00010000) // _ADR: Address
- OperationRegion (P40C, PCI_Config, 0x60, 0x04)
...
- }
- }
-

      Scope (_SB)
 ===
 +            Device (S08)
 +            {
 +                Name (_ADR, 0x00010000)  // _ADR: Address
 +                OperationRegion (P40C, PCI_Config, 0x60, 0x04)
 ...
 +            }
 +
              Device (S10)
              {
                  Name (_ADR, 0x00020000)  // _ADR: Address

with hotplug enabled on root bus (i.e. bus has BSEL configured), a following addtional entries will be seen:

 +                Name (ASUN, One)
 +                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
 +                {

+ Local0 = Package (0x02)
+ {
+ BSEL,
+ ASUN
+ }
+ Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
+ }

similar changes are expected for Q35 modulo:

- Field (PCI0.ISA.PIRQ, ByteAcc, NoLock, Preserve)
+ Field (SF8.PIRQ, ByteAcc, NoLock, Preserve)

and bridge address

---
 tests/qtest/bios-tables-test-allowed-diff.h |  34 --------------------
 tests/data/acpi/pc/DSDT                     | Bin 6422 -> 6496 bytes
 tests/data/acpi/pc/DSDT.acpierst            | Bin 6382 -> 6456 bytes
 tests/data/acpi/pc/DSDT.acpihmat            | Bin 7747 -> 7821 bytes
 tests/data/acpi/pc/DSDT.bridge              | Bin 9496 -> 9570 bytes
 tests/data/acpi/pc/DSDT.cphp                | Bin 6886 -> 6960 bytes
 tests/data/acpi/pc/DSDT.dimmpxm             | Bin 8076 -> 8150 bytes
 tests/data/acpi/pc/DSDT.hpbridge            | Bin 6382 -> 6456 bytes
 tests/data/acpi/pc/DSDT.hpbrroot            | Bin 3069 -> 3107 bytes
 tests/data/acpi/pc/DSDT.ipmikcs             | Bin 6494 -> 6568 bytes
 tests/data/acpi/pc/DSDT.memhp               | Bin 7781 -> 7855 bytes
 tests/data/acpi/pc/DSDT.nohpet              | Bin 6280 -> 6354 bytes
 tests/data/acpi/pc/DSDT.numamem             | Bin 6428 -> 6502 bytes
 tests/data/acpi/pc/DSDT.roothp              | Bin 6656 -> 6694 bytes
 tests/data/acpi/q35/DSDT                    | Bin 8320 -> 8418 bytes
 tests/data/acpi/q35/DSDT.acpierst           | Bin 8337 -> 8435 bytes
 tests/data/acpi/q35/DSDT.acpihmat           | Bin 9645 -> 9743 bytes
 tests/data/acpi/q35/DSDT.applesmc           | Bin 8366 -> 8464 bytes
 tests/data/acpi/q35/DSDT.bridge             | Bin 11449 -> 11547 bytes
 tests/data/acpi/q35/DSDT.cphp               | Bin 8784 -> 8882 bytes
 tests/data/acpi/q35/DSDT.cxl                | Bin 9646 -> 9744 bytes
 tests/data/acpi/q35/DSDT.dimmpxm            | Bin 9974 -> 10072 bytes
 tests/data/acpi/q35/DSDT.ipmibt             | Bin 8395 -> 8493 bytes
 tests/data/acpi/q35/DSDT.ipmismbus          | Bin 8409 -> 8507 bytes
 tests/data/acpi/q35/DSDT.ivrs               | Bin 8337 -> 8435 bytes
 tests/data/acpi/q35/DSDT.memhp              | Bin 9679 -> 9777 bytes
 tests/data/acpi/q35/DSDT.mmio64             | Bin 9450 -> 9548 bytes
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 8640 -> 8738 bytes
 tests/data/acpi/q35/DSDT.nohpet             | Bin 8178 -> 8276 bytes
 tests/data/acpi/q35/DSDT.numamem            | Bin 8326 -> 8424 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa        | Bin 8421 -> 8519 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12          | Bin 8926 -> 9024 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2           | Bin 8952 -> 9050 bytes
 tests/data/acpi/q35/DSDT.viot               | Bin 9429 -> 9527 bytes
 tests/data/acpi/q35/DSDT.xapic              | Bin 35683 -> 35781 bytes
 35 files changed, 34 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -34
index 570b17478e..dfb8523c8b 100644
@@ -1,35 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index da2a3e5c0551ac2d1d8a0a40b92d3235d5757475..5b4624cb68c78eab6e356987974b9bee6c9a1785 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index abcd6d9d309a8f9a9080edc64df7a6c195b5885f..99461b771eec2043263b5bc3c109a08969a99af9 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 884d4871a2a0b87db2c0dd7e6f32486ba9b7e424..b84f3b47c37e427b927c36036307db6e83a843e5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index 31a79aa47673c14f7e564475c39bd38c872f8165..6771620078086e42b445474b16797094e0d0a801 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index 8b0cae4dbfbd083a43751a7c94dc5c76f89084a7..298fa1592676b3a2089b08eff5f764e04391b961 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 38865fb66747a6ee1cf2066b925be6eba064625a..9fcadb266b92fc4942621f0fd919703723de2fd9 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index abcd6d9d309a8f9a9080edc64df7a6c195b5885f..99461b771eec2043263b5bc3c109a08969a99af9 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index dd2c8c0c8c5bf9895eb524e094d5597515b4803e..b10b17cb1111f6b5d61da4aa1c754f2921a4ac1c 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index e819ce69461a36b6fab5e2ffeba90dfe558724a7..aff3e9bbe1fdbf783c49d07a49c2e16317a2871e 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 03a9decdc1563f5e759e34dffdab4bb34645d9b3..07b193b9939e2199bce5edc743de5494133c1e8c 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index b413d9f31d483eca02f45ad09af2f556581ec381..ceee7722ceed8a7e8f61a37805a4c855f47244a8 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index 9e701b2983f9ec45af9c26d801545c2b5d112a10..e03f4d07b86018d12def37b5397ba9673548e2b7 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 8c3956c9ecc63133cc800f1d2d07a1392a35d548..418cc92e4c061ad21e1d281e0b5e6114e283b7d3 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index 3870958969b1c0e29f9dd26a1256359e90897d3e..ea35dc5eba8433a8dcb54815f19ed6239f2534e7 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index c9c18fa4e45288fb6c2182a793a8e6aff72b33d9..146269c68c68238a8be3aa67e049a85c0b8edc66 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index a32e90b5d913d07bc9ed9aca521420305559f357..4dd420b62fbcfdd21485fec2bafdea54f3fdb5a8 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index 5507b6b8f5e6ae4fd4275601eb85caf29bddc352..ff25d82ba24b5e792b9d87958aa1b162bc9e0de2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index a42eb674fa3469a815b1c91ba99b2d4cf85c9380..bde84efd1c5fcafee789781f4030d573002a886a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 2d8cb603c9c937501247d32e6a5b2e79bb01eea3..537be7ca37c021e6a7f098e88c40ba178f3ec3e2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 20d0fb64ea52b2f4979105c934aadb6f416e2b71..aeea64d1cecad0ad011870ed5e04bfea1ae62510 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index b23339513af3be457c1974e0288fc4c6720690d8..ed11aefa4a56a8408bd4e0de83bf2373e6025449 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index 8af2695edeeadbde2a1e8f04ab567f5c00b76945..d9d1e75c987acd42be4576688621be07b21f0e7b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 479df48cd37af888317d63eac8f565f370201490..f6e124137721312722c820b5c084a143492945c9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index c9c18fa4e45288fb6c2182a793a8e6aff72b33d9..146269c68c68238a8be3aa67e049a85c0b8edc66 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index a5730b8ab8abb2602334633cd6c760f79915e564..3e79ba7ac0b9a466fddd2213f32d20c522b8613b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index a4293c20fed04d1ccfc4f4fc1ccf46ca81453854..afc260ebf4d91a2a9f7be5ff21968e99b1f9c5d1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 88bf47ab1805e4ef1dd8039933c5aa8144da37ac..7c14ce3a986fa06e88f3adc088faae54bdd2d8e4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 6feed2ee106087d24d51f468df1b4d44e65143f0..60595f55fc72397e3ed9b1999dddd39cd98f89a8 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 414b8af67bdf79238915de0d609ce45e150eb958..68e67eb91097c58365e3734c9b35d32796639d54 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index 7277a0105035f984dc0a0f09747d441c21e62d1c..811cd27c7e7366e61683c7c5ef67f0996f395c25 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index 253a66e65818d1df67b13d4b70f68add78adff98..7a213e3db230064cedf3a30b83b11128286eaeba 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 76bd4661e6655d2a8f246f4bf38490df14da82ad..b55e828c6397f80c14de82f371fa34553008a875 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index 3f14b57f0797ab13fc4c90dd2949cf4bd6c30896..a8a93fe70d8e98ec0e66278b45d36393b75740ec 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index baa88f6f219a2a47fe20ee0c08b92371cc7e2aa7..8211f5af8f9433b66b64768acb1de61a5716152a 100644
GIT binary patch
Signature · 1 line
2.31.1
#6 lore raw

PATCH 5/11 tests: acpi: whitelist DSDT before generating ICH9_SMB AML automatically

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +21 -0
index dfb8523c8b..fd5852776c 100644
@@ -1 +1,22 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.acpierst",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.applesmc",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.cxl",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.ipmismbus",
+"tests/data/acpi/q35/DSDT.ivrs",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.nohpet",
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
+"tests/data/acpi/q35/DSDT.viot",
+"tests/data/acpi/q35/DSDT.xapic",
Signature · 1 line
2.31.1
#7 lore raw

PATCH 6/11 acpi: add get_dev_aml_func() helper

In reply to Igor Mammedov

It will be used in followup commits to figure out if device has it's own, device specific AML block.

---
 include/hw/acpi/acpi_aml_interface.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
include/hw/acpi/acpi_aml_interface.h +11 -2
index ab76f0e55d..436da069d6 100644
@@ -29,11 +29,20 @@ struct AcpiDevAmlIfClass {
     dev_aml_fn build_dev_aml;
 };
 
-static inline void call_dev_aml_func(DeviceState *dev, Aml *scope)
+static inline dev_aml_fn get_dev_aml_func(DeviceState *dev)
 {
     if (object_dynamic_cast(OBJECT(dev), TYPE_ACPI_DEV_AML_IF)) {
         AcpiDevAmlIfClass *klass = ACPI_DEV_AML_IF_GET_CLASS(dev);
-        klass->build_dev_aml(ACPI_DEV_AML_IF(dev), scope);
+        return klass->build_dev_aml;
+    }
+    return NULL;
+}
+
+static inline void call_dev_aml_func(DeviceState *dev, Aml *scope)
+{
+    dev_aml_fn fn = get_dev_aml_func(dev);
+    if (fn) {
+        fn(ACPI_DEV_AML_IF(dev), scope);
     }
 }
 
Signature · 1 line
2.31.1
Reviewed-by on v1 6/11
#8 lore raw

Re: [PATCH 06/11] acpi: add get_dev_aml_func() helper

Quoted 5 lines · Igor Mammedov

It will be used in followup commits to figure out if device has it's own, device specific AML block.

Quoted 34 lines
---
 include/hw/acpi/acpi_aml_interface.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
include/hw/acpi/acpi_aml_interface.h +11 -3
index ab76f0e55d..436da069d6 100644
@@ -29,11 +29,20 @@ struct AcpiDevAmlIfClass {
     dev_aml_fn build_dev_aml;
 };
 
-static inline void call_dev_aml_func(DeviceState *dev, Aml *scope)
+static inline dev_aml_fn get_dev_aml_func(DeviceState *dev)
 {
     if (object_dynamic_cast(OBJECT(dev), TYPE_ACPI_DEV_AML_IF)) {
         AcpiDevAmlIfClass *klass = ACPI_DEV_AML_IF_GET_CLASS(dev);
-        klass->build_dev_aml(ACPI_DEV_AML_IF(dev), scope);
+        return klass->build_dev_aml;
+    }
+    return NULL;
+}
+
+static inline void call_dev_aml_func(DeviceState *dev, Aml *scope)
+{
+    dev_aml_fn fn = get_dev_aml_func(dev);
+    if (fn) {
+        fn(ACPI_DEV_AML_IF(dev), scope);
     }
 }
 
--

2.31.1

#9 lore raw

PATCH 7/11 acpi: enumerate SMB bridge automatically along with other PCI devices

In reply to Igor Mammedov

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).

---
 hw/i386/acpi-build.c | 27 +++------------------------
 1 file changed, 3 insertions(+), 24 deletions(-)
hw/i386/acpi-build.c +3 -24
index e1483bb11a..916343d8d6 100644
@@ -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) {
Signature · 1 line
2.31.1
#10 lore raw

PATCH 8/11 tests: acpi: update expected blobs

In reply to Igor Mammedov

Expected change in q35 tests:

	@@ -2797,14 +2797,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
		 }
	     }

	-    Scope (_SB.PCI0)
	-    {
	-        Device (SMB0)
	-        {
	-            Name (_ADR, 0x001F0003)  // _ADR: Address
	-        }
	-    }
	-
	     Scope (_SB)
	     {
		 Device (HPET)
	@@ -3282,6 +3274,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
			 }
		     }

	+            Device (SFB)
	+            {
	+                Name (_ADR, 0x001F0003)  // _ADR: Address
	+            }
	+
		     Method (PCNT, 0, NotSerialized)
		     {
		     }

Also for ipmismbus test, child 'Device (MI1)' of SMB0 will be moved along with it

---
 tests/qtest/bios-tables-test-allowed-diff.h |  21 --------------------
 tests/data/acpi/q35/DSDT                    | Bin 8418 -> 8407 bytes
 tests/data/acpi/q35/DSDT.acpierst           | Bin 8435 -> 8424 bytes
 tests/data/acpi/q35/DSDT.acpihmat           | Bin 9743 -> 9732 bytes
 tests/data/acpi/q35/DSDT.applesmc           | Bin 8464 -> 8453 bytes
 tests/data/acpi/q35/DSDT.bridge             | Bin 11547 -> 11536 bytes
 tests/data/acpi/q35/DSDT.cphp               | Bin 8882 -> 8871 bytes
 tests/data/acpi/q35/DSDT.cxl                | Bin 9744 -> 9733 bytes
 tests/data/acpi/q35/DSDT.dimmpxm            | Bin 10072 -> 10061 bytes
 tests/data/acpi/q35/DSDT.ipmibt             | Bin 8493 -> 8482 bytes
 tests/data/acpi/q35/DSDT.ipmismbus          | Bin 8507 -> 8495 bytes
 tests/data/acpi/q35/DSDT.ivrs               | Bin 8435 -> 8424 bytes
 tests/data/acpi/q35/DSDT.memhp              | Bin 9777 -> 9766 bytes
 tests/data/acpi/q35/DSDT.mmio64             | Bin 9548 -> 9537 bytes
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 8738 -> 8727 bytes
 tests/data/acpi/q35/DSDT.nohpet             | Bin 8276 -> 8265 bytes
 tests/data/acpi/q35/DSDT.numamem            | Bin 8424 -> 8413 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa        | Bin 8519 -> 8508 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12          | Bin 9024 -> 9013 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2           | Bin 9050 -> 9039 bytes
 tests/data/acpi/q35/DSDT.viot               | Bin 9527 -> 9516 bytes
 tests/data/acpi/q35/DSDT.xapic              | Bin 35781 -> 35770 bytes
 22 files changed, 21 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -21
index fd5852776c..dfb8523c8b 100644
@@ -1,22 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/q35/DSDT binary +0 -0
index ea35dc5eba8433a8dcb54815f19ed6239f2534e7..c8a2b5df26608f10c75ab8f2f9e404fda987891b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index 146269c68c68238a8be3aa67e049a85c0b8edc66..eb63e439b92424e4c50b7e5f1df92da54ecfc6ea 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 4dd420b62fbcfdd21485fec2bafdea54f3fdb5a8..f9199a0dd614b30c9e73eb7de7e051ce84c1d73f 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index ff25d82ba24b5e792b9d87958aa1b162bc9e0de2..286a4ecec273ca0e2fe2d65f80e8566a68a2f794 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index bde84efd1c5fcafee789781f4030d573002a886a..9a733a54e428d3506aaf73f8d4c1f28324a71a42 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 537be7ca37c021e6a7f098e88c40ba178f3ec3e2..8579626c7f1f035c8d400544c2af6ce6372a5625 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index aeea64d1cecad0ad011870ed5e04bfea1ae62510..96594c00b3b0e0a4933d6d851d927487ad4d18eb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index ed11aefa4a56a8408bd4e0de83bf2373e6025449..e2a3ecf7d90c8c411550505c3b70bf8d19ba4bc9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index d9d1e75c987acd42be4576688621be07b21f0e7b..427272b95692099edc47f569e41fbb3ba69f6b60 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index f6e124137721312722c820b5c084a143492945c9..794779e75aaf33902de834caaa6b0763c4513615 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index 146269c68c68238a8be3aa67e049a85c0b8edc66..eb63e439b92424e4c50b7e5f1df92da54ecfc6ea 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 3e79ba7ac0b9a466fddd2213f32d20c522b8613b..923e213ab6a3c82faa6f659c29de9c8afb6878dd 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index afc260ebf4d91a2a9f7be5ff21968e99b1f9c5d1..a77aa37ca0bb407abbef134e8dce4461070856a2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 7c14ce3a986fa06e88f3adc088faae54bdd2d8e4..43469e6c89813025b902534ed61d39ad940ff7bb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 60595f55fc72397e3ed9b1999dddd39cd98f89a8..e17b252b03b290ba39601afffbee66159a57bfb1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 68e67eb91097c58365e3734c9b35d32796639d54..ade716519de8bd626b3cddee686f55757bb4eb35 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index 811cd27c7e7366e61683c7c5ef67f0996f395c25..b6740b1ec2f4e01bdbdc34bc8bf0a2c36f134671 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index 7a213e3db230064cedf3a30b83b11128286eaeba..5bc095351fd009fb2171daaa4f824c5cc9f36819 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index b55e828c6397f80c14de82f371fa34553008a875..47417f47f7e25576f31207cb0b752b8c086a4480 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index a8a93fe70d8e98ec0e66278b45d36393b75740ec..574b8a0094c556cd8555b7a4e1b92b2d5f64750a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 8211f5af8f9433b66b64768acb1de61a5716152a..74381116ad7f01a860fee9201df38d1ea24a0be6 100644
GIT binary patch
Signature · 1 line
2.31.1
#11 lore raw

Re: [PATCH 08/11] tests: acpi: update expected blobs

Quoted 21 lines · Igor Mammedov

Expected change in q35 tests:
@@ -2797,14 +2797,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
}
}

- Scope (_SB.PCI0)
- {
- Device (SMB0)
- {
- Name (_ADR, 0x001F0003) // _ADR: Address
- }
- }
-
Scope (_SB)
{
Device (HPET)
@@ -3282,6 +3274,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
}
}

Quoted 5 lines

+ Device (SFB)
+ {
+ Name (_ADR, 0x001F0003) // _ADR: Address
+ }
+

Which code generates this hunk? Shouldn't this be "SMB0" for Device?

Quoted 293 lines
                     Method (PCNT, 0, NotSerialized)
                     {
                     }

Also for ipmismbus test, child 'Device (MI1)' of SMB0 will be moved along with it

---
 tests/qtest/bios-tables-test-allowed-diff.h |  21 --------------------
 tests/data/acpi/q35/DSDT                    | Bin 8418 -> 8407 bytes
 tests/data/acpi/q35/DSDT.acpierst           | Bin 8435 -> 8424 bytes
 tests/data/acpi/q35/DSDT.acpihmat           | Bin 9743 -> 9732 bytes
 tests/data/acpi/q35/DSDT.applesmc           | Bin 8464 -> 8453 bytes
 tests/data/acpi/q35/DSDT.bridge             | Bin 11547 -> 11536 bytes
 tests/data/acpi/q35/DSDT.cphp               | Bin 8882 -> 8871 bytes
 tests/data/acpi/q35/DSDT.cxl                | Bin 9744 -> 9733 bytes
 tests/data/acpi/q35/DSDT.dimmpxm            | Bin 10072 -> 10061 bytes
 tests/data/acpi/q35/DSDT.ipmibt             | Bin 8493 -> 8482 bytes
 tests/data/acpi/q35/DSDT.ipmismbus          | Bin 8507 -> 8495 bytes
 tests/data/acpi/q35/DSDT.ivrs               | Bin 8435 -> 8424 bytes
 tests/data/acpi/q35/DSDT.memhp              | Bin 9777 -> 9766 bytes
 tests/data/acpi/q35/DSDT.mmio64             | Bin 9548 -> 9537 bytes
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 8738 -> 8727 bytes
 tests/data/acpi/q35/DSDT.nohpet             | Bin 8276 -> 8265 bytes
 tests/data/acpi/q35/DSDT.numamem            | Bin 8424 -> 8413 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa        | Bin 8519 -> 8508 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12          | Bin 9024 -> 9013 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2           | Bin 9050 -> 9039 bytes
 tests/data/acpi/q35/DSDT.viot               | Bin 9527 -> 9516 bytes
 tests/data/acpi/q35/DSDT.xapic              | Bin 35781 -> 35770 bytes
 22 files changed, 21 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -21
index fd5852776c..dfb8523c8b 100644
@@ -1,22 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/q35/DSDT binary +0 -0
index ea35dc5eba8433a8dcb54815f19ed6239f2534e7..c8a2b5df26608f10c75ab8f2f9e404fda987891b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index 146269c68c68238a8be3aa67e049a85c0b8edc66..eb63e439b92424e4c50b7e5f1df92da54ecfc6ea 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 4dd420b62fbcfdd21485fec2bafdea54f3fdb5a8..f9199a0dd614b30c9e73eb7de7e051ce84c1d73f 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index ff25d82ba24b5e792b9d87958aa1b162bc9e0de2..286a4ecec273ca0e2fe2d65f80e8566a68a2f794 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index bde84efd1c5fcafee789781f4030d573002a886a..9a733a54e428d3506aaf73f8d4c1f28324a71a42 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 537be7ca37c021e6a7f098e88c40ba178f3ec3e2..8579626c7f1f035c8d400544c2af6ce6372a5625 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index aeea64d1cecad0ad011870ed5e04bfea1ae62510..96594c00b3b0e0a4933d6d851d927487ad4d18eb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index ed11aefa4a56a8408bd4e0de83bf2373e6025449..e2a3ecf7d90c8c411550505c3b70bf8d19ba4bc9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index d9d1e75c987acd42be4576688621be07b21f0e7b..427272b95692099edc47f569e41fbb3ba69f6b60 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index f6e124137721312722c820b5c084a143492945c9..794779e75aaf33902de834caaa6b0763c4513615 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index 146269c68c68238a8be3aa67e049a85c0b8edc66..eb63e439b92424e4c50b7e5f1df92da54ecfc6ea 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 3e79ba7ac0b9a466fddd2213f32d20c522b8613b..923e213ab6a3c82faa6f659c29de9c8afb6878dd 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index afc260ebf4d91a2a9f7be5ff21968e99b1f9c5d1..a77aa37ca0bb407abbef134e8dce4461070856a2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 7c14ce3a986fa06e88f3adc088faae54bdd2d8e4..43469e6c89813025b902534ed61d39ad940ff7bb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 60595f55fc72397e3ed9b1999dddd39cd98f89a8..e17b252b03b290ba39601afffbee66159a57bfb1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 68e67eb91097c58365e3734c9b35d32796639d54..ade716519de8bd626b3cddee686f55757bb4eb35 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index 811cd27c7e7366e61683c7c5ef67f0996f395c25..b6740b1ec2f4e01bdbdc34bc8bf0a2c36f134671 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index 7a213e3db230064cedf3a30b83b11128286eaeba..5bc095351fd009fb2171daaa4f824c5cc9f36819 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index b55e828c6397f80c14de82f371fa34553008a875..47417f47f7e25576f31207cb0b752b8c086a4480 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index a8a93fe70d8e98ec0e66278b45d36393b75740ec..574b8a0094c556cd8555b7a4e1b92b2d5f64750a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -1
index 8211f5af8f9433b66b64768acb1de61a5716152a..74381116ad7f01a860fee9201df38d1ea24a0be6 100644
GIT binary patch
 
--

2.31.1

#12 lore raw

Re: [PATCH 08/11] tests: acpi: update expected blobs

Quoted 22 lines · On Mon, 17 Oct 2022 18:13:14 +0530 Ani Sinha <[email protected]> wrote:
Quoted 21 lines · Igor Mammedov

Expected change in q35 tests:

        @@ -2797,14 +2797,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                 }
             }

        -    Scope (_SB.PCI0)
        -    {
        -        Device (SMB0)
        -        {
        -            Name (_ADR, 0x001F0003)  // _ADR: Address
        -        }
        -    }
        -
             Scope (_SB)
             {
                 Device (HPET)
        @@ -3282,6 +3274,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
                         }
                     }
Quoted 7 lines
Quoted 5 lines

+ Device (SFB)
+ {
+ Name (_ADR, 0x001F0003) // _ADR: Address
+ }
+

Which code generates this hunk? Shouldn't this be "SMB0" for Device?

There is no point in trying to keep SMB0 name

it's done by build_append_pci_bus_devices() like for any other PCI device.

        /* start to compose PCI device descriptor */                             
        dev = aml_device("S%.02X", devfn);                                       
        aml_append(dev, aml_name_decl("_ADR", aml_int(adr)));   
Quoted 295 lines
Quoted 294 lines
                     Method (PCNT, 0, NotSerialized)
                     {
                     }

Also for ipmismbus test, child 'Device (MI1)' of SMB0 will be moved along with it

---
 tests/qtest/bios-tables-test-allowed-diff.h |  21 --------------------
 tests/data/acpi/q35/DSDT                    | Bin 8418 -> 8407 bytes
 tests/data/acpi/q35/DSDT.acpierst           | Bin 8435 -> 8424 bytes
 tests/data/acpi/q35/DSDT.acpihmat           | Bin 9743 -> 9732 bytes
 tests/data/acpi/q35/DSDT.applesmc           | Bin 8464 -> 8453 bytes
 tests/data/acpi/q35/DSDT.bridge             | Bin 11547 -> 11536 bytes
 tests/data/acpi/q35/DSDT.cphp               | Bin 8882 -> 8871 bytes
 tests/data/acpi/q35/DSDT.cxl                | Bin 9744 -> 9733 bytes
 tests/data/acpi/q35/DSDT.dimmpxm            | Bin 10072 -> 10061 bytes
 tests/data/acpi/q35/DSDT.ipmibt             | Bin 8493 -> 8482 bytes
 tests/data/acpi/q35/DSDT.ipmismbus          | Bin 8507 -> 8495 bytes
 tests/data/acpi/q35/DSDT.ivrs               | Bin 8435 -> 8424 bytes
 tests/data/acpi/q35/DSDT.memhp              | Bin 9777 -> 9766 bytes
 tests/data/acpi/q35/DSDT.mmio64             | Bin 9548 -> 9537 bytes
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 8738 -> 8727 bytes
 tests/data/acpi/q35/DSDT.nohpet             | Bin 8276 -> 8265 bytes
 tests/data/acpi/q35/DSDT.numamem            | Bin 8424 -> 8413 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa        | Bin 8519 -> 8508 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12          | Bin 9024 -> 9013 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2           | Bin 9050 -> 9039 bytes
 tests/data/acpi/q35/DSDT.viot               | Bin 9527 -> 9516 bytes
 tests/data/acpi/q35/DSDT.xapic              | Bin 35781 -> 35770 bytes
 22 files changed, 21 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -21
index fd5852776c..dfb8523c8b 100644
@@ -1,22 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/q35/DSDT binary +0 -0
index ea35dc5eba8433a8dcb54815f19ed6239f2534e7..c8a2b5df26608f10c75ab8f2f9e404fda987891b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index 146269c68c68238a8be3aa67e049a85c0b8edc66..eb63e439b92424e4c50b7e5f1df92da54ecfc6ea 100644
GIT binary patch

zcmezD_;FPCD<k8g#rTu<MWMNd=i^YB-XKUIVr&2Rp?JcquM^BgZ5W-NYa4<`mBn U@8}Z5!^|MhAi@^l>=(iS0Ek8rTL1t6

delta 75 zcmaFi_}P)mCD<k8vjPJHW57l(J_%`Qz4&0K_yA{5gXkvyU|%N#j(A6xARcB0d4|p6 d66@Kx92H|gDg-<g7GIEKVi#cxaP|vf000r=6CD5m

tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 4dd420b62fbcfdd21485fec2bafdea54f3fdb5a8..f9199a0dd614b30c9e73eb7de7e051ce84c1d73f 100644
GIT binary patch

zcmZqi>G$Ds33dtLS7Tsc%-P7rCm}7Z7a!~tAK>h15Z%Nd?CWH}5%1^{#KX)W&#+ls d;tn^LgF*~Qg@A|r=D*7C8QDeH0-XIq7y!*W69)hQ

tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index ff25d82ba24b5e792b9d87958aa1b162bc9e0de2..286a4ecec273ca0e2fe2d65f80e8566a68a2f794 100644
GIT binary patch

zcmbQ>)au0L66_Mfs>r~=D6x@?Phzu)#5y)Ef906?V5fKicje7*<Ybv7qMP`G-JIe% U;vHRrc$gXF8AR9uoc%%=01xsHAOHXW

delta 76 zcmZp5n&8Cc66_Kppvb_$*tn64PeNK+FFx2QKET=2Ai9Y^*w@K`Bi_*^h=-X$o?)}N d#CkR^KcyIu3IR8z%@^cknb<|x0-XIq7y!Nm5#j&<

tests/data/acpi/q35/DSDT.bridge binary +0 -0
index bde84efd1c5fcafee789781f4030d573002a886a..9a733a54e428d3506aaf73f8d4c1f28324a71a42 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 537be7ca37c021e6a7f098e88c40ba178f3ec3e2..8579626c7f1f035c8d400544c2af6ce6372a5625 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index aeea64d1cecad0ad011870ed5e04bfea1ae62510..96594c00b3b0e0a4933d6d851d927487ad4d18eb 100644
GIT binary patch

zcmbQ>)9S<J66_Mfs>Z;;Xupw*Phzu)#4c_wXXTjqV5fKiZ>7yYlm(e2qMP`G-JIe% U;vHRrc$gXF8AR9uoc%%=03WdrZ2$lO

delta 76 zcmZqmnc&0a66_KppvJ(!xMCw0pM<ouUVN}qe1Nm3L39&;u&<K=N4%p;5DznhJi}&j eiQU{>PD(K#6#z0o9$KGO>%W1vvYKFaQA0rV=jz

tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index ed11aefa4a56a8408bd4e0de83bf2373e6025449..e2a3ecf7d90c8c411550505c3b70bf8d19ba4bc9 100644
GIT binary patch

e5~{ph4hk_K6#^deo8463GqQ`Y1vvYKFaQ7)&=U>-

tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index d9d1e75c987acd42be4576688621be07b21f0e7b..427272b95692099edc47f569e41fbb3ba69f6b60 100644
GIT binary patch

zcmZ4FwAP8sCD<iISCN5%@#sb_J_%`Qz4&0K_yA{5gXkvyU|%N#j(A6xARcB0d4|p6 e66@Kxyj5aADg>NWHeZmlVqzCz3vl)eVE_Q=2@;q9

tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index f6e124137721312722c820b5c084a143492945c9..794779e75aaf33902de834caaa6b0763c4513615 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index 146269c68c68238a8be3aa67e049a85c0b8edc66..eb63e439b92424e4c50b7e5f1df92da54ecfc6ea 100644
GIT binary patch

zcmezD_;FPCD<k8g#rTu<MWMNd=i^YB-XKUIVr&2Rp?JcquM^BgZ5W-NYa4<`mBn U@8}Z5!^|MhAi@^l>=(iS0Ek8rTL1t6

delta 75 zcmaFi_}P)mCD<k8vjPJHW57l(J_%`Qz4&0K_yA{5gXkvyU|%N#j(A6xARcB0d4|p6 d66@Kx92H|gDg-<g7GIEKVi#cxaP|vf000r=6CD5m

tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 3e79ba7ac0b9a466fddd2213f32d20c522b8613b..923e213ab6a3c82faa6f659c29de9c8afb6878dd 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index afc260ebf4d91a2a9f7be5ff21968e99b1f9c5d1..a77aa37ca0bb407abbef134e8dce4461070856a2 100644
GIT binary patch

zcmX@(b<m5;CD<jzQI&y#@ykXoK8ejH671YuPD(NH!A|i4UW$udm6;@>oA`s>oZ>m+ T9bJNWm>J|5MA!nH{X!T3EYS}}

delta 75 zcmX@;b;gU!CD<jzN0otrF?J&tpM<ouUVN}qe1Nm3L39&;u&<K=N4%p;5DznhJi}&j c2@Y;9N5vSB3IRr#hSY>>_Ld&VC^b0K(`I2mk;8

tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 7c14ce3a986fa06e88f3adc088faae54bdd2d8e4..43469e6c89813025b902534ed61d39ad940ff7bb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 60595f55fc72397e3ed9b1999dddd39cd98f89a8..e17b252b03b290ba39601afffbee66159a57bfb1 100644
GIT binary patch

zcmccOaMFRxCD<jzQ-OhjQD7q%pTuSp2?aJTN5z=<V5fKiPle5Ka_<=>qMP`G-JIe% U;vHRrc$gXF8AR9uoc%%=04azMg8%>k

delta 76 zcmX@<aK(YkCD<h-M1g^Uv2r69pM<ouUVN}qe1Nm3L39&;u&<K=N4%p;5DznhJi}&j d2}L$82Zb1r3IPxK%}#Rf8QDeH0-XIq7y#w#5=8(2

tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 68e67eb91097c58365e3734c9b35d32796639d54..ade716519de8bd626b3cddee686f55757bb4eb35 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index 811cd27c7e7366e61683c7c5ef67f0996f395c25..b6740b1ec2f4e01bdbdc34bc8bf0a2c36f134671 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index 7a213e3db230064cedf3a30b83b11128286eaeba..5bc095351fd009fb2171daaa4f824c5cc9f36819 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index b55e828c6397f80c14de82f371fa34553008a875..47417f47f7e25576f31207cb0b752b8c086a4480 100644
GIT binary patch

eiQQ~mK5j7}6#_19oA1a)v#^V>1vvYKFaQ7tbrWF#

tests/data/acpi/q35/DSDT.viot binary +0 -0
index a8a93fe70d8e98ec0e66278b45d36393b75740ec..574b8a0094c556cd8555b7a4e1b92b2d5f64750a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 8211f5af8f9433b66b64768acb1de61a5716152a..74381116ad7f01a860fee9201df38d1ea24a0be6 100644
GIT binary patch

zcmX>)ooUx}CN7s?myliE3=E8aH*)bwY&MaYSjgq57!x1t6ffYZu=#xFdq#=qCjMYI Xr+AKdN0%TTW(Ii%5w-wlzYqoh?b#EU

delta 78 zcmdlro$2UwCN7s?myn~~3=E8E8@c!-q^0%ZgPr07oIMSqoAr$oeVhQ9bJNWm>J|5 gHj7J4D&%rdhyke(@Q~lUx$|Ey9ir=vtI}U0BHvmS^xk5

--
2.31.1

#13 lore raw

PATCH 9/11 tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 34 +++++++++++++++++++++
 1 file changed, 34 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +34 -0
index dfb8523c8b..725a1dc798 100644
@@ -1 +1,35 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
+"tests/data/acpi/pc/DSDT.bridge",
+"tests/data/acpi/pc/DSDT.ipmikcs",
+"tests/data/acpi/pc/DSDT.cphp",
+"tests/data/acpi/pc/DSDT.memhp",
+"tests/data/acpi/pc/DSDT.numamem",
+"tests/data/acpi/pc/DSDT.nohpet",
+"tests/data/acpi/pc/DSDT.dimmpxm",
+"tests/data/acpi/pc/DSDT.acpihmat",
+"tests/data/acpi/pc/DSDT.acpierst",
+"tests/data/acpi/pc/DSDT.roothp",
+"tests/data/acpi/pc/DSDT.hpbridge",
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/DSDT.nohpet",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.acpierst",
+"tests/data/acpi/q35/DSDT.applesmc",
+"tests/data/acpi/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/q35/DSDT.ivrs",
+"tests/data/acpi/q35/DSDT.viot",
+"tests/data/acpi/q35/DSDT.cxl",
+"tests/data/acpi/q35/DSDT.ipmismbus",
+"tests/data/acpi/q35/DSDT.xapic",
Signature · 1 line
2.31.1
#14 lore raw

PATCH 10/11 acpi: pc/35: sanitize _GPE declaration order

In reply to Igor Mammedov

Move _GPE block declaration before it gets referenced by other hotplug handlers. While at it move PCI hotplug (_E01) handler after PCI tree description to avoid forward reference to to not yet declared methods/devices.

PS:
Forward 'usage' usualy is fine as long as it's hidden within method, however 'iasl' may print warnings. So be nice to iasl/guest OS and do things in proper order.

PS2: Also follow up patches will move some of hotplug code from PCI tree to _E01 and that also requires PCI Device nodes build first, before Scope can reuse that from global context.

---
 hw/i386/acpi-build.c | 47 +++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 22 deletions(-)
hw/i386/acpi-build.c +25 -22
index 916343d8d6..960305462c 100644
@@ -1434,6 +1434,18 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
         aml_append(dsdt, sb_scope);
     }
 
+    scope =  aml_scope("_GPE");
+    {
+        aml_append(scope, aml_name_decl("_HID", aml_string("ACPI0006")));
+        if (machine->nvdimms_state->is_enabled) {
+            method = aml_method("_E04", 0, AML_NOTSERIALIZED);
+            aml_append(method, aml_notify(aml_name("\\_SB.NVDR"),
+                                          aml_int(0x80)));
+            aml_append(scope, method);
+        }
+    }
+    aml_append(dsdt, scope);
+
     if (pcmc->legacy_cpu_hotplug) {
         build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
     } else {
@@ -1452,28 +1464,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
                                  pcms->memhp_io_base);
     }
 
-    scope =  aml_scope("_GPE");
-    {
-        aml_append(scope, aml_name_decl("_HID", aml_string("ACPI0006")));
-
-        if (pm->pcihp_bridge_en || pm->pcihp_root_en) {
-            method = aml_method("_E01", 0, AML_NOTSERIALIZED);
-            aml_append(method,
-                aml_acquire(aml_name("\\_SB.PCI0.BLCK"), 0xFFFF));
-            aml_append(method, aml_call0("\\_SB.PCI0.PCNT"));
-            aml_append(method, aml_release(aml_name("\\_SB.PCI0.BLCK")));
-            aml_append(scope, method);
-        }
-
-        if (machine->nvdimms_state->is_enabled) {
-            method = aml_method("_E04", 0, AML_NOTSERIALIZED);
-            aml_append(method, aml_notify(aml_name("\\_SB.NVDR"),
-                                          aml_int(0x80)));
-            aml_append(scope, method);
-        }
-    }
-    aml_append(dsdt, scope);
-
     crs_range_set_init(&crs_range_set);
     bus = PC_MACHINE(machine)->bus;
     if (bus) {
@@ -1752,6 +1742,19 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
     }
     aml_append(dsdt, sb_scope);
 
+    if (pm->pcihp_bridge_en || pm->pcihp_root_en) {
+        scope =  aml_scope("_GPE");
+        {
+            method = aml_method("_E01", 0, AML_NOTSERIALIZED);
+            aml_append(method,
+                aml_acquire(aml_name("\\_SB.PCI0.BLCK"), 0xFFFF));
+            aml_append(method, aml_call0("\\_SB.PCI0.PCNT"));
+            aml_append(method, aml_release(aml_name("\\_SB.PCI0.BLCK")));
+            aml_append(scope, method);
+        }
+        aml_append(dsdt, scope);
+    }
+
     /* copy AML table into ACPI tables blob and patch header there */
     g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len);
     acpi_table_end(linker, &table);
Signature · 1 line
2.31.1
#15 lore raw

PATCH 11/11 tests: acpi: update expected blobs

In reply to Igor Mammedov

Expected changes are:
1) Moving _GPE scope declaration achec of all _E0x methods
+ Scope (_GPE)
+ {
+ Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID
+ }
+

        Scope (_SB)
        {
            Device (\_SB.PCI0.PRES)
    ============
            \_SB.CPUS.CSCN ()
        }

- Scope (_GPE)
- {
- Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID
- }

2) Moving _E01 handler after PCI0 scope is defined
- Scope (_GPE)
- {
- Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID
- Method (_E01, 0, NotSerialized) // _Exx: Edge-Triggered GPE
- {
- Acquire (\_SB.PCI0.BLCK, 0xFFFF)
- \_SB.PCI0.PCNT ()
- Release (\_SB.PCI0.BLCK)
- }
- }
-
Scope (\_SB.PCI0)
{
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
=============
}
}
}
+
+ Scope (_GPE)
+ {
+ Method (_E01, 0, NotSerialized) // _Exx: Edge-Triggered GPE
+ {
+ Acquire (\_SB.PCI0.BLCK, 0xFFFF)
+ \_SB.PCI0.PCNT ()
+ Release (\_SB.PCI0.BLCK)
+ }
+ }
}

---
 tests/qtest/bios-tables-test-allowed-diff.h |  34 --------------------
 tests/data/acpi/pc/DSDT                     | Bin 6496 -> 6501 bytes
 tests/data/acpi/pc/DSDT.acpierst            | Bin 6456 -> 6461 bytes
 tests/data/acpi/pc/DSDT.acpihmat            | Bin 7821 -> 7826 bytes
 tests/data/acpi/pc/DSDT.bridge              | Bin 9570 -> 9575 bytes
 tests/data/acpi/pc/DSDT.cphp                | Bin 6960 -> 6965 bytes
 tests/data/acpi/pc/DSDT.dimmpxm             | Bin 8150 -> 8155 bytes
 tests/data/acpi/pc/DSDT.hpbridge            | Bin 6456 -> 6461 bytes
 tests/data/acpi/pc/DSDT.hpbrroot            | Bin 3107 -> 3107 bytes
 tests/data/acpi/pc/DSDT.ipmikcs             | Bin 6568 -> 6573 bytes
 tests/data/acpi/pc/DSDT.memhp               | Bin 7855 -> 7860 bytes
 tests/data/acpi/pc/DSDT.nohpet              | Bin 6354 -> 6359 bytes
 tests/data/acpi/pc/DSDT.numamem             | Bin 6502 -> 6507 bytes
 tests/data/acpi/pc/DSDT.roothp              | Bin 6694 -> 6699 bytes
 tests/data/acpi/q35/DSDT                    | Bin 8407 -> 8412 bytes
 tests/data/acpi/q35/DSDT.acpierst           | Bin 8424 -> 8429 bytes
 tests/data/acpi/q35/DSDT.acpihmat           | Bin 9732 -> 9737 bytes
 tests/data/acpi/q35/DSDT.applesmc           | Bin 8453 -> 8458 bytes
 tests/data/acpi/q35/DSDT.bridge             | Bin 11536 -> 11541 bytes
 tests/data/acpi/q35/DSDT.cphp               | Bin 8871 -> 8876 bytes
 tests/data/acpi/q35/DSDT.cxl                | Bin 9733 -> 9738 bytes
 tests/data/acpi/q35/DSDT.dimmpxm            | Bin 10061 -> 10066 bytes
 tests/data/acpi/q35/DSDT.ipmibt             | Bin 8482 -> 8487 bytes
 tests/data/acpi/q35/DSDT.ipmismbus          | Bin 8495 -> 8500 bytes
 tests/data/acpi/q35/DSDT.ivrs               | Bin 8424 -> 8429 bytes
 tests/data/acpi/q35/DSDT.memhp              | Bin 9766 -> 9771 bytes
 tests/data/acpi/q35/DSDT.mmio64             | Bin 9537 -> 9542 bytes
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 8727 -> 8732 bytes
 tests/data/acpi/q35/DSDT.nohpet             | Bin 8265 -> 8270 bytes
 tests/data/acpi/q35/DSDT.numamem            | Bin 8413 -> 8418 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa        | Bin 8508 -> 8513 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12          | Bin 9013 -> 9018 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2           | Bin 9039 -> 9044 bytes
 tests/data/acpi/q35/DSDT.viot               | Bin 9516 -> 9521 bytes
 tests/data/acpi/q35/DSDT.xapic              | Bin 35770 -> 35775 bytes
 35 files changed, 34 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -34
index 725a1dc798..dfb8523c8b 100644
@@ -1,35 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index 5b4624cb68c78eab6e356987974b9bee6c9a1785..f1cf7fab349bd26e0f0fa461c715534c1426fbf5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 99461b771eec2043263b5bc3c109a08969a99af9..5cb477625e96f5526f0c7703ba3b443a0b35eefd 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index b84f3b47c37e427b927c36036307db6e83a843e5..76e8bef36fdb667447ad0320d35604031aae2c93 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index 6771620078086e42b445474b16797094e0d0a801..c94c1b54b3ac3085c02307d9564b258e791fcf1e 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index 298fa1592676b3a2089b08eff5f764e04391b961..eb3da0e232e4362bd5850e4eebf5916cbc1d565a 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 9fcadb266b92fc4942621f0fd919703723de2fd9..6553e4c6053aff76ac42dad87d714e4e9ab28f72 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 99461b771eec2043263b5bc3c109a08969a99af9..5cb477625e96f5526f0c7703ba3b443a0b35eefd 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index b10b17cb1111f6b5d61da4aa1c754f2921a4ac1c..ff04ad360beb60571d48bd1e477a4e58e5ee9337 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index aff3e9bbe1fdbf783c49d07a49c2e16317a2871e..83eec58a52b5844a02003665494f63a4ea0b26a7 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 07b193b9939e2199bce5edc743de5494133c1e8c..9e2201d170a86652951a2a4b234bb58204010642 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index ceee7722ceed8a7e8f61a37805a4c855f47244a8..c969e0dae410763a5f749c4c4fc842ccbf901fc5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index e03f4d07b86018d12def37b5397ba9673548e2b7..1cecaa64e9ef29b5096ae1ba4882e2c8e080f0ea 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 418cc92e4c061ad21e1d281e0b5e6114e283b7d3..f57a14cd5c48ddded4c5d0b7da037b9d021a9ecb 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index c8a2b5df26608f10c75ab8f2f9e404fda987891b..8e989819a5f8c470a8933bf9b7af7b988048cce6 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index eb63e439b92424e4c50b7e5f1df92da54ecfc6ea..03745d78de4c7e9639a4a37553361e0e18258633 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index f9199a0dd614b30c9e73eb7de7e051ce84c1d73f..3ad9ba3c987ca1cfbafc3778db889602ab53530e 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index 286a4ecec273ca0e2fe2d65f80e8566a68a2f794..5f01572dc2cf44aa0e730401e0709b95cd8db604 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index 9a733a54e428d3506aaf73f8d4c1f28324a71a42..97141f9db208e1948bc2bdb3f3452ac8f78f98b0 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 8579626c7f1f035c8d400544c2af6ce6372a5625..622e8e5f3700abffc58683689b9470573c117cd0 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 96594c00b3b0e0a4933d6d851d927487ad4d18eb..cecc1caaab81db8559781d23e45d8c615dc73740 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index e2a3ecf7d90c8c411550505c3b70bf8d19ba4bc9..e5be00b4fa658477a9ae7016ed72ae04430a3b2f 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index 427272b95692099edc47f569e41fbb3ba69f6b60..c4f8212c63be2a1d579d6ebc9ac41d4bd5be414b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 794779e75aaf33902de834caaa6b0763c4513615..05fb38820fa9213a20ace5943486ed18ad6a765c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index eb63e439b92424e4c50b7e5f1df92da54ecfc6ea..03745d78de4c7e9639a4a37553361e0e18258633 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 923e213ab6a3c82faa6f659c29de9c8afb6878dd..2a4635d48c017970ee38d14148b20d38b699b030 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index a77aa37ca0bb407abbef134e8dce4461070856a2..0491761dc7132460b08b443579f0d4cad3fa3163 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 43469e6c89813025b902534ed61d39ad940ff7bb..485f571afd35cbd2044baeb7027ef077ba9a133d 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index e17b252b03b290ba39601afffbee66159a57bfb1..9c2ec9f2c96f6bdf536c28559fd804523134cf2c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index ade716519de8bd626b3cddee686f55757bb4eb35..2302de88e93a22118889cd33a8c63811925cff02 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index b6740b1ec2f4e01bdbdc34bc8bf0a2c36f134671..5e4b51d33b8bb88ca2610254e6306c16e5b5b0db 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index 5bc095351fd009fb2171daaa4f824c5cc9f36819..1723fca4464383694f806f93331d008e84b93fef 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 47417f47f7e25576f31207cb0b752b8c086a4480..1a0d6284da01addd0393b8aad96873398411895e 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index 574b8a0094c556cd8555b7a4e1b92b2d5f64750a..6927d1cc96565f0e1e4c7f19fd709635873db912 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 74381116ad7f01a860fee9201df38d1ea24a0be6..4a8a4af625edb1fd01a1404e33f34e85c1a252f3 100644
GIT binary patch
Signature · 1 line
2.31.1
#16 lore raw
In reply to Igor Mammedov
Quoted 11 lines · On Mon, 17 Oct 2022 12:21:35 +0200 Igor Mammedov <[email protected]> wrote:

Series continues refactoring started at recently merged [1]. It replaces special cases/quirks for ISA/SMB bridges and PCI attached VGA devices with generic AcpiDevAmlIf interface, which allows device to provide its own AML description without need for adhoc plumbing in generic DSDT or PCI enumeration code.

PS:
at the end, \_GPE clean up patches which are not part of AcpiDevAmlIf refactoring but iti's still related to PCI, so I've included them there as well.

ping

Quoted 69 lines

1)
https://patchwork.ozlabs.org/project/qemu-devel/list/?series=303856

Igor Mammedov (11):
acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device
descriptors
tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML
automatically
acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus
ennumeration generate AML
tests: acpi: update expected DSDT after ISA bridge is moved directly
under PCI host bridge
tests: acpi: whitelist DSDT before generating ICH9_SMB AML
automatically
acpi: add get_dev_aml_func() helper
acpi: enumerate SMB bridge automatically along with other PCI devices
tests: acpi: update expected blobs
tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup
acpi: pc/35: sanitize _GPE declaration order
tests: acpi: update expected blobs

 hw/display/vga_int.h                  |   2 +
 include/hw/acpi/acpi_aml_interface.h  |  13 +-
 hw/display/acpi-vga-stub.c            |   7 ++
 hw/display/acpi-vga.c                 |  26 ++++
 hw/display/meson.build                |  17 +++
 hw/display/vga-pci.c                  |   4 +
 hw/i386/acpi-build.c                  | 175 +++++---------------------
 hw/isa/lpc_ich9.c                     |  23 ++++
 hw/isa/piix3.c                        |  17 ++-
 tests/data/acpi/pc/DSDT               | Bin 6422 -> 6501 bytes
 tests/data/acpi/pc/DSDT.acpierst      | Bin 6382 -> 6461 bytes
 tests/data/acpi/pc/DSDT.acpihmat      | Bin 7747 -> 7826 bytes
 tests/data/acpi/pc/DSDT.bridge        | Bin 9496 -> 9575 bytes
 tests/data/acpi/pc/DSDT.cphp          | Bin 6886 -> 6965 bytes
 tests/data/acpi/pc/DSDT.dimmpxm       | Bin 8076 -> 8155 bytes
 tests/data/acpi/pc/DSDT.hpbridge      | Bin 6382 -> 6461 bytes
 tests/data/acpi/pc/DSDT.hpbrroot      | Bin 3069 -> 3107 bytes
 tests/data/acpi/pc/DSDT.ipmikcs       | Bin 6494 -> 6573 bytes
 tests/data/acpi/pc/DSDT.memhp         | Bin 7781 -> 7860 bytes
 tests/data/acpi/pc/DSDT.nohpet        | Bin 6280 -> 6359 bytes
 tests/data/acpi/pc/DSDT.numamem       | Bin 6428 -> 6507 bytes
 tests/data/acpi/pc/DSDT.roothp        | Bin 6656 -> 6699 bytes
 tests/data/acpi/q35/DSDT              | Bin 8320 -> 8412 bytes
 tests/data/acpi/q35/DSDT.acpierst     | Bin 8337 -> 8429 bytes
 tests/data/acpi/q35/DSDT.acpihmat     | Bin 9645 -> 9737 bytes
 tests/data/acpi/q35/DSDT.applesmc     | Bin 8366 -> 8458 bytes
 tests/data/acpi/q35/DSDT.bridge       | Bin 11449 -> 11541 bytes
 tests/data/acpi/q35/DSDT.cphp         | Bin 8784 -> 8876 bytes
 tests/data/acpi/q35/DSDT.cxl          | Bin 9646 -> 9738 bytes
 tests/data/acpi/q35/DSDT.dimmpxm      | Bin 9974 -> 10066 bytes
 tests/data/acpi/q35/DSDT.ipmibt       | Bin 8395 -> 8487 bytes
 tests/data/acpi/q35/DSDT.ipmismbus    | Bin 8409 -> 8500 bytes
 tests/data/acpi/q35/DSDT.ivrs         | Bin 8337 -> 8429 bytes
 tests/data/acpi/q35/DSDT.memhp        | Bin 9679 -> 9771 bytes
 tests/data/acpi/q35/DSDT.mmio64       | Bin 9450 -> 9542 bytes
 tests/data/acpi/q35/DSDT.multi-bridge | Bin 8640 -> 8732 bytes
 tests/data/acpi/q35/DSDT.nohpet       | Bin 8178 -> 8270 bytes
 tests/data/acpi/q35/DSDT.numamem      | Bin 8326 -> 8418 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa  | Bin 8421 -> 8513 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12    | Bin 8926 -> 9018 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2     | Bin 8952 -> 9044 bytes
 tests/data/acpi/q35/DSDT.viot         | Bin 9429 -> 9521 bytes
 tests/data/acpi/q35/DSDT.xapic        | Bin 35683 -> 35775 bytes
 43 files changed, 135 insertions(+), 149 deletions(-)
 create mode 100644 hw/display/acpi-vga-stub.c
 create mode 100644 hw/display/acpi-vga.c
#17 lore raw
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Mon, 17 Oct 2022 12:21:35 +0200 Igor Mammedov <[email protected]> wrote:

Series continues refactoring started at recently merged [1]. It replaces special cases/quirks for ISA/SMB bridges and PCI attached VGA devices with generic AcpiDevAmlIf interface, which allows device to provide its own AML description without need for adhoc plumbing in generic DSDT or PCI enumeration code.

Quoted 7 lines
Quoted 4 lines

PS:
at the end, \_GPE clean up patches which are not part of AcpiDevAmlIf refactoring but iti's still related to PCI, so I've included them there as well.

ping

it's in my tree, testing found some issues (looks like they are unrelated to this patchset), debugging.

Quoted 69 lines
Quoted 69 lines

1)
https://patchwork.ozlabs.org/project/qemu-devel/list/?series=303856

Igor Mammedov (11):
acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device
descriptors
tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML
automatically
acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus
ennumeration generate AML
tests: acpi: update expected DSDT after ISA bridge is moved directly
under PCI host bridge
tests: acpi: whitelist DSDT before generating ICH9_SMB AML
automatically
acpi: add get_dev_aml_func() helper
acpi: enumerate SMB bridge automatically along with other PCI devices
tests: acpi: update expected blobs
tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup
acpi: pc/35: sanitize _GPE declaration order
tests: acpi: update expected blobs

 hw/display/vga_int.h                  |   2 +
 include/hw/acpi/acpi_aml_interface.h  |  13 +-
 hw/display/acpi-vga-stub.c            |   7 ++
 hw/display/acpi-vga.c                 |  26 ++++
 hw/display/meson.build                |  17 +++
 hw/display/vga-pci.c                  |   4 +
 hw/i386/acpi-build.c                  | 175 +++++---------------------
 hw/isa/lpc_ich9.c                     |  23 ++++
 hw/isa/piix3.c                        |  17 ++-
 tests/data/acpi/pc/DSDT               | Bin 6422 -> 6501 bytes
 tests/data/acpi/pc/DSDT.acpierst      | Bin 6382 -> 6461 bytes
 tests/data/acpi/pc/DSDT.acpihmat      | Bin 7747 -> 7826 bytes
 tests/data/acpi/pc/DSDT.bridge        | Bin 9496 -> 9575 bytes
 tests/data/acpi/pc/DSDT.cphp          | Bin 6886 -> 6965 bytes
 tests/data/acpi/pc/DSDT.dimmpxm       | Bin 8076 -> 8155 bytes
 tests/data/acpi/pc/DSDT.hpbridge      | Bin 6382 -> 6461 bytes
 tests/data/acpi/pc/DSDT.hpbrroot      | Bin 3069 -> 3107 bytes
 tests/data/acpi/pc/DSDT.ipmikcs       | Bin 6494 -> 6573 bytes
 tests/data/acpi/pc/DSDT.memhp         | Bin 7781 -> 7860 bytes
 tests/data/acpi/pc/DSDT.nohpet        | Bin 6280 -> 6359 bytes
 tests/data/acpi/pc/DSDT.numamem       | Bin 6428 -> 6507 bytes
 tests/data/acpi/pc/DSDT.roothp        | Bin 6656 -> 6699 bytes
 tests/data/acpi/q35/DSDT              | Bin 8320 -> 8412 bytes
 tests/data/acpi/q35/DSDT.acpierst     | Bin 8337 -> 8429 bytes
 tests/data/acpi/q35/DSDT.acpihmat     | Bin 9645 -> 9737 bytes
 tests/data/acpi/q35/DSDT.applesmc     | Bin 8366 -> 8458 bytes
 tests/data/acpi/q35/DSDT.bridge       | Bin 11449 -> 11541 bytes
 tests/data/acpi/q35/DSDT.cphp         | Bin 8784 -> 8876 bytes
 tests/data/acpi/q35/DSDT.cxl          | Bin 9646 -> 9738 bytes
 tests/data/acpi/q35/DSDT.dimmpxm      | Bin 9974 -> 10066 bytes
 tests/data/acpi/q35/DSDT.ipmibt       | Bin 8395 -> 8487 bytes
 tests/data/acpi/q35/DSDT.ipmismbus    | Bin 8409 -> 8500 bytes
 tests/data/acpi/q35/DSDT.ivrs         | Bin 8337 -> 8429 bytes
 tests/data/acpi/q35/DSDT.memhp        | Bin 9679 -> 9771 bytes
 tests/data/acpi/q35/DSDT.mmio64       | Bin 9450 -> 9542 bytes
 tests/data/acpi/q35/DSDT.multi-bridge | Bin 8640 -> 8732 bytes
 tests/data/acpi/q35/DSDT.nohpet       | Bin 8178 -> 8270 bytes
 tests/data/acpi/q35/DSDT.numamem      | Bin 8326 -> 8418 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa  | Bin 8421 -> 8513 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12    | Bin 8926 -> 9018 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2     | Bin 8952 -> 9044 bytes
 tests/data/acpi/q35/DSDT.viot         | Bin 9429 -> 9521 bytes
 tests/data/acpi/q35/DSDT.xapic        | Bin 35683 -> 35775 bytes
 43 files changed, 135 insertions(+), 149 deletions(-)
 create mode 100644 hw/display/acpi-vga-stub.c
 create mode 100644 hw/display/acpi-vga.c