1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #include <acpi/acpi.h> 4 #include <amdblocks/ioapic.h> 5 #include <device/device.h> 6 acpi_fill_madt(unsigned long current)7unsigned long acpi_fill_madt(unsigned long current) 8 { 9 struct device *dev = NULL; 10 while ((dev = dev_find_path(dev, DEVICE_PATH_DOMAIN)) != NULL) { 11 struct resource *res = probe_resource(dev, IOMMU_IOAPIC_IDX); 12 if (!res) 13 continue; 14 15 current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, 16 res->base); 17 } 18 19 return current; 20 } 21