Skip to contentSkip to conversation

Some cleanup in arm/virt/acpi

PATCH Applied Heyi Guo 3 participants 12 messages Feb 4, 2020 – Feb 11, 2020

lore
Share & tools
lore

Heyi Guo

author
#0 lore raw

v3 cover Some cleanup in arm/virt/acpi

Remove conflict _ADR objects, and fix and refine PCI device definition in ACPI/DSDT.

History:

v3 -> v2:
- update commit message for patch 4/7.
- remove diff keywords in commit message of patch 7/7 to avoid applying patch failure.

v1 -> v2:
- flow the work flow in tests/qtest/bios-table-test.c to post ACPI related patches.
- update commit messages for removing "RP0" and "_ADR".
- add 3 more cleanup patches.

Cc Peter Maydell <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Igor Mammedov <[email protected]>
Cc Shannon Zhao <[email protected]>

Heyi Guo (7):
bios-tables-test: prepare to change ARM virt ACPI DSDT arm/virt/acpi: remove meaningless sub device "RP0" from PCI0 arm/virt/acpi: remove _ADR from devices identified by _HID arm/acpi: fix PCI _PRT definition
arm/acpi: fix duplicated _UID of PCI interrupt link devices arm/acpi: simplify the description of PCI _CRS virt/acpi: update golden masters for DSDT update

 hw/arm/virt-acpi-build.c          |  25 ++++++-------------------
 tests/data/acpi/virt/DSDT         | Bin 18462 -> 5307 bytes
 tests/data/acpi/virt/DSDT.memhp   | Bin 19799 -> 6644 bytes
 tests/data/acpi/virt/DSDT.numamem | Bin 18462 -> 5307 bytes
 4 files changed, 6 insertions(+), 19 deletions(-)
Signature · 1 line
2.19.1
author
#1 lore raw

PATCH v3 1/7 bios-tables-test: prepare to change ARM virt ACPI DSDT

We are going to change ARM virt ACPI DSDT table, which will cause make check to fail, so temporarily add related golden masters to ignore list.

---
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 tests/qtest/bios-tables-test-allowed-diff.h | 3 +++
 1 file changed, 3 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +3 -0
index dfb8523c8b..32a401ae35 100644
@@ -1 +1,4 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/virt/DSDT",
+"tests/data/acpi/virt/DSDT.memhp",
+"tests/data/acpi/virt/DSDT.numamem",
Signature · 1 line
2.19.1
author
#2 lore raw

PATCH v3 2/7 arm/virt/acpi: remove meaningless sub device "RP0" from PCI0

In reply to Heyi Guo

The sub device "RP0" under PCI0 in ACPI/DSDT does not contain any method or property other than "_ADR", so it is safe to remove it.

---
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/virt-acpi-build.c | 4 ----
 1 file changed, 4 deletions(-)
hw/arm/virt-acpi-build.c +0 -4
index bd5f771e9b..9f4c7d1889 100644
@@ -317,10 +317,6 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
     aml_append(method, aml_return(buf));
     aml_append(dev, method);
 
-    Aml *dev_rp0 = aml_device("%s", "RP0");
-    aml_append(dev_rp0, aml_name_decl("_ADR", aml_int(0)));
-    aml_append(dev, dev_rp0);
-
     Aml *dev_res0 = aml_device("%s", "RES0");
     aml_append(dev_res0, aml_name_decl("_HID", aml_string("PNP0C02")));
     crs = aml_resource_template();
Signature · 1 line
2.19.1
Reviewed-by on v3 2/7
#3 lore raw

Re: [PATCH v3 2/7] arm/virt/acpi: remove meaningless sub device "RP0" from PCI0

Quoted 5 lines · Heyi Guo

The sub device "RP0" under PCI0 in ACPI/DSDT does not contain any method or property other than "_ADR", so it is safe to remove it.

Quoted 28 lines

---
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/virt-acpi-build.c | 4 ----
 1 file changed, 4 deletions(-)
