| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: spl.S,v 1.39 2013/06/22 06:57:30 uebayasi Exp $ */ | | 1 | /* $NetBSD: spl.S,v 1.40 2014/01/11 17:06:15 christos Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Charles M. Hannum and Andrew Doran. | | 8 | * by Charles M. Hannum and Andrew Doran. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -20,27 +20,27 @@ | | | @@ -20,27 +20,27 @@ |
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | * POSSIBILITY OF SUCH DAMAGE. | | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <machine/asm.h> | | 32 | #include <machine/asm.h> |
33 | __KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.39 2013/06/22 06:57:30 uebayasi Exp $"); | | 33 | __KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.40 2014/01/11 17:06:15 christos Exp $"); |
34 | | | 34 | |
35 | #include "opt_vm86.h" | | 35 | #include "opt_vm86.h" |
36 | #include "opt_ddb.h" | | 36 | #include "opt_ddb.h" |
37 | #include "opt_spldebug.h" | | 37 | #include "opt_spldebug.h" |
38 | #include "opt_xen.h" | | 38 | #include "opt_xen.h" |
39 | | | 39 | |
40 | #include <machine/trap.h> | | 40 | #include <machine/trap.h> |
41 | #include <machine/segments.h> | | 41 | #include <machine/segments.h> |
42 | #include <machine/frameasm.h> | | 42 | #include <machine/frameasm.h> |
43 | | | 43 | |
44 | #include "assym.h" | | 44 | #include "assym.h" |
45 | | | 45 | |
46 | .text | | 46 | .text |
| @@ -216,27 +216,26 @@ IDTVEC(spllower) | | | @@ -216,27 +216,26 @@ IDTVEC(spllower) |
216 | testl %eax,%eax | | 216 | testl %eax,%eax |
217 | jnz 1b | | 217 | jnz 1b |
218 | 4: | | 218 | 4: |
219 | #else | | 219 | #else |
220 | STI(%eax) | | 220 | STI(%eax) |
221 | #endif /* XEN */ | | 221 | #endif /* XEN */ |
222 | popl %edi | | 222 | popl %edi |
223 | popl %esi | | 223 | popl %esi |
224 | popl %ebx | | 224 | popl %ebx |
225 | leave | | 225 | leave |
226 | ret | | 226 | ret |
227 | #if defined(DEBUG) | | 227 | #if defined(DEBUG) |
228 | .Lspllower_panic: | | 228 | .Lspllower_panic: |
229 | addl $8, %esp | | | |
230 | pushl $1f | | 229 | pushl $1f |
231 | call _C_LABEL(panic) | | 230 | call _C_LABEL(panic) |
232 | 1: .asciz "SPLLOWER: INTERRUPT ENABLED" | | 231 | 1: .asciz "SPLLOWER: INTERRUPT ENABLED" |
233 | #endif /* defined(DEBUG) */ | | 232 | #endif /* defined(DEBUG) */ |
234 | IDTVEC_END(spllower) | | 233 | IDTVEC_END(spllower) |
235 | | | 234 | |
236 | /* | | 235 | /* |
237 | * Handle return from interrupt after device handler finishes. | | 236 | * Handle return from interrupt after device handler finishes. |
238 | * | | 237 | * |
239 | * Important registers: | | 238 | * Important registers: |
240 | * ebx - cpl to restore | | 239 | * ebx - cpl to restore |
241 | * esi - address to resume loop at | | 240 | * esi - address to resume loop at |
242 | * edi - scratch for Xsoftnet | | 241 | * edi - scratch for Xsoftnet |