If you get the pkt->req you should be able to find the vaddr.

Good luck.

Andreas

From: Ahmad Hassan <[email protected]<mailto:[email protected]>>
Reply-To: gem5 users mailing list 
<[email protected]<mailto:[email protected]>>
Date: Friday, 27 September 2013 10:41
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: [gem5-users] Virtual memory address

Any ideas on that please?



On 26 September 2013 12:05, Ahmad Hassan 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

How can configure or extract virtual address from PacketPtr object? Gem5 sends 
the following address to the main memory controller (dramsim2 in my case):

DRAMSim2::MemoryPort::recvTimingReq(PacketPtr pkt)
{
...
uint64_t addr = pkt->getAddr();
Transaction tr = Transaction(transType, addr, NULL);
retVal = dramsim2->addTransaction(tr);
...
}

But I have noticed that this 'addr' is not the virtual address that I allocate 
in the appliation. I have tested through a small C program where I allocate a 
memory through malloc and then read/write that memory. I do not see the virtual 
address range of malloc'ed memory in the above gem5 method.

Please can you tell me how can I get the virtual addresses of the heap memory 
that I see/allocate in the application?

Thanks.

Ahmad


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No: 2548782
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to