From aaee6a1839f7642586505c0bd3224f1362f4fcc3 Mon Sep 17 00:00:00 2001 From: petrov Date: Wed, 12 Dec 2001 19:14:47 +0000 Subject: [PATCH] initialize all fpu registers and don't panic on user 'privileged action' --- sys/arch/sparc64/sparc64/trap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index a0383e9469a3..f9a3ff8d8b66 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.74 2001/09/22 00:59:30 mrg Exp $ */ +/* $NetBSD: trap.c,v 1.75 2001/12/12 19:14:47 petrov Exp $ */ /* * Copyright (c) 1996 @@ -174,6 +174,8 @@ int trapdebug = 0/*|TDB_SYSCALL|TDB_STOPSIG|TDB_STOPCPIO|TDB_ADDFLT|TDB_FOLLOW*/ __asm(".align 64"); struct fpstate64 initfpstate = { { ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0 } }; @@ -709,6 +711,10 @@ badtrap: trapsignal(p, SIGILL, 0); /* XXX code?? */ break; + case T_PRIVACT: + trapsignal(p, SIGILL, 0); + break; + case T_FPDISABLED: { struct fpstate64 *fs = p->p_md.md_fpstate;