From owner-freebsd-acpi@FreeBSD.ORG Fri Nov 3 17:52:39 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2468E16A415 for ; Fri, 3 Nov 2006 17:52:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09D0543D46 for ; Fri, 3 Nov 2006 17:52:37 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA3HqUeO023206; Fri, 3 Nov 2006 12:52:35 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: John Utz Date: Fri, 3 Nov 2006 11:45:42 -0500 User-Agent: KMail/1.9.1 References: <200611021139.41252.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611031145.43023.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 03 Nov 2006 12:52:35 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2158/Fri Nov 3 10:25:20 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: Serious Progess Re: smbios.ko probes successfully if i disable acpi sysresource, fails if i do not X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2006 17:52:39 -0000 On Friday 03 November 2006 00:15, John Utz wrote: > > On Nov 2, 2006, at 8:39 AM, John Baldwin wrote: > > > On Wednesday 01 November 2006 23:18, John Utz wrote: > >> > >> On Nov 1, 2006, at 7:51 AM, John Baldwin wrote: > >> > >>> On Tuesday 31 October 2006 18:47, john@utzweb.net wrote: > >>>> > >>>> So i actually do use pmap_mapdev to get a handle to the table, but > >>>> i dont > >>>> do that in smbios_attach, i do it in a function written to walk > >>>> the table. > >>>> > >>>> but, as i alluded to previously, the original author used > >>>> bus_alloc_resource() in smbios_attach() are you saying that i > >>>> should use > >>>> pmap_mapdev() in smbios_attach *instead* of bus_alloc_resource()? > >>> > >>> Yes. Firmware tables are not resources (at least IMHO). > >> > >> ok then. > >> > >> so since pmap_mapdev() returns a void* what is the current blessed > >> type that should be used for pmap_ memory handles in smbios_softc? > > > > Eh? Any pointer will do. :) > > > > tnx! that is what i thought, but i'd rather ask. > > if i do a char* pfoo = pmap_mapdev(addr, size) in smbios_attach(), > > it stands to reason that i would want to do a pmap_unmapdev > (pfoo,size) in smbios_detach(), yes? > > however, when i do this, it panics. > > am i missing the point here? > > tnx for all your help so far! That should work fine, but you should cast the pointer to (vm_offset_t) when passing it to pmap_unmapdev(). -- John Baldwin