Hi, I've started a diary of sorts for this porting effort:
http://enhancedrisc.de/ Feel free to take a look if you're interested in helping. The lowest part is most recent. I was pleasantly surprised someone provided a patch for me over night for building openbsd binutils-2.17 with clang! I'm going to check that out today and I'll be likely busy with pmap.c and co. the rest of the week. Regards, -peter On Fri, Jul 27, 2018 at 11:36:13AM +0200, Peter J. Philipp wrote: > BTW I'm actively looking for PowerPC64 literature.?? I don't mean the .pdf's > provided by IBM but a real book.?? If you know of any send me the ISBN, > sometimes these books hide under names that aren't really leading toward > "powerpc". > > I have in the last 2 weeks bought one book off Amazon.?? It's 32-bit PowerPC > specific called "Newnes PowerPC Programming Pocket Book" by Steve Heath.?? > Great pocket book!?? I love that he has 2 pages in the appendix covering 64 > Bit PowerPC!?? What's astonishing is that he covers the basics of 64 bit > powerpc and the book is from 1995!?? I don't mind buying this because I'm > taking the 32 bit powerpc arch and pretty well hacking on it to make it > 64-bit.?? I don't know if my approach is orthodox, but when I saw FreeBSD's > code it dawned on me I could do this. > > Another book I have is Computer Organization and Design Risc-V edition by > Hennessy and Patterson.?? In the index in the back of the book they describe > that PowerPC is covered in Appendix D section which this book is missing > (doh!).?? Well I can't always get lucky *grin*. > > Regards, > -peter > > On 07/27/18 10:44, Peter J. Philipp wrote: > > On Fri, Jul 27, 2018 at 10:12:30AM +0200, Matthias Freitag wrote: > > > nice, i have two spare G5 Powermacs at home that i will test this on! > > awesome! While building the cross-compiler this week I realised I really > > need to get the cross-includes complete meaning I have to get aim64 arch > > completed. I think powerpc64 is completely in place. This will possibly > > go into next week (when I hope it's cooler). > > > > The idea is sorta like macppc on powerpc where the hierarchy is: > > > > Architecture Hierarchies in OpenBSD > > > > socppc macppc I want it to be: aim64 power > > \ / \ / > > \ / \ / > > \ / \ / > > powerpc powerpc64 > > > > aim64 will solely be G5 Macs (PowerPC 970 based), power would be IBM Power. > > AIM stands for Apple, IBM, Motorola which formed the AIM Alliance in the > > 90's. > > > > I'll put a new snapshot of powerpc64 and aim64 from /usr/src/sys/arch out > > soon, then hopefully you'll be able to make a cross-includes (which I tested > > last night). One hint to do that is to do it in a vmm on amd64, that way if > > you mess up the system by mistyping you don't have to reinstall a possibly > > valuable system. A vmm is disposable. > > > > Regards, > > -peter > > > > > On Fri, 20 Jul 2018 at 16:58, Peter J. Philipp <p...@centroid.eu> wrote: > > > > > > > On Sun, Jul 15, 2018 at 06:02:22PM +0200, Peter J. Philipp wrote: > > > > > > > 60% of the work is in pmap.c, 20% of the work in trap.c, and 20% > > > > > > > of the work is elsewhere. > > > > Hi, > > > > > > > > I've been working hard at this most of the week and I'm at a point now > > > > where > > > > I'm sick of eyeballing the code and doing theoretical changes. I need a > > > > compiler to do a second look for me. Although this is the core > > > > powerpc64 > > > > stuff, there is still the macppc stuff to port and I'll call those > > > > aim64. > > > > > > > > For a snapshot of what I've done: > > > > > > > > http://centroid.eu/private/powerpc64.tgz > > > > > > > > For the CVS repo: > > > > > > > > http://centroid.eu/cgi-bin/cvsweb/powerpc64/ > > > > > > > > And look for aim64 which will have a path such as: > > > > > > > > http://centroid.eu/cgi-bin/cvsweb/aim64/ > > > > > > > > There is still lots of hurdles but when I finish the aim64 stuff, I'll > > > > be > > > > looking for two things. > > > > > > > > 1) A cross-compiler with powerpc64 support > > > > 2) a 64-bit loader (like ofwboot) > > > > > > > > If you know an easier way to get a 64 bit loader other than hacking on > > > > ofwboot > > > > let me know. Or if there is no easier way perhaps someone wants to > > > > help me > > > > with this? Working on a 64 bit loader would be awesome then I have to > > > > do > > > > less > > > > work and we meet in the middle. > > > > > > > > I know the code as is won't compile, but I'm willing to give it a pass > > > > and > > > > work on fixing the errors that the compiler gives me. Given that, > > > > booting > > > > a > > > > first kernel will likely panic() it at boot, if it doesn't panic then > > > > I'm > > > > extremely lucky. Or it's gonna be really slow as I screwed up on the > > > > Segment > > > > Lookaside Buffer or TLB cache or something. I'd like to see the day > > > > :-). > > > > > > > > Now I want to give everyone who worked on this code before me mad props! > > > > The > > > > code was pretty much almost 64 bit ready and I did a bit of cutting out, > > > > and > > > > pulling stuff in from FreeBSD and comparing with the PEM guide from IBM. > > > > Thanks so far! Also thanks for FreeBSD who trailblazed my efforts and > > > > gave me > > > > somethign to work with. > > > > > > > > Here is a list of things that I did a visual inspection on and possibly > > > > changes. What's not checked needs immediate attention still. > > > > > > > > > > > > file first pass (eyes only) second pass > > > > (compiler) > > > > > > > > -------------------------------+-----------------------+----------------------- > > > > powerpc64/bus_dma.c X > > > > powerpc64/bus_space.c X > > > > powerpc64/copystr.c X > > > > powerpc64/cpu_subr.c X > > > > powerpc64/fpu.c X > > > > powerpc64/genassym.cf X > > > > powerpc64/in_cksum.c X > > > > powerpc64/intr.c X > > > > powerpc64/lock_machdep.c X > > > > powerpc64/pmap.c X > > > > powerpc64/process_machdep.c X > > > > powerpc64/setjmp.S > > > > powerpc64/softintr.c X > > > > powerpc64/sys_machdep.c X > > > > powerpc64/trap.c > > > > powerpc64/vm_machdep.c > > > > powerpc64/copyinout.c X > > > > powerpc64/slb.c X > > > > > > > > ddb/db_disasm.c X > > > > ddb/db_interface.c X > > > > ddb/db_memrw.c X > > > > ddb/db_trace.c X > > > > > > > > include/*.h X > > > > > > > > Best Regards, > > > > -peter > > > > > > > >