qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] ARM: Virtual / Physical address translation


From: Ira Ray Jenkins
Subject: Re: [Qemu-devel] ARM: Virtual / Physical address translation
Date: Thu, 31 May 2012 15:07:35 -0400

On Wed, May 30, 2012 at 10:30 AM, Laurent Desnogues
<address@hidden> wrote:
> On Wed, May 30, 2012 at 3:20 AM, Peter Maydell <address@hidden> wrote:
>> On 30 May 2012 02:00, Ira Ray Jenkins <address@hidden> wrote:
>>> What I would like is to be able to get the physical addresses of both
>>> data and instructions. Can anyone help me work through how to get the
>>> properly translated physical addresses given the virtual address?
>>
>> See the function get_phys_addr() in target-arm/helper.c ... That is
>> a private function but if you're doing a local hack you can wire
>> it up to what you need it for.
>
> Using that function directly is not that great an idea as it has
> side effects on the environment.  IMHO the best is to duplicate
> it and remove the side effects (which is what I did for my
> cache simulator).
>
> BTW Edgar Iglesias has implemented a cache simulator in
> QEMU.  I just can't remember where the repository is...
>
>
> Laurent

Would I also need to duplicate get_phys_addr_mpu/v5/v6 ?

The side effects you mentioned, are these in the above functions?

Since I'm really only interested in the physical address - phys_ptr -
, can I ignore protection & page size? What about access type and
user?

Edgar's work was for the cris target, so I'm unsure if it is different
for arm. Basically, since I am just doing a memory trace dump for arm
target, I just want a simple translation from virtual address to
physical, unobtrusively - without modify the state/env. I'm not sure
how to modify get_phys_addr*() to do this. Any help would be great.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]