Felix Held | aab8a22 | 2024-01-08 23:30:38 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
| 4 | #include <amdblocks/data_fabric.h> |
| 5 | #include <device/device.h> |
| 6 | |
| 7 | unsigned 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 | } |