Posts

CopyFail works on ppc64le


Usually exploits like CopyFail tend to have PoCs or exploits that are architecture-specific. Not this one. Patches should be coming real soon now. Exploit tested using this deobfuscated version.

% arch
ppc64le
% make
cc -Wall -Wextra -Os payload.c -o payload
% python3 poc.py
uid=0(root) [...] context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.

Alternatively, disable the defective kernel module (adjust for your distro, as root). This may not always be possible; on my Fedora system I got rmmod: ERROR: Module algif_aead is builtin. In that case, you're going to be building a new kernel with AF_ALG disabled.

# echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-aead.conf
# rmmod algif_aead

To revert:

# rm /etc/modprobe.d/disable-algif-aead.conf
# modprobe algif_aead

FreeBSD considering end of ppc64 support


FreeBSD is considering retiring powerpc64 prior to branching 16, which would make FreeBSD 15 the last stable version to support the architecture. (32-bit PowerPC is already dropped as of FreeBSD 14, though both OpenBSD and NetBSD generally serve this use case, and myself I have a Mac mini G4 running a custom NetBSD kernel with code from FreeBSD for automatic restart.) Although the message says "powerpc64 and powerpc64le" it later on only makes specific reference to the big-endian port, whereas both endiannesses appear on the FreeBSD platform page and on the download server.

I asked Warner Losh for clarification but he hasn't gotten back to me yet, so it's unclear if this is meant to apply to just the BE port or both. Unlike the overall industry mood generally, especially from you underannuated whippersnappers who deal with the doublethink of big-endian math in your head but little-endian code in your repos, the BSDs have historically been friendly to big-endian hardware as a means of ensuring code correctness. Indeed, his note acknowledges this. One sticking point seems to be Power ISA's own unique architectural features but I suspect it is due at least as much to the higher cost and poorer availability of the hardware, which has admittedly been thin on the ground lately.

My preference in server operating systems is a BSD-variant and FreeBSD was going to be my own migration plan when I retire my POWER6 running AIX (big-endian, natch), but this news has made me consider OpenBSD/powerpc64 instead. This port is a little suboptimal in that it states it does not presently run under a hypervisor, but it is currently well-supported and specifically tested on Raptor hardware, which is going to be the majority of the ecosystem. Of course, OpenBSD is also a famously opinionated operating system, so there may be a little bit more of a learning curve for me personally, whereas I already have experience with FreeBSD on shared x86_64 hosting and my other BSD systems all run NetBSD (on /mac68k, /cobalt, /macppc, /alpha, /hpcmips and /hpcsh). Another possibility is to try to maintain security patches and fixes on the remnant of FreeBSD 15, though I have such limited time these days I'd prefer not to pour it into another endeavour with an obvious future dead end. I'd dearly love a NetBSD option, but there isn't a NetBSD port that runs on POWER9.

I do think it's a little unfair to cite the user base as being less than "x86 or armv7" when these were extremely common architectures in their day, and a lot of people are probably still running FreeBSD on older examples to get the most money they can out of their hardware. I can't imagine their RISC-V numbers are very high either but no one is saying that should go away, and Power ISA is still very relevant in today's big-iron shops. If and until "low-end" Power11 desktop hardware is available, we'll want all the operating system support we can get too.

Debian 13 Trixie


Debian 13 is out, which like most other architectures is one of the big three distros on ppc64le (which Debian calls ppc64el in accordance with its normal naming scheme). The current release is based on the LTS kernel 6.12, glibc 2.41 and systemd 257, and includes GNOME 48, KDE Plasma 6.3, LXDE 13, LXQt 2.1.0, Xfce 4.20, gcc 14.2, LLVM-Clang 19, bind 9.20, Perl 5.40, and Python 3.13. ppc64el is one of the supported seven architectures and boots directly on all current Raptor hardware. As with all kernels with a 4K page size, if you try to use KVM acceleration in QEMU with a 64K page size guest (the default), it will fail. This doesn't occur on Fedora because Fedora ships a kernel with a 64K page size. Fortunately, see this note for workarounds by either setting a 4K property on the guest or using a 64K page size on the OS side. Live and installer images are available.

Power11 hits the market this month


IBM made the date official: Power11 launches July 25, with the 32 AI-core Spyre Accelerator expected to follow in the fourth quarter. IBM's launch products will be the full-rack Power E1180 with up to up to 256 SMT-8 Power11 cores with 2MB L2 each and up to 128GBMB of shared L3 (8GBMB per core with the correct figures in the Red Book) with 64TB of DDR5 memory, the midrange 4U Power E1150 with up to 120 Power11 cores and 16TB of DDR5, the junior 4U Power S1124 with up to 60 Power11 cores with 8MB of L3 per core and 8TB of DDR5, and the "low-end" 2U Power S1122 with up to 60 Power11 cores and 4TB of DDR5. The processors come in 16, 24 or 30-core versions; the E systems have four sockets (with up to four nodes in the E1180) and the S systems have two. All four systems can run AIX and Linux, and all systems except for the E1150 can run IBM i. As is usual for IBM's initial offerings, internally they look like straight-up implementations of the Blueridge reference platform and should be expected to scale accordingly. And if you have to ask how much they are, well ...

It's notable that the "meet the family" document IBM links from the press release — so we can assume it's officially blessed — says nothing about OMI, only DDR5 RAM. However, IBM has made it clear that Power11 will continue to have OMI, since enterprise Power10 customers would certainly have had an investment in it, and the upper tier datasheets reference OMI channel capacity. We don't know if the OMI firmware for Power11 is open and libre (it was not in Power10), nor if the Synopsys IP blocks reportedly used in Power10's I/O are still present, because IBM didn't say, or if the "low-end" binned CPUs are different in this regard.