hw/arm/virt-acpi-build.c +0 -4
index bd5f771e9b..9f4c7d1889 100644
@@ -317,10 +317,6 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
     aml_append(method, aml_return(buf));
     aml_append(dev, method);
 
-    Aml *dev_rp0 = aml_device("%s", "RP0");
-    aml_append(dev_rp0, aml_name_decl("_ADR", aml_int(0)));
-    aml_append(dev, dev_rp0);
-
     Aml *dev_res0 = aml_device("%s", "RES0");
     aml_append(dev_res0, aml_name_decl("_HID", aml_string("PNP0C02")));
     crs = aml_resource_template();
Signature · 1 line
2.19.1
author
#4 lore raw

PATCH v3 3/7 arm/virt/acpi: remove _ADR from devices identified by _HID

In reply to Heyi Guo

According to ACPI spec, _ADR should be used for device on a bus that has a standard enumeration algorithm, but not for device which is on system bus and must be enumerated by OSPM. And it is not recommended to contain both _HID and _ADR in a single device.

See ACPI 6.3, section 6.1, top of page 343:

A device object must contain either an _HID object or an _ADR object, but should not contain both.

(https://uefi.org/sites/default/files/resources/ACPI_6_3_May16.pdf)

---
Cc: Shannon Zhao <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/virt-acpi-build.c | 8 --------
 1 file changed, 8 deletions(-)
hw/arm/virt-acpi-build.c +0 -8
index 9f4c7d1889..be752c0ad8 100644
@@ -78,11 +78,6 @@ static void acpi_dsdt_add_uart(Aml *scope, const MemMapEntry *uart_memmap,
                              AML_EXCLUSIVE, &uart_irq, 1));
     aml_append(dev, aml_name_decl("_CRS", crs));
 
-    /* The _ADR entry is used to link this device to the UART described
-     * in the SPCR table, i.e. SPCR.base_address.address == _ADR.
-     */
-    aml_append(dev, aml_name_decl("_ADR", aml_int(uart_memmap->base)));
-
     aml_append(scope, dev);
 }
 
@@ -170,7 +165,6 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
     aml_append(dev, aml_name_decl("_CID", aml_string("PNP0A03")));
     aml_append(dev, aml_name_decl("_SEG", aml_int(0)));
     aml_append(dev, aml_name_decl("_BBN", aml_int(0)));
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
     aml_append(dev, aml_name_decl("_UID", aml_string("PCI0")));
     aml_append(dev, aml_name_decl("_STR", aml_unicode("PCIe 0 Device")));
     aml_append(dev, aml_name_decl("_CCA", aml_int(1)));
