> Date: Wed, 20 Jan 2021 14:12:07 +0100 > From: "Peter J. Philipp" <p...@centroid.eu> > > Hi list, > > Last year I set out for a year to port G5 to 64-bit and I started this year > with converting OFW to FDT. Yesterday was my first day back at this, and I > made some results happen. In fact walking Openfirmware and adding it to the > FDT (Mark hinted to me the arm64 fdt.{c,h} which was brilliant) does create > a nice DTB that I think I can work with. Only there is one problem... > > As I walk the properties in OFW and insert them in FDT the order is reversed. > I don't know if that will cause any conversion problems with drivers, I had > a glance at /sys/arch/macppc/dev/zs.c and that doesn't care the order of it, > but something in me says that name property should always come first, am I > mistaken in this?
The order shouldn't be important. We can probably adjust the code to in fdt.c to add properies in the "right" order. > Anyhow I tried loading the powerpc64 kernel to the loader but it still blows > up before dmesg, I didn't luck out. I'll have to port the powerpc64 to the > macppc64 stuff and compile a kernel. I think I'll have to do something > about the slb's anyhow as those are not supported in the 970 processor. The PowerPC 970 processor has 64 SLBs. The OpenBSD/powerpc64 kernel uses 32 SLBs, so this should all work. The kernel expects to be starting with the SF and HV bits set and the DR and IR bits cleared in the MSR register. So your bootloader will have to switch to that mode. You'll need some sort of early console. That is currently only implemented for OPAL firmware. Given that these machines don't have a usable serial port, you'll probably need to implement a framebuffer console. Since OpenFirmware already initializes the framebuffer that shouldn't be too difficult. You could take a look at how arm64 uses dev/fdt/simplefb.c to set this up. Cheers, Mark