#
#asahi-re · 2022-04-17 01:19
rqou_a bajillion different settings covering basically everything iosurface supports
#asahi-re · 2022-04-17 01:19
rqou_ugh, the scalers are such a huge pain to RE
#asahi-re · 2022-04-16 23:59
nicolas17I knew it went through T2 on Intel Macs but I assumed it would involve its AP or other coprocessor, not SEP
#asahi-re · 2022-04-16 23:59
nicolas17SEP really?
#asahi-re · 2022-04-16 23:54
robinpthe biggest problem is that these are all relayed thru a security switch from the SEP (along with the mic)
#asahi-re · 2022-04-16 23:53
robinpthe 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.
#asahi-re · 2022-04-16 23:00
rqou_probably video over dma and everything else configured via the whole RTBuddy/RTKit thing that i'm not familiar with
#asahi-re · 2022-04-16 23:00
millenialhackerSo CMDs / Video over DMA and extra config over I2C
#asahi-re · 2022-04-16 23:00
rqou_probably has some ringbuffers configured somewhere in its register space
#asahi-re · 2022-04-16 22:59
rqou_it's just a mmio range
#asahi-re · 2022-04-16 22:58
millenialhackerAnd which other bus do you think may be used ?
#asahi-re · 2022-04-16 22:57
millenialhackerYes, it's quite similar
#asahi-re · 2022-04-16 22:56
rqou_btw that boot log is similar to the old facetimehd boot log
#asahi-re · 2022-04-16 22:56
rqou_millenialhacker: my complete guess is that i2c is used to poke extra settings in the camera sensor
#asahi-re · 2022-04-16 22:53
nicolas17wikipedia says "Apple M1 Ultra – Jade 2C-Die and Jade 4C-Die"
#asahi-re · 2022-04-16 22:53
nicolas17ffs
#asahi-re · 2022-04-16 22:51
sveniirc tonga is just the codename for the m1
#asahi-re · 2022-04-16 22:51
millenialhacker:/
#asahi-re · 2022-04-16 22:51
millenialhackerI found physical dart addresses are printed as <private>
#asahi-re · 2022-04-16 22:50
svenhard to make sense of that without a proper MMIO trace :/
#asahi-re · 2022-04-16 22:50
millenialhackerChip name: Tonga, have your seen it before?
#asahi-re · 2022-04-16 22:49
millenialhackerYes, it seems it's one of the co-processors
#asahi-re · 2022-04-16 22:49
millenialhackerI see interesting stuff: https://pastebin.com/Etn6KAs0
#asahi-re · 2022-04-16 22:47
svenIs isp one of these co-processors?
#asahi-re · 2022-04-16 22:47
millenialhackerBtw, It seems boot-args: "camLoggingUsePrintf=1 camLogging=0x2B67 camEnableFWCore=1 camFWTrace=0x2B67" do some trick
#asahi-re · 2022-04-16 22:46
millenialhackeryou need a channel to control the ISP, but actually data transfer can just be DMA
#asahi-re · 2022-04-16 22:45
svenyeah, I’d be surprised if it wasn’t dma
#asahi-re · 2022-04-16 22:45
millenialhackerI 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
#asahi-re · 2022-04-16 22:44
svenso i2c is probably much to slow for a video signal, but maybe they send configuration messages over it?
#asahi-re · 2022-04-16 22:44
millenialhackerI see a lot of stuff related to DART and I2C in strings in AppleH13CameraInterface KEXT
#asahi-re · 2022-04-16 22:43
millenialhackerComing from -dev channel.
#asahi-re · 2022-04-16 13:53
millenialhackerI wonder what camFWTrace boot-arg does :D
#asahi-re · 2022-04-16 13:27
svenpretty sure everyone just uses the hypervisor to do that
#asahi-re · 2022-04-16 13:09
chadmedjust like AMD hackintosh kernel patching ;)
#asahi-re · 2022-04-16 13:09
chadmedwell 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
#asahi-re · 2022-04-16 13:08
millenialhackerOr is it still not possible to build custom XNU kernels for M1 SoCs?
#asahi-re · 2022-04-16 13:07
millenialhackerMaybe 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?
#asahi-re · 2022-04-16 12:27
chadmedhow do i map IOVAs properly? is it just a matter of using iomon.add() on the ranges i (think) i need?
#asahi-re · 2022-04-16 11:42
marcanwe 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
#asahi-re · 2022-04-16 11:41
marcan*section
#asahi-re · 2022-04-16 11:41
marcanthis falls under the section "Referencing other open source code" and in particular the aution about Apple-specific stuff
#asahi-re · 2022-04-16 11:41
marcanmillenialhacker: reminder to read https://asahilinux.org/copyright/
#asahi-re · 2022-04-16 11:28
rqou_it just hangs the bus
#asahi-re · 2022-04-16 11:27
rqou_hmm, the scaler gets upset if i write to (presumably) read-only registers
#asahi-re · 2022-04-16 11:14
millenialhackerYeah, I think probably some kind of mailbox interface over ISP to talk with CAmera
#asahi-re · 2022-04-16 11:14
rqou_the m1 version obviously has a lot more commands though
#asahi-re · 2022-04-16 11:14
rqou_many of the commands are the same if you check the strings in the isp firmware
#asahi-re · 2022-04-16 11:14
millenialhackerWill try to check this lately.
#asahi-re · 2022-04-16 11:13
rqou_yup, i mentioned that the other day
#asahi-re · 2022-04-16 11:13
millenialhackerI'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.

plus ›