<modwizcode>
I'm not very happy with a lot of the code because it seems really inefficient in a lot of places, but that can always be resolved later.
<modwizcode>
I need to get it to present a more complete ADT to get a vanilla build of M1N1 to boot with it though, I've got a fork of M1N1 that works but it's just for testing.
<j`ey>
modwizcode: lotsa penguins
<modwizcode>
Yes indeed :)
<modwizcode>
If marcan gets the big.LITTLE thing working it should show up correctly too (hopefully anyway) since they're exposed with the correct IDs and everything
<modwizcode>
It's fun to see the IPIs firing as I do stuff. You can see that linux assigns the IRQs for the serial port to go to cpu0, then when you type a character you see an IPI fire from cpu0 to another core for each character
<maximus64>
nice :p
<maximus64>
I guess next is DART and PCIE?
<modwizcode>
Eventually yes
<modwizcode>
Have to wait for more hardware docs I think though.
zkrx has quit [Quit: zkrx]
<modwizcode>
But at this point I expect a lot of overlap with existing peripherals (at least higher level ones), like I'm hoping I can reuse the NVMe peripheral code
<modwizcode>
Theoretically because Linux has drivers for a ton of stuff at this point you can just plug in whatever you want on the QEMU side and then tell linux about it via device tree, but that's not my goal since that isn't a true emulation of an M1 mac and it would be useless for running something like macOS
zkrx has joined #asahi-dev
<maximus64>
Good progress tho. If it close enought to the actual HW, it might able to boot the M1 OSX ;)
<modwizcode>
That's the goal eventually. I think it's key to understanding the hardware to have a parallel functional implementation based on that understanding. If the drivers + emulation != results that are expected, it means somewhere something is wrong.
<modwizcode>
A lot of stuff will need to be understood better though. The M1 cpu cores have features that are not documented at all, and macOS certainly will use them.
<j`ey>
as long as you're running qemu on macOS right?
<modwizcode>
That's the other issue
<modwizcode>
I can't do that testing myself because I don't have a mac of my own to legally do that with
<modwizcode>
Luckily other people do and it's not too hard to compile and test so in the future that will not be a problem
<modwizcode>
One thing I'm actually planning to do at some point here is compile the open source release of Xnu and throw it at the emulator. From what I understand there's few to no drivers in that source though, but I think there's Darwin port projects that might be able to supply some basic drivers (or I could probably write my own for serial port at least)
<j`ey>
that doesn't help with understanding the hardware, but a good thing to try ofc
<j`ey>
(well non-cpu hardware)
<modwizcode>
Yeah there is some stuff that I think is there for startup that might expose little differences. Parsing through the code is difficult with how spreadout it is, it actually is sometimes a lot better to throw it at the emulator and look for failures