Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPC support? #348

Closed
ZakDanger opened this issue Dec 28, 2015 · 20 comments
Closed

PPC support? #348

ZakDanger opened this issue Dec 28, 2015 · 20 comments

Comments

@ZakDanger
Copy link
Contributor

According to the webpage for unicorn-engine, it supports PPC.
However the readme in this source code as well as the sourcecode itself doesn't appear to support PPC. I noticed there is no "unicorn/ppc.h" file that includes the PPC registers like there is for the other supported platforms. There is an entry in the architecture enums for "UC_ARCH_PPC" though.

So just wondering whats the official word on PPC support?
What needs to be added to support it besides the ppc.h file?

@aquynh
Copy link
Member

aquynh commented Dec 28, 2015

yes PPC support is in plan, but i have no time for that yet.

if somebody can step up for this work, please go ahead.

@aquynh
Copy link
Member

aquynh commented Dec 28, 2015

i removed PPC from the homepage, thanks.

@zachriggle
Copy link
Contributor

Any updates for PowerPC?

@aquynh
Copy link
Member

aquynh commented Feb 17, 2017

No, this involves lots of work

@invano
Copy link

invano commented Aug 6, 2017

Do you think PPC and PPC64 support is still in plan? Wondering if it's going to happen soonish or it's about making it from scratch.

@aquynh
Copy link
Member

aquynh commented Aug 6, 2017 via email

@maximumspatium
Copy link

if somebody can step up for this work, please go ahead.

I'd do but...
what is required to support a new arch? Is there any docs on how to add an unsupported arch to Unicorn? I wasn't able to find anything...

IIRC, PowerPC is well supported in QEmu. So, the whole story boils down to Unicorn hacking, right?

@maximumspatium
Copy link

@aquynh #461 states that Unicorn is based on Qemu 2.2.1. Does it still hold true today?

Did I get it right that adding PowerPC support to Unicorn means pulling target-ppc code from Qemu 2.2.1 and adopting it to Unicorn's requirements?

@Vociferix
Copy link

I just want to bump this issue. Like @maximumspatium I might be interested in taking on some of this work if there were some amount of documentation on what all needs to be done to port an arch from Qemu to Unicorn.

@mePy2
Copy link

mePy2 commented Apr 14, 2019

+1

@aquynh
Copy link
Member

aquynh commented Apr 15, 2019 via email

@simigo79
Copy link

Hi, I've done (hopefully) most of the work. At this point I have 32 bit ppc initializing, setting up emulation, starting emulation, fetching an instruction then producing segfault somewhere in tcg.
The code is based on this git cloned on Oct 10 2019 and qemu 2.2.1
As far as I understand the code can't be uploaded on github now because it is a work and progress and have copyright notices, etc not updated in the changed files. Anyway if someone feels he can really help please contact me. Otherwise just wait. :-)

@aquynh
Copy link
Member

aquynh commented Apr 28, 2020 via email

@simigo79
Copy link

simigo79 commented May 8, 2020

Good news, everyone! I have a very basic test working.

@simigo79
Copy link

simigo79 commented May 8, 2020

@aquynh
Copy link
Member

aquynh commented May 8, 2020 via email

@simigo79
Copy link

simigo79 commented May 9, 2020

Well, I've made only few tests so far: basic arithmetic, and strlen(), no stack-related tests, no tests for resource leaks on multiple runs, no tests for hooks. Also it is limited to e500v2 and built only in ubuntu/amd64/gcc environment. So this is surely work in progress.
However the changes to the common part of unicorn are few and easy to review and most likely they are not going to introduce any problem with non-ppc platforms. So I created a pull request, if you accept the changes you are going to have an otherwise stable engine with experimental unstable ppc support.

@wtdcode wtdcode closed this as completed Oct 3, 2021
@zachriggle
Copy link
Contributor

@aquynh Why was this closed out?

@wtdcode
Copy link
Member

wtdcode commented Oct 5, 2021

@aquynh
Copy link
Member

aquynh commented Oct 6, 2021

@aquynh Why was this closed out?

we have good PowerPC in unicorn2 now.

besides, this issue does not really have any questions, so it was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants