Date: Sun, 28 Oct 2018 14:12:11 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: Somewhat off topic .. is there a RISC-V project for FreeBSD ? [powerpc64 notes] Message-ID: <A2805286-DBA1-4931-9CB2-CFD0A2DCCE0A@yahoo.com>
next in thread | raw e-mail | index | archive | help
Dennis Clarke dclarke at blastwave.org wrote on Sun Oct 28 15:43:31 UTC 2018 : > As for ppc64 I think IBM Power9 is needed to do anything. Ye old > PowerMac G5 units are available for a dime a dozen and may work > but I really don't know. I have yet to try the installer for > FreeBSD 12.0 beta2 but I may give it go later today. I (sometimes) have access to some old PowerMacs, including 3 old G5s (2 being so-called "Quad Core" ones). I'm running a head -r339076 based "Quad Core" currently. The SSD works fine in all 3 G5s for booting FreeBSD and buildworld buildkernel activities --and building ports. [But I experiment with using fairly modern compiler toolchains for such activity and so my context is not normal.] I've no clue if the following notes related to my activities overlaps with anything that you might try. While my test context is PowerMac based, the notes are not specific to PowerMac contexts. FreeBSD support for the powerpc families is via its gcc 4.2.1 related toolchain. System-clang and devel/llvm[67]0 are not ready yet for buildworld buildkernel and installing, booting and using all the results, at least for C++ with thrown exceptions involved in the operation (even if FreeBSD's libgcc_s.so had no problems in the area). Also, the clang/llvm output for kernel .ko files is mismatched vs. what types of relocation the FreeBSD kernel supports. Attempted loads of such .ko files crash the box. (I've no clue which side should be changed for this. I built in a couple of things into the kernels that I use so my basic activity did not require such .ko dynamic loads, even for a clang-based build.) While there is a devel/powerpc64-xtoolchain-gcc (and its devel/powerpc64-binutils and devel/powerpc64-gcc ), FreeBSD's libgcc_s.so has at least one incompleteness in its stack unwind support for C++ exception handing that can lead to __Unwind_RaiseException looping looking at the same stack frame over and over. As far as I can tell this problem is a strictly-FreeBSD-side problem. clang generated code can also hit the problem in libgcc_s.so . One way this may change is if llvm's libunwind gets to the point of being usable for powerpc64 and the like. (This would avoid such parts of libgcc_s.so .) VNET does something via a technique that works when the gcc 4.2.1 toolchain was used. But use of devel/powerpc64-xtoolchain-gcc leads the technique to causing crashes. This is a fairly new discovery. At this point I have no clue what will change or how it will change. This blocks doing a general devel/kyua based test run because it crashes the box. Such points may not mater much if one is not doing buildworld buildkernel activities: For example, lang/gcc8 generated code, when using its own libraries, instead of using the system libgcc_s.so , has C++ exceptions working. -Wl,-rpath=. . . use can be important. system-clang and devel/llvm[67]0 suffer the libgcc_s.so problem for the code they generate. But if one does not need thrown C++ exceptions, building user-code and running the results seems to be otherwise working. The clang problems are more tied to special aspects of buildworld buildkernel . 32-bit powerpc is more tied to gcc 4.2.1 for buildworld buildkernel, in that there is no devel/powerpc-binutils or devel/powerpc-gcc and the clang/llvm problems apply to this context as well. (clang/llvm has made some progress for FreeBSD support in the last couple of years. I used to have a much longer list of known problems, including violations of the ABIs and stack handling that messed up some stack- frame-tied register values.) Looking at list reports, it would seem that some old PowerMac models may boot fine and others may not, both powerpc64 and powerpc . This also seem to vary by the FreeBSD vintage involved. My understanding is that one of the major powerpc family people used to have one or more PowerMac G5's but no longer has access to such. This could limit getting updates for PowerMac issues. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A2805286-DBA1-4931-9CB2-CFD0A2DCCE0A>