Date: Mon, 25 May 2015 19:16:22 +0530 From: Pratik Singhal <ps06756@gmail.com> To: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Convert virtual address to physical address Message-ID: <CAGf2gkNuO6b71pDhenZdyyRQPUtGCDn8UTyVrAwu0_TimKcMFg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I need to convert a kernel virtual address to physical address. To do that, as far as I know, we have 2 macros :- vtophys :- In sys/arm/include/pmap.h VTOP :- In sys/boot/i386/libi386/amd64_tramp.S Since, I am working on arm kernel with ARM_NEW_PMAP option, I am using vtophys macro by including the pmap.h file. Now, if I compile the kernel after including the pmap.h file, I am getting the error :- error: field has incomplete type 'struct pmap_statistics' struct pmap_statistics pm_stats; /* pmap statictics */ ^ ./machine/pmap-v6.h:127:9: note: forward declaration of 'struct pmap_statistics' struct pmap_statistics pm_stats; /* pmap statictics */ How, should I resolve this error ? Or is there some other way to convert virtual address to physical address for arm kernel ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGf2gkNuO6b71pDhenZdyyRQPUtGCDn8UTyVrAwu0_TimKcMFg>