@@ -334,7 +328,6 @@ static void acpi_dsdt_add_gpio(Aml *scope, const MemMapEntry *gpio_memmap,
 {
     Aml *dev = aml_device("GPO0");
     aml_append(dev, aml_name_decl("_HID", aml_string("ARMH0061")));
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
     aml_append(dev, aml_name_decl("_UID", aml_int(0)));
 
     Aml *crs = aml_resource_template();
@@ -364,7 +357,6 @@ static void acpi_dsdt_add_power_button(Aml *scope)
 {
     Aml *dev = aml_device(ACPI_POWER_BUTTON_DEVICE);
     aml_append(dev, aml_name_decl("_HID", aml_string("PNP0C0C")));
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
     aml_append(dev, aml_name_decl("_UID", aml_int(0)));
     aml_append(scope, dev);
 }
Signature · 1 line
2.19.1
Reviewed-by on v3 3/7
#5 lore raw

Re: [PATCH v3 3/7] arm/virt/acpi: remove _ADR from devices identified by _HID

Quoted 7 lines · Heyi Guo

According to ACPI spec, _ADR should be used for device on a bus that has a standard enumeration algorithm, but not for device which is on system bus and must be enumerated by OSPM. And it is not recommended to contain both _HID and _ADR in a single device.

See ACPI 6.3, section 6.1, top of page 343:

Quoted 8 lines

A device object must contain either an _HID object or an _ADR object, but should not contain both.

(https://uefi.org/sites/default/files/resources/ACPI_6_3_May16.pdf)

Quoted 53 lines

---
Cc: Shannon Zhao <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/virt-acpi-build.c | 8 --------
 1 file changed, 8 deletions(-)
hw/arm/virt-acpi-build.c +0 -8
index 9f4c7d1889..be752c0ad8 100644
@@ -78,11 +78,6 @@ static void acpi_dsdt_add_uart(Aml *scope, const MemMapEntry *uart_memmap,
                              AML_EXCLUSIVE, &uart_irq, 1));
     aml_append(dev, aml_name_decl("_CRS", crs));
 
-    /* The _ADR entry is used to link this device to the UART described
-     * in the SPCR table, i.e. SPCR.base_address.address == _ADR.
-     */
-    aml_append(dev, aml_name_decl("_ADR", aml_int(uart_memmap->base)));
-
     aml_append(scope, dev);
 }
 
@@ -170,7 +165,6 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
     aml_append(dev, aml_name_decl("_CID", aml_string("PNP0A03")));
     aml_append(dev, aml_name_decl("_SEG", aml_int(0)));
     aml_append(dev, aml_name_decl("_BBN", aml_int(0)));
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
     aml_append(dev, aml_name_decl("_UID", aml_string("PCI0")));
     aml_append(dev, aml_name_decl("_STR", aml_unicode("PCIe 0 Device")));
     aml_append(dev, aml_name_decl("_CCA", aml_int(1)));
@@ -334,7 +328,6 @@ static void acpi_dsdt_add_gpio(Aml *scope, const MemMapEntry *gpio_memmap,
 {
     Aml *dev = aml_device("GPO0");
     aml_append(dev, aml_name_decl("_HID", aml_string("ARMH0061")));
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
     aml_append(dev, aml_name_decl("_UID", aml_int(0)));
 
     Aml *crs = aml_resource_template();
@@ -364,7 +357,6 @@ static void acpi_dsdt_add_power_button(Aml *scope)
 {
     Aml *dev = aml_device(ACPI_POWER_BUTTON_DEVICE);
     aml_append(dev, aml_name_decl("_HID", aml_string("PNP0C0C")));
-    aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
     aml_append(dev, aml_name_decl("_UID", aml_int(0)));
     aml_append(scope, dev);
 }
Signature · 1 line
2.19.1
author
#6 lore raw

PATCH v3 4/7 arm/acpi: fix PCI _PRT definition

In reply to Heyi Guo

The address field in each _PRT mapping package should be constructed with high word for device# and low word for function#, so it is wrong to use bus_no as the high word. The existing code adds a bunch useless entries with device #s above 31. Enumerate all possible slots (i.e. PCI_SLOT_MAX) instead.

---
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/virt-acpi-build.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
hw/arm/virt-acpi-build.c +5 -5
index be752c0ad8..5d157a9dd5 100644
@@ -151,7 +151,7 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
 {
     int ecam_id = VIRT_ECAM_ID(highmem_ecam);
     Aml *method, *crs, *ifctx, *UUID, *ifctx1, *elsectx, *buf;
-    int i, bus_no;
+    int i, slot_no;
     hwaddr base_mmio = memmap[VIRT_PCIE_MMIO].base;
     hwaddr size_mmio = memmap[VIRT_PCIE_MMIO].size;
     hwaddr base_pio = memmap[VIRT_PCIE_PIO].base;
@@ -170,12 +170,12 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
     aml_append(dev, aml_name_decl("_CCA", aml_int(1)));
 
     /* Declare the PCI Routing Table. */
-    Aml *rt_pkg = aml_varpackage(nr_pcie_buses * PCI_NUM_PINS);
-    for (bus_no = 0; bus_no < nr_pcie_buses; bus_no++) {
+    Aml *rt_pkg = aml_varpackage(PCI_SLOT_MAX * PCI_NUM_PINS);
+    for (slot_no = 0; slot_no < PCI_SLOT_MAX; slot_no++) {
         for (i = 0; i < PCI_NUM_PINS; i++) {
-            int gsi = (i + bus_no) % PCI_NUM_PINS;
+            int gsi = (i + slot_no) % PCI_NUM_PINS;
             Aml *pkg = aml_package(4);
-            aml_append(pkg, aml_int((bus_no << 16) | 0xFFFF));
+            aml_append(pkg, aml_int((slot_no << 16) | 0xFFFF));
             aml_append(pkg, aml_int(i));
             aml_append(pkg, aml_name("GSI%d", gsi));
             aml_append(pkg, aml_int(0));
Signature · 1 line
2.19.1
author
#7 lore raw

PATCH v3 5/7 arm/acpi: fix duplicated _UID of PCI interrupt link devices

In reply to Heyi Guo

Using _UID of 0 for all PCI interrupt link devices absolutely violates the spec. Simply increase one by one.

---
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/virt-acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/virt-acpi-build.c +1 -1
index 5d157a9dd5..f3e340b172 100644
@@ -189,7 +189,7 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
         uint32_t irqs =  irq + i;
         Aml *dev_gsi = aml_device("GSI%d", i);
         aml_append(dev_gsi, aml_name_decl("_HID", aml_string("PNP0C0F")));
-        aml_append(dev_gsi, aml_name_decl("_UID", aml_int(0)));
+        aml_append(dev_gsi, aml_name_decl("_UID", aml_int(i)));
         crs = aml_resource_template();
         aml_append(crs,
                    aml_interrupt(AML_CONSUMER, AML_LEVEL, AML_ACTIVE_HIGH,
Signature · 1 line
2.19.1
author
#8 lore raw

PATCH v3 6/7 arm/acpi: simplify the description of PCI _CRS

In reply to Heyi Guo

The original code defines a named object for the resource template but then returns the resource template object itself; the resulted output is like below:

Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings

{
    Name (RBUF, ResourceTemplate ()
    {
        WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
            0x0000,             // Granularity
            0x0000,             // Range Minimum
            0x00FF,             // Range Maximum
            0x0000,             // Translation Offset
            0x0100,             // Length
            ,, )
        ......
    })
    Return (ResourceTemplate ()
    {
        WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
            0x0000,             // Granularity
            0x0000,             // Range Minimum
            0x00FF,             // Range Maximum
            0x0000,             // Translation Offset
            0x0100,             // Length
            ,, )
        ......
    })
}

So the named object "RBUF" is actually useless. The more natural way is to return RBUF instead, or simply drop RBUF definition.

Choose the latter one to simplify the code.

---
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/virt-acpi-build.c | 1 -
 1 file changed, 1 deletion(-)
hw/arm/virt-acpi-build.c +0 -1
index f3e340b172..fb4b166f82 100644
@@ -236,7 +236,6 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
                              size_mmio_high));
     }
 
-    aml_append(method, aml_name_decl("RBUF", rbuf));
     aml_append(method, aml_return(rbuf));
     aml_append(dev, method);
 
Signature · 1 line
2.19.1
author
#9 lore raw

PATCH v3 7/7 virt/acpi: update golden masters for DSDT update

In reply to Heyi Guo

Differences between disassembled ASL files:

@@ -5,13 +5,13 @@
*
* Disassembling to symbolic ASL+ operators *
- * Disassembly of DSDT, Thu Jan 23 16:00:04 2020
+ * Disassembly of DSDT.new, Thu Jan 23 16:47:12 2020 *
* Original Table Header:

  *     Signature        "DSDT"
- *     Length           0x0000481E (18462)
+ *     Length           0x000014BB (5307)
  *     Revision         0x02
- *     Checksum         0x60
+ *     Checksum         0xD1
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "BXPCDSDT"
  *     OEM Revision     0x00000001 (1)
@@ -43,7 +43,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
                     0x00000021,
                 }
             })
-            Name (_ADR, 0x09000000)  // _ADR: Address
         }

         Device (FLS0)

