This information may also be of interest:
https://cirosantilli.com/linux-kernel-module-cheat/#m5ops

On Fri, Mar 20, 2020 at 5:33 AM Armand Behroozi <arma...@umich.edu> wrote:
>
> Thank you so much! Will take a look.
>
> Also wanted to thank you for your tutorials and learning_gem5 code.
>
> My research would not be possible without them.
>
> Regards,
>
> Armand
>
> On Thu, Mar 19, 2020 at 6:36 PM Jason Lowe-Power <ja...@lowepower.com> wrote:
>>
>> Hi Armand,
>>
>> You can definitely do this in gem5! We have what we call m5ops or "magic 
>> instructions" that allow for these kinds of "hypercalls" from the simulated 
>> system into the simulator. The documentation has a little information about 
>> this (http://www.gem5.org/documentation/general_docs/m5ops/). However, the 
>> code in util/m5 is probably the best place to look.
>>
>> Cheers,
>> Jason
>>
>> On Thu, Mar 19, 2020 at 1:55 PM Armand Behroozi <arma...@umich.edu> wrote:
>>>
>>> Hello All,
>>>
>>> I wanted to know if there is a method for passing data (such as the pointer 
>>> to an array returned from malloc) from an application to gem5 while the 
>>> application is running.
>>>
>>> Currently, in order to pass gem5 the address bounds, I run the application 
>>> without gem5, print out the address bounds of multiple arrays onto the 
>>> screen and then pass them as command line arguments to the run script when 
>>> I execute the application with gem5. I'm using SE mode.
>>>
>>> I've worked with another simulator that allows you to insert special 
>>> function calls into the source code using the data you want to pass as 
>>> arguments. Control is then transferred to code inside of the simulator and 
>>> the data can then be used to set the values of variables inside of the 
>>> simulator.
>>>
>>> In other words, I want to create a gem5 event in application code (I have 
>>> looked at "Create gem5 Event in application code").
>>>
>>> Any help would be much appreciated.
>>>
>>> Thank you.
>>>
>>> Regards,
>>>
>>> Armand Behroozi
>>> _______________________________________________
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to