xeon_sp: Setup x2apic in SRAT
Set up SRAT table in X2APIC mode when necessary. Change-Id: Ib8b4cebefe81f7b5514524dba2fa364eee4bb157 Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73366 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
994ff52464
commit
559f9ed583
|
@ -4,6 +4,7 @@
|
|||
#include <arch/hpet.h>
|
||||
#include <assert.h>
|
||||
#include <cbmem.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <device/mmio.h>
|
||||
#include <device/pci.h>
|
||||
#include <soc/acpi.h>
|
||||
|
@ -26,10 +27,20 @@ unsigned long acpi_create_srat_lapics(unsigned long current)
|
|||
for (cpu = all_devices; cpu; cpu = cpu->next) {
|
||||
if (!is_enabled_cpu(cpu))
|
||||
continue;
|
||||
printk(BIOS_DEBUG, "SRAT: lapic cpu_index=%02x, node_id=%02x, apic_id=%02x\n",
|
||||
cpu_index, cpu->path.apic.node_id, cpu->path.apic.apic_id);
|
||||
current += acpi_create_srat_lapic((acpi_srat_lapic_t *)current,
|
||||
cpu->path.apic.node_id, cpu->path.apic.apic_id);
|
||||
|
||||
if (is_x2apic_mode()) {
|
||||
printk(BIOS_DEBUG, "SRAT: x2apic cpu_index=%08x, node_id=%02x, apic_id=%08x\n",
|
||||
cpu_index, cpu->path.apic.node_id, cpu->path.apic.apic_id);
|
||||
|
||||
current += acpi_create_srat_x2apic((acpi_srat_x2apic_t *)current,
|
||||
cpu->path.apic.node_id, cpu->path.apic.apic_id);
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "SRAT: lapic cpu_index=%02x, node_id=%02x, apic_id=%02x\n",
|
||||
cpu_index, cpu->path.apic.node_id, cpu->path.apic.apic_id);
|
||||
|
||||
current += acpi_create_srat_lapic((acpi_srat_lapic_t *)current,
|
||||
cpu->path.apic.node_id, cpu->path.apic.apic_id);
|
||||
}
|
||||
cpu_index++;
|
||||
}
|
||||
return current;
|
||||
|
|
Loading…
Reference in New Issue