Sun Oct 31 04:51:19 2010 UTC ()
keep interrupts disabled in NMI handler.
the patch provided by IRINO yoshiaki in PR/43007.


(yamt)
diff -r1.53 -r1.54 src/sys/arch/i386/i386/vector.S

cvs diff -r1.53 -r1.54 src/sys/arch/i386/i386/vector.S (expand / switch to unified diff)

--- src/sys/arch/i386/i386/vector.S 2010/02/22 06:42:14 1.53
+++ src/sys/arch/i386/i386/vector.S 2010/10/31 04:51:19 1.54
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vector.S,v 1.53 2010/02/22 06:42:14 darran Exp $ */ 1/* $NetBSD: vector.S,v 1.54 2010/10/31 04:51:19 yamt Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 (c) Wasabi Systems, Inc. 4 * Copyright 2002 (c) Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Frank van der Linden for Wasabi Systems, Inc. 7 * Written by Frank van der Linden for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -55,27 +55,27 @@ @@ -55,27 +55,27 @@
55 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 55 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
56 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 56 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
57 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 57 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
58 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 58 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
59 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 59 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
60 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 60 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
61 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 61 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
62 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 62 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
63 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 63 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
64 * POSSIBILITY OF SUCH DAMAGE. 64 * POSSIBILITY OF SUCH DAMAGE.
65 */ 65 */
66 66
67#include <machine/asm.h> 67#include <machine/asm.h>
68__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.53 2010/02/22 06:42:14 darran Exp $"); 68__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.54 2010/10/31 04:51:19 yamt Exp $");
69 69
70#include "opt_ddb.h" 70#include "opt_ddb.h"
71#include "opt_multiprocessor.h" 71#include "opt_multiprocessor.h"
72#include "opt_ipkdb.h" 72#include "opt_ipkdb.h"
73#include "opt_vm86.h" 73#include "opt_vm86.h"
74#include "opt_xen.h" 74#include "opt_xen.h"
75#include "opt_dtrace.h" 75#include "opt_dtrace.h"
76 76
77#include <machine/i8259.h> 77#include <machine/i8259.h>
78#include <machine/i82093reg.h> 78#include <machine/i82093reg.h>
79#include <machine/i82489reg.h> 79#include <machine/i82489reg.h>
80#include <machine/frameasm.h> 80#include <machine/frameasm.h>
81#include <machine/segments.h> 81#include <machine/segments.h>
@@ -886,27 +886,30 @@ _C_LABEL(xenev_stubs): @@ -886,27 +886,30 @@ _C_LABEL(xenev_stubs):
886#ifdef IPKDB 886#ifdef IPKDB
887#define BPTTRAP(a) pushl $0; pushl $(a); jmp _C_LABEL(bpttraps) 887#define BPTTRAP(a) pushl $0; pushl $(a); jmp _C_LABEL(bpttraps)
888#else 888#else
889#define BPTTRAP(a) ZTRAP(a) 889#define BPTTRAP(a) ZTRAP(a)
890#endif 890#endif
891 891
892 892
893 .text 893 .text
894IDTVEC(trap00) 894IDTVEC(trap00)
895 ZTRAP(T_DIVIDE) 895 ZTRAP(T_DIVIDE)
896IDTVEC(trap01) 896IDTVEC(trap01)
897 BPTTRAP(T_TRCTRAP) 897 BPTTRAP(T_TRCTRAP)
898IDTVEC(trap02) 898IDTVEC(trap02)
899 ZTRAP(T_NMI) 899 pushl $0
 900 pushl $(T_NMI)
 901 INTRENTRY
 902 jmp _C_LABEL(calltrap)
900IDTVEC(trap03) 903IDTVEC(trap03)
901 BPTTRAP(T_BPTFLT) 904 BPTTRAP(T_BPTFLT)
902IDTVEC(trap04) 905IDTVEC(trap04)
903 ZTRAP(T_OFLOW) 906 ZTRAP(T_OFLOW)
904IDTVEC(trap05) 907IDTVEC(trap05)
905 ZTRAP(T_BOUND) 908 ZTRAP(T_BOUND)
906/* 909/*
907 * Privileged instruction fault. 910 * Privileged instruction fault.
908 */ 911 */
909#ifdef KDTRACE_HOOKS 912#ifdef KDTRACE_HOOKS
910 SUPERALIGN_TEXT 913 SUPERALIGN_TEXT
911IDTVEC(trap06) 914IDTVEC(trap06)
912 /* Check if there is no DTrace hook registered. */ 915 /* Check if there is no DTrace hook registered. */