acpi: Add SRAT x2APIC table support

For platforms using X2APIC mode add SRAT x2APIC table
generation. This allows to setup proper SRAT tables.

Change-Id: If78c423884b7ce9330f0f46998ac83da334ee26d
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73365
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Naresh Solanki
2023-01-20 19:13:02 +01:00
committed by Felix Held
parent 87d97ffe16
commit 76835cc678
2 changed files with 26 additions and 0 deletions

View File

@@ -531,6 +531,19 @@ int acpi_create_srat_lapic(acpi_srat_lapic_t *lapic, u8 node, u8 apic)
return lapic->length;
}
int acpi_create_srat_x2apic(acpi_srat_x2apic_t *x2apic, u32 node, u32 apic)
{
memset((void *)x2apic, 0, sizeof(acpi_srat_x2apic_t));
x2apic->type = 2; /* Processor x2APIC structure */
x2apic->length = sizeof(acpi_srat_x2apic_t);
x2apic->flags = (1 << 0); /* Enabled (the use of this structure). */
x2apic->proximity_domain = node;
x2apic->x2apic_id = apic;
return x2apic->length;
}
int acpi_create_srat_mem(acpi_srat_mem_t *mem, u8 node, u32 basek, u32 sizek,
u32 flags)
{