Skip to contentSkip to conversation

hw/i386/acpi: Pre-compute the _PRT table

PATCH Superseded Ricardo Ribalda 2 participants 7 messages Jun 7, 2024 – Jun 28, 2024

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover hw/i386/acpi: Pre-compute the _PRT table

Today for x86 the _PRT() table is computed in runtime. Under some configurations, computing the _PRT table can take more than 30 seconds and the ACPI timeout is violated.

This patchset modifies _PRT() to return a pre-computed table.

Changelog v2 Thanks Michael:
- Code style
- Add cover letter

Ricardo Ribalda (3):
tests/acpi: pc: allow DSDT acpi table changes hw/i386/acpi-build: Return a pre-computed _PRT table tests/acpi: pc: update golden masters for DSDT

 hw/i386/acpi-build.c             | 120 ++++++-------------------------
 tests/data/acpi/pc/DSDT          | Bin 6830 -> 8527 bytes
 tests/data/acpi/pc/DSDT.acpierst | Bin 6741 -> 8438 bytes
 tests/data/acpi/pc/DSDT.acpihmat | Bin 8155 -> 9852 bytes
 tests/data/acpi/pc/DSDT.bridge   | Bin 13701 -> 15398 bytes
 tests/data/acpi/pc/DSDT.cphp     | Bin 7294 -> 8991 bytes
 tests/data/acpi/pc/DSDT.dimmpxm  | Bin 8484 -> 10181 bytes
 tests/data/acpi/pc/DSDT.hpbridge | Bin 6781 -> 8478 bytes
 tests/data/acpi/pc/DSDT.hpbrroot | Bin 3337 -> 5034 bytes
 tests/data/acpi/pc/DSDT.ipmikcs  | Bin 6902 -> 8599 bytes
 tests/data/acpi/pc/DSDT.memhp    | Bin 8189 -> 9886 bytes
 tests/data/acpi/pc/DSDT.nohpet   | Bin 6688 -> 8385 bytes
 tests/data/acpi/pc/DSDT.numamem  | Bin 6836 -> 8533 bytes
 tests/data/acpi/pc/DSDT.roothp   | Bin 10623 -> 12320 bytes
 tests/data/acpi/q35/DSDT.cxl     | Bin 9714 -> 13148 bytes
 tests/data/acpi/q35/DSDT.viot    | Bin 9464 -> 14615 bytes
 16 files changed, 22 insertions(+), 98 deletions(-)
Signature · 1 line
2.45.2.505.gda0bf45e8d-goog
#1 lore raw

PATCH v3 1/3 tests/acpi: pc: allow DSDT acpi table changes

---
 tests/qtest/bios-tables-test-allowed-diff.h | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test-allowed-diff.h +1 -0
index dfb8523c8b..b2c2c10cbc 100644
@@ -1 +1,2 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
Signature · 1 line
2.45.2.505.gda0bf45e8d-goog
#2 lore raw

Re: [PATCH v3 1/3] tests/acpi: pc: allow DSDT acpi table changes

tests/qtest/bios-tables-test-allowed-diff.h line 2

Quoted 12 lines · On Fri, 7 Jun 2024 14:17:24 +0000 Ricardo Ribalda <[email protected]> wrote:
---
 tests/qtest/bios-tables-test-allowed-diff.h | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test-allowed-diff.h +1 -0
index dfb8523c8b..b2c2c10cbc 100644
@@ -1 +1,2 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",

that's no enough, a lot more tables expected blobs are affected by the next patch.

before posting, make sure that 'make check-qtest' passes fine

#3 lore raw

Re: [PATCH v3 1/3] tests/acpi: pc: allow DSDT acpi table changes

Hi Igor

Quoted 9 lines · Igor Mammedov
Quoted 5 lines · On Fri, 7 Jun 2024 14:17:24 +0000 Ricardo Ribalda <[email protected]> wrote:
---
 tests/qtest/bios-tables-test-allowed-diff.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

