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 Switch from printf to panic. These mess...



details:   https://anonhg.NetBSD.org/src/rev/920a7d7823d7
branches:  trunk
changeset: 844532:920a7d7823d7
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Aug 21 16:35:10 2019 +0000

description:
Switch from printf to panic. These messages were notorious for being
unreadable, and at least a clean panic allows the user to inspect the
system via DDB. Also simplify the output, EAX gets overwritten with
the error code so it indicates nothing meaningful.

diffstat:

 sys/arch/amd64/amd64/locore.S |  16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diffs (32 lines):

diff -r b2a710f5e749 -r 920a7d7823d7 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S     Wed Aug 21 13:48:37 2019 +0000
+++ b/sys/arch/amd64/amd64/locore.S     Wed Aug 21 16:35:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.185 2019/05/18 13:32:12 maxv Exp $        */
+/*     $NetBSD: locore.S,v 1.186 2019/08/21 16:35:10 maxv Exp $        */
 
 /*
  * Copyright-o-rama!
@@ -1322,19 +1322,11 @@
        jmp     syscall_sysret
 
 #ifdef DIAGNOSTIC
-       /* Report SPL error */
 .Lspl_error:
        movabsq $4f,%rdi
-       movl    TF_RAX(%rsp),%esi
-       movl    TF_RDI(%rsp),%edx
-       movl    %ebx,%ecx
-       movl    CPUVAR(ILEVEL),%r8d
-       xorq    %rax,%rax
-       call    _C_LABEL(printf)
-       movl    $IPL_NONE,%edi
-       call    _C_LABEL(spllower)
-       jmp     .Lsyscall_checkast
-4:     .asciz  "WARNING: SPL NOT LOWERED ON SYSCALL %d %d EXIT %x %x\n"
+       movl    CPUVAR(ILEVEL),%esi
+       call    _C_LABEL(panic)
+4:     .asciz  "spl not lowered on syscall, ilevel=%x"
 #endif
 
 /* AST pending or pmap load needed */



Home | Main Index | Thread Index | Old Index