BTW I pushed a patch exposing m5_exit_addr at: https://gem5-review.googlesource.com/c/public/gem5/+/36896
And after that this should work on KVM https://gem5-review.googlesource.com/c/public/gem5-resources/+/36677/1 ________________________________ From: Gabe Black via gem5-users <[email protected]> Sent: Wednesday, October 28, 2020 10:48 PM To: gem5 users mailing list <[email protected]> Cc: Gabe Black <[email protected]> Subject: [gem5-users] Re: How to use the new libm5.a Hi Wenqi. You do still need to call map_m5_mem(), but as you found, now that there isn't one baked in call mechanism in the library you need to call the version of the function that will use the invocation mechanism you need. The header doesn't have declarations for them all, but if you declare your own with the same signature and an _addr suffix, you can call that and use the magic address based calling mechanism. Gabe On Wed, Oct 28, 2020 at 10:49 AM Wenqi Yin via gem5-users <[email protected]<mailto:[email protected]>> wrote: Hi Hoa, Gabe, Thanks for your help! But just want to confirm this: what I did in the past is calling map_m5_mem() in my code first and then call specific m5 functions, and it seems to work. The guest in running on KvmCPU. When I am trying to do the same thing with the new libm5.a, it gave an exception (Illegal Instruction), however I haven’t looked into the error carefully yet, it may just because for some reason the lib is still trying to use the magic instruction interface. But before I proceed any further, just want to make sure I was using the correct approach to do this. Best, Wenqi On Oct 26, 2020, at 23:30, Gabe Black via gem5-users <[email protected]<mailto:[email protected]>> wrote: Hi Wenqi. The updated libm5.a should be used in basically the same way as the old version. Just link against the library, include the header file, and call into the op you want using the normal function call syntax. Hoa, the documentation you've linked to is a little out of date. How can it be updated? Gabe On Sun, Oct 25, 2020 at 9:31 PM Hoa Nguyen via gem5-users <[email protected]<mailto:[email protected]>> wrote: Hi Wenqi, We have some documentation about the new m5 utility here: https://www.gem5.org/documentation/general_docs/m5ops/ The following link is an example of annotating PARSEC: https://github.com/darchr/parsec-benchmark/commits/gem5-20-annotations Regards, Hoa Nguyen On 10/25/20, wqyin--- via gem5-users <[email protected]<mailto:[email protected]>> wrote: > Hello all, > > I noticed the util/m5 has big changes since this > commit:26454e8072e607d54ac67c42b33355d7c94d6d60 around Apr 27. I am > wondering how should I use this new interface/implementation to call > m5ops in my program? Shall I also instantiate a default CallType and > then use it to obtain the dispatch table and finally pass it to > Command::run? Also is there any examples which use the new > implementation to annotate any benchmarks running inside gem5? Thanks > > Best, > > Wenqi > > _______________________________________________ gem5-users mailing list -- [email protected]<mailto:[email protected]> To unsubscribe send an email to [email protected]<mailto:[email protected]> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s _______________________________________________ gem5-users mailing list -- [email protected]<mailto:[email protected]> To unsubscribe send an email to [email protected]<mailto:[email protected]> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s _______________________________________________ gem5-users mailing list -- [email protected]<mailto:[email protected]> To unsubscribe send an email to [email protected]<mailto:[email protected]> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
