From owner-freebsd-current@FreeBSD.ORG Mon Jul 14 17:36:01 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D9C737B401 for ; Mon, 14 Jul 2003 17:36:01 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 172CE43F3F for ; Mon, 14 Jul 2003 17:36:01 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 18562 invoked by uid 1000); 15 Jul 2003 00:36:02 -0000 Date: Mon, 14 Jul 2003 17:36:02 -0700 (PDT) From: Nate Lawson To: current@freebsd.org Message-ID: <20030714173017.F18544@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: imp@bsdimp.com Subject: newbus questions X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2003 00:36:01 -0000 I'm working on ECDT support for ACPI and ran into a couple newbus-related questions. 1. I'm using the identify entry as a way to get called early on in the boot process. However, this does not happen before $PIR evaluation. How should I hook in a routine for pre-$PIR execution? 2. I need to call bus_alloc_resource() to get access to some io ports. However, calling BUS_READ_IVAR in the identify routine gets a bad pointer deref. So how do I get a handle to use for allocating the IO ports (first arg of bus_alloc_resource)? 3. It appears bus_alloc_resource() takes a range of values. If I know the exact value to use, I request it via "value, value" instead of "0, ~0". Is this correct? The framework for this code is in ec_identify() and ec_attach() in sys/dev/acpica/acpi_ec.c. Thanks, Nate