freebsd-dev/sys/x86/include
John Baldwin 9e2154ff1c Cleanups related to debug exceptions on x86.
- Add constants for fields in DR6 and the reserved fields in DR7.  Use
  these constants instead of magic numbers in most places that use DR6
  and DR7.
- Refer to T_TRCTRAP as "debug exception" rather than a "trace trap"
  as it is not just for trace exceptions.
- Always read DR6 for debug exceptions and only clear TF in the flags
  register for user exceptions where DR6.BS is set.
- Clear DR6 before returning from a debug exception handler as
  recommended by the SDM dating all the way back to the 386.  This
  allows debuggers to determine the cause of each exception.  For
  kernel traps, clear DR6 in the T_TRCTRAP case and pass DR6 by value
  to other parts of the handler (namely, user_dbreg_trap()).  For user
  traps, wait until after trapsignal to clear DR6 so that userland
  debuggers can read DR6 via PT_GETDBREGS while the thread is stopped
  in trapsignal().

Reviewed by:	kib, rgrimes
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D15189
2018-05-22 00:45:00 +00:00
..
xen
_align.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
_inttypes.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
_limits.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
_stdint.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
_types.h Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
acpica_machdep.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
apicreg.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
apicvar.h Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00
apm_bios.h
bus_dma.h Clean up MD pollution of bus_dma.h: 2017-07-01 05:35:29 +00:00
bus.h amd64: Add a 48-bit MAXADDR constant 2018-01-13 17:55:22 +00:00
busdma_impl.h Add support for NUMA domains to bus dma tags. This causes all memory 2018-01-12 23:34:16 +00:00
cputypes.h Remove 'cpu' and 'cpu_class' on amd64. 2016-09-15 17:05:54 +00:00
dump.h
elf.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
endian.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fdt.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
float.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fpu.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
frame.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ifunc.h Add helper macros to hide some boring repeatable ceremonies to define 2018-05-03 21:45:59 +00:00
init.h x86: improve reservation of AP trampoline memory 2018-04-05 14:39:51 +00:00
legacyvar.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
mca.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
metadata.h
mptable.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
ofw_machdep.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
pci_cfgreg.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
psl.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ptrace.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
pvclock.h
reg.h Cleanups related to debug exceptions on x86. 2018-05-22 00:45:00 +00:00
segments.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
setjmp.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
sigframe.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
signal.h Remove very old and unused signal information codes. 2018-03-27 20:57:51 +00:00
specialreg.h Add definition for Intel Speculative Store Bypass Disable MSR bits 2018-05-21 21:07:13 +00:00
stack.h
stdarg.h Introduce an architecture-agnostic <sys/_stdarg.h> to reduce 2017-12-25 20:54:00 +00:00
sysarch.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
trap.h Remove very old and unused signal information codes. 2018-03-27 20:57:51 +00:00
ucontext.h Fix a typo. 2018-03-19 17:14:56 +00:00
vdso.h sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
vmware.h
x86_smp.h x86: improve reservation of AP trampoline memory 2018-04-05 14:39:51 +00:00
x86_var.h Cleanups related to debug exceptions on x86. 2018-05-22 00:45:00 +00:00