Bug 581 - power-gem5 needs upstream merging
Summary: power-gem5 needs upstream merging
Status: CONFIRMED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks: 241
  Show dependency treegraph
 
Reported: 2021-01-23 17:06 GMT by Luke Kenneth Casson Leighton
Modified: 2021-02-14 15:00 GMT (History)
2 users (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2021-01-23 17:06:26 GMT
conversation with jason and bobby

    experimental power-gem5 branch?

    https://github.com/power-gem5/gem5/tree/gem5-experimental


Good question. If I remember correctly, they were posted to gerrit, but they were never reviewed. I believe they start here: https://gem5-review.googlesource.com/c/public/gem5/+/16604.

To get them merged, they would need to be rebased and reviewed. We would definitely appreciate someone picking up these forgotten changes and taking them over the finish line!

One of the first steps would be to create an Epic on Jira (https://gem5.atlassian.net/) to "update POWER" support" or something like that and start figuring out what needs to be done.
Comment 1 Luke Kenneth Casson Leighton 2021-01-23 17:07:20 GMT
this is going to be a prerequisite for being able to do remote gdb
Comment 2 Luke Kenneth Casson Leighton 2021-01-27 10:46:14 GMT
https://github.com/sandip4n/gem5/tree/develop-power
Comment 3 Luke Kenneth Casson Leighton 2021-01-28 10:31:31 GMT
from sandipan:

$ ./build/POWER/gem5.debug configs/example/se.py --wait-gdb -c ~/test

And then run the pygdbmi equivalents of the following gdb commands.

$ gdb
(gdb) file ~/test
(gdb) set step-mode on
(gdb) set remote Z-packet on
(gdb) break _start
(gdb) target remote localhost:7000
(gdb) nexti
Comment 4 Luke Kenneth Casson Leighton 2021-01-28 12:18:36 GMT
>> cross-verifying register contents between a gem5 and qemu (user-mode) runs
>> of small assembly programs covering the corner cases of each instruction.
>> In your case, this will be something like:
>>
>> $ ./build/POWER/gem5.debug configs/example/se.py --wait-gdb -c ~/test
>
> that's exactly it.  thank you that will save a huge amount of time.
> have you made the unit test programs available?  also, you may be

Glad you found it to be useful. I have some old test programs here at
https://bitbucket.org/sandip4n/gem5-powerpc64le-tests

These were written a while back when I was still learning powerpc
assembly and upon a quick inspection, it seems that the stack frame
setup is semantically incorrect. As in, those stw/stwu instructions
should have been std/stdu. The test cases might still be salvageable.

> interested to know that anton blanchard wrote a
> random-program-generator, they're checked in here
> https://github.com/antonblanchard/microwatt/tree/master/tests
>

Nice! I'll check it out. A colleague had also pointed me to something
similar for qemu called risu which is available at
https://git.linaro.org/people/peter.maydell/risu.git

This tool can also generate random instruction sequences and compare
the results with a real system.
Comment 5 Luke Kenneth Casson Leighton 2021-02-08 06:37:18 GMT
CC: Luke

On 08/02/21 10:26 am, Sandipan Das wrote:
> Hello Boris, Gabe,
>
> I have rebased and pushed the changes to gerrit.
> This is link to the first patch in the series:
> https://gem5-review.googlesource.com/c/public/gem5/+/40880
>
>
Comment 6 Luke Kenneth Casson Leighton 2021-02-08 17:35:29 GMT
https://www.mail-archive.com/gem5-dev@gem5.org/msg37638.html
Comment 7 Luke Kenneth Casson Leighton 2021-02-14 15:00:52 GMT
i've pulled and pushed the develop-power branch from sandipan:

https://github.com/sandip4n/gem5/tree/develop-power
https://git.libre-soc.org/?p=gem5.git;a=tree;h=refs/heads/develop-power;hb=refs/heads/develop-power