tests/qtest/bios-tables-test-allowed-diff.h line 2

Quoted 7 lines
tests/qtest/bios-tables-test-allowed-diff.h +1 -0
index dfb8523c8b..b2c2c10cbc 100644
@@ -1 +1,2 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",

that's no enough, a lot more tables expected blobs are affected by the next patch.

Sorry about that, I did not realise that the check was quitting after the first different file was found.

will post a new version soon

Thanks!

Quoted 3 lines

before posting, make sure that 'make check-qtest' passes fine

Signature · 1 line
Ricardo Ribalda
#4 lore raw

PATCH v3 2/3 hw/i386/acpi-build: Return a pre-computed _PRT table

In reply to Ricardo Ribalda

When qemu runs without kvm acceleration the ACPI executions take a great amount of time. If they take more than the default time (30sec), the ACPI calls fail and the system might not behave correctly.

Now the _PRT table is computed on the fly. We can drastically reduce the execution of the _PRT method if we return a pre-computed table.

Without this patch:

[   51.343484] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[   51.527032] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[   51.530049] virtio-pci 0000:00:02.0: can't derive routing for PCI INT A
[   51.530797] virtio-pci 0000:00:02.0: PCI INT A: no GSI
[   81.922901] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[   82.103534] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[   82.106088] virtio-pci 0000:00:04.0: can't derive routing for PCI INT A
[   82.106761] virtio-pci 0000:00:04.0: PCI INT A: no GSI
[  112.192568] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[  112.486687] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[  112.489554] virtio-pci 0000:00:05.0: can't derive routing for PCI INT A
[  112.490027] virtio-pci 0000:00:05.0: PCI INT A: no GSI
[  142.559448] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[  142.718596] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[  142.722889] virtio-pci 0000:00:06.0: can't derive routing for PCI INT A
[  142.724578] virtio-pci 0000:00:06.0: PCI INT A: no GSI

With this patch:

[   22.938076] ACPI: \_SB_.LNKB: Enabled at IRQ 10
[   24.214002] ACPI: \_SB_.LNKD: Enabled at IRQ 11
[   25.465170] ACPI: \_SB_.LNKA: Enabled at IRQ 10
[   27.944920] ACPI: \_SB_.LNKC: Enabled at IRQ 11

