mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
Register an interrupt vector for DTrace return probes. There is some
code missing in lapic to make sure that we don't overwrite this entry, but this will be done on a sequent commit. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
97f047a80b
commit
cba3269417
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211924
@ -108,6 +108,10 @@ IDTVEC(dbg)
|
||||
TRAP_NOEN(T_TRCTRAP)
|
||||
IDTVEC(bpt)
|
||||
TRAP_NOEN(T_BPTFLT)
|
||||
#ifdef KDTRACE_HOOKS
|
||||
IDTVEC(dtrace_ret)
|
||||
TRAP_NOEN(T_DTRACE_RET)
|
||||
#endif
|
||||
|
||||
/* Regular traps; The cpu does not supply tf_err for these. */
|
||||
#define TRAP(a) \
|
||||
|
@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "opt_msgbuf.h"
|
||||
#include "opt_perfmon.h"
|
||||
#include "opt_sched.h"
|
||||
#include "opt_kdtrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -1089,6 +1090,9 @@ extern inthand_t
|
||||
IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot),
|
||||
IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align),
|
||||
IDTVEC(xmm), IDTVEC(dblfault),
|
||||
#ifdef KDTRACE_HOOKS
|
||||
IDTVEC(dtrace_ret),
|
||||
#endif
|
||||
IDTVEC(fast_syscall), IDTVEC(fast_syscall32);
|
||||
|
||||
#ifdef DDB
|
||||
@ -1617,6 +1621,9 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
|
||||
setidt(IDT_AC, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0);
|
||||
setidt(IDT_MC, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0);
|
||||
setidt(IDT_XF, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0);
|
||||
#ifdef KDTRACE_HOOKS
|
||||
setidt(IDT_DTRACE_RET, &IDTVEC(dtrace_ret), SDT_SYSIGT, SEL_UPL, 0);
|
||||
#endif
|
||||
|
||||
r_idt.rd_limit = sizeof(idt0) - 1;
|
||||
r_idt.rd_base = (long) idt;
|
||||
|
@ -214,6 +214,7 @@ struct region_descriptor {
|
||||
#define IDT_XF 19 /* #XF: SIMD Floating-Point Exception */
|
||||
#define IDT_IO_INTS NRSVIDT /* Base of IDT entries for I/O interrupts. */
|
||||
#define IDT_SYSCALL 0x80 /* System Call Interrupt Vector */
|
||||
#define IDT_DTRACE_RET 0x92 /* DTrace pid provider Interrupt Vector */
|
||||
|
||||
/*
|
||||
* Entries in the Global Descriptor Table (GDT)
|
||||
|
@ -108,6 +108,8 @@ IDTVEC(nmi)
|
||||
pushl $0; TRAP(T_NMI)
|
||||
IDTVEC(bpt)
|
||||
pushl $0; TRAP(T_BPTFLT)
|
||||
IDTVEC(dtrace_ret)
|
||||
pushl $0; TRAP(T_DTRACE_RET)
|
||||
IDTVEC(ofl)
|
||||
pushl $0; TRAP(T_OFLOW)
|
||||
IDTVEC(bnd)
|
||||
|
@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "opt_npx.h"
|
||||
#include "opt_perfmon.h"
|
||||
#include "opt_xbox.h"
|
||||
#include "opt_kdtrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -1876,7 +1877,11 @@ extern inthand_t
|
||||
IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm),
|
||||
IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot),
|
||||
IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align),
|
||||
IDTVEC(xmm), IDTVEC(lcall_syscall), IDTVEC(int0x80_syscall);
|
||||
IDTVEC(xmm),
|
||||
#ifdef KDTRACE_HOOKS
|
||||
IDTVEC(dtrace_ret),
|
||||
#endif
|
||||
IDTVEC(lcall_syscall), IDTVEC(int0x80_syscall);
|
||||
|
||||
#ifdef DDB
|
||||
/*
|
||||
@ -2825,6 +2830,10 @@ init386(first)
|
||||
GSEL(GCODE_SEL, SEL_KPL));
|
||||
setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYS386TGT, SEL_UPL,
|
||||
GSEL(GCODE_SEL, SEL_KPL));
|
||||
#ifdef KDTRACE_HOOKS
|
||||
setidt(IDT_DTRACE_RET, &IDTVEC(dtrace_ret), SDT_SYS386TGT, SEL_UPL,
|
||||
GSEL(GCODE_SEL, SEL_KPL));
|
||||
#endif
|
||||
|
||||
r_idt.rd_limit = sizeof(idt0) - 1;
|
||||
r_idt.rd_base = (int) idt;
|
||||
|
@ -207,6 +207,7 @@ struct region_descriptor {
|
||||
#define IDT_XF 19 /* #XF: SIMD Floating-Point Exception */
|
||||
#define IDT_IO_INTS NRSVIDT /* Base of IDT entries for I/O interrupts. */
|
||||
#define IDT_SYSCALL 0x80 /* System Call Interrupt Vector */
|
||||
#define IDT_DTRACE_RET 0x92 /* DTrace pid provider Interrupt Vector */
|
||||
|
||||
/*
|
||||
* Entries in the Global Descriptor Table (GDT)
|
||||
|
Loading…
Reference in New Issue
Block a user