#asahi-dev · 2023-11-28 14:24
DannyBso please, have at it :)#asahi-dev · 2023-11-28 14:24
DannyBRubber duck debugging is great#asahi-dev · 2023-11-28 14:24
DannyBi'll update it to my hacked up current version#asahi-dev · 2023-11-28 14:23
DannyBand definitely busted#asahi-dev · 2023-11-28 14:23
DannyBThat code is now old#asahi-dev · 2023-11-28 14:23
DannyBThe initial TCR, and bootstrap pagetables, are the same in XNU for 14.2 for m2/m3. I was going to look at older kernels today see if it was differnet before, and they just chose something in 14.2 that works for all#asahi-dev · 2023-11-28 14:23
DannyBYes. I have the initial XNU TCR value, and decoded it, ours did not look crazy but maybe i decoded it wrong. #asahi-dev · 2023-11-28 14:21
DannyB(On the plus side, i did figure out 75% of the unknown chicken bits we are using on the M2 and documented them :)#asahi-dev · 2023-11-28 14:20
DannyBto MMU/SPRR#asahi-dev · 2023-11-28 14:20
DannyBand they don't look related#asahi-dev · 2023-11-28 14:20
DannyBI also was able to get most of the names/info of these chicken bits from the kernel debug info#asahi-dev · 2023-11-28 14:20
DannyBAs for chickens themselves, i automated running every combination of lines in chickens for m3 and they all have the same behavior if i don't play with TCR (IE none of them change that we hang the chip the second MMU is turned on)#asahi-dev · 2023-11-28 14:18
DannyBbut i set them to lockdown nothing in chickens (and have tried both ways there too)#asahi-dev · 2023-11-28 14:18
DannyBwhich appears to be MSR lockdown for EL2#asahi-dev · 2023-11-28 14:17
DannyBthere is also an additional MSR lockdown register that is write only#asahi-dev · 2023-11-28 14:17
DannyBsven: but not tried turning off SPRR permissions#asahi-dev · 2023-11-28 14:17
DannyBsven: I have run it without gxf init and no dice#asahi-dev · 2023-11-28 14:17
DannyBsven: I'll give it a shot#asahi-dev · 2023-11-28 14:07
DannyBregister. So i assume something changed that is causing addresses to be translated or whatever in a way that we don't want on the m3, but not m1/m2. The MMU is not on when we get it on m3, so i have no idea why this has any effect, but it does!#asahi-dev · 2023-11-28 14:07
DannyBThe alternative would be to have a real spec of what we expect the invariants to be for m1n1, and put all the chips in that state. Maybe later#asahi-dev · 2023-11-28 14:07
DannyBUnless someone has a better idea, i'm going to assume that the set of things that m1n1 wants is defined as "however the m1/m2 chip registers start right now", and ensure we put the m3 in the same state in chickens.#asahi-dev · 2023-11-28 14:07
DannyBXNU resets the TCR very early and uses statically allocated bootstrap pagetables very early in the init until it sets up real pagetables. #asahi-dev · 2023-11-28 14:07
DannyBWhee. i figured out why the m3 mmu hangs but i'm not sure what to do about it. It seems the state that m1n1 expects us to start in is not how things start for the m3. So for example, i have to clear the TCR register in chickens (or at least set it to the value that XNU does), to make the MMU init work, even though the MMU init *also* sets the TCR register itself. If i don't, the chip hangs when we set the SCTLR #asahi-dev · 2023-10-10 14:00
DannyB(including the 4388 support)#asahi-dev · 2023-10-10 14:00
DannyBI'm also happy to try to upstream all these patches if you want#asahi-dev · 2023-10-10 13:59
DannyBI audited all other users - the p2p case is broken too right now, but that seemed less important, i'll send a followup to fix p2p.#asahi-dev · 2023-10-10 13:56
DannyB@marcan: FYI - without https://github.com/AsahiLinux/linux/pull/209, the current asahi-wip branch will only find 2g bssids. The TL;DR is that the band wasmplicitly being set in most cases by the chanspec encoder based on channel number. It is now explicit, and escan did not ever set the band field before encoding the spec. So it's running through all the channels and encoding them into chanspecs, and only producing 2g chanspecs.