ACPI disassembly:

        Scope (PCI0)
        {
            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
            {
                Return (Package (0x80)
                {
                    Package (0x04)
                    {
                        0xFFFF,
                        Zero,
                        LNKD,
                        Zero
                    },

                    Package (0x04)
                    {
                        0xFFFF,
                        One,
                        LNKA,
                        Zero
                    },

                    Package (0x04)
                    {
                        0xFFFF,
                        0x02,
                        LNKB,
                        Zero
                    },

                    Package (0x04)
                    {
                        0xFFFF,
                        0x03,
                        LNKC,
                        Zero
                    },

                    Package (0x04)
                    {
                        0x0001FFFF,
                        Zero,
                        LNKS,
                        Zero
                    },

Context: https://lore.kernel.org/virtualization/[email protected]/T/#t

---
 hw/i386/acpi-build.c | 120 ++++++++-----------------------------------
 1 file changed, 22 insertions(+), 98 deletions(-)
hw/i386/acpi-build.c +22 -98
index 53f804ac16..03216a6f29 100644
@@ -725,120 +725,44 @@ static Aml *aml_pci_pdsm(void)
     return method;
 }
 
-/**
- * build_prt_entry:
- * @link_name: link name for PCI route entry
- *
- * build AML package containing a PCI route entry for @link_name
- */
-static Aml *build_prt_entry(const char *link_name)
-{
-    Aml *a_zero = aml_int(0);
-    Aml *pkg = aml_package(4);
-    aml_append(pkg, a_zero);
-    aml_append(pkg, a_zero);
-    aml_append(pkg, aml_name("%s", link_name));
-    aml_append(pkg, a_zero);
-    return pkg;
-}
-
 /*
- * initialize_route - Initialize the interrupt routing rule
- * through a specific LINK:
- *  if (lnk_idx == idx)
- *      route using link 'link_name'
- */
-static Aml *initialize_route(Aml *route, const char *link_name,
-                             Aml *lnk_idx, int idx)
-{
-    Aml *if_ctx = aml_if(aml_equal(lnk_idx, aml_int(idx)));
-    Aml *pkg = build_prt_entry(link_name);
-
-    aml_append(if_ctx, aml_store(pkg, route));
-
-    return if_ctx;
-}
-
-/*
- * build_prt - Define interrupt rounting rules
+ * build_prt - Define interrupt routing rules
  *
  * Returns an array of 128 routes, one for each device,
  * based on device location.
  * The main goal is to equally distribute the interrupts
  * over the 4 existing ACPI links (works only for i440fx).
- * The hash function is  (slot + pin) & 3 -> "LNK[D|A|B|C]".
+ * The hash function is: (slot + pin) & 3 -> "LNK[D|A|B|C]".
  *
  */
 static Aml *build_prt(bool is_pci0_prt)
 {
-    Aml *method, *while_ctx, *pin, *res;
+    const int nroutes = 128;
+    Aml *rt_pkg, *method;
+    int pin;
 
     method = aml_method("_PRT", 0, AML_NOTSERIALIZED);
-    res = aml_local(0);
-    pin = aml_local(1);
-    aml_append(method, aml_store(aml_package(128), res));
-    aml_append(method, aml_store(aml_int(0), pin));
+    rt_pkg = aml_varpackage(nroutes);
 
-    /* while (pin < 128) */
-    while_ctx = aml_while(aml_lless(pin, aml_int(128)));
-    {
-        Aml *slot = aml_local(2);
-        Aml *lnk_idx = aml_local(3);
-        Aml *route = aml_local(4);
-
-        /* slot = pin >> 2 */
-        aml_append(while_ctx,
-                   aml_store(aml_shiftright(pin, aml_int(2), NULL), slot));
-        /* lnk_idx = (slot + pin) & 3 */
-        aml_append(while_ctx,
-            aml_store(aml_and(aml_add(pin, slot, NULL), aml_int(3), NULL),
-                      lnk_idx));
-
-        /* route[2] = "LNK[D|A|B|C]", selection based on pin % 3  */
-        aml_append(while_ctx, initialize_route(route, "LNKD", lnk_idx, 0));
-        if (is_pci0_prt) {
-            Aml *if_device_1, *if_pin_4, *else_pin_4;
-
-            /* device 1 is the power-management device, needs SCI */
-            if_device_1 = aml_if(aml_equal(lnk_idx, aml_int(1)));
-            {
-                if_pin_4 = aml_if(aml_equal(pin, aml_int(4)));
-                {
-                    aml_append(if_pin_4,
-                        aml_store(build_prt_entry("LNKS"), route));
-                }
-                aml_append(if_device_1, if_pin_4);
-                else_pin_4 = aml_else();
-                {
-                    aml_append(else_pin_4,
-                        aml_store(build_prt_entry("LNKA"), route));
-                }
-                aml_append(if_device_1, else_pin_4);
-            }
-            aml_append(while_ctx, if_device_1);
+    for (pin = 0; pin < nroutes; pin++) {
+        Aml *pkg = aml_package(4);
+        int slot = pin >> 2;
+
+        aml_append(pkg, aml_int((slot << 16) | 0xFFFF));
+        aml_append(pkg, aml_int(pin & 3));
+        /* device 1 is the power-management device, needs SCI */
+        if (is_pci0_prt && pin == 4) {
+            aml_append(pkg, aml_name("%s", "LNKS"));
         } else {
-            aml_append(while_ctx, initialize_route(route, "LNKA", lnk_idx, 1));
+            const char link_name[][5] = {"LNKD", "LNKA", "LNKB", "LNKC"};
+            int hash = (slot + pin) & 3;
+            aml_append(pkg, aml_name("%s", link_name[hash]));
         }
-        aml_append(while_ctx, initialize_route(route, "LNKB", lnk_idx, 2));
-        aml_append(while_ctx, initialize_route(route, "LNKC", lnk_idx, 3));
-
-        /* route[0] = 0x[slot]FFFF */
-        aml_append(while_ctx,
-            aml_store(aml_or(aml_shiftleft(slot, aml_int(16)), aml_int(0xFFFF),
-                             NULL),
-                      aml_index(route, aml_int(0))));
-        /* route[1] = pin & 3 */
-        aml_append(while_ctx,
-            aml_store(aml_and(pin, aml_int(3), NULL),
-                      aml_index(route, aml_int(1))));
-        /* res[pin] = route */
-        aml_append(while_ctx, aml_store(route, aml_index(res, pin)));
-        /* pin++ */
-        aml_append(while_ctx, aml_increment(pin));
+        aml_append(pkg, aml_int(0));
+        aml_append(rt_pkg, pkg);
     }
-    aml_append(method, while_ctx);
-    /* return res*/
-    aml_append(method, aml_return(res));
+
+    aml_append(method, aml_return(rt_pkg));
 
     return method;
 }
Signature · 1 line
2.45.2.505.gda0bf45e8d-goog
Reviewed-by on v3 2/3
#5 lore raw

Re: [PATCH v3 2/3] hw/i386/acpi-build: Return a pre-computed _PRT table

Quoted 77 lines · On Fri, 7 Jun 2024 14:17:25 +0000 Ricardo Ribalda <[email protected]> wrote:

When qemu runs without kvm acceleration the ACPI executions take a great amount of time. If they take more than the default time (30sec), the ACPI calls fail and the system might not behave correctly.

Now the _PRT table is computed on the fly. We can drastically reduce the execution of the _PRT method if we return a pre-computed table.

Without this patch:

[   51.343484] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[   51.527032] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[   51.530049] virtio-pci 0000:00:02.0: can't derive routing for PCI INT A
[   51.530797] virtio-pci 0000:00:02.0: PCI INT A: no GSI
[   81.922901] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[   82.103534] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[   82.106088] virtio-pci 0000:00:04.0: can't derive routing for PCI INT A
[   82.106761] virtio-pci 0000:00:04.0: PCI INT A: no GSI
[  112.192568] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[  112.486687] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[  112.489554] virtio-pci 0000:00:05.0: can't derive routing for PCI INT A
[  112.490027] virtio-pci 0000:00:05.0: PCI INT A: no GSI
[  142.559448] ACPI Error: Aborting method \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/psparse-529)
[  142.718596] ACPI Error: Method execution failed \_SB.PCI0._PRT due to previous error (AE_AML_LOOP_TIMEOUT) (20230628/uteval-68)
[  142.722889] virtio-pci 0000:00:06.0: can't derive routing for PCI INT A
[  142.724578] virtio-pci 0000:00:06.0: PCI INT A: no GSI

With this patch:

[   22.938076] ACPI: \_SB_.LNKB: Enabled at IRQ 10
[   24.214002] ACPI: \_SB_.LNKD: Enabled at IRQ 11
[   25.465170] ACPI: \_SB_.LNKA: Enabled at IRQ 10
[   27.944920] ACPI: \_SB_.LNKC: Enabled at IRQ 11

ACPI disassembly:

        Scope (PCI0)
        {
            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
            {
                Return (Package (0x80)
                {
                    Package (0x04)
                    {
                        0xFFFF,
                        Zero,
                        LNKD,
                        Zero
                    },

                    Package (0x04)
                    {
                        0xFFFF,
                        One,
                        LNKA,
                        Zero
                    },

                    Package (0x04)
                    {
                        0xFFFF,
                        0x02,
                        LNKB,
                        Zero
                    },

                    Package (0x04)
                    {
                        0xFFFF,
                        0x03,
                        LNKC,
                        Zero
                    },

                    Package (0x04)
                    {
                        0x0001FFFF,
                        Zero,
                        LNKS,
                        Zero
                    },
Quoted 3 lines

Context: https://lore.kernel.org/virtualization/[email protected]/T/#t

Quoted 151 lines
---
 hw/i386/acpi-build.c | 120 ++++++++-----------------------------------
 1 file changed, 22 insertions(+), 98 deletions(-)
hw/i386/acpi-build.c +22 -98
index 53f804ac16..03216a6f29 100644
@@ -725,120 +725,44 @@ static Aml *aml_pci_pdsm(void)
     return method;
 }
 
-/**
- * build_prt_entry:
- * @link_name: link name for PCI route entry
- *
- * build AML package containing a PCI route entry for @link_name
- */
-static Aml *build_prt_entry(const char *link_name)
-{
-    Aml *a_zero = aml_int(0);
-    Aml *pkg = aml_package(4);
-    aml_append(pkg, a_zero);
-    aml_append(pkg, a_zero);
-    aml_append(pkg, aml_name("%s", link_name));
-    aml_append(pkg, a_zero);
-    return pkg;
-}
-
 /*
- * initialize_route - Initialize the interrupt routing rule
- * through a specific LINK:
- *  if (lnk_idx == idx)
- *      route using link 'link_name'
- */
-static Aml *initialize_route(Aml *route, const char *link_name,
-                             Aml *lnk_idx, int idx)
-{
-    Aml *if_ctx = aml_if(aml_equal(lnk_idx, aml_int(idx)));
-    Aml *pkg = build_prt_entry(link_name);
-
-    aml_append(if_ctx, aml_store(pkg, route));
-
-    return if_ctx;
-}
-
-/*
- * build_prt - Define interrupt rounting rules
+ * build_prt - Define interrupt routing rules
  *
  * Returns an array of 128 routes, one for each device,
  * based on device location.
  * The main goal is to equally distribute the interrupts
  * over the 4 existing ACPI links (works only for i440fx).
- * The hash function is  (slot + pin) & 3 -> "LNK[D|A|B|C]".
+ * The hash function is: (slot + pin) & 3 -> "LNK[D|A|B|C]".
  *
  */
 static Aml *build_prt(bool is_pci0_prt)
 {
-    Aml *method, *while_ctx, *pin, *res;
+    const int nroutes = 128;
+    Aml *rt_pkg, *method;
+    int pin;
 
     method = aml_method("_PRT", 0, AML_NOTSERIALIZED);
-    res = aml_local(0);
-    pin = aml_local(1);
-    aml_append(method, aml_store(aml_package(128), res));
-    aml_append(method, aml_store(aml_int(0), pin));
+    rt_pkg = aml_varpackage(nroutes);
 
-    /* while (pin < 128) */
-    while_ctx = aml_while(aml_lless(pin, aml_int(128)));
-    {
-        Aml *slot = aml_local(2);
-        Aml *lnk_idx = aml_local(3);
-        Aml *route = aml_local(4);
-
-        /* slot = pin >> 2 */
-        aml_append(while_ctx,
-                   aml_store(aml_shiftright(pin, aml_int(2), NULL), slot));
-        /* lnk_idx = (slot + pin) & 3 */
-        aml_append(while_ctx,
-            aml_store(aml_and(aml_add(pin, slot, NULL), aml_int(3), NULL),
-                      lnk_idx));
-
-        /* route[2] = "LNK[D|A|B|C]", selection based on pin % 3  */
-        aml_append(while_ctx, initialize_route(route, "LNKD", lnk_idx, 0));
-        if (is_pci0_prt) {
-            Aml *if_device_1, *if_pin_4, *else_pin_4;
-
-            /* device 1 is the power-management device, needs SCI */
-            if_device_1 = aml_if(aml_equal(lnk_idx, aml_int(1)));
-            {
-                if_pin_4 = aml_if(aml_equal(pin, aml_int(4)));
-                {
-                    aml_append(if_pin_4,
-                        aml_store(build_prt_entry("LNKS"), route));
-                }
-                aml_append(if_device_1, if_pin_4);
-                else_pin_4 = aml_else();
-                {
-                    aml_append(else_pin_4,
-                        aml_store(build_prt_entry("LNKA"), route));
-                }
-                aml_append(if_device_1, else_pin_4);
-            }
-            aml_append(while_ctx, if_device_1);
+    for (pin = 0; pin < nroutes; pin++) {
+        Aml *pkg = aml_package(4);
+        int slot = pin >> 2;
+
+        aml_append(pkg, aml_int((slot << 16) | 0xFFFF));
+        aml_append(pkg, aml_int(pin & 3));
+        /* device 1 is the power-management device, needs SCI */
+        if (is_pci0_prt && pin == 4) {
+            aml_append(pkg, aml_name("%s", "LNKS"));
         } else {
-            aml_append(while_ctx, initialize_route(route, "LNKA", lnk_idx, 1));
+            const char link_name[][5] = {"LNKD", "LNKA", "LNKB", "LNKC"};
+            int hash = (slot + pin) & 3;
+            aml_append(pkg, aml_name("%s", link_name[hash]));
         }
-        aml_append(while_ctx, initialize_route(route, "LNKB", lnk_idx, 2));
-        aml_append(while_ctx, initialize_route(route, "LNKC", lnk_idx, 3));
-
-        /* route[0] = 0x[slot]FFFF */
-        aml_append(while_ctx,
-            aml_store(aml_or(aml_shiftleft(slot, aml_int(16)), aml_int(0xFFFF),
-                             NULL),
-                      aml_index(route, aml_int(0))));
-        /* route[1] = pin & 3 */
-        aml_append(while_ctx,
-            aml_store(aml_and(pin, aml_int(3), NULL),
-                      aml_index(route, aml_int(1))));
-        /* res[pin] = route */
-        aml_append(while_ctx, aml_store(route, aml_index(res, pin)));
-        /* pin++ */
-        aml_append(while_ctx, aml_increment(pin));
+        aml_append(pkg, aml_int(0));
+        aml_append(rt_pkg, pkg);
     }
-    aml_append(method, while_ctx);
-    /* return res*/
-    aml_append(method, aml_return(res));
+
+    aml_append(method, aml_return(rt_pkg));
 
     return method;
 }
#6 lore raw

PATCH v3 3/3 tests/acpi: pc: update golden masters for DSDT

In reply to Ricardo Ribalda
tmp/asl-4Q0YO2.dsl renamed from tmp/asl-87N0O2.dsl +76 -64
@@ -1,30 +1,30 @@
 /*
  * Intel ACPI Component Architecture
  * AML/ASL+ Disassembler version 20230628 (64-bit version)
  * Copyright (c) 2000 - 2023 Intel Corporation
  *
  * Disassembling to symbolic ASL+ operators
  *
- * Disassembly of tests/data/acpi/pc/DSDT, Fri Jun  7 07:20:54 2024
+ * Disassembly of /tmp/aml-NF1YO2, Fri Jun  7 07:20:54 2024
  *
  * Original Table Header:
  *     Signature        "DSDT"
- *     Length           0x00001AAE (6830)
+ *     Length           0x0000214F (8527)
  *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
- *     Checksum         0x0B
+ *     Checksum         0x59
  *     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
         }
 
@@ -168,102 +168,1058 @@
                         ""
                     }
                 Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
                     ))
                 Local0 [Zero] = Local2
                 Return (Local0)
             }
         }
     }
 
     Scope (_SB)
     {
         Scope (PCI0)
         {
             Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
             {
-                Local0 = Package (0x80){}
-                Local1 = Zero
-                While ((Local1 < 0x80))
+                Return (Package (0x80)
                 {
-                    Local2 = (Local1 >> 0x02)
-                    Local3 = ((Local1 + Local2) & 0x03)
-                    If ((Local3 == Zero))
-                    {
-                        Local4 = Package (0x04)
-                            {
-                                Zero,
-                                Zero,
-                                LNKD,
-                                Zero
-                            }
-                    }
+                    Package (0x04)
+                    {
+                        0xFFFF,
+                        Zero,
+                        LNKD,
+                        Zero
+                    },
 
-                    If ((Local3 == One))
+                    Package (0x04)
                     {
-                        If ((Local1 == 0x04))
-                        {
-                            Local4 = Package (0x04)
-                                {
-                                    Zero,
-                                    Zero,
-                                    LNKS,
-                                    Zero
-                                }
-                        }
-                        Else
-                        {
-                            Local4 = Package (0x04)
-                                {
-                                    Zero,
-                                    Zero,
-                                    LNKA,
-                                    Zero
-                                }
-                        }
-                    }
+                        0xFFFF,
+                        One,
+                        LNKA,
+                        Zero
+                    },
 
-                    If ((Local3 == 0x02))
+                    Package (0x04)
                     {
-                        Local4 = Package (0x04)
-                            {
-                                Zero,
-                                Zero,
-                                LNKB,
-                                Zero
-                            }
-                    }
+                        0xFFFF,
+                        0x02,
+                        LNKB,
+                        Zero
+                    },
 
-                    If ((Local3 == 0x03))
+                    Package (0x04)
                     {
-                        Local4 = Package (0x04)
-                            {
-                                Zero,
-                                Zero,
-                                LNKC,
-                                Zero
-                            }
-                    }
+                        0xFFFF,
+                        0x03,
+                        LNKC,
+                        Zero
+                    },
 
-                    Local4 [Zero] = ((Local2 << 0x10) | 0xFFFF)
-                    Local4 [One] = (Local1 & 0x03)
-                    Local0 [Local1] = Local4
-                    Local1++
-                }
+                    Package (0x04)
+                    {
+                        0x0001FFFF,
+                        Zero,
+                        LNKS,
+                        Zero
+                    },
 
-                Return (Local0)
+                    Package (0x04)
+                    {
+                        0x0001FFFF,
+                        One,
+                        LNKB,
+                        Zero
+                    },
+
+                    Package (0x04)
+                    {
+                        0x0001FFFF,
+                        0x02,
+                        LNKC,
+                        Zero
+                    },
+
+                    Package (0x04)
+                    {
+                        0x0001FFFF,
+                        0x03,
+                        LNKD,
+                        Zero
+                    },
+
+                    Package (0x04)
+                    {
+                        0x0002FFFF,
+                        Zero,
+                        LNKB,
+                        Zero
+                    },
+
+                    Package (0x04)
+                    {
+                        0x0002FFFF,
+                        One,
+                        LNKC,
+                        Zero
+                    },
+
 

...

+
+ Package (0x04)
+ {

+                        0x001FFFFF,
+                        0x03,
+                        LNKB,
+                        Zero
+                    }
+                })
             }
         }

         Method (IQST, 1, NotSerialized)
         {
             If ((0x80 & Arg0))
             {
                 Return (0x09)
             }

             Return (0x0B)
         }

         Method (IQCR, 1, Serialized)
         {
             Name (PRR0, ResourceTemplate ()

**

---
 tests/data/acpi/pc/DSDT                     | Bin 6830 -> 8527 bytes
 tests/data/acpi/pc/DSDT.acpierst            | Bin 6741 -> 8438 bytes
 tests/data/acpi/pc/DSDT.acpihmat            | Bin 8155 -> 9852 bytes
 tests/data/acpi/pc/DSDT.bridge              | Bin 13701 -> 15398 bytes
 tests/data/acpi/pc/DSDT.cphp                | Bin 7294 -> 8991 bytes
 tests/data/acpi/pc/DSDT.dimmpxm             | Bin 8484 -> 10181 bytes
 tests/data/acpi/pc/DSDT.hpbridge            | Bin 6781 -> 8478 bytes
 tests/data/acpi/pc/DSDT.hpbrroot            | Bin 3337 -> 5034 bytes
 tests/data/acpi/pc/DSDT.ipmikcs             | Bin 6902 -> 8599 bytes
 tests/data/acpi/pc/DSDT.memhp               | Bin 8189 -> 9886 bytes
 tests/data/acpi/pc/DSDT.nohpet              | Bin 6688 -> 8385 bytes
 tests/data/acpi/pc/DSDT.numamem             | Bin 6836 -> 8533 bytes
 tests/data/acpi/pc/DSDT.roothp              | Bin 10623 -> 12320 bytes
 tests/data/acpi/q35/DSDT.cxl                | Bin 9714 -> 13148 bytes
 tests/data/acpi/q35/DSDT.viot               | Bin 9464 -> 14615 bytes
 tests/qtest/bios-tables-test-allowed-diff.h |   1 -
 16 files changed, 1 deletion(-)
tests/data/acpi/pc/DSDT binary +0 -0
index c93ad6b7f83a168a1833d7dba1112dd2ab8a431f..92225236e717b2e522a2ee00492fb0ded418dc7b 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index f643fa2d034053fa07f74f095565b64f021d4290..25b39955059409b177870800949eaf937cd39005 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 9d3695ff289036856886a093733926667a32a058..73a9ce59e9426b180fea0ec5820c4841ebdb6700 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index 840b45f354ac14c858d0af8fbd31e97949a65d4b..4cef454e379e1009141694e0f4036a2a701c80d7 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index dbc0141b2bbc77a6d806ff046dc137992c59a899..1dc928333d7ae7e4df6bb51d850af5e1cb480158 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 1294f655d418dbdccc095e0d47ab220869a61a07..9f71d2e58b1707e733584e38dab7f73f9bda5eb7 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 8012b5eb3155377dc7995b73059ecb267d19232c..db420593a3c51eced25cd57420353fbb9ccdf63c 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index 4fa0c6fe720f7859f0541b82f828c0329a3c0548..31b6adb4eb941e5bf0c02ec8c3819c9213adf022 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index 0a891baf458abee4a772ffba7a31914ec22418ec..c2a0330d97d495298889b9e28bde2f90235cea88 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 9b442a64cf711b33d80691fe84f1d3a6256f943b..c15a9fae947bb3929a30c60b7c0f2092705868f8 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index 1754c6878839fc657230e1e714cd7c5142e0a77e..dd29f5cb620e5164601e303e37524530ddb12684 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index 9fc731d3d2bcde5e2612a8ccd81e12098134afe9..8a6b56fe7da18bf42c339d13b863aabf81780527 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index e654c83ebe40c413b204c711adcefe3f04655e8c..a16b0d9d4becec47fa3cf57ed0077ff6cff88908 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index afcdc0d0ba8e41bb70ac20a78dcc8562ca0cb74b..f561750cab8b061c123c041fe2209d74c7a740f1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index 64e81f571120e3eb2b8c6c9545293a78c75b7bbd..8d98dd8845a60a08df5aff27097646bea4913b75 100644
GIT binary patch
tests/qtest/bios-tables-test-allowed-diff.h +0 -1
index b2c2c10cbc..dfb8523c8b 100644
@@ -1,2 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
Signature · 1 line
2.45.2.505.gda0bf45e8d-goog