xref: /qemu/hw/acpi/pci-bridge.c (revision 6c36ec46b0d28f682eed1ce1278989535c1307dc)
1*6c36ec46SIgor Mammedov /*
2*6c36ec46SIgor Mammedov  * QEMU ACPI PCI bridge
3*6c36ec46SIgor Mammedov  *
4*6c36ec46SIgor Mammedov  * Copyright (c) 2023 Red Hat, Inc.
5*6c36ec46SIgor Mammedov  *
6*6c36ec46SIgor Mammedov  * Author:
7*6c36ec46SIgor Mammedov  *   Igor Mammedov <imammedo@redhat.com>
8*6c36ec46SIgor Mammedov  *
9*6c36ec46SIgor Mammedov  * SPDX-License-Identifier: GPL-2.0-or-later
10*6c36ec46SIgor Mammedov  *
11*6c36ec46SIgor Mammedov  * This work is licensed under the terms of the GNU GPL, version 2 or later.
12*6c36ec46SIgor Mammedov  * See the COPYING file in the top-level directory.
13*6c36ec46SIgor Mammedov  */
14*6c36ec46SIgor Mammedov 
15*6c36ec46SIgor Mammedov #include "qemu/osdep.h"
16*6c36ec46SIgor Mammedov #include "hw/acpi/pci.h"
17*6c36ec46SIgor Mammedov #include "hw/pci/pci_bridge.h"
18*6c36ec46SIgor Mammedov #include "hw/acpi/pcihp.h"
19*6c36ec46SIgor Mammedov 
20*6c36ec46SIgor Mammedov void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope)
21*6c36ec46SIgor Mammedov {
22*6c36ec46SIgor Mammedov     PCIBridge *br = PCI_BRIDGE(adev);
23*6c36ec46SIgor Mammedov 
24*6c36ec46SIgor Mammedov     if (object_property_find(OBJECT(&br->sec_bus), ACPI_PCIHP_PROP_BSEL)) {
25*6c36ec46SIgor Mammedov         build_append_pci_bus_devices(scope, pci_bridge_get_sec_bus(br));
26*6c36ec46SIgor Mammedov     }
27*6c36ec46SIgor Mammedov }
28