@@ -668,11 +667,10 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID Name (_SEG, Zero) // _SEG: PCI Segment
Name (_BBN, Zero) // _BBN: BIOS Bus Number
- Name (_ADR, Zero) // _ADR: Address
Name (_UID, "PCI0") // _UID: Unique ID
Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String Name (_CCA, One) // _CCA: Cache Coherency Attribute
- Name (_PRT, Package (0x0400) // _PRT: PCI Routing Table
+ Name (_PRT, Package (0x80) // _PRT: PCI Routing Table

             {
                 Package (0x04)
                 {
@@ -1696,7174 +1694,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
                     0x03,
                     GSI2,
                     Zero

- },
-
- Package (0x04)
- {

-                    0x0020FFFF,
-                    Zero,
-                    GSI0,
-                    Zero

- },
-
- *Omit the other (4 * (256 - 32) - 2) packages*
-
- Package (0x04)
- {

-                    0x00FFFFFF,
-                    0x03,
-                    GSI2,
-                    Zero
                 }
             })
             Device (GSI0)

@@ -8892,7 +1722,7 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
Device (GSI1)
{
Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */) // _HID: Hardware ID
- Name (_UID, Zero) // _UID: Unique ID
+ Name (_UID, One) // _UID: Unique ID
Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings {
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
@@ -8915,7 +1745,7 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
Device (GSI2)
{
Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */) // _HID: Hardware ID

-                Name (_UID, Zero)  // _UID: Unique ID
+                Name (_UID, 0x02)  // _UID: Unique ID

Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings {
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
@@ -8938,7 +1768,7 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
Device (GSI3)
{
Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */) // _HID: Hardware ID

-                Name (_UID, Zero)  // _UID: Unique ID
+                Name (_UID, 0x03)  // _UID: Unique ID

Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings {
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
@@ -8965,37 +1795,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)

Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings {
- Name (RBUF, ResourceTemplate ()
- {
- WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,

-                        0x0000,             // Granularity
-                        0x0000,             // Range Minimum
-                        0x00FF,             // Range Maximum
-                        0x0000,             // Translation Offset
-                        0x0100,             // Length
-                        ,, )
-                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
-                        0x00000000,         // Granularity
-                        0x10000000,         // Range Minimum
-                        0x3EFEFFFF,         // Range Maximum
-                        0x00000000,         // Translation Offset
-                        0x2EFF0000,         // Length
-                        ,, , AddressRangeMemory, TypeStatic)
-                    DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
-                        0x00000000,         // Granularity
-                        0x00000000,         // Range Minimum
-                        0x0000FFFF,         // Range Maximum
-                        0x3EFF0000,         // Translation Offset
-                        0x00010000,         // Length
-                        ,, , TypeStatic, DenseTranslation)
-                    QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
-                        0x0000000000000000, // Granularity
-                        0x0000008000000000, // Range Minimum
-                        0x000000FFFFFFFFFF, // Range Maximum
-                        0x0000000000000000, // Translation Offset
-                        0x0000008000000000, // Length
-                        ,, , AddressRangeMemory, TypeStatic)

- })
Return (ResourceTemplate ()
{
WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
@@ -9080,11 +1879,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)

                 })
             }

