1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <device/pci_def.h>
6 unsigned long acpi_fill_madt(unsigned long current
)
8 struct device
*bdev
, *dev
= NULL
;
9 struct resource
*res
= NULL
;
11 bdev
= pcidev_on_root(2, 0);
12 /* P64H2 Bus B IOAPIC */
14 dev
= pcidev_path_behind(bdev
->downstream
, PCI_DEVFN(28, 0));
16 res
= find_resource(dev
, PCI_BASE_ADDRESS_0
);
17 current
+= acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t
*)current
, res
->base
);
20 /* P64H2 Bus A IOAPIC */
22 dev
= pcidev_path_behind(bdev
->downstream
, PCI_DEVFN(30, 0));
24 res
= find_resource(dev
, PCI_BASE_ADDRESS_0
);
25 current
+= acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t
*)current
, res
->base
);