#asahi-dev · 2021-11-13 12:48
svenso i guess they added reset to that one on the Pro/Max#asahi-dev · 2021-11-13 12:48
svenMBSE is also used for poweroff on the M1#asahi-dev · 2021-11-13 12:44
svenjannau: you can try to boot with smcdebug=0xff and maybe you'll see a SMC write at the very end#asahi-dev · 2021-11-13 12:43
svenyeah, i wonder what that's actually about#asahi-dev · 2021-11-13 12:37
sveniirc nvram is also somehow involved in shutdown on the M1#asahi-dev · 2021-11-13 12:35
svenjannau: looks like the last messages in macOS log on the M1 are "IOPlatformHaltRestartAction -> AppleT8103PMGR" and then "wdog restart"#asahi-dev · 2021-11-12 22:58
svenhah. so now we just need to find a way to quickly the drain the battery and then we also have power off without requiring SMC :P#asahi-dev · 2021-11-12 21:02
svenoh, this is on the pro/max?#asahi-dev · 2021-11-12 20:20
svenyou could try to disallow any write to 0x1c and just print it instead#asahi-dev · 2021-11-12 20:19
sven(and just after that the usb device disappears)#asahi-dev · 2021-11-12 20:19
sventhat's what i see#asahi-dev · 2021-11-12 20:19
sven[cpu0][0xfffffe001340e5ac] MMIO: W.4 0x23d2b0010 (wdt[0], offset 0x10) = 0x0#asahi-dev · 2021-11-12 20:19
sven[cpu0][0xfffffe001340e5ac] MMIO: W.4 0x23d2b0014 (wdt[0], offset 0x14) = 0x0#asahi-dev · 2021-11-12 20:19
sven[cpu0][0xfffffe001340e5ac] MMIO: W.4 0x23d2b001c (wdt[0], offset 0x1c) = 0x4#asahi-dev · 2021-11-12 20:19
sven[cpu0][0xfffffe001340e5ac] MMIO: W.4 0x23d2b0010 (wdt[0], offset 0x10) = 0x0#asahi-dev · 2021-11-12 20:18
svenweird#asahi-dev · 2021-11-12 20:18
sven0x80befc00 is 90 seconds#asahi-dev · 2021-11-12 20:17
svenwhich trace mode do you use? if it's async the usb interface might just disappear before you see the writes#asahi-dev · 2021-11-12 20:13
svenand 0x2922b0024 looks wrong. that more than what can fit inside a 32bit register#asahi-dev · 2021-11-12 20:13
sven0xaba95000 should be two minutes#asahi-dev · 2021-11-12 20:12
sveni know that if you reset macos it'll use the 2nd watchdog#asahi-dev · 2021-11-12 20:10
svenor maybe not :D#asahi-dev · 2021-11-12 20:10
svenmaybe these function-* entries in the ADT can somehow be used to switch the first one to just do a normal reboot as well#asahi-dev · 2021-11-12 20:09
svenwhat's their reboot timer for the first one?#asahi-dev · 2021-11-12 20:08
svenor is there a way to convince the one at 0x10 to also generate interrupts?#asahi-dev · 2021-11-12 20:08
sventhe first one?#asahi-dev · 2021-11-12 19:35
svenhttps://www.kernel.org/doc/htmldocs/kernel-api/API-clk-get-rate.html#asahi-dev · 2021-11-12 19:34
svenit’ll work without that enable but that’s just because our ref clock is a constant clock anyway#asahi-dev · 2021-11-12 19:33
svenI think I’m only allowed to call get_rate after I enabled the clock :/#asahi-dev · 2021-11-12 19:28
svenapple,wdt it is then#asahi-dev · 2021-11-12 19:12
svenbut anyway, if the interface for the previous phone SoCs is similar i'll just call the base compatible "apple,wdt"#asahi-dev · 2021-11-12 19:09
svenbut the wdt parent _is_ aic and it contains that weird flag#asahi-dev · 2021-11-12 19:08
svenyeah. and i've seen nodes with AIC as a parent in the ADT that had that additional "flag" and others that don't#asahi-dev · 2021-11-12 19:06
sveni've seen second interrupts which just contains zero or one a few times already#asahi-dev · 2021-11-12 19:05
sveni think we somehow don't understand the interrupt property completely fwiw#asahi-dev · 2021-11-12 19:01
sventhe one starting at 0x23d280000#asahi-dev · 2021-11-12 19:00
svenoh.. looks like there's also another register range in the ADT#asahi-dev · 2021-11-12 18:55
svenbut if they have the same interface anyway wdt is fine with me#asahi-dev · 2021-11-12 18:55
svenoh, interesting. i wonder why it's called version 2 then#asahi-dev · 2021-11-12 18:54
sven(and probably don't care about version 1 since it's probably only present on iphones)#asahi-dev · 2021-11-12 18:54
svenyeah, not sure about that either. ADT claims it's version 2 and i have no idea how version 1 looks like#asahi-dev · 2021-11-12 18:50
svennot sure if it makes sense to expose the two watchdogs that don't trigger recovery mode. i mostly care about the system reset anyway#asahi-dev · 2021-11-12 18:48
svenlet me push my current version#asahi-dev · 2021-11-12 18:47
svenjust did#asahi-dev · 2021-11-12 18:10
svenmine is next to me and I’ve actually been very close to just forcibly disconnecting that speaker #asahi-dev · 2021-11-12 18:09
svenhah :D#asahi-dev · 2021-11-12 18:07
svenmaz: still needs macOS at least once for now to turn it off for the first time though :-(#asahi-dev · 2021-11-12 18:06
svenaccording to the ADT there’s also some GPIO involved but I haven’t been able to figure out what it does yet #asahi-dev · 2021-11-12 18:05
svenand more importantly: unlike the usb pd reset these don’t seem to turn that annoying startup chime back one :D#asahi-dev · 2021-11-12 18:04
svenlooks like this thing has three watchdog timers. first one can also fire an interrupt N ticks before reset but then always resets to recovery mode. The other two just seem to do a “normal” reset