src/*acpi: create acpi table for x2apic mode

Create acpi table for x2apic nmi, apic_ids

BUG=None
BRANCH=None
TEST=boot to OS and check apic mode
cat /proc/cpuinfo | grep "apicid"

Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Change-Id: I9399d30b686b55d86806f5db4110bf4a80fe459b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51724
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Wonkyu Kim 2021-03-22 20:07:15 -07:00 committed by Patrick Georgi
parent 26ab9bfeb5
commit 0aeedd42ee
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include <soc/gpio.h> #include <soc/gpio.h>
#include <soc/iomap.h> #include <soc/iomap.h>
#include <soc/pm.h> #include <soc/pm.h>
#include <cpu/x86/lapic.h>
#define CPUID_6_EAX_ISST (1 << 7) #define CPUID_6_EAX_ISST (1 << 7)
@ -80,6 +81,10 @@ static unsigned long acpi_madt_irq_overrides(unsigned long current)
/* NMI */ /* NMI */
current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)current, 0xff, 5, 1); current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)current, 0xff, 5, 1);
if (is_x2apic_mode())
current += acpi_create_madt_lx2apic_nmi((acpi_madt_lx2apic_nmi_t *)current,
0xff, 0xd, 1);
return current; return current;
} }