Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/amd64 Declare and use TRAP_ENTRY_POINT_DNA. T...



details:   https://anonhg.NetBSD.org/src/rev/a1343d3b7949
branches:  trunk
changeset: 829927:a1343d3b7949
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Feb 17 20:47:04 2018 +0000

description:
Declare and use TRAP_ENTRY_POINT_DNA. This time we don't give an is_ztrap
argument, because the macro is tied to the entry point, and it would be
wrong to suggest the paramater is controllable. No real functional change.

diffstat:

 sys/arch/amd64/amd64/amd64_trap.S |  29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diffs (57 lines):

diff -r 4625e9a19e07 -r a1343d3b7949 sys/arch/amd64/amd64/amd64_trap.S
--- a/sys/arch/amd64/amd64/amd64_trap.S Sat Feb 17 20:41:57 2018 +0000
+++ b/sys/arch/amd64/amd64/amd64_trap.S Sat Feb 17 20:47:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amd64_trap.S,v 1.28 2018/02/17 20:41:57 maxv Exp $     */
+/*     $NetBSD: amd64_trap.S,v 1.29 2018/02/17 20:47:04 maxv Exp $     */
 
 /*
  * Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@
 #define check_swapgs alltraps
 #endif
 
-#define        TRAP(a) PRE_TRAP ; pushq $(a)
+#define        TRAP(a)         PRE_TRAP ; pushq $(a)
 #define        ZTRAP(a)        PRE_TRAP ; pushq $0 ; pushq $(a)
 
 .macro TRAP_ENTRY_POINT        name,code,is_ztrap
@@ -130,6 +130,19 @@
 IDTVEC_END(\name)
 .endm
 
+.macro TRAP_ENTRY_POINT_DNA    name,code
+IDTVEC(\name)
+       ZTRAP(\code)
+       INTRENTRY
+#ifdef DIAGNOSTIC
+       movl    CPUVAR(ILEVEL),%ebx
+#endif
+       movq    %rsp,%rdi
+       call    _C_LABEL(fpudna)
+       jmp     .Lalltraps_checkusr
+IDTVEC_END(\name)
+.endm
+
 .macro TRAP_ENTRY_POINT_FPU    name,code,is_ztrap
 IDTVEC(\name)
        .if     \is_ztrap
@@ -257,17 +270,7 @@
 TRAP_ENTRY_POINT       trap04,T_OFLOW,1
 TRAP_ENTRY_POINT       trap05,T_BOUND,1
 TRAP_ENTRY_POINT       trap06,T_PRIVINFLT,1
-
-IDTVEC(trap07)
-       ZTRAP(T_DNA)
-       INTRENTRY
-#ifdef DIAGNOSTIC
-       movl    CPUVAR(ILEVEL),%ebx
-#endif
-       movq    %rsp,%rdi
-       call    _C_LABEL(fpudna)
-       jmp     .Lalltraps_checkusr
-IDTVEC_END(trap07)
+TRAP_ENTRY_POINT_DNA   trap07,T_DNA
 
 /*
  * Double faults execute on a particular stack, and we must not jump out



Home | Main Index | Thread Index | Old Index