Skip to contentSkip to conversation

acpi: Add _CCA support for pxb devices

PATCH In review Wang Xingang 2 participants 6 messages Feb 5, 2021 – Feb 10, 2021

lore
Share & tools
lore
#0 lore raw

cover acpi: Add _CCA support for pxb devices

From: Xingang Wang <[email protected]>

This patch series add fix for pxb support dma
1. Add _CCA attribute for pxb DSDT, because cache coherency attribute is needed when check dma support for pxb device.
2. Update DSDT.pxb file

Xingang Wang (3):
acpi: Allow pxb DSDT acpi table changes acpi/gpex: Fix cca attribute check for pxb device
acpi: Update _CCA attribute in DSDT.pxb

 hw/pci-host/gpex-acpi.c       |   1 +
 tests/data/acpi/virt/DSDT.pxb | Bin 7689 -> 7695 bytes
 2 files changed, 1 insertion(+)
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/3 acpi: Allow pxb DSDT acpi table changes

From: Xingang Wang <[email protected]>

---
 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..90c53925fc 100644
@@ -1 +1,2 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/virt/DSDT.pxb",
Signature · 1 line
2.19.1
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] acpi: Allow pxb DSDT acpi table changes

Quoted 13 lines · On Fri, 5 Feb 2021 01:56:43 +0000 Wang Xingang <[email protected]> wrote:

From: Xingang Wang <[email protected]>

---
 tests/qtest/bios-tables-test-allowed-diff.h | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test-allowed-diff.h +0 -0
index dfb8523c8b..90c53925fc 100644

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

Quoted 2 lines
tests/qtest/bios-tables-test-allowed-diff.h +1 -0
@@ -1 +1,2 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/virt/DSDT.pxb",
#3 lore raw

PATCH 2/3 acpi/gpex: Fix cca attribute check for pxb device

In reply to Wang Xingang

From: Xingang Wang <[email protected]>

When check DMA support for device attached to pxb, the cache coherency attribute need to be set. This add _CCA attribute for pxb DSDT.

Fixes 6f9765fbad ("acpi/gpex: Build tables for pxb")
---
 hw/pci-host/gpex-acpi.c | 1 +
 1 file changed, 1 insertion(+)
hw/pci-host/gpex-acpi.c +1 -0
index 446912d771..0f01f13a6e 100644
@@ -175,6 +175,7 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)
             aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));
             aml_append(dev, aml_name_decl("_UID", aml_int(bus_num)));
             aml_append(dev, aml_name_decl("_STR", aml_unicode("pxb Device")));
+            aml_append(dev, aml_name_decl("_CCA", aml_int(1)));
             if (numa_node != NUMA_NODE_UNASSIGNED) {
                 aml_append(dev, aml_name_decl("_PXM", aml_int(numa_node)));
             }
Signature · 1 line
2.19.1
Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] acpi/gpex: Fix cca attribute check for pxb device

Quoted 10 lines · On Fri, 5 Feb 2021 01:56:44 +0000 Wang Xingang <[email protected]> wrote:

From: Xingang Wang <[email protected]>

When check DMA support for device attached to pxb, the cache coherency attribute need to be set. This add _CCA attribute for pxb DSDT.

Fixes 6f9765fbad ("acpi/gpex: Build tables for pxb")

I'm not sure about if ARM side if fine with the change, CCed.

Quoted 16 lines
---
 hw/pci-host/gpex-acpi.c | 1 +
 1 file changed, 1 insertion(+)
hw/pci-host/gpex-acpi.c +1 -0
index 446912d771..0f01f13a6e 100644
@@ -175,6 +175,7 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)
             aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));
             aml_append(dev, aml_name_decl("_UID", aml_int(bus_num)));
             aml_append(dev, aml_name_decl("_STR", aml_unicode("pxb Device")));
+            aml_append(dev, aml_name_decl("_CCA", aml_int(1)));
             if (numa_node != NUMA_NODE_UNASSIGNED) {
                 aml_append(dev, aml_name_decl("_PXM", aml_int(numa_node)));
             }
#5 lore raw

PATCH 3/3 acpi: Update _CCA attribute in DSDT.pxb

In reply to Wang Xingang

From: Xingang Wang <[email protected]>

A new _CCA attribute is added.

Update expected DSDT files accordingly, and re-enable their testing.

Full diff of changed files disassembly:

*
* Disassembling to symbolic ASL+ operators *
- * Disassembly of DSDT.pxb, Thu Feb 4 21:07:42 2021
+ * Disassembly of DSDT.pxb, Thu Feb 4 21:06:59 2021 *
* Original Table Header:

  *     Signature        "DSDT"
- *     Length           0x00001E09 (7689)
+ *     Length           0x00001E0F (7695)
  *     Revision         0x02
- *     Checksum         0x30
+ *     Checksum         0xEF
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "BXPCDSDT"
  *     OEM Revision     0x00000001 (1)
@@ -642,6 +642,7 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001)
             Name (_BBN, 0x80)  // _BBN: BIOS Bus Number
             Name (_UID, 0x80)  // _UID: Unique ID
             Name (_STR, Unicode ("pxb Device"))  // _STR: Description String
+            Name (_CCA, One)  // _CCA: Cache Coherency Attribute
             Name (_PRT, Package (0x80)  // _PRT: PCI Routing Table
             {
                 Package (0x04)
---
 tests/data/acpi/virt/DSDT.pxb               | Bin 7689 -> 7695 bytes
 tests/qtest/bios-tables-test-allowed-diff.h |   1 -
 2 files changed, 1 deletion(-)
tests/data/acpi/virt/DSDT.pxb binary +0 -0
index ce3b67dff277e23f43925b1adcbb55c9d0b4eee3..b060a90dcdd6e067195c0db6a48a7ceab366f6de 100644
GIT binary patch
tests/qtest/bios-tables-test-allowed-diff.h +0 -1
index 90c53925fc..dfb8523c8b 100644
@@ -1,2 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/virt/DSDT.pxb",
Signature · 1 line
2.19.1