trap.c (174254) | trap.c (174395) |
---|---|
1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 24 unchanged lines hidden (view full) --- 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 38 */ 39 40#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 24 unchanged lines hidden (view full) --- 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/amd64/amd64/trap.c 174254 2007-12-04 12:33:03Z kib $"); | 41__FBSDID("$FreeBSD: head/sys/amd64/amd64/trap.c 174395 2007-12-07 08:20:17Z jkoshy $"); |
42 43/* 44 * AMD64 Trap and System call handling 45 */ 46 47#include "opt_clock.h" 48#include "opt_cpu.h" 49#include "opt_hwpmc_hooks.h" --- 140 unchanged lines hidden (view full) --- 190#ifdef HWPMC_HOOKS 191 /* 192 * CPU PMCs interrupt using an NMI. If the PMC module is 193 * active, pass the 'rip' value to the PMC module's interrupt 194 * handler. A return value of '1' from the handler means that 195 * the NMI was handled by it and we can return immediately. 196 */ 197 if (type == T_NMI && pmc_intr && | 42 43/* 44 * AMD64 Trap and System call handling 45 */ 46 47#include "opt_clock.h" 48#include "opt_cpu.h" 49#include "opt_hwpmc_hooks.h" --- 140 unchanged lines hidden (view full) --- 190#ifdef HWPMC_HOOKS 191 /* 192 * CPU PMCs interrupt using an NMI. If the PMC module is 193 * active, pass the 'rip' value to the PMC module's interrupt 194 * handler. A return value of '1' from the handler means that 195 * the NMI was handled by it and we can return immediately. 196 */ 197 if (type == T_NMI && pmc_intr && |
198 (*pmc_intr)(PCPU_GET(cpuid), (uintptr_t) frame->tf_rip, 199 TRAPF_USERMODE(frame))) | 198 (*pmc_intr)(PCPU_GET(cpuid), frame)) |
200 goto out; 201#endif 202 203 if ((frame->tf_rflags & PSL_I) == 0) { 204 /* 205 * Buggy application or kernel code has disabled 206 * interrupts and then trapped. Enabling interrupts 207 * now is wrong, but it is better than running with --- 729 unchanged lines hidden --- | 199 goto out; 200#endif 201 202 if ((frame->tf_rflags & PSL_I) == 0) { 203 /* 204 * Buggy application or kernel code has disabled 205 * interrupts and then trapped. Enabling interrupts 206 * now is wrong, but it is better than running with --- 729 unchanged lines hidden --- |