From owner-cvs-all Wed May 1 12:42: 9 2002 Delivered-To: cvs-all@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 25D6037B419; Wed, 1 May 2002 12:41:45 -0700 (PDT) Received: from mailgate.nlsystems.com ([62.49.251.130] helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 172zyy-000DRX-0Y; Wed, 01 May 2002 20:41:44 +0100 Received: from herring.nlsystems.com (localhost [127.0.0.1]) by herring.nlsystems.com (8.12.3/8.11.2) with ESMTP id g41Jfhcj040998; Wed, 1 May 2002 20:41:43 +0100 (BST) (envelope-from dfr@herring.nlsystems.com) Received: (from dfr@localhost) by herring.nlsystems.com (8.12.3/8.12.3/Submit) id g41JfhJc040997; Wed, 1 May 2002 20:41:43 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Doug Rabson To: Marcel Moolenaar Subject: Re: cvs commit: src/sys/ia64/ia64 exception.s src/sys/ia64/include frame.h Date: Wed, 1 May 2002 20:41:43 +0100 X-Mailer: KMail [version 1.4] Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <200204300637.g3U6bQc25956@freefall.freebsd.org> <200205012015.32377.dfr@nlsystems.com> <20020501193719.GA699@athlon.pn.xcllnt.net> In-Reply-To: <20020501193719.GA699@athlon.pn.xcllnt.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200205012041.43577.dfr@nlsystems.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday 01 May 2002 8:37 pm, Marcel Moolenaar wrote: > On Wed, May 01, 2002 at 08:15:32PM +0100, Doug Rabson wrote: > > > > What I actually meant by that statement was that since the except= ion > > > > entry path didn't disturb the value of ar.lc (or ar.ec for that > > > > matter) and that it can rely on the value being preserved by the > > > > higher level handlers (e.g. trap, interrupt, syscall etc), it can > > > > also rely on the value in > > > > exception_restore being the user's value. > > > > > > That is correct, provided we save them on context switches, right? > > > > Right. > > Ok, I'll add them to savectx() and cpu_switch() then :-) > > > > BTW: The reason I added them was for ptrace(2). > > > > Thats as good a reason as any. Another way would be to use the unwind > > system to find if/where the register had been saved and access it eit= her > > directly or at the save location. > > Wicked! I'll let this run through my head for a while. My first reactio= n > is that it sounds like a very costly approach, time and complexity wise= =2E > For example: if ar.lc has been saved in the process' pcb, then there's > no way the unwind information can tell us that. We need to handle those > cases seperately, AFAICT. Actually, it would probably be possible to write some carefully crafted u= nwind=20 records in exception_save which describe the locations where stuff gets p= ut=20 in the trapframe... Its certainly a costly approach but for rarely-accessed state, it might b= e=20 worth it compared to the alternative (adding *everything* to struct=20 trapframe). --=20 Doug Rabson=09=09=09=09Mail: dfr@nlsystems.com =09=09=09=09=09Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message