From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 14 20:42:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3F5216A4DA; Mon, 14 Aug 2006 20:42:37 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A79343D55; Mon, 14 Aug 2006 20:42:37 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (ozdlzc5qemdjlwzt@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k7EKgaN0021476; Mon, 14 Aug 2006 13:42:36 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k7EKgW2s021475; Mon, 14 Aug 2006 13:42:32 -0700 (PDT) (envelope-from jmg) Date: Mon, 14 Aug 2006 13:42:32 -0700 From: John-Mark Gurney To: Stanislav Sedov Message-ID: <20060814204232.GR99774@funkthat.com> Mail-Followup-To: Stanislav Sedov , John Baldwin , freebsd-hackers@freebsd.org References: <20060814124658.1d416cbe@localhost> <200608140932.57875.jhb@freebsd.org> <20060814194729.436fc453@localhost> <20060814181521.GQ99774@funkthat.com> <20060814231223.3c7f1930@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060814231223.3c7f1930@localhost> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: exception handling in kernel code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 20:42:37 -0000 Stanislav Sedov wrote this message on Mon, Aug 14, 2006 at 23:12 +0600: > On Mon, 14 Aug 2006 11:15:22 -0700 > John-Mark Gurney mentioned: > > > > You should make a MD API for reading these out (if one doesn't already > > exist) that handle the faulting for you, and then have your driver hook > > into this api... > > > > I had to do something similar for accessing PCI config registers > > that don't exist and cause a fault... > > Do you know some examples to look at? The problem is that i can't make > modifications in trap.c or anywhere else in src tree as such driver > isn't likely to become a part of FreeBSD kernel. That will be very difficult to do then.... The work I did for accessing PCI config registers had to be merged into the tree... Maybe introducing a method for adding a MD callback to the trap handler for other modules that need this? Short of modifing the function in real time to point to your code, I don't have any suggestions... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."