#
…

2022-04-16

01:00user982492 has joined #asahi-re
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi-re
01:53user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:02RevHelix has joined #asahi-re
02:08RevHelix has quit []
02:09yuyichao_ has quit [Ping timeout: 480 seconds]
02:09RevHelix has joined #asahi-re
02:10user982492 has joined #asahi-re
02:15roxfan has quit [Ping timeout: 480 seconds]
02:46PhilippvK has joined #asahi-re
02:50phiologe has quit [Ping timeout: 480 seconds]
03:18yuyichao_ has joined #asahi-re
04:16roxfan has joined #asahi-re
04:56nicolas17 has quit [Quit: Konversation terminated!]
06:26the_lanetly_052__ has joined #asahi-re
06:32the_lanetly_052___ has quit [Ping timeout: 480 seconds]
06:42alexsv has joined #asahi-re
06:52pg12 has quit [Ping timeout: 480 seconds]
07:01pg12 has joined #asahi-re
07:06user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:14user982492 has joined #asahi-re
07:59millenialhacker has quit [Quit: Konversation terminated!]
08:19millenialhacker has joined #asahi-re
08:42user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:26pg12_ has joined #asahi-re
09:28pg12 has quit [Ping timeout: 480 seconds]
09:43millenialhacker has quit [Quit: Konversation terminated!]
09:48blocklisted[m] has joined #asahi-re
09:48user982492 has joined #asahi-re
10:07millenialhacker has joined #asahi-re
10:15millenialhacker has quit []
10:21millenialhacker has joined #asahi-re
10:22millenialhacker has quit []
10:26millenialhacker has joined #asahi-re
10:30marcanrqou_: > SHIKINO_VERSION_MAGIC0
10:30marcancurious, where'd that come from?
10:31rqou_i brute-force read all the registers, and there's ascii text at that address
10:31marcanand it says shikino?
10:31marcanthat's amazing
10:32rqou_iirc "SHIKINO KJN-7GI 0001" if i remember correctly
10:32marcanI love it
10:32millenialhacker has quit []
10:34millenialhacker has joined #asahi-re
10:34rqou_i actually assume that only the "DCT, entropy coding" parts come from shikino
10:35rqou_and that color space conversion, tiling, agx compression, etc. are stuff apple wrapped around it
10:35rqou_it would explain why the registers seem to come in two groups
10:35rqou_before/after 0x1000
10:37marcanyup, that would make sense
10:37rqou_there's also at least three major versions of the jpeg block if you look inside the driver
10:37rqou_the version in the m1 is controlled by AppleAJPEGHal
10:38rqou_there's also a AppleEJPEGHal and AppleJPEGHal
10:38rqou_AppleJPEGHal looks like a samsung jpeg block but iirc has a few extra registers
10:38rqou_the EJPEG version looks closer to the AJPEG version, but idk what's different
10:39marcanheh, neat
11:13millenialhackerI'm not an expert here, but I have found https://github.com/patjak/facetimehd/wiki, this a pre-M1 era, however when I enabled camera driver debugging in my MacOSX and then dumped strings from AppleCameraInterface it seems nothing has change dramatically. I think main difference now is that camera is not exposed anymore through PCI bus.
11:13rqou_yup, i mentioned that the other day
11:14millenialhackerWill try to check this lately.
11:14rqou_many of the commands are the same if you check the strings in the isp firmware
11:14rqou_the m1 version obviously has a lot more commands though
11:14millenialhackerYeah, I think probably some kind of mailbox interface over ISP to talk with CAmera
11:27kelito has joined #asahi-re
11:27millenialhacker has quit [Remote host closed the connection]
11:27millenialhacker has joined #asahi-re
11:27rqou_hmm, the scaler gets upset if i write to (presumably) read-only registers
11:28kelito has quit [Remote host closed the connection]
11:28rqou_it just hangs the bus
11:35millenialhacker has quit [Ping timeout: 480 seconds]
11:37user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:41marcanmillenialhacker: reminder to read https://asahilinux.org/copyright/
11:41marcanthis falls under the section "Referencing other open source code" and in particular the aution about Apple-specific stuff
11:41marcan*section
11:42marcanwe don't know how that driver was developed, so unless we can verify that, we have to treat it similarly as we would Apple code
11:44millenialhacker has joined #asahi-re
11:54millenialhacker has quit [Ping timeout: 480 seconds]
12:06millenialhacker has joined #asahi-re
12:11millenialhacker has quit [Read error: No route to host]
12:11millenialhacker has joined #asahi-re
12:12pg12_ has quit []
12:22millenialhacker has quit [Ping timeout: 480 seconds]
12:23millenialhacker has joined #asahi-re
12:27chadmedhow do i map IOVAs properly? is it just a matter of using iomon.add() on the ranges i (think) i need?
12:30pg12 has joined #asahi-re
12:34millenialhacker has quit [Ping timeout: 480 seconds]
12:51millenialhacker has joined #asahi-re
13:00the_lanetly_052___ has joined #asahi-re
13:02millenialhacker has quit [Remote host closed the connection]
13:03millenialhacker has joined #asahi-re
13:06the_lanetly_052__ has quit [Ping timeout: 480 seconds]
13:07millenialhackerMaybe this is a silly question, but has anyone tried to run a custom version of XNU in M1 machines customized to dump traffic to coprocessors?
13:08millenialhackerOr is it still not possible to build custom XNU kernels for M1 SoCs?
13:09chadmedwell most the stuff that makes it actually work is closed source, so id say to change that sort of thing youd have to bust out a hex editor and know which bytes to change and to what
13:09chadmedjust like AMD hackintosh kernel patching ;)
13:27svenpretty sure everyone just uses the hypervisor to do that
13:48the_lanetly_052__ has joined #asahi-re
13:53millenialhackerI wonder what camFWTrace boot-arg does :D
13:54the_lanetly_052___ has quit [Ping timeout: 480 seconds]
13:55the_lanetly_052___ has joined #asahi-re
14:01the_lanetly_052__ has quit [Ping timeout: 480 seconds]
14:06millenialhacker has quit []
14:22millenialhacker has joined #asahi-re
14:31millenialhacker has quit [Remote host closed the connection]
14:32millenialhacker has joined #asahi-re
14:37roxfan has quit [Ping timeout: 480 seconds]
14:45millenia_ has joined #asahi-re
14:52millenialhacker has quit [Ping timeout: 480 seconds]
15:12millenia_ has quit [Remote host closed the connection]
15:12millenialhacker has joined #asahi-re
17:05roxfan has joined #asahi-re
18:13millenialhacker has quit [Remote host closed the connection]
18:13millenialhacker has joined #asahi-re
18:21millenialhacker has quit [Ping timeout: 480 seconds]
18:30user982492 has joined #asahi-re
18:46millenialhacker has joined #asahi-re
18:54millenialhacker has quit [Ping timeout: 480 seconds]
19:02millenialhacker has joined #asahi-re
19:10millenia_ has joined #asahi-re
19:10millenialhacker has quit [Read error: Connection reset by peer]
19:20millenia_ has quit [Ping timeout: 480 seconds]
19:31millenialhacker has joined #asahi-re
19:36millenialhacker has quit [Remote host closed the connection]
19:36millenialhacker has joined #asahi-re
19:50millenialhacker has quit [Remote host closed the connection]
19:51millenialhacker has joined #asahi-re
20:07user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:46MajorBiscuit has joined #asahi-re
20:51nicolas17 has joined #asahi-re
21:02millenialhacker has quit [Remote host closed the connection]
21:03millenialhacker has joined #asahi-re
21:05millenia_ has joined #asahi-re
21:11MajorBiscuit has quit [Ping timeout: 480 seconds]
21:12millenialhacker has quit [Ping timeout: 480 seconds]
21:21millenia_ has quit [Remote host closed the connection]
21:22millenialhacker has joined #asahi-re
22:01MajorBiscuit has joined #asahi-re
22:31alexsv has quit [Ping timeout: 480 seconds]
22:39user982492 has joined #asahi-re
22:43millenialhackerComing from -dev channel.
22:44millenialhackerI see a lot of stuff related to DART and I2C in strings in AppleH13CameraInterface KEXT
22:44svenso i2c is probably much to slow for a video signal, but maybe they send configuration messages over it?
22:45millenialhackerI wonder if they have DMA capabilities, the can use I2C to chat or send commands, but actually video signal can be in DMA accessed from ISP
22:45svenyeah, I’d be surprised if it wasn’t dma
22:46millenialhackeryou need a channel to control the ISP, but actually data transfer can just be DMA
22:47millenialhackerBtw, It seems boot-args: "camLoggingUsePrintf=1 camLogging=0x2B67 camEnableFWCore=1 camFWTrace=0x2B67" do some trick
22:47svenIs isp one of these co-processors?
22:49millenialhackerYes, it seems it's one of the co-processors
22:50millenialhackerChip name: Tonga, have your seen it before?
22:50svenhard to make sense of that without a proper MMIO trace :/
22:51millenialhackerI found physical dart addresses are printed as <private>
22:51sveniirc tonga is just the codename for the m1
22:53nicolas17wikipedia says "Apple M1 Ultra – Jade 2C-Die and Jade 4C-Die"
22:56rqou_millenialhacker: my complete guess is that i2c is used to poke extra settings in the camera sensor
22:56rqou_btw that boot log is similar to the old facetimehd boot log
22:57millenialhackerYes, it's quite similar
22:58millenialhackerAnd which other bus do you think may be used ?
22:59rqou_it's just a mmio range
23:00rqou_probably has some ringbuffers configured somewhere in its register space
23:00millenialhackerSo CMDs / Video over DMA and extra config over I2C
23:00rqou_probably video over dma and everything else configured via the whole RTBuddy/RTKit thing that i'm not familiar with
23:12MajorBiscuit has quit [Ping timeout: 480 seconds]
23:26millenialhacker has quit [Remote host closed the connection]
23:53robinpthe camera is just a MIPI CSI-2 interface afaict - which includes i2c lines for control and then 2-4 lines for data transfer. Looking at the sch Apple only uses two.
23:54robinpthe biggest problem is that these are all relayed thru a security switch from the SEP (along with the mic)
23:59nicolas17SEP really?
23:59nicolas17I knew it went through T2 on Intel Macs but I assumed it would involve its AP or other coprocessor, not SEP
…