summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/acpi/acpi_gic.c26
-rw-r--r--src/include/acpi/acpi.h1
2 files changed, 27 insertions, 0 deletions
diff --git a/src/acpi/acpi_gic.c b/src/acpi/acpi_gic.c
index e9ae370c4c..13e5a50a7d 100644
--- a/src/acpi/acpi_gic.c
+++ b/src/acpi/acpi_gic.c
@@ -79,11 +79,37 @@ static unsigned long acpi_create_madt_gicr_v3(unsigned long current)
return current + gicr->length;
}
+__weak int platform_get_gic_its(uintptr_t **base)
+{
+ return 0;
+}
+
+static unsigned long acpi_create_madt_gic_its_v3(unsigned long current)
+{
+ int i, its_count;
+ uintptr_t *its_base;
+
+ its_count = platform_get_gic_its(&its_base);
+
+ for (i = 0; i < its_count; i++) {
+ acpi_madt_gic_its_t *gic_its = (acpi_madt_gic_its_t *)current;
+ memset(gic_its, 0, sizeof(acpi_madt_gic_its_t));
+ gic_its->type = GIC_ITS;
+ gic_its->gic_its_id = i;
+ gic_its->physical_base_address = its_base[i];
+ gic_its->length = sizeof(acpi_madt_gic_its_t);
+
+ current = current + gic_its->length;
+ }
+ return current;
+}
+
unsigned long acpi_arch_fill_madt(acpi_madt_t *madt, unsigned long current)
{
current = acpi_create_madt_giccs_v3(current);
current = acpi_create_madt_gicd_v3(current);
current = acpi_create_madt_gicr_v3(current);
+ current = acpi_create_madt_gic_its_v3(current);
return current;
}
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h
index b405e20431..1684e71840 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -1706,6 +1706,7 @@ unsigned long acpi_create_madt_lapic_nmis(unsigned long current);
uintptr_t platform_get_gicd_base(void);
uintptr_t platform_get_gicr_base(void);
+int platform_get_gic_its(uintptr_t **base);
int acpi_create_srat_lapic(acpi_srat_lapic_t *lapic, u8 node, u8 apic);
int acpi_create_srat_x2apic(acpi_srat_x2apic_t *x2apic, u32 node, u32 apic);