Bug 581 - power-gem5 needs upstream merging
Summary: power-gem5 needs upstream merging
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
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:


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?


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
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

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

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
Comment 7 Luke Kenneth Casson Leighton 2021-02-14 15:00:52 GMT
i've pulled and pushed the develop-power branch from sandipan: