#asahi-dev · 2022-06-04 11:24
marcanbut yeah, sounds like your underlying issue was something else too#asahi-dev · 2022-06-04 11:24
marcanyou need to use smp_wait or smp_call_sync#asahi-dev · 2022-06-04 11:24
marcanchadmed: smp_call without waiting for completion is not supposed to work, no#asahi-dev · 2022-06-04 11:22
marcanthat should be fun for Linux kernel debugging#asahi-dev · 2022-06-04 11:22
marcanhypervisor now has a gdbstub :)#asahi-dev · 2022-06-04 11:22
marcanhttps://github.com/AsahiLinux/m1n1/pull/194 \o/#asahi-dev · 2022-06-03 16:30
marcanyes, the disk resizing and general OS recognition stuff could be used on x86 Macs. not all of it though, the boot/nvram/recovery related stuff is quite specific to M1.#asahi-dev · 2022-06-01 17:44
marcanand of course all the binaries have to be for the specific architecture so there's no way to "share" an actual complete OS image#asahi-dev · 2022-06-01 17:43
marcanthere is absolutely nothing to be shared before that point#asahi-dev · 2022-06-01 17:43
marcanwe already share the basic setup after UEFI, that's why GRUB's in our default image and it is configured the same way as on any x86 box#asahi-dev · 2022-05-31 18:26
marcan(or maybe later this week)#asahi-dev · 2022-05-31 18:26
marcanI'll give that a shot tomorrow#asahi-dev · 2022-05-31 18:26
marcanit effectively fixes the race entirely I think, at least within a single stage#asahi-dev · 2022-05-31 18:25
marcanthat might be a good idea actuallyu#asahi-dev · 2022-05-31 18:25
marcanalternatively, another hack would be to leave DCP up while m1n1 runs, but kill its HPD interrupt, and then finally shut it down at the end only (which will implicitly fix the IRQ once it comes back up)#asahi-dev · 2022-05-31 18:24
marcanbut I think this should work reasonably well once we do that#asahi-dev · 2022-05-31 18:24
marcanI need to get some sleep :)#asahi-dev · 2022-05-31 18:24
marcanapparently the first modeset trakes 485ms so that explains the bad lining up#asahi-dev · 2022-05-31 18:23
marcansounds like we probably just want to retry a couple times#asahi-dev · 2022-05-31 18:22
marcanor was stage1 not modeset there?#asahi-dev · 2022-05-31 18:22
marcanif so I guess the mode that stage1 set was different? since normally a dummy modeset doesn't take much time#asahi-dev · 2022-05-31 18:21
marcanare both of those after a stage1 modeset?#asahi-dev · 2022-05-31 18:20
marcanI guess one thing to do would be to retry the whole modeset a few times#asahi-dev · 2022-05-31 18:19
marcanso the monitor cycles pretty quickly in your case, and we rely on the second modeset happening *after* that in that case?#asahi-dev · 2022-05-31 18:19
marcanthat's just an unplug#asahi-dev · 2022-05-31 18:14
marcanany syslogs?#asahi-dev · 2022-05-31 18:10
marcanjannau: how does the second modeset fail if done too quickly, exactly?#asahi-dev · 2022-05-31 18:09
marcanwill have to look at that then#asahi-dev · 2022-05-31 17:07
marcan(well, it does, but it requires the ADT to specify the current state)#asahi-dev · 2022-05-31 17:07
marcanmacos also doesn't know how to do that, but I made the HV codepath wake DCP back up into quiesced mode#asahi-dev · 2022-05-31 17:07
marcanI expect this to break with the linux DCP stuff of course; it needs to learn to unconditionally kick the ASC (like I made m1n1 do)#asahi-dev · 2022-05-31 17:05
marcannot sure if that fixes it on the mac studio though, haven't tried there yet#asahi-dev · 2022-05-31 17:04
marcanjannau: Pushed the new stuff to put DCP to sleep. Also fixed macos crashing with the DART changes (it was the l2-tt stuff; iBoot only ever allocates 2 tables, macOS hates any more)#asahi-dev · 2022-05-31 15:56
marcan0x1004 / 0x1014 kind of fits, those did look like they do something for me#asahi-dev · 2022-05-31 15:28
marcanyeah, that one is the one I had but I think those registers don't exist/do anything#asahi-dev · 2022-05-31 15:26
marcanmaybe the "ipi" thing I found is the nmi#asahi-dev · 2022-05-31 15:25
marcanhah#asahi-dev · 2022-05-31 15:24
marcanI couldn't find the nmi stuff where I thought it was#asahi-dev · 2022-05-31 15:18
marcanwhat I didn't find is a way to restart the CPU without involving a PMGR reset#asahi-dev · 2022-05-31 15:18
marcan(renamed from HW:Mailbox)#asahi-dev · 2022-05-31 15:18
marcandumped the register notes here: https://github.com/AsahiLinux/docs/wiki/HW:ASC#asahi-dev · 2022-05-31 15:10
marcanthat seems hackier than an orderly shutdown though#asahi-dev · 2022-05-31 15:10
marcanjannau: found another way to do it; DCP has a mini AIC type thing and we can disable IRQs or mask the relevant IRQ, then it behaves the same (doesn't notice the disconnect, still doesn't notice if it comes back before IRQs are reenabled)#asahi-dev · 2022-05-31 12:20
marcantrying to get out of it#asahi-dev · 2022-05-31 12:20
marcanyeah, I caught myself in an email death spiral since the release in march :(#asahi-dev · 2022-05-31 12:09
marcan(I had someone file a bug on their side for this...)#asahi-dev · 2022-05-31 12:09
marcan(they're still doing that, and postmaster tools still says everything is green)#asahi-dev · 2022-05-31 12:09
marcandoesn't help when google blocks half my emails#asahi-dev · 2022-05-31 11:33
marcani.e. it would break if, say the two stages take ~100ms and stage2 does not change resolution and the monitor takes about the same to disconnect and catches stage2 in just the exact window between hpd check and dcp shutdown#asahi-dev · 2022-05-31 11:33
marcanat which point we can do the double check and *hopefully* it doesn't line up in the race very often