OVP Forums - A community of assistance, help, questions, and answers.
  FAQFAQ    SearchSearch      RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in
Manipulating memory contents by functions in callbacks

 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Memories and Caches
View previous topic :: View next topic  
Author Message
KaMous



Joined: 17 Feb 2011
Posts: 9

PostPosted: Wed Nov 09, 2011 6:36 pm    Post subject: Manipulating memory contents by functions in callbacks Reply with quote

Hello,

how can I manipulate memory by means of callbacks? Using the armm processor model and the non-TLM platform model, I'm trying to set up callbacks on memory address ranges so that values stored to them are modified in order to inject faults. But if I set up a read callback that calls
Code:
icmWriteProcessorMemory()
or
Code:
icmDebugWriteProcessorMemory()
on the address that is read, set e.g to the address range from 0x00400000 to 0x405000 and do a
Code:
p {int}0x00401604
in arm-none-eabi-gdb, the gdb connection is closed.

Can you help me, please?
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1654
Location: United Kingdom

PostPosted: Thu Nov 10, 2011 5:38 am    Post subject: Reply with quote

This is the same question posted here

A callback applied to an address replaces the memory location so what happens here is
1. Access address
2. callback is called
3. callback accesses address
repeat from 2.

Maybe, there should be a detection of a recursively called callback that would detect the problem and stop with an error.
Back to top
View user's profile Send private message Visit poster's website
KaMous



Joined: 17 Feb 2011
Posts: 9

PostPosted: Sun Nov 20, 2011 3:00 pm    Post subject: Reply with quote

Thank you for your reply regarding the use of an MMC for what I need to do. I've been able to achieve what I wanted to.

So, am I getting this correctly: that the memory callback generated by the icmAdd...Callback() function is not executed in addition to the ordinary memory access, but rather instead of it?
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1654
Location: United Kingdom

PostPosted: Mon Nov 21, 2011 1:36 am    Post subject: Reply with quote

Yes that is correct.

Think of it this way, you create the memory behavior by adding a memory object or by a adding a memory callback over the address range you want to use.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Memories and Caches All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Information regarding OVP © 2008-2022 Imperas Software