If there are going to be third-party Power11 systems, and IBM didn't say anything in the press release about them either, they generally follow six to twelve months after. We have heard little from Raptor since about the SolidSilicon S1 and X1, and because all indications suggest the S1 is a Power10 implementation without the crap, this already puts them behind the curve. That said, adapting Power11 should be possible to any next-generation Power ISA workstation: the Talos II and T2 Lite are fairly straightforward reworks of the reference POWER9 Romulus design, and Blackbird is still Romulus, just in a much smaller form factor. These first-generation P11 boxes, as presumably performant as they are, wouldn't be nice to have in an office and IBM just doesn't do end user sales. Creating a T3 based on Blueridge would seem to be the best way forward for Raptor to regain the top slot in OpenPOWER workstations — assuming the architecture is still open.

[UPDATE: I have been advised by an anonymous individual with knowledge of the situation that a new Raptor announcement on products under development is scheduled for Q1 2026 ... which would be "six to twelve months after" as predicted. "Open firmware" is specifically mentioned and absolutely planned. It's worth pointing out that both Raptor and SolidSilicon are now listed as top-tier Platinum members for OpenPOWER parallel with IBM itself. That implies SolidSilicon is still in the mix and IBM is still backing OpenPOWER. They stressed this is not an official announcement, so you take it for what it's worth.]

Enter the IBM z17 mainframe with Telum II (more clues for Power11?)


IBM is announcing their new z17 mainframe, based on the Telum II (see our notes on the original Telum CPU). IBM first announced the Telum II last year and the z17, its intended first deployment, has now emerged just about bang on time.
Still, we're obviously more interested in Power ISA around here, and IBM has yet to say much substantive about Power11 other than the usual assertions of additional power efficiency, more cores and higher clock. It is also expected to offer DDR5 support for enhanced memory bandwidth, though this is all but certain to require OMI DDR5, not direct-attached RAM as in our Raptor boxes. But it's often instructive to look at what's going on with IBM mainframes for microarchitectural clues now that Z-machines and IBM "big" Power chips often have the same underlying design.

The first Telum strongly emphasized cache. Interestingly, it did so by dropping categorial L3 and L4 altogether: instead, IBM developed a strategy where cores could reach into the L2 of other cores and treat that as L3, and reach into other chips' cache and treat that as L4. Each chip had eight cores and 32MB of L2 per core, giving lots of opportunity for more efficient utilization. The picture of the Telum II die above shows that IBM has not substantially deviated from this plan, using the same 128K/128K L1 but increasing L2 to 36MB per core. IBM's documentation says that there are eight cores per chip, but at a cursory glance there appear to be ten on the die, likely for yield reasons (two cores would be fused off). Assuming these dud cores still have useable cache, however, that matches IBM's specs of up to 360MB of effective L3 and a whopping 2.88GB of L4 per system.

