Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/70267 )
Change subject: acpi/acpi.c: Add a method to generate IOAPIC DRAM entries from hw ......................................................................
acpi/acpi.c: Add a method to generate IOAPIC DRAM entries from hw
This reads back the ioapic id from hardware.
Change-Id: I214557bbe963d1086f35f96efb1cb47950099eb3 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/acpi/acpi.c M src/include/acpi/acpi.h 2 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/70267/1
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c index c567299..eb41409 100644 --- a/src/acpi/acpi.c +++ b/src/acpi/acpi.c @@ -898,6 +898,14 @@ SCOPE_IOAPIC, enumeration_id, bus, dev, fn); }
+unsigned long acpi_create_dmar_ds_ioapic_from_hw(unsigned long current, + u32 addr, u8 bus, u8 dev, u8 fn) +{ + u8 enumeration_id = get_ioapic_id((void *)(uintptr_t)addr); + return acpi_create_dmar_ds(current, + SCOPE_IOAPIC, enumeration_id, bus, dev, fn); +} + unsigned long acpi_create_dmar_ds_msi_hpet(unsigned long current, u8 enumeration_id, u8 bus, u8 dev, u8 fn) { diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h index 57dbc65..f66f054 100644 --- a/src/include/acpi/acpi.h +++ b/src/include/acpi/acpi.h @@ -1432,6 +1432,8 @@ unsigned long acpi_create_dmar_ds_ioapic(unsigned long current, u8 enumeration_id, u8 bus, u8 dev, u8 fn); +unsigned long acpi_create_dmar_ds_ioapic_from_hw(unsigned long current, + u32 addr, u8 bus, u8 dev, u8 fn); unsigned long acpi_create_dmar_ds_msi_hpet(unsigned long current, u8 enumeration_id, u8 bus, u8 dev, u8 fn);