i386/acpi: show PCI Express bus on pxb-pcie expanders
diff mbox series

Message ID 1563526469-15588-1-git-send-email-wrfsh@yandex-team.ru
State New
Headers show
Series
  • i386/acpi: show PCI Express bus on pxb-pcie expanders
Related show

Commit Message

Evgeny Yakovlev July 19, 2019, 8:54 a.m. UTC
Show PCIe host bridge PNP id with PCI host bridge as a compatible id
when expanding a pcie bus.

Signed-off-by: Evgeny Yakovlev <wrfsh@yandex-team.ru>
---
 hw/i386/acpi-build.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Igor Mammedov July 19, 2019, 12:14 p.m. UTC | #1
On Fri, 19 Jul 2019 11:54:29 +0300
Evgeny Yakovlev <wrfsh@yandex-team.ru> wrote:

> Show PCIe host bridge PNP id with PCI host bridge as a compatible id
> when expanding a pcie bus.
> 
> Signed-off-by: Evgeny Yakovlev <wrfsh@yandex-team.ru>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  hw/i386/acpi-build.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index d281ffa..0675952 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1908,10 +1908,13 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>              scope = aml_scope("\\_SB");
>              dev = aml_device("PC%.02X", bus_num);
>              aml_append(dev, aml_name_decl("_UID", aml_int(bus_num)));
> -            aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
>              aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));
>              if (pci_bus_is_express(bus)) {
> +                aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08")));
> +                aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03")));
>                  aml_append(dev, build_q35_osc_method());
> +            } else {
> +                aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
>              }
>  
>              if (numa_node != NUMA_NODE_UNASSIGNED) {

Patch
diff mbox series

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index d281ffa..0675952 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1908,10 +1908,13 @@  build_dsdt(GArray *table_data, BIOSLinker *linker,
             scope = aml_scope("\\_SB");
             dev = aml_device("PC%.02X", bus_num);
             aml_append(dev, aml_name_decl("_UID", aml_int(bus_num)));
-            aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
             aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));
             if (pci_bus_is_express(bus)) {
+                aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08")));
+                aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03")));
                 aml_append(dev, build_q35_osc_method());
+            } else {
+                aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
             }
 
             if (numa_node != NUMA_NODE_UNASSIGNED) {