Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Nov 2006 11:45:42 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        John Utz <john@utzweb.net>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: Serious Progess Re: smbios.ko probes successfully if i disable acpi sysresource, fails if i do not
Message-ID:  <200611031145.43023.jhb@freebsd.org>
In-Reply-To: <F9BF0018-8A4B-46E5-97E2-C260357CFEEB@utzweb.net>
References:  <FBFBCF13-54B0-4825-A115-4CDDE4215CD7@utzweb.net> <200611021139.41252.jhb@freebsd.org> <F9BF0018-8A4B-46E5-97E2-C260357CFEEB@utzweb.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611031145.43023.jhb>