Convert virtual address to physical address
Garrett Cooper
yaneurabeya at gmail.com
Mon May 25 13:50:42 UTC 2015
On May 25, 2015, at 6:46, Pratik Singhal <ps06756 at gmail.com> wrote:
> 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 ?
Try using `#include <vm/pmap.h>` instead.
Cheers,
-NGie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20150525/31bfad20/attachment.sig>
More information about the freebsd-hackers
mailing list