The cores top out at 5.5GHz with various microarchitectural improvements such as better branch prediction and faster store writeback and address translation, all the typical kinds of tweaks that would also likely show up in Power11. Power11 is also expected to remain on 7nm with a "refined" process instead of moving to 5nm. (It's possible that Power12, whenever that arrives, may skip 5nm entirely.)

Of course, the marketing material on z17 is all AI all the time. IBM's claimed AI improvements seem to descend from an enhanced "DPU" ("data processing unit") with its own 64K (32K instruction/32K data) L1 cache capable of 24 trillion INT8 operations per second, the kind of bolt-on hardware that could also be incorporated or scaled-down into other products. In fact, such a product exists already, shown above: IBM's Spyre Accelerator, which is basically 32 more DPUs. These attach over PCIe and would be a good alternative to our having to scrabble around with iffy GPU support, assuming that IBM supports this in Linux (but they already do for LinuxONE systems, so it shouldn't be much of a stretch).

If you have the money and a convenient IBM salesdroid who actually answers the phone, you too can horrify your electrical utility starting in June. As for those of us on the small systems side, Power11 in whatever form it ends up taking is not anticipated to emerge until Q3 2025, presumably as what will be the E1100 series starting with the E1180 and going down. This further shrinks the production and sales window for the long-anticipated Raptor S1 systems, however, and there hasn't been a lot of news about those — to say nothing of what the Trump tariffs could mean for rolling out a new system.

Plan 9 finally comes to the POWER9


A great announcement today from the 9front team: ongoing support for ppc64. Today's release finally brings the groundbreaking Plan 9 operating system to our platform as a preferred architecture, with big endian a first-class citizen. It's idiosyncratic, sometimes baffling and at times deliberately outright user-hostile, but now you have a choice of operating systems and can truly use our refreshingly different computers with a refreshingly different user interface paradigm. I'm downloading and installing it on the Blackbird right now and I'll report back with a full review in detail.

Also, I'm well aware of the calendar, thanks.

Real-world Blackbird does real-world stuff for Apache (really)


Let's call it a #ShowUsYourTalos moment. This video from Savoir Technologies shows off their own Blackbird system, carrying an 8-core POWER9 CPU with a 3U HSF, a 4-slot NVMe riser card, two 64GB DDR4 DIMMs and a 500W PSU running on the onboard ASPEED framebuffer.

But this machine isn't just a bragging rights toy: it provides substantial support for the Apache products Savoir works on. These are primarily Java-based and there are three main choices for JDKs on POWER9, in particular Adoptium's Temurin, Eclipse OpenJ9 (descended from IBM's original J9, which I personally run on my AIX POWER6), and Red Hat's build of OpenJDK. Savoir tests on all three.

As anyone working on Java will attest, it's not enough just to make sure it works on different JVMs. This machine is dedicated to improving ppc64le support, stability and performance actually on the architecture itself. (Linus would agree.) Savoir does multiple builds to tamp down broken unit tests and find glitches due to Power ISA's different memory model guarantees. One example they cite in the video was a stress test they did on this very box, running one billion SOAP requests through Apache CXF with no errors.

I'm not involved or linked to Savoir in any way; I'm just delighted to see real hardware in the real world doing real things for real people. Right now, I don't think you're going to get throughput like this from anything with the current crop of RISC-V chips in it, and I'm hopeful that S1 is still in the pipeline to give us the shot in the arm we need to stay ahead of the curve on open hardware.

Microwatt goes multiprocessor


It's been awhile since we dropped in on Microwatt, the OpenPOWER VHDL softcore. Microwatt now runs on multiple FPGA boards or can be run (slowly) in simulation, and is capable of booting Linux. Raptor uses Microwatt for the Arctic Tern soft BMC. Although it still doesn't support vector instructions, recent commits have added an FPU and many of the standard special-purpose registers, and the newest ones now add support for SMP.

The newest pull request, currently to be committed, allows more than one processor core to be created by adding an NCPUS option to soc.vhdl. These cores can be debugged separately with JTAG and have the same view of memory and the same timebase value, and can be individually activated. For interrupts, they each have their own presentation controller in the XICS.

Although Microwatt cores are currently of only modest performance, more cores — if you have the space — can certainly improve its throughput and the range of applications it could be practical for. Unfortunately, we've still yet to hear anything new about the Solid Silicon S1 or how libre Power11 will end up being. Hopefully as the Microwatt design gets more efficient, at least the very smallest Power ISA systems will now have some additional flexibilities to work with.

Fedora 41 mini-review on the Blackbird and Talos II


It's Fedora upgrade time again! And in the same way I preface all these mini-reviews (see our last for Fedora 40), Fedora was one of the first mainstream distributions to support POWER9 out of the box, it's still one of the top distributions OpenPOWER denizens use and its position closest to the bleeding, ragged edge is where we see problems emerge first and get fixed (hopefully) before they move further downstream. That's why it's worth caring about it even if you yourself don't run it. Also, as always, recall both my Talos II and Blackbird are configured to come up in a text boot instead of gdm and I start the GUI manually from there. I always recommend a non-graphical boot as a recovery mechanism in case your graphics card gets whacked by something or other, and on Fedora this is easily done by ensuring the symlink /etc/systemd/system/default.target points to /lib/systemd/system/multi-user.target.

I'll also give a quick shout out here to Dan Horák at Red Hat, who responds to our user issues and maintains some additional Fedora packages in copr. Read his newly updated blog for information.

Irritatingly, dnf continues to fail to update grub2's config (bug 1921479, showing messages like 0ed84c0-p94177c1: integer expression expected during the process), so the process remains largely unchanged from F39 and F40:

dnf upgrade --refresh # upgrade prior system and DNF
grub2-mkconfig -o /boot/grub2/grub.cfg # force grub to update
dnf install dnf-plugin-system-upgrade # install upgrade plugin if not already done
dnf system-upgrade download --refresh --releasever=41 # download F41 packages
dnf system-upgrade reboot # reboot into upgrader

Again there was no installation screen on either the Blackbird or T2 this time around; for both systems I needed to log in as root on an alternate VTY (Ctrl-Alt-F2 or as appropriate) and either dnf system-upgrade log --number=-1 intermittently to watch the updates, or just do journalctl -f if you want a live feed and don't mind the scrollspam. You can probably also still monitor it on the virtual TTY in the BMC web interface. Both systems then rebooted (fast reboot is disabled on both) and came up clean, again with no XFS burp on the T2! I think we can conclude the updated Petitboot firmware has resolved that issue. As usual, one more grub2-mkconfig -o /boot/grub2/grub.cfg was needed to get Petitboot's menu looking right and the install was complete.

I should also note that two people on the Raptor forums reported that their systems were unbootable after this update. However, both the Blackbird and the T2 upgraded with no hitches except for a really old F33 package on the T2 I had to blow away, so I can't replicate that here and neither can Dan.

Let's proceed with testing out the Blackbird, which is my proving ground system before upgrading my regular T2 workstation. The biggest update is that in the most recent kernel versions, especially if you haven't done any updates between the F40 upgrade and now, we finally have 1920x1200 support on the built-in BMC HDMI video!

Yes, much as it pains me to say it, Wayland has finally progressed to the point where it's useable with the ASPEED BMC framebuffer. This is a crucial point to make if you're running a GPU-less configuration, especially if you're trying to achieve a fully libre machine with no firmware blobs: you can now use Wayland with it with little obvious compromise, if you really really want.
All resolutions up to 1920x1200 are supported, including 1920x1080. This works in both GNOME and KDE Plasma 6.2, though I'll have something bad to say about GNOME in a moment.

Now, there's still reasons not to use Wayland with BMC graphics, and the big one is that the fans just ran continuously in Wayland because everything is getting crammed through llvmpipe. This is a little 4-core Blackbird and it could keep up with it, but it certainly earned its money doing so. When I switched back to Xorg using plasma6-x11-unsupported, all was quiet again.

X11 modelines never had any problems supporting BMC video, but here it is for the record.
I also commented on the Chromium build now available for ppc64le in the F40 mini-review, so it's only fair to see how far it's come. And, well, it's come a long way. Many more things work and the previous graphical glitches in Xorg seem gone now. It's still somewhat rickety and crash reports pop up intermittently as its subprocesses fart and die, and really big Wasm apps like (oh the irony) Google Earth will bring it to its knees, but casual browsing largely works fine and it can run MAME from the Internet Archive's online arcade now with reasonable performance. I still find my personal builds of Firefox with Baseline JIT to be faster with browsing and I retain my philosophical objections to Chrome and Chromium, but I can't deny the progress, so this will make others of you happy.

Something that won't make you happy was GNOME. Whether it was Wayland or Xorg, there were tons of graphical artifacts on the blob-free Blackbird (these are photographs of the screen since the framebuffer didn't always reflect the issue):

The Plasma 6.2 update doesn't seem to break anything major, so if you're blob-free, I'd just use KDE with the unsupported X11 support. It's easier on the cores and it generally works. Xfce would probably be okay too.

On the T2, other than that weir-dass F33 remainder package, the upgrade was similarly smooth. Nothing so far has seemed to regress. However, the Talos II has a Raptor-BTO AMD WX7100 card, unlike the Blackbird.

Regular readers know very well I'll complain when it's time to complain, but this time around the F41 upgrade worked well and the system seems solid. I'm sorry to hear about the problems some others have had, but I couldn't replicate them here. So far this has been one of the smoother updates, which was a profound relief.

CHRP support gone from Linux kernel


UPDATE: The patch has been retracted, see comments.

There weren't that many Common Hardware Reference Platform PowerPC systems anyway, but if you have one of them (notably systems like IBM's RS/6000 7046 Model B50, the Total Impact briQ, Motorola PowerStacks or the PegasosPPC or Pegasos II from Genesi), your days are numbered as CHRP support will be removed from the next Linux kernel release. CHRP never got much market traction; Apple, then the largest seller of PowerPC machines, only partially supported it (Old World Macs are sui generis and New World Macs are a combination of CHRP and PReP), and as a result Linux support for Power Macs — at least what remains — never completely depended on it.

At least for the Genesi machines, however, you have better and more supported options in MorphOS and AmigaOS 4, and while Power Macs should still work, they're (IMHO) more usefully served by one of the BSDs. For the real oddball machines, though, if you were running a bleeding-edge kernel this is the end of the line — unless you'd like to step in and maintain it.

Updated Baseline JIT OpenPOWER patches for Firefox 128ESR


I updated the Baseline JIT patches to apply against Firefox 128ESR, though if you use the Mercurial rebase extension (and you should), it will rebase automatically and only one file had to be merged — which it did for me also. Nevertheless, everything is up to date against tip again, and this patchset works fine for both Firefox and Thunderbird. I kept the fix for bug 1912623 because I think Mozilla's fix in bug 1909204 is wrong (or at least suboptimal) and this is faster on systems without working Wasm. Speaking of, I need to get back into porting rr to ppc64le so I can solve those startup crashes.

Fedora 41


Just a quick note that Fedora 41 is out, the standard Linux distro we use here on our two Raptor systems. Based on kernel 6.11, he big updates are updated packaging with DNF 5 and RPM 4.20 plus Perl 5.40, Python 3.13, LLVM 19 and gcc 14.1/glibc 2.40. Fortunately there are apparently still optional Xorg support packages for GNOME and KDE Plasma. Once the package repos have stabilized a bit, I'll have the usual minireview. For now, refresh your memory with how things went with Fedora 40, and of course Fedora 38 will be EOL in about a month based on their standard schedule.

Running Thunderbird with the OpenPower Baseline JIT


The issues with Ion and Wasm in OpenPower Firefox notwithstanding, the Baseline JIT works well in Firefox ESR128, and many of you use it (including yours truly). Of course, that makes Thunderbird look sluggish without it.

I wasn't able to get a full LTO-PGO build for Thunderbird to build properly so far with gcc (workin' on it), but with the JIT patches for ESR128 an LTO optimized build will complete and run, and that's good enough for now. The diff for the .mozconfig is more or less the following:

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++

