-
-
Notifications
You must be signed in to change notification settings - Fork 172
Add support for FreeBSD and OpenBSD #2338
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
Conversation
Only 122 MB of RAM consumed for the entire OS plus DOSBox Staging 🤯 😎 |
Nice to see that BSD support gets some well-deserved love! I much more prefer the BSD-philosophy than the Linux one (well-designed vs "organically grown", to be diplomatic about it 😅), so this is a welcome improvement! 🎉 Nice one @kcgen 🎊 |
Does this thing even support OpenGL? If not, it will be a nice testbed for the software renderer backend of the OSD/UI stuff. |
The BSDs are quite a pleasure to work with, having a consistent layout and configuration approach. I'm especially a fan of their end-to-end documentation; from the kernel up to the services.
Yes! (Zoom into the top left of the screenshot to see the log)-- hardware acceleration and even GLSL handling! Pretty amazing; it's the latest OpenBSD 7.2 circa late 2022 even running clang 13.x out of the box. Giving the old hardware plenty of legs! |
Installing Gentoo Linux on the Powerbook G4; hopefully will have better luck being able to run and test the PPC dynrec core. (motivation being to check big-endian handling/bugs in all the new code added since the last round of big-endian fixes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @kcgen , nice build instructions. Out of interest, does the Linux binary run in the Linux compatibility mode of BSD? (I've just heard there is such a thing 😄 )
Oh yes! I forgot the BSDs' have a Linux compatibility mode - so didn't try running it. I would imagine its libc MMAP wrapper would hit the same security rules in the OpenBSD kernel (then again, maybe to be compatible, they allow a lot more inside some runtime sandbox.. 🤷♂️ 😅 ) If I ever revisit OpenBSD, will have to remember to try. Thanks, @johnnovak ! |
The PPC dynrec cores were disabled early 2021 in commit 5151610 as a result of syncing with upstream's r4424 SVN commit, which refactored the cpu module in ways that broke the PPC dynrec backends. Unfortunately my own PowerPC was no longer working at that time, so I wasn't able to help get it working again. Fortunately I have a working MacBook G4 now, so can help again. Note: the PPC 64-bit backends haven't been updated (because I don't have such a system), however we should laeve it enabled for the day someone /does/ have a system and can report it to the project. Then similar change can be made as done in this commit to get it work again. This commit also adds toggling of per-page W^X to Meson.
Also makes a couple minor compatibility fixes: - OpenBSD's thread name in Loguru - Update headers for the BSDs
I'm not hitting any regressions testing other dyn rec cores: x86, armV7, and aarch64, so will go ahead with the merge. |
Also re-enables the PPC dynrec cores that were unfortunately disabled in the 2021 commit 5151610 as a result of some refactoring in SVN r4424, which broke the PPC backends. It's nice to finally revisit PPC land now that I have working hardware again.
Using the normal core, I tested the following:
They're all (still) working on big-endian, so that's good!
As for the PPC dynamic core, it now builds - but the OpenBSD kernel blocks it at runtime with an ABORT. OpenBSD has strict
mmap
requirements regarding R+W+X permission flags, despite Staging complying w/ W^X memory tagging usingmprotect
, so I'll have to switch to Linux or FreeBSD to get further.