- Device (RP0)
- {
- Name (_ADR, Zero) // _ADR: Address
- }
-
Device (RES0)
{
Name (_HID, "PNP0C02" /* PNP Motherboard Resources */) // _HID: Hardware ID
@@ -9131,7 +1925,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
Device (PWRB)
{
Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID
- Name (_ADR, Zero) // _ADR: Address

             Name (_UID, Zero)  // _UID: Unique ID
         }
     }

The differences between the two versions of DSDT.memhp are almost the same as the above, except for total length and checksum.

DSDT.numamem binary is just the same with DSDT on virt machine, so we don't show the differences again.

---
Cc: Peter Maydell <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 tests/data/acpi/virt/DSDT                   | Bin 18462 -> 5307 bytes
 tests/data/acpi/virt/DSDT.memhp             | Bin 19799 -> 6644 bytes
 tests/data/acpi/virt/DSDT.numamem           | Bin 18462 -> 5307 bytes
 tests/qtest/bios-tables-test-allowed-diff.h |   3 ---
 4 files changed, 3 deletions(-)
tests/data/acpi/virt/DSDT binary +0 -0
index d0f3afeb134fdf1c11f64cd06dbcdd30be603b80..d6f5c617881c4247f55d4dcd06581f9693916b2f 100644
GIT binary patch
tests/data/acpi/virt/DSDT.memhp binary +0 -0
index 41ccc6431b917252bcbaac86c33b340c796be5ce..c527ac4739af3df3c3e042bf91c412033a2b73c3 100644
GIT binary patch
tests/data/acpi/virt/DSDT.numamem binary +0 -0
index d0f3afeb134fdf1c11f64cd06dbcdd30be603b80..d6f5c617881c4247f55d4dcd06581f9693916b2f 100644
GIT binary patch
tests/qtest/bios-tables-test-allowed-diff.h +0 -3
index 32a401ae35..dfb8523c8b 100644
@@ -1,4 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/virt/DSDT",
-"tests/data/acpi/virt/DSDT.memhp",
-"tests/data/acpi/virt/DSDT.numamem",
Signature · 1 line
2.19.1
author
#10 lore raw
In reply to Heyi Guo

