#asahi-re · 2022-06-18 16:57
marcanI'm more interested in things like like SMC, I looked at an iPhone one and that helped answer some questions but there was enough that was different to leave plenty of mysteries#asahi-re · 2022-06-18 16:55
marcanso I guess we can finally decrypt iBoot/SMC and answer some mysteries that way (RE policy still applies as usual, don't do that if you're writing drivers and I don't know you know what you're doing)#asahi-re · 2022-06-18 16:55
marcan(no idea where those came from, but public decryption keys for public firmware blobs are fair game FWIW)#asahi-re · 2022-06-18 16:54
marcanhttps://twitter.com/nyan_satan/status/1538200104573755398 cute#asahi-re · 2022-06-17 04:44
marcana lot of that is related to what our installer does, I probably could've really used that test script if I'd known about it before writing it...#asahi-re · 2022-06-17 04:44
marcantons of references to the mythical bless2cli and bootabilityutil there... I wish we had those :)#asahi-re · 2022-06-17 04:43
marcanspeaking of "things Apple leaks unintentionally", I found this one recently: https://github.com/apple-opensource/bless/blob/master/test/test_bless2#asahi-re · 2022-06-17 04:42
marcan* ^ reused one register number, I meant#asahi-re · 2022-06-17 04:41
marcanSo anything that we find in public sources also needs to be confirmed to be real, and often the bit assignments can change (e.g. AArch32 bits are unimplemented in M1 and newer chips) and that should be documented too.#asahi-re · 2022-06-17 04:40
marcansometimes there are collisions too, so you need to be mindful to not just blindly copy. e.g. Apple reused one register name for two things, and Corellium had the wrong one in the mindless chicken bit sequence copy and paste they shipped in their port. We don't want that kind of nonsense.#asahi-re · 2022-06-17 04:39
marcan... keys which is hinted to in XNU source, etc.)#asahi-re · 2022-06-17 04:39
marcanprofessortox[m]: the register names in the wiki, to my knowledge, all came from collating references in various XNU source dumps and possibly some other public debug tools, and also guesswork (it's possible to come up with identical names to the original registers if you have related ones already, e.g. _EL12 variants are obvious, things like KNOWN_FEATURE_NAME_CFG, stuff related to pointer auth ...#asahi-re · 2022-06-17 04:35
marcanAlso, I only use schematics that are widely available, i.e. I managed to dig up in a web search and they can be considered effectively public. I don't want anyone bringing in anything "they got from someone", that kind of stuff is a big liability risk (and that kind of culture is also toxic to open projects).#asahi-re · 2022-06-17 04:32
marcan... schematics fundamentally contain.#asahi-re · 2022-06-17 04:32
marcanAs for schematics: so far I've used those to come up with the GPIO backlight toggle stop-gap solution - which is why it isn't available on the iMacs, no schematics for those and I haven't bothered to brute force it - and to guess a lot of SMC hardware sensor keys. That kind of stuff is, as far as the end product, safe from copyright claims, since it is just factual information, which is what ...#asahi-re · 2022-06-17 04:28
marcanBut that's the one exception. *Definitely* no leaked images, AppleInternal tools, stuff from prototype devices that "someone forgot in a bar", etc.#asahi-re · 2022-06-17 04:27
marcanI make *one* exception to that second rule, leaked schematics, because there's practically no way for copyrightable content to wind up in our code from that and schematics should be available anyway for repairability purposes, and an entire industry depends on them.#asahi-re · 2022-06-17 04:26
marcanStuff stolen or leaked from Apple internal channels is a no-no#asahi-re · 2022-06-17 04:26
marcanThat includes things part of public betas, user-accessible field test images, and things like that#asahi-re · 2022-06-17 04:26
marcanIn other words, stuff Apple publishes through open channels, intentionally or not, is considered equivalent for reverse engineering purposes and subject to the RE policy (which largely says you can't use it if it's copyrightable, see the RE policy for details)#asahi-re · 2022-06-17 04:24
marcanAnd to be clear, "leaked" means specifically "not via official channels".#asahi-re · 2022-06-05 10:22
marcanalso shouldn't we be having this discussion in -gpu? lina isn't even here#asahi-re · 2022-06-05 10:22
marcan(plus the existing rtkit stuff)#asahi-re · 2022-06-05 10:21
marcanso basically just a UAT driver#asahi-re · 2022-06-05 10:21
marcanthat would still be single-process but at least it wouldn't be insanity as far as memory management goes#asahi-re · 2022-06-05 10:21
marcanwhat *might* make more sense for experiments is a really insecure dumb driver that lets you do kernel-space maps and talk to the ASC side#asahi-re · 2022-06-05 10:19
marcanI've done the "drivers from userspace" thing before and just getting a single buffer mapped to a device was already problematic#asahi-re · 2022-06-05 10:19
marcanI'm... not sure that's a good idea, with the UAT and everything involved (and it'd only work for a single app at once)#asahi-re · 2022-06-05 10:18
marcanlol#asahi-re · 2022-06-05 10:17
marcan(and she has a point with the Rust thing)#asahi-re · 2022-06-05 10:17
marcanlina might have some work to do there :p#asahi-re · 2022-06-05 10:16
marcanso that should be interesting if they made big changes#asahi-re · 2022-06-05 10:16
marcanI want us to support 12.3 for the first GPU driver if possible, mostly to force the issue of supporting multiple firmwares and avoid having to make people upgrade firmware to get GPU support eventually#asahi-re · 2022-06-05 10:10
marcanthis is the first time we're going to have two GPU majors supported at the same time#asahi-re · 2022-06-05 10:09
marcanI do wonder if they'll keep the structs synced between GPU revisions though#asahi-re · 2022-06-05 10:09
marcanso it'll be an ABI bump on that end#asahi-re · 2022-06-05 10:09
marcanbut there's no reason for them to change the basic design#asahi-re · 2022-06-05 10:09
marcanthat's usually how it goes with these things#asahi-re · 2022-06-05 10:08
marcanphire: the GPU should be a new major revision AIUI, which will likely make a bunch of changes to initdata and friends#asahi-re · 2022-06-04 22:54
marcanI don't outright expect any major changes other than that, but we'll see#asahi-re · 2022-06-04 22:53
marcan(lina probably less since I'm guessing that side would change less? but who knows)#asahi-re · 2022-06-04 22:53
marcanwhich means alyssa has some work to do#asahi-re · 2022-06-04 22:53
marcanprobably new GPU too, reading the tea leaves#asahi-re · 2022-06-03 17:20
marcanmost things are 16K aligned due to the page size only#asahi-re · 2022-06-03 17:19
marcanI think the normal DARTs only have like 0x300 bytes worth of registers, so 0x2000 vs 0x4000 doesn't sounds like it necessarily means anything#asahi-re · 2022-06-03 17:14
marcanUSB isn't using the DART?#asahi-re · 2022-06-03 17:14
marcanthat's good news too#asahi-re · 2022-06-03 17:12
marcanyeah, thought so#asahi-re · 2022-06-03 17:12
marcanrobher was complaining about me introducing AIC2 right after AIC1 :p#asahi-re · 2022-06-03 17:12
marcangood to hear AIC really did stay compatible