From owner-cvs-src-old@FreeBSD.ORG Thu Apr 1 15:18:14 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1708D1065808 for ; Thu, 1 Apr 2010 15:18:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DD9678FC13 for ; Thu, 1 Apr 2010 15:18:13 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o31FIDKQ067687 for ; Thu, 1 Apr 2010 15:18:13 GMT (envelope-from marius@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o31FIDP4067686 for cvs-src-old@freebsd.org; Thu, 1 Apr 2010 15:18:13 GMT (envelope-from marius@repoman.freebsd.org) Message-Id: <201004011518.o31FIDP4067686@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marius@repoman.freebsd.org using -f From: Marius Strobl Date: Thu, 1 Apr 2010 15:17:52 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/sys/sparc64/include wstate.h src/sys/sparc64/sparc64 exception.S locore.S machdep.c support.S X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 15:18:14 -0000 marius 2010-04-01 15:17:52 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/sparc64/include wstate.h sys/sparc64/sparc64 exception.S locore.S machdep.c support.S Log: SVN rev 206045 on 2010-04-01 15:17:52Z by marius MFC: r205409 - The firmware of Sun Fire V1280 has a misfeature of setting %wstate to 7 which corresponds to WSTATE_KMIX in OpenSolaris whenever calling into it which totally screws us even when restoring %wstate afterwards as spill/fill traps can happen while in OFW. The rather hackish OpenBSD approach of just setting the equivalent of WSTATE_KERNEL to 7 also is no option as we treat %wstate as a bit field. So in order to deal with this problem actually implement spill/fill handlers for %wstate 7 which just act as the WSTATE_KERNEL ones except of theoretically also handling 32-bit, turn off interrupts completely so we don't even take IPIs while in OFW which should ensure we only take spill/fill traps at most and restore %wstate after calling into OFW once we have taken over the trap table. While at it, actually set WSTATE_{,PROM}_KMIX before calling into OFW just like OpenSolaris does, which should at least help testing this change on non-V1280. - Remove comments referring to the %wstate usage in BSD/OS. - Remove the no longer used RSF_ALIGN_RETRY macro. - Correct some trap table addresses in comments. - Ensure %wstate is set to WSTATE_KERNEL when taking over the trap table. - Ensure PSTATE_AM is off when entering or exiting to OFW as well as that interrupts are also completely off when exiting to OFW as the firmware trap table shouldn't be used to handle our interrupts. Revision Changes Path 1.4.24.1 +5 -30 src/sys/sparc64/include/wstate.h 1.75.2.5 +37 -15 src/sys/sparc64/sparc64/exception.S 1.22.2.4 +5 -0 src/sys/sparc64/sparc64/locore.S 1.138.2.16 +2 -1 src/sys/sparc64/sparc64/machdep.c 1.32.2.4 +20 -5 src/sys/sparc64/sparc64/support.S