freebsd-skq/sys/conf
Konstantin Belousov 0a110d5b17 Use VT-d interrupt remapping block (IR) to perform FSB messages
translation.  In particular, despite IO-APICs only take 8bit apic id,
IR translation structures accept 32bit APIC Id, which allows x2APIC
mode to function properly.  Extend msi_cpu of struct msi_intrsrc and
io_cpu of ioapic_intsrc to full int from one byte.

KPI of IR is isolated into the x86/iommu/iommu_intrmap.h, to avoid
bringing all dmar headers into interrupt code. The non-PCI(e) devices
which generate message interrupts on FSB require special handling. The
HPET FSB interrupts are remapped, while DMAR interrupts are not.

For each msi and ioapic interrupt source, the iommu cookie is added,
which is in fact index of the IRE (interrupt remap entry) in the IR
table. Cookie is made at the source allocation time, and then used at
the map time to fill both IRE and device registers. The MSI
address/data registers and IO-APIC redirection registers are
programmed with the special values which are recognized by IR and used
to restore the IRE index, to find proper delivery mode and target.
Map all MSI interrupts in the block when msi_map() is called.

Since an interrupt source setup and dismantle code are done in the
non-sleepable context, flushing interrupt entries cache in the IR
hardware, which is done async and ideally waits for the interrupt,
requires busy-wait for queue to drain.  The dmar_qi_wait_for_seq() is
modified to take a boolean argument requesting busy-wait for the
written sequence number instead of waiting for interrupt.

Some interrupts are configured before IR is initialized, e.g. ACPI
SCI.  Add intr_reprogram() function to reprogram all already
configured interrupts, and call it immediately before an IR unit is
enabled.  There is still a small window after the IO-APIC redirection
entry is reprogrammed with cookie but before the unit is enabled, but
to fix this properly, IR must be started much earlier.

Add workarounds for 5500 and X58 northbridges, some revisions of which
have severe flaws in handling IR.  Use the same identification methods
as employed by Linux.

Review:	https://reviews.freebsd.org/D1892
Reviewed by:	neel
Discussed with:	jhb
Tested by:	glebius, pho (previous versions)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2015-03-19 13:57:47 +00:00
..
config.mk Populate new KERN_OPTS from all the opt_*.h files in 2015-02-18 15:25:19 +00:00
dtb.mk Prefer install over mkdir to create the directory. Add test to ensure 2015-02-09 16:29:44 +00:00
files Fix ixgbe(4) - add ix_txrx to compile in the kernel. 2015-03-18 05:03:07 +00:00
files.amd64 Use VT-d interrupt remapping block (IR) to perform FSB messages 2015-03-19 13:57:47 +00:00
files.arm Use the ARM unwinder with dtrace to extract the stack when asked. With this 2015-02-19 12:20:21 +00:00
files.i386 Use VT-d interrupt remapping block (IR) to perform FSB messages 2015-03-19 13:57:47 +00:00
files.mips
files.pc98 Merge pc98's machdep.c into i386/i386/machdep.c. 2014-10-04 06:01:30 +00:00
files.powerpc Remove FreeBSD/wii. 2015-02-10 06:35:16 +00:00
files.sparc64
kern.mk Merge ^/head r279313 through r279595. 2015-03-04 19:47:33 +00:00
kern.opts.mk Categorize certain kernel builds as being broken in certain places. 2015-03-12 03:57:19 +00:00
kern.post.mk
kern.pre.mk Globally enable -fms-extensions when building kernel with gcc, and remove 2015-02-17 19:27:14 +00:00
kmod_syms.awk
kmod.mk Allow the ARM unwinder to work through modules. This will be used to add 2015-02-19 12:06:57 +00:00
ldscript.amd64
ldscript.arm
ldscript.i386
ldscript.mips
ldscript.mips.cfe
ldscript.mips.mips64
ldscript.mips.octeon1
ldscript.powerpc Refactor PowerPC (especially AIM) init sequence to be less baroque. 2015-01-18 18:32:43 +00:00
ldscript.powerpc64 Refactor PowerPC (especially AIM) init sequence to be less baroque. 2015-01-18 18:32:43 +00:00
ldscript.sparc64
Makefile.amd64 Clang's 3.5 integrated assembler now handles these files correctly (it 2015-01-05 12:28:22 +00:00
Makefile.arm Since for clang 3.5.0 ARM EHABI is now the default, the -mllvm 2014-11-26 23:28:16 +00:00
Makefile.i386 Clang's 3.5 integrated assembler now handles these files correctly (it 2015-01-05 12:28:22 +00:00
Makefile.mips
Makefile.pc98 Clang's 3.5 integrated assembler now handles these files correctly (it 2015-01-05 12:28:22 +00:00
Makefile.powerpc Make 32-bit PowerPC kernels, like 64-bit PowerPC kernels, position-independent 2015-03-07 20:14:46 +00:00
Makefile.sparc64
makeLINT.mk
makeLINT.sed
newvers.sh Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the 2014-12-22 19:10:21 +00:00
NOTES Update to the Intel ixgbe driver: 2015-03-17 18:32:28 +00:00
options Reimplement support for userland core dump compression using a new interface 2015-03-09 03:50:53 +00:00
options.amd64
options.arm Add arm option ARM_NEW_PMAP, to allow us to begin adding the new pmap 2014-12-30 02:51:04 +00:00
options.i386 Garbage collect the asr driver. Hardware for it has not been produced in 2015-01-02 05:34:14 +00:00
options.mips
options.pc98
options.powerpc Remove FreeBSD/wii. 2015-02-10 06:35:16 +00:00
options.sparc64
systags.sh
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE The sn driver doesn't actually include microcode at the current time, 2014-12-30 02:39:44 +00:00