mk_add_options MOZ_MAKE_FLAGS="-j24"

#ac_add_options --enable-application=browser
#ac_add_options MOZ_PGO=1
#
ac_add_options --enable-project=comm/mail
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/tbobj

ac_add_options --enable-optimize="-O3 -mcpu=power9 -fpermissive"
ac_add_options --enable-release
ac_add_options --enable-linker=bfd
ac_add_options --enable-lto=full
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --with-libclang-path=/usr/lib64

export GN=/home/censored/bin/gn # if you haz
export RUSTC_OPT_LEVEL=2

You can use a unified .mozconfig like this to handle both the browser and the E-mail client; if you do, to build the browser the commented lines should be uncommented and the two lines below the previously commented section should be commented.

You'll need comm-central embedded in your ESR128 tree as per the build instructions, and you may want to create an .hg/hgignore file inside your ESR128 source directory as well to keep changes to the core and Tbird from clashing, something like

^tbobj/
^comm/

which will ignore those directories but isn't a change to .hgignore that you have to manually edit out. Once constructed, your built client will be in tbobj/. If you were using a prebuilt Thunderbird before, you may need to start it with tbobj/dist/bin/thunderbird -p default-release (substitute your profile name if it differs) to make sure you get your old mailbox back, though as always backup your profile first.

Music production on Power: an adventure in porting


