qemu/hw/pci-host
Eric Auger af151d50ea hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method
gpex build_host_bridge_osc() and x86 originated
build_pci_host_bridge_osc_method() are mostly identical.

In GPEX, SUPP is set to CDW2 but is not further used. CTRL
is same as Local0.

So let gpex code reuse build_pci_host_bridge_osc_method()
and remove build_host_bridge_osc().

Also add an imply ACPI_PCI clause along with
PCI_EXPRESS_GENERIC_BRIDGE to compile hw/acpi/pci.c
when its dependency is resolved (ie. CONFIG_ACPI_PCI).
This is requested to link qemu-system-mips64el.

The disassembled DSDT difference is given below:

  * Original Table Header:
  *     Signature        "DSDT"
- *     Length           0x00001A4F (6735)
+ *     Length           0x00001A35 (6709)
  *     Revision         0x02
- *     Checksum         0xBF
+ *     Checksum         0xDD
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "BXPC    "
  *     OEM Revision     0x00000001 (1)
@@ -1849,27 +1849,26 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPC    ", 0x00000001)
                 {
                     CreateDWordField (Arg3, 0x04, CDW2)
                     CreateDWordField (Arg3, 0x08, CDW3)
-                    SUPP = CDW2 /* \_SB_.PCI0._OSC.CDW2 */
-                    CTRL = CDW3 /* \_SB_.PCI0._OSC.CDW3 */
-                    CTRL &= 0x1F
+                    Local0 = CDW3 /* \_SB_.PCI0._OSC.CDW3 */
+                    Local0 &= 0x1F
                     If ((Arg1 != One))
                     {
                         CDW1 |= 0x08
                     }

-                    If ((CDW3 != CTRL))
+                    If ((CDW3 != Local0))
                     {
                         CDW1 |= 0x10
                     }

-                    CDW3 = CTRL /* \_SB_.PCI0.CTRL */
-                    Return (Arg3)
+                    CDW3 = Local0
                 }
                 Else
                 {
                     CDW1 |= 0x04
-                    Return (Arg3)
                 }
+
+                Return (Arg3)
             }

             Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Message-Id: <20250714080639.2525563-10-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-07-15 02:56:40 -04:00
..
articia.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
astro.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
bonito.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
designware.c hw/pci-host/designware: Fix viewport configuration 2025-05-06 15:02:35 +01:00
dino.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
fsl_imx8m_phy.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
gpex-acpi.c hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method 2025-07-15 02:56:40 -04:00
gpex.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
grackle.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
gt64120.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
i440fx.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
Kconfig hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method 2025-07-15 02:56:40 -04:00
meson.build hw/arm/fsl-imx8mp: Add PCIe support 2025-02-25 17:02:34 +00:00
mv643xx.h mv64361: Add dummy gigabit ethernet PHY access registers 2023-07-07 04:18:26 -03:00
mv64361.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pam.c hw/pci-host/pam: Make init_pam() usage more readable 2023-05-19 10:30:46 -04:00
pnv_phb3_msi.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_phb3_pbcq.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_phb3.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
pnv_phb4_pec.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_phb4.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
pnv_phb.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_phb.h include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
ppc4xx_pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
ppc440_pcix.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ppce500.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
q35.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
raven.c hw/pci-host/raven: Revert "raven: Move BIOS loading from board code to PCI host" 2025-06-10 11:06:46 +02:00
remote.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sabre.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
sh_pci.c qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
trace-events hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/ 2024-02-22 12:47:40 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uninorth.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
versatile.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
xen_igd_pt.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
xilinx-pcie.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00