Sat Dec 7 10:19:35 2019 UTC ()
Panic instead of printf, same as syscall.


(maxv)
diff -r1.50 -r1.51 src/sys/arch/amd64/amd64/amd64_trap.S

cvs diff -r1.50 -r1.51 src/sys/arch/amd64/amd64/amd64_trap.S (expand / switch to unified diff)

--- src/sys/arch/amd64/amd64/amd64_trap.S 2019/11/14 16:23:52 1.50
+++ src/sys/arch/amd64/amd64/amd64_trap.S 2019/12/07 10:19:35 1.51
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: amd64_trap.S,v 1.50 2019/11/14 16:23:52 maxv Exp $ */ 1/* $NetBSD: amd64_trap.S,v 1.51 2019/12/07 10:19:35 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 2007, 2008, 2017 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, by Andrew Doran and by Maxime Villard. 8 * by Charles M. Hannum, by Andrew Doran and by Maxime Villard.
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.
@@ -684,33 +684,28 @@ calltrap: @@ -684,33 +684,28 @@ calltrap:
684 jne .Lspl_error 684 jne .Lspl_error
685#endif 685#endif
686 INTRFASTEXIT 686 INTRFASTEXIT
687 687
6889: STI(si) 6889: STI(si)
689 call _C_LABEL(do_pmap_load) 689 call _C_LABEL(do_pmap_load)
690 jmp .Lalltraps_checkast /* re-check ASTs */ 690 jmp .Lalltraps_checkast /* re-check ASTs */
691 691
692#ifdef DIAGNOSTIC 692#ifdef DIAGNOSTIC
693.Lspl_error: 693.Lspl_error:
694 STI(si) 694 STI(si)
695 movabsq $4f,%rdi 695 movabsq $4f,%rdi
696 movl CPUVAR(ILEVEL),%esi 696 movl CPUVAR(ILEVEL),%esi
697 movl %ebx,%edx 697 call _C_LABEL(panic)
698 xorq %rax,%rax 6984: .asciz "spl not lowered on trap exit, ilevel=%x"
699 call _C_LABEL(printf) 
700 movl %ebx,%edi 
701 call _C_LABEL(spllower) 
702 jmp .Lalltraps_checkast 
7034: .asciz "WARNING: SPL NOT LOWERED ON TRAP EXIT %x %x\n" 
704#endif 699#endif
705END(alltraps) 700END(alltraps)
706 701
707#ifdef KDTRACE_HOOKS 702#ifdef KDTRACE_HOOKS
708 .bss 703 .bss
709 .globl dtrace_invop_jump_addr 704 .globl dtrace_invop_jump_addr
710 .align 8 705 .align 8
711 .type dtrace_invop_jump_addr, @object 706 .type dtrace_invop_jump_addr, @object
712 .size dtrace_invop_jump_addr, 8 707 .size dtrace_invop_jump_addr, 8
713dtrace_invop_jump_addr: 708dtrace_invop_jump_addr:
714 .zero 8 709 .zero 8
715 .globl dtrace_invop_calltrap_addr 710 .globl dtrace_invop_calltrap_addr
716 .align 8 711 .align 8