[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/17] x86: pci: acpi: reorder Device's _DSM method
From: |
Igor Mammedov |
Subject: |
[PATCH 15/17] x86: pci: acpi: reorder Device's _DSM method |
Date: |
Fri, 1 Jul 2022 09:35:13 -0400 |
align _DSM method in empty slot descriptor with
a populated slot position.
Expected change:
+ Device (SE8)
+ {
+ Name (_ADR, 0x001D0000) // _ADR: Address
+ Name (ASUN, 0x1D)
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
Local0 = Package (0x02)
{
BSEL,
ASUN
}
Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
}
- }
- Device (SE8)
- {
- Name (_ADR, 0x001D0000) // _ADR: Address
- Name (ASUN, 0x1D)
Name (_SUN, 0x1D) // _SUN: Slot User Number
Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device
{
PCEJ (BSEL, _SUN)
}
+ }
i.e. put _DSM right after ASUN, with _SUN/_EJ0 following it.
that will eliminate contextual changes (causing test failures)
when follow up patches merge code generating populated and empty
slots descriptors.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
hw/i386/acpi-build.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index fd7f3253e5..406bbac1c7 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -444,15 +444,13 @@ static void build_append_pci_bus_devices(Aml
*parent_scope, PCIBus *bus,
dev = aml_device("S%.02X", devfn);
aml_append(dev, aml_name_decl("_ADR", aml_int(adr)));
aml_append(dev, aml_name_decl("ASUN", aml_int(slot)));
+ aml_append(dev, aml_pci_device_dsm());
aml_append(dev, aml_name_decl("_SUN", aml_int(slot)));
method = aml_method("_EJ0", 1, AML_NOTSERIALIZED);
aml_append(method,
aml_call2("PCEJ", aml_name("BSEL"), aml_name("_SUN"))
);
aml_append(dev, method);
-
- aml_append(dev, aml_pci_device_dsm());
-
aml_append(parent_scope, dev);
build_append_pcihp_notify_entry(notify_method, slot);
--
2.31.1
- [PATCH 08/17] tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN, (continued)
[PATCH 01/17] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move, Igor Mammedov, 2022/07/01
[PATCH 11/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field, Igor Mammedov, 2022/07/01
[PATCH 17/17] x86: pci: acpi: deduplate PCI slots creation, Igor Mammedov, 2022/07/01
[PATCH 06/17] x86: acpi: _DSM: use Package to pass parameters, Igor Mammedov, 2022/07/01
[PATCH 15/17] x86: pci: acpi: reorder Device's _DSM method,
Igor Mammedov <=
[PATCH 16/17] tests: acpi: update expected blobs, Igor Mammedov, 2022/07/01
[PATCH 05/17] acpi: x86: refactor PDSM method to reduce nesting, Igor Mammedov, 2022/07/01
[PATCH 14/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field, Igor Mammedov, 2022/07/01
[PATCH 12/17] x86: pci: acpi: reorder Device's _ADR and _SUN fields, Igor Mammedov, 2022/07/01
[PATCH 13/17] tests: acpi: update expected blobs, Igor Mammedov, 2022/07/01
[PATCH 09/17] x86: acpi: cleanup PCI device _DSM duplication, Igor Mammedov, 2022/07/01