2022-05-23
00:18jakebot has quit [Quit: Ping timeout (120 seconds)]
00:18jakebot has joined #asahi-dev
00:27jakebot has quit [Ping timeout: 480 seconds]
00:49dost^ has joined #asahi-dev
01:07jakebot has joined #asahi-dev
01:30Raqbit has quit [Ping timeout: 480 seconds]
01:44Raqbit has joined #asahi-dev
02:13dost^ has quit [Ping timeout: 480 seconds]
02:16dost^ has joined #asahi-dev
03:02PhilippvK has joined #asahi-dev
03:04phiologe has quit [Ping timeout: 480 seconds]
03:16derzahl has quit [Ping timeout: 480 seconds]
03:44winter has quit [Remote host closed the connection]
03:48winter has joined #asahi-dev
04:43conradev has quit [Quit: -]
04:44conradev has joined #asahi-dev
05:03derzahl has joined #asahi-dev
06:52derzahl has quit [Ping timeout: 480 seconds]
07:58bps has joined #asahi-dev
08:00the_lanetly_052 has joined #asahi-dev
08:22jluthra has quit [Remote host closed the connection]
08:22jluthra has joined #asahi-dev
09:14millenialhacker has joined #asahi-dev
09:15millenialhackerA fun story about Apple ISP. The IO IPC channel is used to send commands to ISP, that channel is 8 bytes wide, so they put the IOVA address of the CMD struct which is apparently 8 bytes wide too, but they never change the Address, they mostly use the same iova address and replace the contents of memory. Here's a couple of sessions I traced today: https://gist.github.com/kellermanrivero/c92aec82d59d6d0a4d27b3381d1038b7
09:16millenialhackerThe weird stuff is: Apple something uses IOVA address X and sometimes it uses X + 1
09:18millenialhackerIt's quite weird, maybe a bug? As long as ISP uses the address no matter if it is X or X+1, it will work, but I wonder why they have that little offset changing for some specific commands
09:19millenialhackerI still have no idea what those commands do, but after two samples, command stream looks quite the same in both samples.
09:20millenialhackerI'm learning a lot with this stuff btw
09:21the_lanetly_052__ has joined #asahi-dev
09:27the_lanetly_052 has quit [Ping timeout: 480 seconds]
09:31the_lanetly_052__ has quit [Ping timeout: 480 seconds]
09:41povikthe bottom bit could be a flag of some sorts, exploiting the fact that the address is always 4-aligned which frees the bottom two bits for auxiliary signalling
09:42povikthat goes in hand with the fact that the x+1 messages have their first non-zero byte at an offset in comparison to the x+0
09:51_jannau_marcan: do you have time this week to add mac studio support to the installer? there's liitle left I can do
09:52millenialhacker@povik, do you mean iova & 0xffffff00?
09:53millenialhacker@povik, do you mean iova & 0xfffffffc?
09:56millenialhackerI wonder how I can guess what those commands do, any suggestion beside doing static RE on Apple KEXT?
09:56dost^ has quit [Remote host closed the connection]
09:56dost^ has joined #asahi-dev
10:07millenialhackerbtw, @povik and others thanks!
10:21dost^ has quit [Ping timeout: 480 seconds]
10:38kov has joined #asahi-dev
11:37the_lanetly_052 has joined #asahi-dev
12:59yuniDepending on the required alignment, that could be up to 6 bits that aren't stored and are assumed to be zero.
13:00yuniThen, where you would otherwise have those zero bits, other pieces of data can be squeezed in.
13:01yuniLike the type of data that's being pointed to, or the length (itself divided by a power-of-two, only storing the high bits), or so on.
13:02yuniAs Jamie[m] correctly jokes, this scheme is used for instruction pointers on certain Arm CPUs.
13:49Guest489 is now known as svenpeter[m]
14:29Gaspare has joined #asahi-dev
14:34millenialhackerTy Yuni
14:35millenialhacker has quit [Quit: Konversation terminated!]
14:39dost^ has joined #asahi-dev
14:47dost^ has quit [Remote host closed the connection]
14:48Gaspare has quit [Quit: Gaspare]
14:49Gaspare has joined #asahi-dev
14:49kaprests has quit [autokilled: Possible botnet activity. Mail support@oftc.net with questions. (2022-05-23 14:49:59)]
14:55kaprests has joined #asahi-dev
15:16derzahl has joined #asahi-dev
15:18the_lanetly_052 has quit [Remote host closed the connection]
15:20nicolas17 has joined #asahi-dev
15:32Gaspare has quit [Quit: Gaspare]
15:34j`eyin the adt, what section does clock-gates = [n] refer to? aka where do I look to see which n it is
15:42Gaspare has joined #asahi-dev
15:57Gaspare has quit [Quit: Gaspare]
16:03svenpeter[m]note that drivers that use more than one domain needs special support
16:03svenpeter[m]the core only handles a single domain automatically
16:04j`eyI dont know which it actually needs yet, in the ADT is only has one thing in the clock-gates array
16:04svenpeter[m]that’s the one it should need
16:04svenpeter[m]does it work from m1n1?
16:21j`ey_jannau_: seems like that helped actually, just commented out all the fpwm/pms_fpwm pmgr nodes
16:31caef^ has joined #asahi-dev
16:33jakebot has quit [Quit: The Lounge - https://thelounge.chat]
16:33jakebot has joined #asahi-dev
16:35marcanalternatively maybe those devices are kind of broken and need an actual reset to come back up after a power gate
16:37j`eypower-domains = <&ps_fpwm1>;, this works.. but unless Im reading the ADT wrong (likely), it should be ps_fpwm0
16:40j`eyit's not obvious if the name field is at the end or the start of a block https://paste.gg/p/anonymous/4c54a63688df4974ab69e1e53cfb6a67
16:40j`eyI read this as line 27 starting a block, with id=37 on line 51.. but name might be the last field in a block, so id=37 is actually fpwm1?
16:45svenpeter[m]yes, the block starts at Container and name is the last entry
16:46svenpeter[m]it’s a bit confusing because the output is just print(adt) and then however construct and Python decide to format it afaict
16:47j`eythe name and the container on the same line "name = u'FPWM0' (total 5), Container:" makes it look like its naming the following container
16:47svenpeter[m]yeah, the “,” there separates the entries of the list(?)
16:47svenpeter[m]it’s rather confusing
16:48j`eyanyways I can toggle the kb backlight with "echo 1 > /sys/devices/platform/pwmleds/leds/kbd_backlight/brightness" now, so thats cool
17:04Gaspare has joined #asahi-dev
17:18povikso it looks like macos patches something in the preloaded AOP image before it kicks CPU_START
17:25freefiree has joined #asahi-dev
17:29jokerface has joined #asahi-dev
17:29jokerfacePlease join to my new channel on libera.chat if you like safari browser. The name of the channel of course is #safari
17:32caef^ has quit [Remote host closed the connection]
17:38jokerface was banned on #asahi-dev by ChanServ [*!~jokerface@85.194.207.61]
17:38jokerface was kicked from #asahi-dev by ChanServ [You are not permitted on this channel]
17:41nicolas17 has quit [Ping timeout: 480 seconds]
17:42nicolas17 has joined #asahi-dev
17:47freefiree has quit [autokilled: Please do not spam on IRC. Email support@oftc.net with questions. (2022-05-23 17:47:17)]
17:57povikha... and of course if i re-do the patching *and* fix a bug in setting up DAPF entries, AOP finally boots
18:09nicolas17j`ey: the AOP is "always on" as in "even when the main CPU is in deep sleep" (that aspect is mostly relevant on mobile I guess)
18:10nicolas17afaik a bunch of peripherals such as the microphone are hard-wired to the AOP, so you *have* to go through the AOP to get microphone on asahi
18:12nicolas17ah I think audio on recent Intel Macs always goes through the T2, maybe I was mixing up with that
18:13svenpeter[m]povik: huh, interesting. I saw some section in the ANS firmware that very much looked as if it was supposed to be patched by iboot to pass some arguments iirc
18:14millenialhacker has joined #asahi-dev
18:16poviknicolas17: you can access its peripherals, some of which we already know (ADMAC,MCA) because the AP has its own copy of them
18:16svenpeter[m]i think the same is true for ANS, but iboot has done that for us already
18:25povikwait those weird looking numbers in the argument section could be apple's favorite four-character keys
18:29bisko has quit [Ping timeout: 480 seconds]
18:30poviki guess they are four-char-keys, not that i like having to make sense of it: https://tpaste.us/8b46
18:30Gaspare has quit [Quit: Gaspare]
18:32bisko has joined #asahi-dev
18:35Gaspare has joined #asahi-dev
19:37Glanzmann has joined #asahi-dev
20:06Glanzmann has quit [Quit: EOF]
20:10MajorBiscuit has joined #asahi-dev
21:11millenialhacker has quit [Quit: Konversation terminated!]
21:38Major_Biscuit has joined #asahi-dev
21:39MajorBiscuit has quit [Ping timeout: 480 seconds]
21:47Gaspare has quit [Quit: Gaspare]
22:08MajorBiscuit has joined #asahi-dev
22:10Major_Biscuit has quit [Ping timeout: 480 seconds]
22:35MajorBiscuit has quit [Ping timeout: 480 seconds]
23:18lromwoo^ has joined #asahi-dev