#
…

2026-07-21

00:00waltmck has joined #asahi-re
00:26nepeat has quit [Ping timeout: 480 seconds]
00:29nepeat has joined #asahi-re
00:37nepeat has quit [Ping timeout: 480 seconds]
00:40djFalse positive. iBoot seems to handle all that complexity, we’re just missing proper configuration somewhere. But so far chickens preset for t6050 looks vastly different still
00:40nepeat has joined #asahi-re
00:42JamesCalligeros[m]yeah i think in the -dev logs someone mentioned that iboot does chimkens for us now
00:43djyeah, sounds right. hopefully simpler for newer chips going forward once m5 pro/max is solved
01:25djgotta tweak the chickens setup in m1n1 more. I’ve verified though the iBoot1 and iBoot2 successfully install the T6050 specific transition programs into two memory locations, so when handoff to m1n1 happens that state is clean and expected
01:26djjust missing the right stuff in chickens, probably the m4 assumptions are bad
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-re
03:01ddxtanx has joined #asahi-re
03:29djpretty lost so far. doesn’t seem like chickens are doing anything either since they mainly affect post-fetch execution and stuff like sleep. I’ve tried removing m4 specific assumptions but did nothing too. somewhere between the handoff to m1n1 and before we try to do secondary startup, we’re missing some sort of configuration maybe
03:30djrvbar+0x200 is def an exception vector I’ve verified that through disasm. why it goes there is some missing configuration
03:34djand that’s set externally somewhere, not the core actually reaching that or executing exception handler at all. the iBoot stuff they added extra was a dead end. It only handles the core power transitions for us and has several presets, including deep sleep, proved to be nothing useful
03:35djdisassembling private code paths for iBoot handoff or how kernel starts cpu gave nothing useful either heh
03:36djstartup is already very very close to how xnu handles it
04:00djAppleT6050PMGR::restoreHW(true)
04:00djdid I just find the holy grail
04:00djtime to implement that into m1n1
04:00JamesCalligeros[m]does iboot have symbols
04:01djnot iBoot, this is production XNU binary
04:01djI found iBoot to be a distraction and completely irrelevant in this tbh
04:02Guest13793 has quit [Ping timeout: 480 seconds]
04:02rhysmdnz has quit [Ping timeout: 480 seconds]
04:02djiBoot is booting XNU or m1n1 the exact same way, ofc it had to be m1n1 missing something t6050 specific in startup and going through the disasm helped
04:02djnow we pray this makes the cores start finally then I can sleep
04:03djthis function does very specific weird stuff
04:03djmaybe matching the addresses will help they’re prolly known somewhere like ADT
04:06NickChan[m] has joined #asahi-re
04:06NickChan[m]It cannot be exactly the same way because gxf doesn't work
04:08djsorry I’m a beginner here - what is gxf?
04:08NickChan[m]as for symbol iboot is a raw binary and have no place for symbol, and on production iboots even the asserts are obfuscated
04:10NickChan[m]dj: guarded execution feature, or: lateral exception levels
04:10djooh interesting
04:10NickChan[m]from how most of the system registers becoming readonly can see how the boot is most definitely different
04:10djreversing iBoot was helpful to find out about t6050’s new built in transition programs though we’ll need that for sleep stuff to work
04:10NickChan[m]But amarioguy say those might be caused by ""tunables"" only applied in fuOS case
04:11NickChan[m]and not something inlined in code
04:11NickChan[m]erm, tunables in data section
04:11djinteresting didn’t know Apple gated that feature from fuOS
04:12NickChan[m]This is the whole reason we are in this sticky situation instead of tracing macOs
04:12djgotcha
04:13NickChan[m]it's also not fuOS in general, but rather raw boot binary, macho boot objects still get all that enabled but under sptm
04:23djI see
04:23djlooks quite well documented in Asahi docs
04:25djfor now I’m just gonna do everything Apple’s t6050 restoreHW is doing a partial impl setting bits here and there & the wait it has still crashed same way
04:26djinteresting getDieCount == 2 while its acc 1
04:27djI wonder how much amount of crazy RE work will the in house radio chip be
04:29djI’m interested in tinkering with that and external SSD support but atcphy hahaha
04:39JamesCalligeros[m]If the radio chip is some rtkit thing it might not be too bad
04:42djI’ll look into it tomorrow maybe
04:44djofc writing to a random address reconstructed from disasm was gonna raise SError.. this is a tough one
04:45djbut i might be very close
05:19rhysmdnz has joined #asahi-re
05:19djok so restoreHW here is doing some CPM + smth smth writes which raise SError cause we’re in EL2. cluster control is also not reading back expected value for some reason. Very confusing. With CPM writes skipped I still get the fault, and not sure if it’s the CPM writes that would fix it. Will look more carefully into restoreHW and see if it’s missing anything important
05:19enick_272 has joined #asahi-re
05:31JamesCalligeros[m]there is no EL3 so it should not serror because of EL2 unless it's supposed to run in GLx
05:32djXNU has access to it, it’s writing there in the binary
05:33djBut probably not needed for secondary startup, that would make no sense
05:33djI found additional stuff restoreHW does and at diff stages so trying to reproduce more of its state before starting cores
05:33djLet’s see
06:33sventhere’s likely just some other init missing or something’s still powered off when you get SErrors
06:33yukaI'm not so sure of that
06:33svenmy bet is that iboot is just broken and that’s why startup doesn’t work though :(
06:33yukaon M4/M5, I've seen a lot of SErrors on very particular mmio reads/writes
06:34yukafor example the pmgr disp*cpu pstates
06:34yukaor some specific pinctrl gpios
06:34yukathey just serror when you read them
06:34yukawhile others work fine
06:34yukathat seems indeed like a """Filter""" for for mmio
06:34yukaas if there's a list of disallowed regions somewhere
06:34svensounds more likely they can just disable some regions or something
06:35yukaexactly
06:35JamesCalligeros[m]fabric firewall :p
06:35yukaexactly :p
06:35svenshutup, Claude :p
06:35yukait's not that unlikely that they also disable some of the cpu controls that way
06:36yukabut in general, yes
06:36yukafirst assumption should be that something is not yet initialized/enabled when getting an SError
06:49pb17 has quit [Ping timeout: 480 seconds]
06:50yukaSo I figured out yesterday, with knowledge gained from binary RE, how to initialize the pcie on t8132/t6040. The main info needed is APCIE_PHY_CTRL_RESET BIT(7) => BIT(4).
06:50yukaAccording to the RE policy the code I have locally is derived from binary RE and someone else should write it again from the information I documented here, but I find it a bit laughable since I narrowed it down to this trivial change.
06:50pb17 has joined #asahi-re
06:51yukaSo I request permission to publish the code change for that directly
06:52yukaI would also like someone to check if the same works for t8142
06:52kubed has joined #asahi-re
06:52vup has quit []
06:53jtingiris has quit [Read error: Connection reset by peer]
06:53kubed is now known as jtingiris
06:56yukat8142 pcie reg layout looks close enough that it could
07:10nickchanthe controls to modify the cpu p-state definitions are disabled when the kernel boots on t8103 already
07:10nickchanso there's precedent
07:12mattia013 has joined #asahi-re
07:13jtingiris has quit [Quit: ZNC 1.10.1 - https://znc.in]
07:13jtingiris has joined #asahi-re
07:13svensure, go ahead
07:13sventhat change is more that trivial enough ;)
07:26Ariadne has quit [Read error: Connection reset by peer]
07:27Ariadne has joined #asahi-re
07:43vup has joined #asahi-re
08:00user has joined #asahi-re
08:01user has quit []
08:01mattia013 has quit [Quit: mattia013]
08:53kubed has joined #asahi-re
08:57jtingiris has quit [Ping timeout: 480 seconds]
08:57kubed is now known as jtingiris
10:00chadmed has quit [Quit: Konversation terminated!]
10:28chadmed has joined #asahi-re
11:10scottjg4 has quit [Ping timeout: 480 seconds]
14:05djsven: yes I keep finding one init after another that is missing and explains the SError perfectly. lol still haven’t hit the wall
14:07djwriting to certain regions indeed seems blocked until you enable certain bits, and reversing xnu’s init is helping with exactly that but it’s a tedious process. once it works, I’ll try to narrow it down to exactly what was needed
14:07yukadj: if you can figure out what the impact of the individual init things are (x makes y writable), having documentation of this would be amazing
14:08djyes I’m keeping notes of it
14:25djeven after settings the pmp bits xnu does, still couldn’t write to CPM + 0x40f8. what sorcery is apple doing
14:33pb17 has quit [Ping timeout: 480 seconds]
14:34pb17 has joined #asahi-re
14:37nela has quit [Quit: Ping timeout (120 seconds)]
14:37nela has joined #asahi-re
14:41djis it possible to issue a store from el1 somehow
15:08mattia013 has joined #asahi-re
15:38user890104 has quit []
15:39user890104 has joined #asahi-re
16:12Retr0id9 has joined #asahi-re
16:12nela3 has joined #asahi-re
16:12mildsunrise7 has joined #asahi-re
16:12marv70008 has joined #asahi-re
16:12mildsunrise has quit [Read error: Connection reset by peer]
16:12mildsunrise7 is now known as mildsunrise
16:12marv7000 has quit [Read error: Connection reset by peer]
16:12marv70008 is now known as marv7000
16:13cyberhead_ has quit [Remote host closed the connection]
16:14Retr0id has quit [Read error: Connection reset by peer]
16:14Retr0id9 is now known as Retr0id
16:14nela has quit [Read error: Connection reset by peer]
16:14nela3 is now known as nela
16:14riker77 has quit [Read error: Connection reset by peer]
16:14cyberhead has joined #asahi-re
16:15riker77 has joined #asahi-re
16:20truita has quit [Read error: Connection reset by peer]
16:20truita has joined #asahi-re
16:20commandoline has quit [Quit: Bye!]
16:20marshmallow has quit [Remote host closed the connection]
16:20sofus_ has joined #asahi-re
16:21commandoline has joined #asahi-re
16:21marshmallow has joined #asahi-re
16:21sofus has quit [Read error: Connection reset by peer]
16:23ncopa has joined #asahi-re
17:35alessaba has quit [Ping timeout: 480 seconds]
17:36alessaba has joined #asahi-re
18:13sveni still suspect that the smp issue is just some bug in iboot :(
18:58djlike a bug specific to fuos that doesn’t affect xnu?
19:03djgonna dig into sptm too
19:03djtried countless things from xnu that is t6050 specific, like the symbol clearly says so, but it doesn’t work still
19:03djmaybe it’s a layer up, in sptm
19:05svenyes, because the boot path for fuos is different from the "regular" macos boot path
19:05svenand the fuos path is just not very well tested by apple
19:07djit’s a possibility
19:08dji did look into iboot’s handoff and there wasn’t much diff in how it performs handoff to us or regular macos. there was some something about svc #2 and svc #3 which was t6050 specific
19:08djregular macOS seems to get a flag smth along the lines of apple trusted
19:08sventhe paths must look very different, the regular macos one needs to load SPTM and XNU to memory
19:08svenand the fuos path needs to somehow lock down all sysregs, etc.
19:10djI meant the path from iboot to sptm or iboot to fuos. I was comparing t6050 specific paths so could’ve missed something
19:11djsptm is seemingly doing some setup that m1n1 does not and that’s why we can’t start secondaries, that’s the current theory. If that doesn’t work, I’m out of ideas other than iboot being actually being bugged you may as well be right lol
19:12svenif it's bugged all we can do is file a feedback assistant report and hope for the best essentially :(
19:12sveni hope i'm not right :D
19:16djwe shall find out today :) hope for the best. Just found something related to ACC-CTRR etc locks which sptm handles before xnu handoff that might be enabling CPM writes
19:17djtested a read on them, they came back unconfigured. let’s try it out
19:21djokay I can’t write them in EL2
19:23djthere isn’t any known limitations of chainload path having less privileges or is there
19:23djthere isn’t any known limitations of chainload path having less privileges or is there
19:24yukachainloading another m1n1 shouldn't affect privileges in any way, but I suspect you mean something else?
19:26yukaas people have been telling you, we would all expect this stuff to be locked down in your device/setup
19:27yuka> <chaos_princess> it is unlikely that you will succeed. the relevant bits are in iboot, and you can't change it
19:27yuka> <sven> and the fuos path needs to somehow lock down all sysregs, etc.
19:28yukathere are things which are known to be locked (though not under which specific conditions?), like pretty much all apple specific imp regs / msrs on the usual setup (install raw boot object via kmutil -r) on M4
19:29yukaI personally haven't verified if this is also the case when using a newer iboot (one from an SPTM-enabled build) on an M3 device, or with the non-raw / macho kernel objects
19:29yuka*or with the non-raw / macho kernel objects on M4+
19:30sveni don't think the silicon is there on M3 to actually lock anything down
19:30yukawhat is locked where is a bit unknown, but things are definitely locked down a lot
19:30enverbalalic has joined #asahi-re
19:31svenafaict on M4+ they at least have some way to configure which sysregs are read-only and i think they just disabled everything except what's in the arm architecture reference manual
19:31yukadj: for context, on the base M4 model there was also specific macOS/iboot versions which had broken smp (possibly in a similar way) and then it worked again just like that after one with 26.x updates
19:32yukathere is a lot of reasons to assume this is an iboot bug, though it is somewhat difficult to prove (but your analysis with reading pc of the secondary cores kinda supports it)
19:32svenand then they didn't test anything 🙃
19:35djthat makes more sense then, I didn’t know this has been the case before with M4. and the lock down on a lot of stuff is real. is it possible for me to test stuff out with raw boot objects?
19:36yukaI assume you have been doing the raw boot object path
19:36yukabecause that's pretty much how you install m1n1 nowadays, and the assumption is if you attempted to install the macho version on recent platforms you would be dropped into an environment running under SPTM
19:37yukaI haven't verified any of this, but if you actually run under SPTM it might be very annoying to even get debug output in any way
19:37yukaor even get m1n1 running fully
19:37svenit won't even allow the m1n1 macho to be installed right now because it doesn't look like xnu anymore :D
19:38svenand m1n1 will probably panic very early when it tries to access the uart. and even if that worked it'll definitely panic when trying to enable the MMU
19:38yukayeah, so it would be nice if someone had a closer look at that boot mode, but it's probably not an easy task
19:38svenmight even be easier to fork m1n1 and adjust it to be able to run under SPTM for experiments
19:39picnoir has quit [Ping timeout: 480 seconds]
19:39djI don’t think it’s running under SPTM right now. But if I could try doing that, could possibly make things easier for f6050
19:39svenwe can't run linux under sptm
19:39svensptm owns the pagetables and you have to nicely ask it if you want to change any
19:40svenyou're definitely not running under sptm unless you specifically adjusted m1n1 :)
19:40djlol fair, that’s ruled out then
19:41djbut for an experiment to see if secondaries work under SPTM, would be a cool verification method no?
19:41djand if it _just works_, we know where the problem is
19:41svensure, but keep in mind that running m1n1 under SPTM is going to be quite annoying
19:42svenmight be interesting either way for some experiments
19:42enverbalalictheoretically, would a m1n1 macho running under SPTM allow the macos virtualization to run without the sptm emulation hacks ?
19:42djI suppose it would make things easier
19:42djI’m gonna try emulating more of sptm first, and later today boot back into macOS and try a sptm enabled m1n1
19:43svenuh, what do you mean with sptm enabled m1n1?
19:43djwording is off but I meant the experiment to run m1n1 under SPTM :)
19:44djI just wanna see if the problem is rly lying in iboot or sptm layer and conclude my experiment
19:45yukaI don't know if the SPTM guest can even have its own guests, or if everything virtualization shaped needs to go via SPTM
19:45sventhe latter
19:47picnoir has joined #asahi-re
19:49yukais that just how macOS does it, or does the normal EL2/EL1 separation just not work?
19:49enverbalalic has quit [Remote host closed the connection]
19:49yukaor does SPTM not allow setting up the pagetables that way
19:53svenyou e.g. can't write to HCR from EL2 the moment GXF is enabled
19:54enverbalalic has joined #asahi-re
19:54svenand SPTM will probably make sure that you can't setup stage 2 translations, etc.
19:55yukaAhh fair
19:55svenoh, and you need to write to HCR to enable EL1 anyway
19:55enverbalalicbtw, do we know what csrutil allow-research-guests does, according to apple it's some virtual research environment for private cloud compute, and enabling that allows additional access to hardware ?
19:56svenallows you to run EL1 guests from XNU with some additional apple features enabled
19:56sveni think even GXR/SPRR but that doesn't help us because host-XNU already drives all the hardware and won't expose it to us
20:04enverbalalic has quit [Remote host closed the connection]
20:10enverbalalic has joined #asahi-re
20:33enverbalalicreading into the docs for these PCC nodes, wouldn't surprise me if all this register lockdown stuff didn't come from the iboot changes they did specifically for these things
20:41svenwe’re pretty sure they locked down all these sysregs because arm lawyers complained about all apple extensions
20:42sventhey had to build new silicon for this, it’s not just iboot changes
21:13UmutKzl has joined #asahi-re
21:16UmutKzl has quit [Remote host closed the connection]
21:32mattia013 has quit [Remote host closed the connection]
22:01alessaba has quit [Ping timeout: 480 seconds]
22:02alessaba has joined #asahi-re
22:04enverbalalic has quit [Ping timeout: 480 seconds]
22:13enverbalalic has joined #asahi-re
22:16enverbalalic has quit [Read error: No route to host]
22:16enverbalalic has joined #asahi-re
22:28k70 has quit [Ping timeout: 480 seconds]
23:47nicolas17I think PCC nodes use M2 Ultra so they wouldn't have the proprietary register lockdown stuff
…