memory type e820
sourish at cloudbyte.com
Sat Nov 1 13:33:53 UTC 2014
I tried the pmap_mapdev() as suggested by you. Works perfectly. Thanks for
What is required, If I want to add this nvram memory to VM pages?
On Thu, Oct 30, 2014 at 11:23 PM, John Baldwin <jhb at freebsd.org> wrote:
> On Thursday, October 30, 2014 12:39:27 pm Sourish Mazumder wrote:
> > Hi John,
> > I want to make a block device out of this nvram memory. So, I will need
> > perform memcpy() operation into this memory.
> > Do I need to add this memory into the vm system, if I need to do
> > like memcpy().
> Ah, so you just need to map it. The most expedient thing you can do for
> void *p;
> p = pmap_mapdev(physaddr, len);
> (This uses an uncached mapping).
> When you are finished (e.g during a detach routine if you need to unload
> driver) you can do:
> pmap_unmapdev((vm_offset_t)p, len);
> Note that for a PCI BAR you would do something different, but for a
> you discover via the SMAP and is x86 specific this is ok.
> John Baldwin
More information about the freebsd-amd64