#
✕ nick:nickchan
#asahi-dev · 2025-03-04 03:45
nickchanwould like to have some feedback on A7-A11, T2 CPU PMU support https://lore.kernel.org/asahi/20250228-apple-cpmu-v5-0-9e124cd28ed4@gmail.com/
#asahi-dev · 2025-03-03 23:57
nickchanat least according to adt /arm-io/pmgr for t6000 it's also cluster->base + 0x70000
#asahi-dev · 2025-03-03 23:42
nickchanand now cpu_pstate_latencies and such should report pstate 3 and 4 being the same
#asahi-dev · 2025-03-03 23:41
nickchanthe last one doesn't actually exist on a11 but i think it exists in m1 as the strides becomes 0x40 in m2 which probably means apple run out of space
#asahi-dev · 2025-03-03 23:40
nickchanwrite64(cluster->base + 0x70000 + 0x18 + 3 * 0x20, read64(cluster->base + 0x70000 + 0x18 + 4 * 0x20))
#asahi-dev · 2025-03-03 23:40
nickchanwrite64(cluster->base + 0x70000 + 0x10 + 3 * 0x20, read64(cluster->base + 0x70000 + 0x10 + 4 * 0x20))
#asahi-dev · 2025-03-03 23:40
nickchanwrite64(cluster->base + 0x70000 + 0x8 + 3 * 0x20, read64(cluster->base + 0x70000 + 0x8 + 4 * 0x20))
#asahi-dev · 2025-03-03 23:40
nickchanwrite64(cluster->base + 0x70000 + 0x0 + 3 * 0x20, read64(cluster->base + 0x70000 + 0x0 + 4 * 0x20))
#asahi-dev · 2025-03-03 23:40
nickchanso like to overwrite pstate 3 with pstate 4
#asahi-dev · 2025-03-03 23:39
nickchanoff includes 0x0, 0x8, 0x10, 0x18 it covers the entire pstate definitions
#asahi-dev · 2025-03-03 23:38
nickchanchaos_princess: cluster->base + 0x70000 + off + pstate * 0x20
#asahi-dev · 2025-03-03 11:37
nickchanchaos_princess: did you ever got around to poking voltage registers on t8103?
#asahi-dev · 2025-03-03 07:07
nickchanmake loading sep firmware work from Linux I mean
#asahi-dev · 2025-03-03 07:06
nickchancan probably make it work by setting up a shellcode firmware loading interface from the preloader stages
#asahi-dev · 2025-03-03 07:05
nickchanbut SEP interface is unstable
#asahi-dev · 2025-03-03 07:05
nickchanat least I hope I don't have to shove seprom fwload race into Linux
#asahi-dev · 2025-03-03 06:59
nickchan(kernel patching mostly for assisting with dynamic tracing)
#asahi-dev · 2025-03-03 06:58
nickchanthat stuff doesn't belong to here :)
#asahi-dev · 2025-03-03 06:58
nickchanand on a7-a11, t2 there will always be preloader stages before m1n1, there are some stuff like kernel and iboot patching, SEP ROM firmware load races that require binary RE, no way around it, some parts even call hardcoded function pointers in SecureROM to setup a USB stack while subject to strict size limitations
#asahi-dev · 2025-03-02 18:04
nickchanno way that it's actually going to be compatible with t7000 display pipe
#asahi-dev · 2025-03-02 17:58
nickchanat least the mipi part is the same
#asahi-dev · 2025-03-02 17:57
nickchanneither touchbar_bad_apple or touchbar_rainbow worked on iphone x after fixing dart and the addresses so apple,h7-display-pipe is probably a very bad compatible name but so be it
#asahi-dev · 2025-03-02 11:27
nickchanfetch-config, diag-config etc
#asahi-dev · 2025-03-02 11:26
nickchanbut the dart-jpeg0 still worked fine without them
#asahi-dev · 2025-03-02 11:26
nickchanthere's a bunch of tunables in adt that I can correspond to registers by looking at dart-disp0 as setup by iboot
#asahi-dev · 2025-03-02 11:23
nickchan(with invalid ttbr and translation enabled)
#asahi-dev · 2025-03-02 11:22
nickchanprobably should still bypass to nowhere just in case
#asahi-dev · 2025-03-02 11:18
nickchanwhen ttbr is not valid
#asahi-dev · 2025-03-02 11:18
nickchanTTY> Exception: IRQ (from EL1h) die: 0 type: 1 num: 197 mpidr: 80000000 cnt: 82b8a532b
#asahi-dev · 2025-03-02 11:18
nickchangot it
#asahi-dev · 2025-03-02 10:54
nickchansven: don't think generating interrupts are a good thing as it creates bogus kernel logs id rather bypass to invalid
#asahi-dev · 2025-03-02 10:45
nickchani probably should put the hw docs somewhere
#asahi-dev · 2025-03-02 10:35
nickchanI need to see if that generate interrupts
#asahi-dev · 2025-03-02 10:35
nickchansven: TTBR_VALID does exist
#asahi-dev · 2025-03-02 10:32
nickchanlower 32-bit of the address space
#asahi-dev · 2025-03-02 10:32
nickchantechnically setting it to 0 would be identity but... there's nothing in the lower 32-bit so
#asahi-dev · 2025-03-02 10:31
nickchanreset value of that register is 0x8080808, i.e. bypass to 0x800000000 for all 4 streams
#asahi-dev · 2025-03-02 10:30
nickchansven: there is a register holding bit[35:32] of the offset for each stream so just set that register to something like 0
#asahi-dev · 2025-03-02 10:19
nickchancloses thing to blocked domain would be bypass with offset to invalid
#asahi-dev · 2025-03-02 10:19
nickchansven: bypass when translate disabled in tcr
#asahi-dev · 2025-03-02 09:30
nickchanand i also figured out a11 dart but only in translation mode, all of these darts are 4k page size though, so there should never be a need to go into bypass mode
#asahi-dev · 2025-03-02 09:28
nickchanmore specifically, the dart is either translating or bypassing, there's no "off"
#asahi-dev · 2025-03-02 09:28
nickchanand iova 0xffffffff -> pa 0x8ffffffff
#asahi-dev · 2025-03-02 09:27
nickchanfor example in bypass iova 0x0 -> pa 0x800000000
#asahi-dev · 2025-03-02 09:26
nickchanat least, this is true when I tried it with the jpeg block
#asahi-dev · 2025-03-02 09:26
nickchantranslation mode
#asahi-dev · 2025-03-02 09:26
nickchanand pretend that it only support translation
#asahi-dev · 2025-03-02 09:25
nickchansven: so I did figure out the dart on a7-a10, there's a sort of bypass mode but what happens in that mode is that translation still happen and the iova = (pa & 0xffffffff), it really is not identity mapping though, so I guess I should just ignore the bypass support?
#asahi-dev · 2025-02-28 08:35
nickchanand by mostly compatible I mean I can read the rtc counter just fine using m1n1's spmi.py
#asahi-dev · 2025-02-28 08:35
nickchanmaybe I should take these compatibles less seriously

plus ›