qemu/tests/data/acpi/q35
Ani Sinha a8339e07f9 tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge test
We added a new unit test for testing acpi hotplug on multifunction bridges in
q35 machines. Here, we update the DSDT table gloden master blob for this unit
test.

The test adds the following devices to qemu and then checks the changes
introduced in the DSDT table due to the addition of the following devices:

(a) a multifunction bridge device
(b) a bridge device with function 1
(c) a non-bridge device with function 2

In the DSDT table, we should see AML hotplug descriptions for (a) and (b).
For (a) we should find a hotplug AML description for function 0.

Following is the ASL diff between the original DSDT table and the modified DSDT
table due to the unit test. We see that multifunction bridge on bus 2 and single
function bridge on bus 3 function 1 are described, not the non-bridge balloon
device on bus 4, function 2.

@@ -1,30 +1,30 @@
 /*
  * Intel ACPI Component Architecture
  * AML/ASL+ Disassembler version 20190509 (64-bit version)
  * Copyright (c) 2000 - 2019 Intel Corporation
  *
  * Disassembling to symbolic ASL+ operators
  *
- * Disassembly of tests/data/acpi/q35/DSDT, Thu Oct  7 18:29:19 2021
+ * Disassembly of /tmp/aml-C7JCA1, Thu Oct  7 18:29:19 2021
  *
  * Original Table Header:
  *     Signature        "DSDT"
- *     Length           0x00002061 (8289)
+ *     Length           0x00002187 (8583)
  *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
- *     Checksum         0xF9
+ *     Checksum         0x8D
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "BXPC    "
  *     OEM Revision     0x00000001 (1)
  *     Compiler ID      "BXPC"
  *     Compiler Version 0x00000001 (1)
  */
 DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
 {
     Scope (\)
     {
         OperationRegion (DBG, SystemIO, 0x0402, One)
         Field (DBG, ByteAcc, NoLock, Preserve)
         {
             DBGB,   8
         }

@@ -3265,23 +3265,95 @@
                 Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
                 {
                     Return (Zero)
                 }

                 Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
                 {
                     Return (Zero)
                 }

                 Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                 {
                     Return (Zero)
                 }
             }

+            Device (S10)
+            {
+                Name (_ADR, 0x00020000)  // _ADR: Address
+                Name (BSEL, One)
+                Device (S00)
+                {
+                    Name (_SUN, Zero)  // _SUN: Slot User Number
+                    Name (_ADR, Zero)  // _ADR: Address
+                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device, x=0-9
+                    {
+                        PCEJ (BSEL, _SUN)
+                    }
+
+                    Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
+                    {
+                        Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+                    }
+                }
+
+                Method (DVNT, 2, NotSerialized)
+                {
+                    If ((Arg0 & One))
+                    {
+                        Notify (S00, Arg1)
+                    }
+                }
+
+                Method (PCNT, 0, NotSerialized)
+                {
+                    BNUM = One
+                    DVNT (PCIU, One)
+                    DVNT (PCID, 0x03)
+                }
+            }
+
+            Device (S19)
+            {
+                Name (_ADR, 0x00030001)  // _ADR: Address
+                Name (BSEL, Zero)
+                Device (S00)
+                {
+                    Name (_SUN, Zero)  // _SUN: Slot User Number
+                    Name (_ADR, Zero)  // _ADR: Address
+                    Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device, x=0-9
+                    {
+                        PCEJ (BSEL, _SUN)
+                    }
+
+                    Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
+                    {
+                        Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+                    }
+                }
+
+                Method (DVNT, 2, NotSerialized)
+                {
+                    If ((Arg0 & One))
+                    {
+                        Notify (S00, Arg1)
+                    }
+                }
+
+                Method (PCNT, 0, NotSerialized)
+                {
+                    BNUM = Zero
+                    DVNT (PCIU, One)
+                    DVNT (PCID, 0x03)
+                }
+            }
+
             Method (PCNT, 0, NotSerialized)
             {
+                ^S19.PCNT ()
+                ^S10.PCNT ()
             }
         }
     }
 }

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20211007135750.1277213-4-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
2021-10-20 06:18:17 -04:00
..
APIC tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
APIC.acpihmat tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
APIC.cphp tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
APIC.dimmpxm tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
APIC.xapic tests: acpi: update expected tables blobs 2021-10-20 04:37:55 -04:00
DMAR.dmar tests: acpi: add expected blob for DMAR table 2021-10-20 04:37:55 -04:00
DSDT bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.acpihmat bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.bridge bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.cphp bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.dimmpxm bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.ipmibt bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.ivrs tests: acpi: update expected blobs 2021-10-20 04:37:55 -04:00
DSDT.memhp bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.mmio64 bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.multi-bridge tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge test 2021-10-20 06:18:17 -04:00
DSDT.nohpet bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.numamem bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.tis.tpm2 bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.tis.tpm12 bios-tables-test: Update ACPI DSDT table golden blobs for q35 2021-10-05 17:30:57 -04:00
DSDT.xapic tests: acpi: update expected tables blobs 2021-10-20 04:37:55 -04:00
FACP tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
FACP.nosmm qtest/acpi/bios-tables-test: update acpi tables 2021-02-23 10:58:42 -05:00
FACP.xapic tests: acpi: update expected tables blobs 2021-10-20 04:37:55 -04:00
FACS tests: Move tests/acpi-test-data/ to tests/data/acpi/ 2018-11-05 13:23:31 -05:00
HMAT.acpihmat tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
HPET tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
IVRS.ivrs tests: acpi: update expected blobs 2021-10-20 04:37:55 -04:00
MCFG tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
NFIT.dimmpxm tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SLIT.cphp tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SLIT.memhp tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SRAT.acpihmat tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SRAT.cphp tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SRAT.dimmpxm tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SRAT.memhp tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SRAT.mmio64 tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SRAT.numamem tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
SRAT.xapic tests: acpi: update expected tables blobs 2021-10-20 04:37:55 -04:00
SSDT.dimmpxm tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00
TCPA.tis.tpm12 tests: acpi: tpm1.2: Add expected TPM 1.2 ACPI blobs 2021-08-31 17:33:12 -04:00
TPM2.tis.tpm2 tests: acpi: tpm2: Add the renamed ACPI files and drop old ones 2021-08-31 17:33:12 -04:00
WAET tests/acpi: update expected data files 2021-02-05 08:52:59 -05:00