arch/x86: Enable support for IOAPIC devices

On platforms with multiple IOAPICs the GSI base must not be
linear, which is currently assumed by acpi_create_madt_ioapic_from_hw().

Integrate the existing struct device DEVICE_PATH_IOAPIC type and allow
to assign custom GSI bases for each IOAPIC. Write out the IOAPIC devices
into the MADT table if any.

For now, since no platform adds IOAPIC devices, the existing behaviour
remains the same. Allows to get rid of soc_get_ioapic_info().

Change-Id: Ie13d4f5c4f0704f0935974f90e5b7cf24e94aab3
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85226
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Patrick Rudolph 2024-11-21 08:50:40 +01:00 committed by Lean Sheng Tan
commit b04ecb2a5f
5 changed files with 66 additions and 0 deletions

View file

@ -85,7 +85,9 @@ struct apic_path {
};
struct ioapic_path {
uintptr_t addr;
unsigned int ioapic_id;
unsigned int gsi_base;
};
struct cpu_cluster_path {