#
✕ nick:rqou_
#asahi-re · 2022-04-16 11:13
rqou_yup, i mentioned that the other day
#asahi-re · 2022-04-16 10:39
rqou_(by samsung jpeg i mean one of the ones supported by this https://github.com/torvalds/linux/blob/master/drivers/media/platform/samsung/s5p-jpeg/jpeg-regs.h)
#asahi-re · 2022-04-16 10:38
rqou_the EJPEG version looks closer to the AJPEG version, but idk what's different
#asahi-re · 2022-04-16 10:38
rqou_AppleJPEGHal looks like a samsung jpeg block but iirc has a few extra registers
#asahi-re · 2022-04-16 10:38
rqou_there's also a AppleEJPEGHal and AppleJPEGHal
#asahi-re · 2022-04-16 10:37
rqou_the version in the m1 is controlled by AppleAJPEGHal
#asahi-re · 2022-04-16 10:37
rqou_there's also at least three major versions of the jpeg block if you look inside the driver
#asahi-re · 2022-04-16 10:35
rqou_before/after 0x1000
#asahi-re · 2022-04-16 10:35
rqou_it would explain why the registers seem to come in two groups
#asahi-re · 2022-04-16 10:35
rqou_and that color space conversion, tiling, agx compression, etc. are stuff apple wrapped around it
#asahi-re · 2022-04-16 10:34
rqou_i actually assume that only the "DCT, entropy coding" parts come from shikino
#asahi-re · 2022-04-16 10:32
rqou_iirc "SHIKINO KJN-7GI 0001" if i remember correctly
#asahi-re · 2022-04-16 10:31
rqou_i brute-force read all the registers, and there's ascii text at that address
#asahi-re · 2022-04-13 06:18
rqou_especially since the original dart code wasn't particularly well parameterized over device type
#asahi-re · 2022-04-13 06:16
rqou_also i ended up removing the L0 logic because t8110 obviously didn't have it, and afterwards i was lazy and didn't want to figure out the appropriate place to stick if statements to unify the code
#asahi-re · 2022-04-13 06:14
rqou_i then realized it didn't, at least not in the t600x
#asahi-re · 2022-04-13 06:14
rqou_i duplicated the code before i was sure about the page table format (and suspected it had additional page table levels)
#asahi-re · 2022-04-13 06:14
rqou_reason? yes. good reason? probably not
#asahi-re · 2022-04-13 05:58
rqou_e.g. that's how i figured out that bit1 of the PTE is probably "uncacheable"
#asahi-re · 2022-04-13 05:57
rqou_the code itself is basically all m1n1 code, but i got a bunch of register names and bit positions by dumping the DWARF data from the KDK
#asahi-re · 2022-04-13 05:55
rqou_feel free to yell at me for doing a huge copypasta
#asahi-re · 2022-04-13 05:55
rqou_btw marcan have you had a chance to take a look at my t8110 dart code for m1n1?
#asahi-re · 2022-04-13 05:48
rqou_and some of which aren't even in there
#asahi-re · 2022-04-13 05:48
rqou_some of which the seemoo people seem to have somehow figured out https://github.com/seemoo-lab/internalblue/blob/master/internalblue/hci.py
#asahi-re · 2022-04-13 05:48
rqou_btw the bluetooth has a _ton_ of vendor-specific commands
#asahi-re · 2022-04-13 05:46
rqou_yup, saw your tweets about that
#asahi-re · 2022-04-13 05:45
rqou_yeah, having seen the (mostly empty) internal datasheet for the old webcam is a big part of why i suspected the bluetooth pcie is custom
#asahi-re · 2022-04-13 05:44
rqou_iirc the T1 touchbar macs were next
#asahi-re · 2022-04-13 05:43
rqou_i wonder if the old facetimehd chip was some kind of test of putting apple custom IP into a macbook?
#asahi-re · 2022-04-13 05:42
rqou_yeah
#asahi-re · 2022-04-13 05:42
rqou_basically all apple stuff, even though everyone out there thinks it's a "broadcom webcam chip"
#asahi-re · 2022-04-13 05:41
rqou_so yeah, it runs a 32-bit ARM of some kind
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099343] FWMSG: Tool-chain : iPhone OS - 7.0.3 [clang/clang++]
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099321] FWMSG: ffw : 4143
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099290] FWMSG: H4ISPCD : 4081
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099261] FWMSG: Release : S2ISP-01.43.00
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099276] FWMSG: H4ISPAPPLE : 11536
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099223] FWMSG: Application : adc [release]
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099243] FWMSG: Linked on : Jul 25 2015 - 08:48:55
#asahi-re · 2022-04-13 05:40
rqou_[3110795.099205] FWMSG: Disclaimer : Copyright (c) APPLE Inc. All Rights Reserved.
#asahi-re · 2022-04-13 05:40
rqou_but yeah, APOLLO-ISP-APPLE
#asahi-re · 2022-04-13 05:40
rqou_(this one https://github.com/patjak/facetimehd)
#asahi-re · 2022-04-13 05:39
rqou_if you actually load the REd facetimehd driver it prints the ISP boot log to dmesg
#asahi-re · 2022-04-13 05:39
rqou_yeah
#asahi-re · 2022-04-13 05:38
rqou_even the internal datasheet was missing everything else
#asahi-re · 2022-04-13 05:38
rqou_the facetimehd chip on older macbooks is mostly non-broadcom IP, broadcom only did the pcie and ram
#asahi-re · 2022-04-13 05:38
rqou_yeah
#asahi-re · 2022-04-13 05:38
rqou_yeah
#asahi-re · 2022-04-13 05:37
rqou_at least the command names are the same
#asahi-re · 2022-04-13 05:37
rqou_anyways, since this is the -re channel where cursed stuff can be discussed, i ran `strings` on the camera firmware a while back and suspect that some of the information from the `facetimehd` driver carries over

plus ›