#
✕ nick:marcan
#asahi-re · 2022-07-17 16:30
marcanthat's something to work out
#asahi-re · 2022-07-17 16:29
marcanyou could fake the read data as 000 and fff to get the masks, but tbh it probably doesn't matter much
#asahi-re · 2022-07-17 16:28
marcanwe should put that nonsense in m1n1 anyway
#asahi-re · 2022-07-17 16:28
marcanjust hypervisor log it?
#asahi-re · 2022-07-17 16:04
marcanentirely possible that the first half is just pmgr stuff shoved into that driver for no good reason
#asahi-re · 2022-07-17 16:03
marcanpmgr directly maps some device ranges, and some devices directly map pmgr ranges
#asahi-re · 2022-07-17 16:03
marcanrqou_: pmgr is a kitchen sink of nonsense and the ADT reg ranges are a huge mess
#asahi-re · 2022-07-17 08:33
marcanI don't think it's upstream yet?
#asahi-re · 2022-07-17 08:32
marcanI should poke her to push that
#asahi-re · 2022-07-17 08:32
marcanthere's also that thing lina did to speed up the whole m1n1 USB comms 3x (?)
#asahi-re · 2022-07-17 08:30
marcanor that, yeah, just filter it
#asahi-re · 2022-07-17 08:30
marcanmight be doing something silly with trace modes...
#asahi-re · 2022-07-17 08:30
marcan*tracer
#asahi-re · 2022-07-17 08:30
marcanmaybe I should take a look at that tracerr?
#asahi-re · 2022-07-17 08:29
marcaneven if there's a lot of traffic, just logging buffers back and forth has to be faster
#asahi-re · 2022-07-17 08:29
marcanSEP can't possibly be quite as bad as lina's logs... she's logging *every single memory access from CPU to GPU-mapped memory*
#asahi-re · 2022-07-05 20:21
marcanif you do a systemwide trace you're just going to see the global activity on the little cores, which is why it counts
#asahi-re · 2022-07-05 20:20
marcanby default you get the little counters (at least on my system) and by default commands will run on the big cores (because they're faster), which is why you get "not counted" with nothing
#asahi-re · 2022-07-05 20:19
marcanuse taskset to restrict cmd to specific cores to get consistent results
#asahi-re · 2022-07-05 20:19
marcanTry this if you want to get counters for both CPU types: perf stat -e apple_firestorm_pmu/cycles/ -e apple_icestorm_pmu/cycles/ -e apple_firestorm_pmu/instructions/ -e apple_icestorm_pmu/instructions/ <cmd>
#asahi-re · 2022-07-05 20:16
marcan-a means perf the entire system, not just the command you specify
#asahi-re · 2022-07-05 20:16
marcanI think you're confused about what -a does
#asahi-re · 2022-07-05 20:13
marcanthere are separate perf counters for big/little so if you actually run on all CPUs you will not get consistent results
#asahi-re · 2022-07-05 20:12
marcanThe implementation is correct. This is just a quirk of big.LITTLE systems.
#asahi-re · 2022-07-03 06:39
marcanif the task floats between different core types, then perf events would be meaningless anyway
#asahi-re · 2022-07-03 06:38
marcan(in case he reads logs): you need to pin the task to a specific core type and specify it in perf, since the counters are different for ecores/pcores. This is standard for big.LITTLE systems.
#asahi-re · 2022-06-21 04:13
marcancan't really help you much beyond that; that code is quite fragile and breaks in odd cases... patches accepted ;)
#asahi-re · 2022-06-21 04:12
marcanVasyaPupkin[m]: could be it's trying to draw too much power. I've also seen that loop for random reasons before. Make sure you're charging the machine via another port and a proper sized charger.
#asahi-re · 2022-06-20 15:54
marcanpjakobsson: make sure you read our RE policy (in the topic) :)
#asahi-re · 2022-06-18 19:35
marcanboth, I believe
#asahi-re · 2022-06-18 18:12
marcanjannau: ah, thanks!
#asahi-re · 2022-06-18 17:10
marcan(I wish Apple just stopped encrypting this stuff)
#asahi-re · 2022-06-18 17:10
marcanUltimately those keys being public help a lot of causes, including verifiability of the boot chain.
#asahi-re · 2022-06-18 17:09
marcanRight. I don't endorse all that "fell of a truck" stuff, but if the end result is data that is in everyone's M1 anyway being published, I'm not going to say no to using it.
#asahi-re · 2022-06-18 17:03
marcanthen it doesn't have to care
#asahi-re · 2022-06-18 17:03
marcanneed to fix up Linux RTKit so it uses an always-safe sequence to bring up RTKit that works regardless of what shutdown mode a copro is in
#asahi-re · 2022-06-18 17:02
marcanI think I'm going to stick with that for now
#asahi-re · 2022-06-18 17:02
marcantbh though, the current "shut down DCP" solution is quite pretty, and better than prodding magic registers and having to have linux prod them back
#asahi-re · 2022-06-18 17:01
marcanso yeah, nice rabbit hole for someone to go down if they're bored
#asahi-re · 2022-06-18 17:01
marcan... it's x86. 80186.
#asahi-re · 2022-06-18 17:01
marcanwe do have firmare for that one
#asahi-re · 2022-06-18 17:01
marcan(since the HPD pin goes through it)
#asahi-re · 2022-06-18 17:00
marcanthough I bet it could be done with i2c shenanigans poking the dp2hdmi chip, but that's *another* layer of blind undocumented registers
#asahi-re · 2022-06-18 17:00
marcanbut I didn't find anything useful to solve the hotplug problem
#asahi-re · 2022-06-18 17:00
marcanI already reversed some of it, it's in proxyclient stuff
#asahi-re · 2022-06-18 17:00
marcanand I'd love to know what it does with those
#asahi-re · 2022-06-18 16:59
marcanalso, IIRC iBoot talks to some EPIC endpoints besides the iBoot/disp0 one
#asahi-re · 2022-06-18 16:59
marcanand also exactly what algorithm apple used to use for mode selection before they nixed it
#asahi-re · 2022-06-18 16:58
marcanthe DCP client side would be nice to find too
#asahi-re · 2022-06-18 16:57
marcanalso since SMC is always on, this is good for proving absence of backdoors and such

plus ›