Attention is currently required from: Jonathan Zhang, Johnny Lin, Christian Walter, Arthur Heymans, Tim Chu.
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/73366 )
Change subject: xeon_sp: Setup x2apic in SRAT ......................................................................
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 --- M src/soc/intel/xeon_sp/nb_acpi.c 1 file changed, 27 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/73366/1
diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c index 121c8a1..89deb88 100644 --- a/src/soc/intel/xeon_sp/nb_acpi.c +++ b/src/soc/intel/xeon_sp/nb_acpi.c @@ -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 @@ 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;