freebsd-dev/sys
Andriy Gapon bc1e649924 Local APIC: add support for extended LVT entries found in AMD processors
The extended LVT entries can be used to configure interrupt delivery
for various events that are internal to a processor and can use this
feature.

All current processors that support the feature have four of such entries.
The entries are all masked upon the processor reset, but it's possible
that firmware may use some of them.

BIOS and Kernel Developer's Guides for some processor models do not assign
any particular names to the extended LVTs, while other BKDGs provide names
and suggested usage for them.
However, there is no fixed mapping between the LVTs and the processor
events in any processor model that supports the feature.  Any entry can be
assigned to any event.  The assignment is done by programming an offset
of an entry into configuration bits corresponding to an event.

This change does not expose the flexibility that the feature offers.
The change adds just a single method to configure a hardcoded extended LVT
entry to deliver APIC_CMC_INT.  The method is designed to be used with
Machine Check Error Thresholding mechanism on supported processor models.

For references please see BKDGs for families 10h - 16h and specifically
descriptions of APIC30, APIC400, APIC[530:500] registers.
For a description of the Error Thresholding mechanism see, for example,
BKDG for family 10h, section 2.12.1.6.
http://developer.amd.com/resources/developer-guides-manuals/

Thanks to jhb and kib for their suggestions.

Reviewed by:	kib
Discussed with:	jhb
MFC after:	5 weeks
Relnotes:	maybe
Differential Revision: https://reviews.freebsd.org/D9612
2017-02-28 18:48:12 +00:00
..
amd64 Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
arm Add SOC_ALTERA_* kernel options per each SoC and use it to 2017-02-28 16:20:33 +00:00
arm64 Load the new sp_el0 with interrupts disabled in fork_trampoline. If an 2017-02-15 14:56:47 +00:00
boot Add support for Intel Arria 10 SoC Development Kit. 2017-02-28 14:02:16 +00:00
bsm
cam Make ctl_queue_sense() not sleep. 2017-02-28 11:56:17 +00:00
cddl MFV 314276 2017-02-25 20:01:17 +00:00
compat Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
conf Add SOC_ALTERA_* kernel options per each SoC and use it to 2017-02-28 16:20:33 +00:00
contrib Add 7265D firmware. 2017-02-22 04:42:02 +00:00
crypto Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
ddb Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
dev Add compatible string. 2017-02-28 14:42:57 +00:00
fs Do not leak mount references for dying threads. 2017-02-25 10:38:18 +00:00
gdb
geom Add sysctl to control auto resize of the GEOM metadata. 2017-02-27 17:54:01 +00:00
gnu Add Ingenic X1000 DTS files (unofficial). 2016-11-19 15:03:49 +00:00
i386 Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
isa Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
kern Implement sbuf_prf(), which takes an sbuf and outputs it 2017-02-28 18:25:06 +00:00
kgssapi
libkern sys: Replace zero with NULL for pointers. 2017-02-22 02:35:59 +00:00
mips Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
modules Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
net Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
net80211 [net80211] validate VHT IEs. 2017-02-20 04:04:59 +00:00
netgraph mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. 2017-01-20 00:02:11 +00:00
netinet TCP window updates are only sent if the window can be increased by at 2017-02-23 18:14:36 +00:00
netinet6 Remove IPsec related PCB code from SCTP. 2017-02-13 11:37:52 +00:00
netipsec For translated packets do not adjust UDP checksum if it is zero. 2017-02-18 19:53:37 +00:00
netnatm
netpfil sys: Replace zero with NULL for pointers. 2017-02-22 02:35:59 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Avoid NULL dereference in a couple of sysctl handlers in ibcore. 2017-02-23 07:48:58 +00:00
opencrypto Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
powerpc Make kernel breakpoints work for book-e 2017-02-28 04:31:28 +00:00
riscv Implement atomic_fcmpset_*() for RISC-V. 2017-02-05 00:32:12 +00:00
rpc add svcpool_close to handle killed nfsd threads 2017-02-14 17:49:08 +00:00
security Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, 2016-11-22 00:41:24 +00:00
sparc64 Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
sys Implement timerfd family syscalls. 2017-02-26 09:48:18 +00:00
teken
tests
tools Replace using of objdump with elfdump 2017-01-10 18:46:40 +00:00
ufs Do not leak mount references for dying threads. 2017-02-25 10:38:18 +00:00
vm call vm_lowmem hook in uma_reclaim_worker 2017-02-25 16:39:21 +00:00
x86 Local APIC: add support for extended LVT entries found in AMD processors 2017-02-28 18:48:12 +00:00
xdr
xen "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00