Hi Peter,

Do you have any other comments? If not, could you help to merge into your tree?

Thanks,

Heyi

Quoted 38 lines · Heyi Guo

Remove conflict _ADR objects, and fix and refine PCI device definition in ACPI/DSDT.

History:

v3 -> v2:
- update commit message for patch 4/7.
- remove diff keywords in commit message of patch 7/7 to avoid applying patch failure.

v1 -> v2:
- flow the work flow in tests/qtest/bios-table-test.c to post ACPI related patches.
- update commit messages for removing "RP0" and "_ADR".
- add 3 more cleanup patches.

Cc Peter Maydell <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Igor Mammedov <[email protected]>
Cc Shannon Zhao <[email protected]>

Heyi Guo (7):
bios-tables-test: prepare to change ARM virt ACPI DSDT arm/virt/acpi: remove meaningless sub device "RP0" from PCI0 arm/virt/acpi: remove _ADR from devices identified by _HID arm/acpi: fix PCI _PRT definition
arm/acpi: fix duplicated _UID of PCI interrupt link devices arm/acpi: simplify the description of PCI _CRS virt/acpi: update golden masters for DSDT update

  hw/arm/virt-acpi-build.c          |  25 ++++++-------------------
  tests/data/acpi/virt/DSDT         | Bin 18462 -> 5307 bytes
  tests/data/acpi/virt/DSDT.memhp   | Bin 19799 -> 6644 bytes
  tests/data/acpi/virt/DSDT.numamem | Bin 18462 -> 5307 bytes
  4 files changed, 6 insertions(+), 19 deletions(-)
#11 lore raw
In reply to Heyi Guo
Quoted 17 lines · Heyi Guo

Remove conflict _ADR objects, and fix and refine PCI device definition in ACPI/DSDT.

History:

v3 -> v2:
- update commit message for patch 4/7.
- remove diff keywords in commit message of patch 7/7 to avoid applying patch failure.

v1 -> v2:
- flow the work flow in tests/qtest/bios-table-test.c to post ACPI related patches.
- update commit messages for removing "RP0" and "_ADR".
- add 3 more cleanup patches.

Quoted 6 lines
Cc Peter Maydell <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Igor Mammedov <[email protected]>
Cc Shannon Zhao <[email protected]>

Applied to target-arm.next, thanks.

-- PMM