[Here's a guest post from taylor.fish on their porting work on music and audio software. I thought it made a good tutorial on porting and also is a great way to show off the diverse things people are doing on OpenPower. Like all guest and first-party posts on Talospace, this article remains the property of the original author and may be distributed under CC-BY-SA 4.0. -- Ed.]

For the past five years, I’ve used a Blackbird as my primary computing device. Prior to that I used x86 systems flashed with Libreboot, but aging hardware running unsupported firmware only gets you so far.

The switch to a truly owner-controlled Power ISA system was a welcome one, but it wasn’t without its growing pains. I could no longer assume any given piece of Linux-compatible software would successfully compile and run on my machine, due to the small but significant portion with architecture-specific issues. That didn’t deter me from continuing to use my Blackbird as my main device, but when I wanted to get back into music production, I knew I would have to confront this problem: my previous endeavors, although sticking entirely to free software, were all on x86.

Of particular importance in digital music production are plugins, which include instruments like synthesizers and samplers, effects like equalizers and reverb, and analysis tools like spectrograms and oscilloscopes. While there are some excellent plugins released as free software, they are vastly outnumbered by proprietary ones, and it takes dedication to commit to producing music only with free software. Not wanting that uphill battle to feel more like a cliff, when I discovered that some of those plugins wouldn’t run on Power, I was determined to change that fact rather than lose what few tools I had.

And so my porting adventure began. Over the past year or so I developed patches for every piece of free/libre audio software that I wanted to use but that didn’t work on Power. Some of those changes have been merged upstream, but for all the others I maintain a GitHub organization called PowerAudio that contains forked versions of each repository with ppc64le patches applied (along with some other improvements for use on GNU/Linux). If you just want working audio plugins on Power, visit that page, which has more information about each piece of ported software. If you want to know more about what the porting process entailed, however, read on…

The porting process

Each piece of software to be ported has its own unique set of problems, but there are some common themes. Here are some of the most frequent issues that prevent audio plugins from working on Power ISA systems:

1. Architecture-specific compiler options

This is the easiest issue to fix. Some projects pass architecture-specific options to the compiler (like -msse on x86) but don’t restrict those options only to the relevant architectures. In that case the fix is simply to perform an architecture check before applying those options, as in this change to tap-lv2:

@@ -10 +10,3 @@
+ifneq ($(findstring $(shell uname -m),x86_64 amd64 i386 i686),)
 CFLAGS += -mtune=generic -msse -msse2 -mfpmath=sse
+endif

Some projects handle specific architectures but then assume x86 as a fallback. In that case, it’s easiest to continue the pattern and add ppc as one of the cases, as in this change to Helm:

@@ -25,4 +25,8 @@ ifneq (,$(findstring aarch,$(MACHINE)))
 ifneq (,$(findstring arm,$(MACHINE)))
	SIMDFLAGS := -march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+else
+ifneq (,$(findstring ppc,$(MACHINE)))
+	SIMDFLAGS :=
 else
	SIMDFLAGS := -msse2
+endif

2. Assumptions broken by Power

Some code appears to be cross-platform but contains assumptions that don’t apply to Power ISA systems. For example, the plugin framework DPF used the first part of gcc -dumpmachine to obtain the correct directory name for VST plugins. On 64-bit little-endian PowerPC, that yields powerpc64le. But the VST 3 specification says the directory name should match uname -m, which is ppc64le. These two identifiers happen to be identical for many architectures, but generally differ on PowerPC and Power ISA systems.

Simply using uname -m here would break cross-compilation, so the fix performs a text substitution to correct the discrepancy on Power:

@@ -691 +691,3 @@ ifeq ($(LINUX),true)
-VST3_BINARY_DIR = Contents/$(TARGET_PROCESSOR)-linux
+# This must match `uname -m`, which differs from `gcc -dumpmachine` on PowerPC.
+VST3_ARCHITECTURE := $(patsubst powerpc%,ppc%,$(TARGET_PROCESSOR))
+VST3_BINARY_DIR = Contents/$(VST3_ARCHITECTURE)-linux

A similar issue existed in JUCE, a popular framework for audio plugins. JUCE performs architecture detection with a chain of preprocessor conditionals that (somewhat hackily) use #error to emit the correct architecture identifier, which JUCE uses in places that expect the output of uname -m. While those conditionals do attempt to detect PowerPC, they don’t account for the fact that the different endiannesses of 64-bit PowerPC have different identifiers, and incorrectly classify ppc64le as ppc64. This can cause compilation to fail entirely when JUCE uses the incorrect architecture name but then runs a validator that expects the correct one.

A simple endianness check fixes this one:

@@ -64,3 +64,7 @@ #elif defined(__ppc__) || defined(__ppc) || ...
   #if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
-    #error JUCE_ARCH ppc64
+    #ifdef __LITTLE_ENDIAN__
+      #error JUCE_ARCH ppc64le
+    #else
+      #error JUCE_ARCH ppc64
+    #endif
   #else

3. Lack of inclusion in platform-specific code

Some projects contain truly platform-specific code that needs to be written separately for each architecture, but don’t include PowerPC one of the handled cases. In these situations, the most straightforward (and sometimes only) fix is to add the necessary Power-specific code. For example, sfizz contained a copy of a low-level dependency that only supported x86 and ARM, but because that dependency had already added support for Power and other architectures upstream, all that was necessary for sfizz was to update the dependency.

Another example comes from DISTRHO Ports, a large collection of plugins ported to GNU/Linux, in which an architecture detection script required adding code to detect the various types of PowerPC:

@@ -42,4 +42,19 @@
     elif echo "${fileout}" | grep -q "x86-64"; then
         if [ "$(uname -m)" != "x86_64" ]; then
             MESON_EXE_WRAPPER="qemu-x86_64-static"
         fi
+
+    elif echo "${fileout}" | grep -q "64-bit LSB.*PowerPC"; then
+        if [ "$(uname -m)" != "ppc64le" ]; then
+            MESON_EXE_WRAPPER="qemu-ppc64le-static"
+        fi
+
+    elif echo "${fileout}" | grep -q "64-bit MSB.*PowerPC"; then
+        if [ "$(uname -m)" != "ppc64" ]; then
+            MESON_EXE_WRAPPER="qemu-ppc64-static"
+        fi
...

Although the purpose of this script is to aid cross-compilation, the lack of Power support prevented even native compilation.

4. Missing optional vector intrinsics

Hardware-specific vector intrinsic functions (SIMD) are often used to improve performance, but software that uses them must provide a separate implementation for each supported architecture, which rarely includes Power. However, some software is designed to use vector intrinsics only when such an implementation exists, falling back to a non-optimized, cross-platform approach otherwise. In practice, though, if non-optimized platforms don’t get much testing, bugs that unintentionally prevent compilation on these systems can go unnoticed.

This issue occurred in a dependency used by Wavetable that contained, but did not require, optimized SIMD code for x86–64 and ARM, but caused errors on other architectures by mistakenly trying to use their nonexistent SIMD implementations. Because SIMD was designed to be optional in this dependency, the fix simply adds an architecture check:

@@ -80,5 +80,7 @@
  #ifdef JUCE_32BIT
   #define GIN_HAS_SIMD 0
- #else
+ #elif defined(JUCE_INTEL) || defined(JUCE_ARM)
   #define GIN_HAS_SIMD 1
+ #else
+  #define GIN_HAS_SIMD 0
  #endif

Another example comes, again, from JUCE. JUCE contains a copy of libpng, a PNG library that actually contains optimized VSX code for Power! But in a cruel twist of irony, JUCE excluded that optimized code from their copy, yet kept the code that tries to use it. The result? Linker failures that, because they occur in a helper tool almost always compiled early in the build process, prevent almost all software that uses JUCE from compiling on Power.

The fix for this one comes from libpng itself, which demonstrates the proper way of disabling optimizations, by defining certain macros instead of just deleting the implementations. So these macros simply need to be added to JUCE, which… already defines one of them?

#define PNG_ARM_NEON_OPT 0

Indeed, because JUCE’s copy of libpng excludes the optimized routines for all architectures, this issue presumably appeared on ARM at some point and was fixed (x86 happens not to exhibit the problem because libpng optimizations are opt-in on that architecture). That would have been a great time to include the other macros to disable optimizations, but instead, that task is accomplished by this fix:

@@ -268 +268,4 @@
   #define PNG_ARM_NEON_OPT 0
+  #define PNG_POWERPC_VSX_OPT 0
+  #define PNG_INTEL_SSE_OPT 0
+  #define PNG_MIPS_MSA_OPT 0

5. Missing required vector intrinsics

Finally, one of the most common sources of incompatibility with Power in audio software is the non-optional use of SIMD, necessitating separate implementations for each architecture. Unsurprisingly, support for Power is not typically included.

My preferred approach in this case is to use SIMDe, a cross-platform implementation of x86 (and ARM) vector intrinsics, optimized with the platform’s native vector operations when available. In the case of Vaporizer2, that looks something like this:

@@ -6,5 +6,8 @@
 #ifdef __aarch64__ //arm64
	#include "../../sse2neon.h"
-#else
+#elif defined JUCE_INTEL
	#include "immintrin.h"
+#else
+	#define SIMDE_ENABLE_NATIVE_ALIASES
+	#include <simde/x86/sse3.h>
 #endif

Something similar is done for Vitalium, the fork of Vital in DISTRHO Ports. However, when attempting to use SIMDe to implement the x86 intrinsics it uses, I encountered odd runtime errors with backtraces that involved SIMDe. More investigation is needed to determine the cause, but because Vitalium also provides implementations of its vector-optimized routines for ARM, an easier workaround was to configure SIMDe to implement ARM’s vector intrinsics (NEON) instead, which appears to avoid that issue.

@@ -33,8 +33,13 @@
 #else
-  static_assert(false, "No SIMD Intrinsics found which are necessary for compilation");
+  #warning "No native SIMD support; using SIMDe"
+  #define SIMDE_ENABLE_NATIVE_ALIASES
+  #include <simde/arm/neon.h>
+  #define VITAL_NEON 1
+  #define VITAL_SIMDE 1
 #endif

-#if VITAL_SSE2
+#if VITAL_SIMDE
+#elif VITAL_SSE2
   #include <immintrin.h>
 #elif VITAL_NEON
   #include <arm_neon.h>

[See also x86intrin.h -- Ed.]

Lastly, another example of this comes—yet again—from JUCE, in a form that prompts a different solution. JUCE contains its own set of SIMD functions, designed with an architecture-independent API but requiring architecture-specific implementations. Although Power is predictably unsupported, JUCE does contain cross-platform fallback implementations for almost all of its SIMD API; however, these are used only as part of the architecture-specific implementations, to implement operations that don’t have a precise native equivalent on a given platform.

Why not, then, provide a universal fallback implementation for all unsupported architectures? That’s exactly what this change does (with a diff too large to include here), fixing another source of compilation errors in projects that use JUCE.

Conclusion

When ARM devices running desktop operating systems started to become more common, in particular due to Apple’s decision to move away from Intel, I had hoped that this would encourage x86-only software to become architecture-independent, benefiting Power in the process. Unfortunately, many projects have simply special-cased support for ARM, even when cross-platform alternatives exist (which don’t preclude optimized architecture-specific routines if desired). Maybe another architecture will eventually become the catalyst for this change, but until then, we’ll need patches.

I will, however, take a moment to complain again about JUCE. Despite making me sign their Contribution License Agreement, JUCE has ignored all of my pull requests (juce-pr1, juce-pr2, and juce-pr3), even the simplest two that would not require much review (yet are the most important fixes for Power). Because of this, every project that uses JUCE must, at a minimum, use a patched version in order to compile on Power.

Still, I think the biggest takeaway is that music production is absolutely possible on Power. The experience is undoubtedly rough around the edges, but I hope that PowerAudio’s ports can reduce the discrepancy in available tools compared to other architectures, and generally make this activity more accessible to Power ISA users.

Baseline JIT patches available for Firefox ESR128 on OpenPOWER


It's been a long hot summer at $DAYJOB and I haven't had much time for much of anything, but I got granted some time this week to take care of an unrelated issue and seized the opportunity to get caught up.

The OpenPOWER Firefox JIT still crashes badly in Wasm and Ion for reasons I have yet to ascertain, but the Baseline Interpreter and Baseline Compiler stages of the JIT continue to work great and are significantly faster than the baseline Interpreter (even in a PGO-LTO build), so I did the needful and finally got them pulled up to the new Extended Support Release which is Firefox 128.

I then spent the last two days bashing out crashes and bugs, including a regression from Firefox's new WebAssembly-based in-browser translation engine. The browser chrome now assumes that WebAssembly is always present, but on JIT-less tier-3 machines (or partially implemented JITs like ours, and possibly where Wasm is disabled in prefs) it isn't, so it hits an uncaught error which then blows up substantial portions of the browser UI like the stop-reload button and context menus. The Fedora official ppc64le build of Firefox 128.0.3 is affected as well; I filed bug 1912623 with a provisional fix. Separately all JIT and JavaScript tests completely pass in multiple permutations of Baseline Interpreter and Baseline Compiler, single- and multi-threaded.

As a sign of confidence I've been dogfooding it for the last 24 hours with my typical massive number of tabs and add-ons and can't get it to crash anymore, so I'm typing this blog post in it and using it to upload its own changesets to Github. Grab the ESR source from Mozilla (either pull a tree with Mercurial or just download an archive) and apply the changesets in numerical order, though after bug 1912623 is fixed you won't need #823094. The necessary .mozconfig for building an LTO-PGO build, which is what I'm using, is also in that issue; it's pretty much the same as earlier ones except for --enable-jit.

Little-endian POWER9 remains the officially supported architecture. This version has not been tested on POWER8 or big-endian POWER9, though the JIT should still statically disable itself even if compiled with it on, so the browser should still otherwise work normally. If this is not the case, I consider that a bug, and will accept a fix (I don't have a POWER8 system here to test against). There are no Power10 specific instructions, but I don't see any reason why it wouldn't work on a Power10 machine or on a SolidSilicon S1 whenever we get one of those.

Comments always solicited, though backtraces and reliable STRs are needed to diagnose any bug, of course. Meanwhile I've got more work cut out for me but at least we're back in the saddle for another go.

Chromium Power ISA patches ... from Solid Silicon


It appears that some of the issues observed by me and others with Chromium on Fedora ppc64le may in fact be due to an incomplete patch set, which is now available on Solid Silicon's Gitlab. If your distro doesn't support this, now you have an upstream to point them at or build your own. They include the Ungoogled changes as well, even though I retain my philosophical objections to Chromium, and still use Firefox personally (I've got to get back on the horse and resume maintaining my personal builds now that I've got Plasma 6 back running on Xorg again).

Oh, yeah, it really is that Solid Silicon. You can make your own speculations from the commit log, though regardless of whether Solid Silicon is truly a separate concern or a Raptor subsidiary, it wouldn't be surprising that Raptor resources are assisting since they've kind of bet the store on the S1.

Timothy Pearson's comments in the Electron Github suggest that Google has been pretty resistant to incorporating support for architectures outside of their core platforms. This is not a wholly unreasonable position on Google's part but it's not a particularly charitable one, and unlike Mozilla, the Chrome team doesn't really have the concept of a tier-3 build nor any motivation to. That kind of behaviour is all the more reason not to encourage browser monocultures because it's not just the layout engine that causes vendor lock-in. Fortunately V8, the JavaScript engine, is maintained separately, and reportedly has been more accommodating presumably because of things like Node.js on IBM hardware (even IBM i via PASE!).

Mozilla is much more accepting of this as long as regressions aren't introduced. This is why TenFourFox patches were largely not upstreamed since they would potentially cause problems with Cocoa widgets in later versions of macOS, though what patches were generally applicable I would do so. The main reason I'm still maintaining the Firefox ppc64le JIT patches outside is because I still can't solve these recent startup crashes deep within Wasm code, which largely limits me to Baseline Compiler and thus is not suitable for loading into the tree yet (we'd have to also upstream pref changes that would adversely affect tier-1 until this is fixed). I still intend to pull these patches up to the next ESR, especially since Github is glacially slow now without a JIT and it's affecting my personal ability to do other tasks. Maybe I should be working on something like rr for ppc64le at the same time because stepping through deeply layered code in gdb is a great way to go stark raving mad.

A RISC-V option for your Framework laptop (how about POWER next?)


Many of you have heard of the Framework laptop, a modular system that you can DIY from a mainboard and parts or purchase fully assembled. The designs are open-sourced on Github and Framework has actively been trying to develop an ecosystem around the product.

The part that's potentially most interesting is the mainboard. Framework actively advertises the notion that you can just replace components piecemeal to upgrade, including the logic board, yet keep the same display, port loadout, keyboard, battery and so on if they still work. You can even stick the old one in a case and use it for something else, which is not only environmentally conscious but very customer-friendly.

Now the first third-party Framework mainboard is coming, and it's not x86: it's RISC-V, and it fits in their 13" chassis. A RISC-V option is of course not new in portable computers; I reviewed the ClockworkPi RISC-V DevTerm a couple years ago, which can take either an RPi ARM compute module or an Allwinner D1 based on the 1GHz RV64IMAFDCVU XuanTie C906. However, the CPU is more powerful than that, a quad-core StarFive JH7110 with four SiFive U74 cores. The new Framework mainboard is based on an existing DeepComputing laptop product called "Roma;" DeepComputing now sells a more advanced version in a laptop of their own based on the octocore SpacemiT K1. Combined with the generally well-regarded Framework loadout and creature comforts, this could definitely be a product to watch.

That said, much as I was disappointed with the performance of the RISC-V DevTerm, most people are going to be similarly unimpressed with the performance of this one. Phoronix's benchmarks placed it well below the Raspberry Pi 4 (and the Orange Pi 5 crushed it), and Framework is trying to set expectations low by saying, "The peripheral set and performance aren’t yet competitive with our Intel and AMD-powered Framework Laptop Mainboards." That would certainly be an understatement, and is yet another example of the self-licking RISC-V ice cream cone getting ahead of its skis on real-world throughput. Framework also apologetically notes that the board "has soldered memory and uses MicroSD cards and eMMC for storage, both of which are limitations of the processor." Still, it's (soon to be) available and functional, and it could be mounted in one of those small desktop cases, so if you want a sidecar RISC-V machine to play with you've got another option better than yet another SBC.

But more important than that: it proves that you can put really any architecture on such a board and take advantage of the Framework, uh, framework instead of reinventing the wheel completely. So, instead of these various attempts at building a PowerPC laptop, why isn't there a Power ISA Framework mainboard? Wouldn't that approach just make more sense?

A baby Power10, if you're desperate


Are you really desperate to have your own Power10 (libre issues notwithstanding) while we wait for S1? IBM historically releases "little" versions of their servers after the launch systems have exhausted their novelty and now it's time for this generation's. If you've got 2Us in your rack, a wad of money in your wallet and an IBM salesdroid in your Rolodex, in about a month the Power S1012 could be yours.

Based on the size of the board, no one would mistake this for a Blackbird, yet it's pretty much the IBM equivalent: a single socket supporting up to eight cores. It comes as either a rackmount or in IBM's mega-tower case with four RAM slots for up to 256GB of memory. Tape and RAID are options, and it boots Linux, AIX or IBM i. If you need more sockets, there's the S1022 with a second one in the same form factor, and if you need more capacity, the 4U S1014 has you covered — and is still tower-ready in the same way that Orson Welles was suit-ready.

IBM hasn't shown as much love for their baby towers recently, though. In fact, there wasn't an IBM 2U option at all in POWER9's generation (no doubt much to Raptor's relief); if you wanted Big Blue in a Littler Box, you had to buy the 4U S914 instead (or a leftover POWER8 S812). Also, it seems like the S1012 tower's power output is gimped somewhat: the spec sheet says the rackmount can put 240W through the single CPU socket but the tower manages "only" 195W, which limits your core count. In the glory days, though, we had things like this.

