Re: FreeBSD on PowerVM LPARs (powerpc64le) — LibrePower PoC
LibrePower <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.ppc |
|---|---|
| Message-ID | <[email protected]> |
Le 2026-08-17T16:27:27.000+02:00, Calvin Buckley <[email protected]> a écrit : > It should work on PowerVM/phyp in both LE/BE, but there's some bugs that prevent it from working[1]. If you fix one, the other one should also be fixed (and FWIW, P5/P6/P7 hardware is cheap used and BE only). > > [1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279137 Thanks Calvin — that bug report is useful, and I had not seen it before. I encountered a failure at the same stage: boot1.chrp never reached the loader on real PAPR firmware. In my case, the problem seemed to be the entry convention. The firmware enters the client program in big-endian mode, while boot1.elf is a little-endian image whose entry point does not switch MSR[LE]. As a result, the first instruction is decoded using the wrong endianness and traps. This does not happen under QEMU because SLOF enters client programs in little-endian mode. The proposed fix is a short bi-endian preamble at _start, using the same approach as Linux’s FIXUP_ENDIAN: https://gitlab.com/librepower/freebsd-powervm/-/blob/main/patches/12-01-boot1-endianness.patch There is one important caveat regarding PR 279137: the preamble is compiled only for little-endian builds. Big-endian images already match the PAPR entry convention, so I think this shall not explain the BE failures described in that report. It may explain one part of the problem, but someone with an affected system should be able to confirm or rule it out quickly. Regarding older hardware, I understand the point. However, my target is a PowerVM partition on "current" systems (Power9/10/11) both on-premises and PowerVS. In any case, I will keep documenting and publishing everything in the repository, whether or not it eventually reaches upstream. If it helps someone investigate the remaining issues, test on other systems, or submit better patches, then this modest effort will already have been worthwhile.