From owner-freebsd-ppc@FreeBSD.ORG Thu Mar 20 05:13:30 2014 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2B25C51 for ; Thu, 20 Mar 2014 05:13:30 +0000 (UTC) Received: from mail-yh0-x22f.google.com (mail-yh0-x22f.google.com [IPv6:2607:f8b0:4002:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 67EF1104 for ; Thu, 20 Mar 2014 05:13:30 +0000 (UTC) Received: by mail-yh0-f47.google.com with SMTP id 29so331487yhl.34 for ; Wed, 19 Mar 2014 22:13:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; bh=WTngPCBAreoXED69+c8sfB+oVFdiaFa5GYc35iScPRw=; b=JX/ciKdva9pEjGeHx/Vv+XGgdnBN+aJAo3tzAKqybbrwoWNIEU0DWx6hITBYHrox8s 1wsJgn/fEwzolaiVygpTzHkqyLU3uXkNA2BRyxdKrW5W8aiUvDNU2d2Q2t2Cg4qdW2fL VHnnV6xmyl+iJvb6pt2hg+hRnGnN6mQzvcKLKR4GOkPbaNi5votZDOceOcBICIyxaxlJ Wmia5VricnFNLyZ7CZp6RSLMzlXbiUHlc0cNLogkpR/tNYFXCduf70DmQp0W+3bXKTFg cKAEarfa8EQ/5bO/Y+bhwWTW5Xtj5C3JI2MngH37f7OWj/kY/AjIaoH4Zefx4T3D8IVK MxxQ== X-Received: by 10.236.123.38 with SMTP id u26mr16552720yhh.93.1395292409557; Wed, 19 Mar 2014 22:13:29 -0700 (PDT) Received: from zhabar.att.net (107-222-186-3.lightspeed.sntcca.sbcglobal.net. [107.222.186.3]) by mx.google.com with ESMTPSA id e70sm1434930yhk.9.2014.03.19.22.13.29 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 19 Mar 2014 22:13:29 -0700 (PDT) Date: Wed, 19 Mar 2014 22:13:25 -0700 From: Justin Hibbits To: FreeBSD PowerPC ML Subject: set_mcontext()/grab_mcontext() Message-ID: <20140319221325.13f4b7c2@zhabar.att.net> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; powerpc64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2014 05:13:30 -0000 Running into problems with X exiting during a sigreturn(2) on my G4 PowerBooks, it seems sometimes bit 10 is set in the mc_srr1 field, which, from the documentation, can only be set by hardware on an external interrupt. Looking at the references closer, bits 1-4, 10-15 (ppc32), also numbered as bits 33-36, 42-47 (ppc64) are for exception-specific information only. I'm wondering if it makes sense to mask these off when setting and getting the context, as those bits are useless upon an rfi. I know this is probably simply a band-aid for possible corruption in X, but to me it makes sense, as the context data is useful only when entering the interrupt context, not when context is restored (bits are localized, not restored to MSR). - Justin