#
#asahi-re · 2025-04-06 11:43
nickchanthere are like 4 ctrr regions that can be configure on m4
#asahi-re · 2025-04-06 11:42
svenand then just disabled SPRR/GXF/etc. in there
#asahi-re · 2025-04-06 11:42
svensiguza suggested yesterday that it either has to be a sysreg or something that applies to all cores directly after they're out of reset or that they do something cursed like putting a single page under CTRR and locking down the secondary reset vectors to that one
#asahi-re · 2025-04-06 11:41
chaos_princessis there a chance that sptm is not the first/only code that runs there, and it jumps to iboot or sth?
#asahi-re · 2025-04-06 11:41
svennow i wonder how this is locked down in raw boot mode
#asahi-re · 2025-04-06 11:41
svenyeah
#asahi-re · 2025-04-06 11:41
nickchanit also has to because the core comes out of reset in EL2 with GL available but disabled
#asahi-re · 2025-04-06 11:40
svenif xnu did this it could also hijack SPTM
#asahi-re · 2025-04-06 11:40
nickchanit definitely happens inside sptm according to some tweets i have seen
#asahi-re · 2025-04-06 11:40
svenbut i haven't found the actual code that does the bringup now
#asahi-re · 2025-04-06 11:40
svenI think SPTM does that all automatically. i've found a function in there that parses the ADT and finds the cpu-impl-regs and maps them
#asahi-re · 2025-04-06 11:39
chaos_princessas in: genter to sptm with a "do start secondaries" syscall?
#asahi-re · 2025-04-06 11:39
sveneventually they all end up at XNU's entry point https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/arm64/sptm/start_sptm.s#L34
#asahi-re · 2025-04-06 11:39
svenso I think it has to happen inside SPTM
#asahi-re · 2025-04-06 11:38
chaos_princesssven: do we know how xnu stars secondaries on m4?
#asahi-re · 2025-04-05 19:01
roxfaniirc they are basically hardcoded in sleigh specs
#asahi-re · 2025-04-05 13:18
svenUnkSytemRegWrite followed by a bunch of numbers is kinda annoying to read
#asahi-re · 2025-04-05 13:18
svenis there a simple way to define custom sysregs in ghdira?
#asahi-re · 2025-04-05 10:04
mischa85_sorry i have no clue
#asahi-re · 2025-04-05 10:00
svenactually try out how wfi behaves
#asahi-re · 2025-04-05 10:00
sventhat's not what i'm saying
#asahi-re · 2025-04-05 10:00
mischa85_so CYC_OVRD_WFI_MODE_MASK on it also returns 0
#asahi-re · 2025-04-05 09:59
mischa85_last time i checked cyc_ovrd just returned 0
#asahi-re · 2025-04-05 09:54
svenessentially figure out if wfi ever loses register state (e.g. when sleeping for a longer time)
#asahi-re · 2025-04-05 09:52
mischa85_i have t6041 ready for action if you want me to try out some stuff
#asahi-re · 2025-04-05 09:39
svenwould need an M4 to figure out what's going on. could just be the magic state machine that decides retention vs. non-retention now
#asahi-re · 2025-04-05 09:39
svenyeah, i'm blind. the save/restore regs stuff is still there
#asahi-re · 2025-04-05 09:37
svenor maybe i'm just blind
#asahi-re · 2025-04-05 09:28
sveni guess
#asahi-re · 2025-04-05 09:17
chadmeddoes that mean we need a pmgr driver or to do some gross psci implementation in m1n1
#asahi-re · 2025-04-05 09:16
svenso wfi probably can't enter deep sleep anymore without some help from pmgr or whatever
#asahi-re · 2025-04-05 09:15
svendoesn't look like I can find the save/restore state anymore
#asahi-re · 2025-04-05 08:59
sven*restores
#asahi-re · 2025-04-05 08:58
svenI should probably check if it still saves/restored all registers before wfi
#asahi-re · 2025-04-05 08:58
sveni.e. it loses state when some hw state machine decides it’s time to enter deeper sleep states
#asahi-re · 2025-04-05 08:58
sveneither that or it’s always in automatic mode now
#asahi-re · 2025-04-05 08:35
chadmedi wonder if that means they got rid of deep wfi entirely and rely on pmgr to do stuff
#asahi-re · 2025-04-05 08:12
svenso i guess t8132 just no longer has it?
#asahi-re · 2025-04-05 08:12
svenand even in the SPTM boot path it should try to access that reg, see https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/arm64/sptm/start_sptm.s#L101
#asahi-re · 2025-04-05 08:11
svencomparing with the xnu source drop that means t8132 has NO_CPU_OVRD defined
#asahi-re · 2025-04-05 08:11
svenokay, quick digging into XNU: _arm64_force_wfi_clock_gate on t8132 is just a no-op, _arm64_force_wfi_clock_gate on t8103 write to SYS_IMP_APL_CYC_OVRD
#asahi-re · 2025-04-04 17:12
yukathanks for confirming!
#asahi-re · 2025-04-04 17:08
jannauyuka: booting a raw m1n1 is still broken on 15.4 / m4*
#asahi-re · 2025-04-03 21:14
svenhuh, don't think i see any chicken bits inside t8132 SPTM though
#asahi-re · 2025-04-03 21:05
svenso we'll probably need the chicken bits because SPTM never ran
#asahi-re · 2025-04-03 21:05
svenand for raw it's just iboot -> m1n1.bin in EL2
#asahi-re · 2025-04-03 21:05
svenmy assumption is that for macho it's iboot -> sptm (-> maybe iboot again because sptm's entry seems to eventually return) -> xnu in EL2
#asahi-re · 2025-04-03 21:04
sventhey're either from xnu source dumps or just taken from the xnu entry point
#asahi-re · 2025-04-03 21:03
sven*reversed
#asahi-re · 2025-04-03 21:03
sveni don't think any of the previous chicken bits have been reverse with m1n1 tbh

plus ›