Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2015 06:50:38 -0700
From:      Garrett Cooper <yaneurabeya@gmail.com>
To:        Pratik Singhal <ps06756@gmail.com>
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Convert virtual address to physical address
Message-ID:  <1E426B87-C1AF-495A-8125-8B7CBFF566D4@gmail.com>
In-Reply-To: <CAGf2gkNuO6b71pDhenZdyyRQPUtGCDn8UTyVrAwu0_TimKcMFg@mail.gmail.com>
References:  <CAGf2gkNuO6b71pDhenZdyyRQPUtGCDn8UTyVrAwu0_TimKcMFg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_02F3F810-9606-468E-A740-F8D3C72BA2EE
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii

On May 25, 2015, at 6:46, Pratik Singhal <ps06756@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

--Apple-Mail=_02F3F810-9606-468E-A740-F8D3C72BA2EE
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJVYyivAAoJEMZr5QU6S73eUXoH/0gfDj4/ugn4H/6ZzN7edgtu
yQCQNthhYsG3B9xIY5veWIyiTShE2gAiZQtelon8dRad3pkwO/uO+u+2EJSoipYV
oD/t9H7lF6meiUNcJmMQC+VMCHSMhu31QLCbi3agJk7bJeTuuQiRekzqo41qXHZ2
YLZL0dK7fBFg8PlYSDsLySDorqyzCpPrvDoJNFQGrymcR8fQdbPef7qfBri4c3ns
zT8smYxT+diYDHd8iVJaO/cTGDAu3z5eNIiPdV/M0vCgEOJLfhofctx1vMOiiCag
ZrHcty41bxd1tBV5rl0tBRVIvlsDK1Si/WrEq0IOH5as82Rz80gqQHYZ1z8vARw=
=xxam
-----END PGP SIGNATURE-----

--Apple-Mail=_02F3F810-9606-468E-A740-F8D3C72BA2EE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1E426B87-C1AF-495A-8125-8B7CBFF566D4>