

Freestanding “Hello World” for OpenPower - andreiw
https://github.com/andreiw/ppc64le_hello

======
andreiw
Power8 and OpenPOWER has seen some mentions on HN, but not a whole lot of
focus has been made on the software aspect of the platform.

I became intrigued because OpenPOWER finally makes little-endian PowerPC a
first-class ecosystem. I decided to tinker around with getting some little-
endian code running freestanding (i.e. as a “kernel”). Today the test
environment is the Power8 Functional Simulator
([http://www-304.ibm.com/support/customercare/sas/f/pwrfs/home...](http://www-304.ibm.com/support/customercare/sas/f/pwrfs/home.html))
and the skiboot firmware ([https://github.com/open-
power/skiboot](https://github.com/open-power/skiboot)).

The current result is
[https://github.com/andreiw/ppc64le_hello](https://github.com/andreiw/ppc64le_hello)

The code hopefully answers some of the most basic questions that can arise
while targeting or porting system software to PowerPC64 LE. In most cases I
traded complexity for simplicity/crappiness, as it’s just a demo (and too long
of a demo, I suppose).

Maybe some crazy guys will resurrect the Power(PC) port of ReactOS now ;-)
(the original port was BE, which sort of defeated the purpose).

~~~
ianlevesque
Pardon my ignorance on the subject but is there any reason to prefer little
endian POWER over big endian?

~~~
andreiw
The hearsay is that Power8 and GPUs seem like a convenient marriage as far as
HPC in the data center goes, and GPUs are little endian. And although part of
the problems are solvable at the driver level, no one wants to spend time
making all of the existing userspace GPU stuff endian clean. But maybe that's
just rumors.

From a personal perspective, I think no one will ever willingly bother
investing into converting code to become endian safe. Especially so when
dealing with complex (or systems) software. It's a real shame that in the 21st
century we can't settle on something so basic as byte order.

------
daxtens
Cool! I work at IBM with POWER, so I'm trying to get that to run on real
hardware now --- I'll let you know how I go.

~~~
andreiw
Wow, neat! Looking forward to hearing back. Fortunately, with the exception of
a single use of SIM_WRITE_CONSOLE_CODE (main.c:L356), no other callthru
facilities are used.

~~~
daxtens
OK, it works: [http://sthbrx.github.io/blog/2015/06/03/ppc64le-hello-on-
rea...](http://sthbrx.github.io/blog/2015/06/03/ppc64le-hello-on-real-
hardware/)

