Skip to content
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

Compatibility with PPC in general and MacOS PPC in particular? #392

Open
barracuda156 opened this issue May 30, 2023 · 22 comments
Open

Compatibility with PPC in general and MacOS PPC in particular? #392

barracuda156 opened this issue May 30, 2023 · 22 comments
Labels
hardware i can haz? New feature or request

Comments

@barracuda156
Copy link

From README is seems to follow that all archs supported by FreeBSD are supposed to be supported by ravynos; has it been tried out on PowerPC (Big-endian)?

Another question, there is the following note:

Eventual compatibility with x86-64/arm64 macOS binaries (Mach-O) and libraries

It would be awesome to have a compatibility with ppc/ppc64 macOS binaries too :)

@mszoek mszoek added i can haz? New feature or request hardware labels Jun 5, 2023
@mszoek
Copy link
Collaborator

mszoek commented Jun 5, 2023

That's not entirely true. Currently the only supported arch is amd64 (x86_64) machines, and we are working on arm64 (i.e. Mac M1/M2, Pinebook Pro) support as well. Most of the code would build on ppc but not all - there are some tricky bits of assembly language that make critical things work in Mach and objc. Those don't exist yet for ppc.

TLDR: we can probably get there but not today.

@barracuda156
Copy link
Author

Please add a note that this is desirable to have supported, even if low-priority.

P. S. If things reach a stage where generic support is there but MacOS ppc assembler is a stopper, I would take a look if I can contribute to that or ask someone more experienced.

@mszoek
Copy link
Collaborator

mszoek commented Jun 6, 2023

Sure, let's leave this open to keep track of the idea. I'd be grateful if you wanted to try getting the ppc asm working. It's been a long time since I wrote any and it wasn't 64 bit. I also don't have any ppc hardware these days so that's a big obstacle as well.

@barracuda156
Copy link
Author

@mszoek By the way, while the following is not related to ravynos, but to FreeBSD on PowerPC, maybe you could offer some insight how this may be fixed? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271826
Just in case. I tried to install 13.2, and though it succeeded after quite a number of failures, the OS is unusable for any practical purposes, freezing at every text command or menu. There is an opinion that support for multiprocessor systems is broken (I have some G4 machines, but they are natively too slow; we really need FreeBSD running on DC and Quad PowerMac for any development efforts to be meaningful).

@mszoek
Copy link
Collaborator

mszoek commented Jun 6, 2023

I'm not familiar enough with PPC multiprocessing to offer much. Typically a kernel will use spinlocks and disable interrupts during critical sections to support SMP. Maybe some of that got broken over the years for PPC?

@DKnoto
Copy link

DKnoto commented Jun 9, 2023

@barracuda156 Last year I agonized quite intensively with FreeBSD 13.x and 14 on PPC64. On my G5 it didn't want to run well but on POWER9 (Talos II) it ran without much problems.

@barracuda156
Copy link
Author

@barracuda156 Last year I agonized quite intensively with FreeBSD 13.x and 14 on PPC64. On my G5 it didn't want to run well but on POWER9 (Talos II) it ran without much problems.

@DKnoto Thank you for a confirmation.

Need to somehow get attention of developers to fix this issue.

P. S. If you have an extra minute, could you drop a line there on FreeBSD Bugzilla, so that developers see the issue affects some real users and occurs consistently?

@AssassinK786
Copy link

@barracuda156 you can have look for DingusPPC
It is PPC emulator for mac
We can try to use it

@markusbkk
Copy link

I actually still have a PowerMac G5 I bought in 2022 with the stated goal of running MorphOS on it one day (still lacking a decent AMD GPU for that, alas. Been a while but I think it's a PCIe slot model) and I thought about how awesome it would be to have ravynOS on it one day.

Even if we can overcome the tricky ASM bits though, the real question is: Will it even run Wayland? As in, will the average PowerMac user have a GPU new enough to support DRM/KMS?

@mszoek
Copy link
Collaborator

mszoek commented Jan 15, 2024 via email

@barracuda156
Copy link
Author

Probably not. What chip is in that G5?

If you mean GPU, it will be OS-dependent. I cannot say which are the latest that Linux and OpenBSD can support, but there were video reports on YouTube with someone installing newer GPUs into PowerMacs.
On macOS the best ones to have been supported were Quadro FX 4500 and ATI 1900 XT.

@DKnoto
Copy link

DKnoto commented Jan 16, 2024

@markusbkk @barracuda156
I've been testing FreeBSD 15 CURRENT in a Qemu VM on Fedora 39 on Talos II for several weeks.
QEMU emulator version 8.1.3 (qemu-8.1.3-1.fc39) Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
In graphic mode without DRM it works quite tolerably even a large resolution of 2880x1248. I am now working on a tutorial on how to install FreeBSD ppc64le well in a virtual machine and how to change UFS to ZFS for ROOTFS.

As for GPU-free DRM running on virtio-gpu-pci, there has been a corresponding patch in the FreeBSD/DRM project for more than a year but for licensing reasons it has not yet been enabled. The author doesn't seem to have the time to rewrite it properly.

On another note, if RavynOS is to be a reflection of macOS then Wayland is completely unnecessary to it, pure DRM is enough.

@barracuda156
Copy link
Author

@DKnoto Could you say if FreeBSD is still broken on G5 multicore? (I expect it is, will try to ping upstream to do something about that.)

P. S. On a side note, Power9 is Bi-endian (as all Power cpus), you could just use ppc64 without suffering with LE.

@DKnoto
Copy link

DKnoto commented Jan 16, 2024

@barracuda156

I have not yet tried FreeBSD 15 CURRENT on my G5. I will try to check it out.

PS. LE it's a necessity for me at the moment ;-)

@markusbkk
Copy link

Probably not. What chip is in that G5?

NVIDIA 6600.

Stock ones are NVIDIA FX 5200, AFAIK.

I think the highest end cards people (mainly MorphOS users) use with those PowerMac G5s are ATI Radeon X800 and maybe ATI Radeon X1950 Pro. The Radeon 9800 is still popular with those machines, too.

@markusbkk
Copy link

On another note, if RavynOS is to be a reflection of macOS then Wayland is completely unnecessary to it, pure DRM is enough.

Wayland is simply an abstraction and ravynOS' WindowServer already seems to hook into Mach IPC somewhat.
Getting rid of Wayland wouldn't gain anything. It would just make things more complicated and less compatible with existing software like Foot (the basis of ravynOS' terminal).