This is my long-trucking POWER6 p520, the 2U baby of the old POWER6 generation. You could get it with two sockets and the same CPUs as its larger siblings, and since the POWER6 was SMT-2, I've got four threads running on its single LPAR. It has RAID and an optical drive and 16GB of RAM, with more available if you were willing to do battle with IBM Capacity on Demand codes. All in all, not bad for 2009.

Of course, I'm being very facetious in this article, because naturally none of these towers are really workstation substitutes. The S1012 (and certainly the S1022) is undoubtedly as loud as the POWER6, and while the POWER6's back baffle reduces some of the noise, it correspondingly reduces ventilation. There's a reason, after all, that I gave the thing its own room with the other geriatric servers. Plus, IBM doesn't talk to us end users: you'll have to buy it through a VAR or authorized rep. That was why I said screw it to buying a brand-spanking new POWER7 back in the day and got the POWER6, because it was used, cheaper and actually available. Which reminds me — if you have to ask how much it is, you almost certainly can't afford it. Hope you've been saving your pennies for the S1.

Rocky Linux 9.4


Rocky Linux 9.4 is out, based on RHEL 9.4, but, you know, free. (Note that Rocky Linux 8.9 doesn't come in a ppc64le version, so Rocky 9.x is your only choice.) If you want the stability of RHEL but don't like the pricetag and don't need the support, here's one of your options. As is typical for such point releases, this one primarily refreshes included software along with security updates. Boot, minimal and DVD ISOs are available for download.

End of the road for PowerPC 40x in Linux


The original PowerPC 400-series embedded chips are no longer supported in the Linux kernel as of today. Despite its prior design wins in many set top boxes, service processors and network equipment, there are no known current consumers of the code and no maintainers. The change affects the 401, 403 and 405, but in case you were worried the change is irrelevant to the embedded PowerPC 405 variant used as an on-chip controller for OpenPOWER, since it runs the Self-Boot Engine and not mainline Linux. It also does not extend to the 44x and above, like the Amiga clone Sam440ep and Sam460ex (AmigaOne 500) boards, which use the AMCC 440EP and 440-derived AMCC 460EX respectively and thus remain supported.