summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-02-09 21:00:56 +0000
committerkib <kib@FreeBSD.org>2015-02-09 21:00:56 +0000
commit0754f0eac9d97737274d7b77cb519abb250362b3 (patch)
treed2e88c87f150ce7e0dfe34e37fbc902c5f84fd8a /sys/contrib
parente83a0077986ede1b5481738b285a4612ca8636e1 (diff)
downloadFreeBSD-src-0754f0eac9d97737274d7b77cb519abb250362b3.zip
FreeBSD-src-0754f0eac9d97737274d7b77cb519abb250362b3.tar.gz
Add x2APIC support. Enable it by default if CPU is capable. The
hw.x2apic_enable tunable allows disabling it from the loader prompt. To closely repeat effects of the uncached memory ops when accessing registers in the xAPIC mode, the x2APIC writes to MSRs are preceeded by mfence, except for the EOI notifications. This is probably too strict, only ICR writes to send IPI require serialization to ensure that other CPUs see the previous actions when IPI is delivered. This may be changed later. In vmm justreturn IPI handler, call doreti_iret instead of doing iretd inline, to handle corner conditions. Note that the patch only switches LAPICs into x2APIC mode. It does not enables FreeBSD to support > 255 CPUs, which requires parsing x2APIC MADT entries and doing interrupts remapping, but is the required step on the way. Reviewed by: neel Tested by: pho (real hardware), neel (on bhyve) Discussed with: jhb, grehan Sponsored by: The FreeBSD Foundation MFC after: 2 months
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/acpica/include/actbl2.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/contrib/dev/acpica/include/actbl2.h b/sys/contrib/dev/acpica/include/actbl2.h
index a6f2f20..0f929eb 100644
--- a/sys/contrib/dev/acpica/include/actbl2.h
+++ b/sys/contrib/dev/acpica/include/actbl2.h
@@ -466,6 +466,7 @@ typedef struct acpi_table_dmar
/* Masks for Flags field above */
#define ACPI_DMAR_INTR_REMAP (1)
+#define ACPI_DMAR_X2APIC_OPT_OUT (2)
/* DMAR subtable header */
OpenPOWER on IntegriCloud