@barracuda156
Copy link
Author

Probably not. What chip is in that G5?

NVIDIA 6600.

This was the stock one for PowerMac 2.3 DC and 2.5 Quad.

Stock ones are NVIDIA FX 5200, AFAIK.

Maybe for the earlier generation.

I think the highest end cards people (mainly MorphOS users) use with those PowerMac G5s are ATI Radeon X800 and maybe ATI Radeon X1950 Pro. The Radeon 9800 is still popular with those machines, too.

X800 and 9800, AFAIK, are for older PowerMacs and not even compatible with late 2005 models. There is no point in flashing PCI-E versions even if they exist, since better cards are available.

Assuming you refer to the last generation of PowerMacs, the best GPUs supported by macOS are Quadro FX 4500, 7800 GT and ATI X1950 XT. There is some controversy on which of these three is superior.

@DKnoto
Copy link

DKnoto commented Jan 17, 2024

Wayland is simply an abstraction and ravynOS' WindowServer already seems to hook into Mach IPC somewhat.
Getting rid of Wayland wouldn't gain anything. It would just make things more complicated and less compatible with existing software like Foot (the basis of ravynOS' terminal).

Possibly, but Wayland is the first thing I remove from Fedora Linux after instalation, for example ;-)

@markusbkk
Copy link

X800 and 9800, AFAIK, are for older PowerMacs and not even compatible with late 2005 models. There is no point in flashing PCI-E versions even if they exist, since better cards are available.

There is a point if you wanna run MorphOS with full Warp3D support, which I'd argue is the largest niche amongst the niche that are PowerMac users in the year 2024.

Assuming you refer to the last generation of PowerMacs, the best GPUs supported by macOS are Quadro FX 4500, 7800 GT and ATI X1950 XT. There is some controversy on which of these three is superior.

Depends on what you wanna do, really. But for modern Amiga computing as well as Wayland, the ATI is the only sane option in that list.

The more I think about it, the more I wanna work on this. It would actually be nice to undust my PowerMac G5 Quad (and getting it to run there could be a nice stepping stone towards making it run on a Power9 workstation. For all the five people out there who can drop this much money on a desktop).

I don't suppose anybody would like to bribe me with an ATI Radeon X1950 XT? 😛

@markusbkk
Copy link

Wayland is simply an abstraction and ravynOS' WindowServer already seems to hook into Mach IPC somewhat.
Getting rid of Wayland wouldn't gain anything. It would just make things more complicated and less compatible with existing software like Foot (the basis of ravynOS' terminal).

Possibly, but Wayland is the first thing I remove from Fedora Linux after instalation, for example ;-)

WDYM by "remove"? As in the Gnome Wayland session? Wayland is a protocol not a server (unlike Xorg).

@mszoek
Copy link
Collaborator

mszoek commented Jan 20, 2024

On another note, if RavynOS is to be a reflection of macOS then Wayland is completely unnecessary to it, pure DRM is enough.

Wayland is simply an abstraction and ravynOS' WindowServer already seems to hook into Mach IPC somewhat. Getting rid of Wayland wouldn't gain anything. It would just make things more complicated and less compatible with existing software like Foot (the basis of ravynOS' terminal).

Both are true.. WindowServer doesn't actually need Wayland and it gets in the way to some extent. I used an existing minimal compositor to get things running quickly and for some *nix compatibility, but we may convert all that lower level stuff to pure DRM and drop Wayland at some point. It (and X) could be reimplemented on top of WindowServer later.

Foot is also just a way to quickly get a terminal going. Eventually I would like to get iTerm2 or something like that working instead. Foot is a great terminal but it's a Wayland app - there's no integration at all with the Mac desktop.

@markusbkk
Copy link

markusbkk commented Jan 21, 2024

On another note, if RavynOS is to be a reflection of macOS then Wayland is completely unnecessary to it, pure DRM is enough.

Wayland is simply an abstraction and ravynOS' WindowServer already seems to hook into Mach IPC somewhat. Getting rid of Wayland wouldn't gain anything. It would just make things more complicated and less compatible with existing software like Foot (the basis of ravynOS' terminal).

Both are true.. WindowServer doesn't actually need Wayland and it gets in the way to some extent. I used an existing minimal compositor to get things running quickly and for some *nix compatibility, but we may convert all that lower level stuff to pure DRM and drop Wayland at some point. It (and X) could be reimplemented on top of WindowServer later.

Foot is also just a way to quickly get a terminal going. Eventually I would like to get iTerm2 or something like that working instead. Foot is a great terminal but it's a Wayland app - there's no integration at all with the Mac desktop.

Fair enough.
Any plans for a Wayland-independent WindowServer protocol then? Will you go the Serenity route and implement a custom code generator or choose something like Protobuf? The other day I saw an implementation of Protobuf over UDS that could probably serve as a "tutorial" on how to use Protobuf with custom transports.

EDIT: Oh wait. I forgot that there's MIG. That'll probably work to generate and compile the IDL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardware i can haz? New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants