#asahi-dev · 2025-01-14 07:24
nickchanbecause the CPMU on these can't deliever a FIQ, the fiq handler should not touch the PMC registers#asahi-dev · 2025-01-14 07:23
nickchanThis also means the current AIC FIQ handler is wrong for A7-A10#asahi-dev · 2025-01-14 07:22
nickchanI really hope I can get AIC mode to work because otherwise it's to insert an IMP DEF hack inside Linux's sync exceptio handler#asahi-dev · 2025-01-14 07:21
nickchanthere's quite a bit of hw differences#asahi-dev · 2025-01-14 07:21
nickchanLarstiQ: for those device themselves#asahi-dev · 2025-01-14 07:19
nickchanLarstiQ: to get performance counters working properly in Linux#asahi-dev · 2025-01-14 07:19
nickchanmy experiments https://github.com/asdfugil/m1n1-idevice/blob/cpmu/proxyclient/experiments/pmi.py#asahi-dev · 2025-01-14 07:16
nickchanthere is no hypervisor however so a lot more blind probing#asahi-dev · 2025-01-14 07:14
nickchanthese devices are lot cheaper than macs :)#asahi-dev · 2025-01-14 07:12
nickchanLarstiQ: i have a lot #asahi-dev · 2025-01-14 07:11
nickchanbut only a11 can deliver the fiq#asahi-dev · 2025-01-14 07:11
nickchanall of a7-a11 can deliever the sync exception#asahi-dev · 2025-01-14 06:26
nickchaneven as IMPDEF delivering a data abort doesn't sound right to me however#asahi-dev · 2025-01-14 06:19
nickchanby generating a sync exception I mean it is generated at the expected time, where the counter reaches 48 bit#asahi-dev · 2025-01-14 06:16
nickchanffs i don't want to add impdef aborts into linux#asahi-dev · 2025-01-14 06:15
nickchanExternal abort type. This bit can provide an IMPLEMENTATION DEFINED classification of External aborts.#asahi-dev · 2025-01-14 06:15
nickchanEA, bit [9]#asahi-dev · 2025-01-14 06:13
nickchandata abort exception too#asahi-dev · 2025-01-14 06:13
nickchanam pretty sure that's illegal#asahi-dev · 2025-01-14 06:13
nickchan16-bit instruction trapped and ISV is 0#asahi-dev · 2025-01-14 06:12
nickchanand HALT mode halts the CPU as expected#asahi-dev · 2025-01-14 06:12
nickchanFIQ mode is RES0 so probably not supported#asahi-dev · 2025-01-14 06:11
nickchanAIC mode can be set but does nothing#asahi-dev · 2025-01-14 06:11
nickchanPMI mode generates a sync exception with a ESR of 0x94000200#asahi-dev · 2025-01-14 06:11
nickchanokay a8x cpmu is getting even more interesting#asahi-dev · 2025-01-12 06:25
nickchan<https://github.com/asdfugil/linux-apple/blob/bits/060-pmu/drivers/perf/apple_m1_cpu_pmu.c> my newest code Note a7-a10 don't use PMCR0_IMODE_FIQ and i will figure that out later#asahi-dev · 2025-01-12 06:23
nickchanalas the pmu driver hardcodes every details of the pmu, unlike, say, the pmgr power domain drivers#asahi-dev · 2025-01-11 19:02
nickchanand uses PMCR0_IMODE_AIC instead of PMCR0_IMODE_FIQ#asahi-dev · 2025-01-11 19:02
nickchana7-a10's CPU PMU does not have the interrupt fired via FIQ#asahi-dev · 2025-01-11 19:01
nickchan appearently#asahi-dev · 2025-01-11 13:21
nickchanso there's no all instruction hw event#asahi-dev · 2025-01-11 13:21
nickchanand T32 instructions has another pmu event#asahi-dev · 2025-01-11 13:20
nickchanokay here's a problem it turns out that A32 and A64 instructions uses different pmu events#asahi-dev · 2025-01-11 13:06
nickchanwip code will commit properly later https://github.com/asdfugil/linux-apple/blob/tests/pmu/drivers/perf/apple_m1_cpu_pmu.c #asahi-dev · 2025-01-11 12:49
nickchanadded A32 EL0 counting support in m1_pmu_configure_counter() but numbers on A7 still seems off (A8-A9) seems normal#asahi-dev · 2025-01-11 11:56
nickchanand I probably should check out what happens with A32 EL0...#asahi-dev · 2025-01-11 11:29
nickchan- the available events and affinities are different#asahi-dev · 2025-01-11 11:29
nickchan- a7 - a9 has 8 counters, a10-m1 has 10 counters#asahi-dev · 2025-01-11 11:28
nickchan- overall pmu logic is same all the way back to a7#asahi-dev · 2025-01-11 11:28
nickchanin summary:#asahi-dev · 2025-01-11 10:24
nickchanit can report instructions and cycles so it works#asahi-dev · 2025-01-11 10:24
nickchana7 still has 8 counters#asahi-dev · 2025-01-11 10:11
nickchana10 already has 10 counters#asahi-dev · 2025-01-11 10:11
nickchana9 has 8 counters only#asahi-dev · 2025-01-11 09:16
nickchanokay got perf stat to work#asahi-dev · 2025-01-11 09:09
nickchannevermind I will just redefine m1_pmu_get_event_idx for every table#asahi-dev · 2025-01-11 09:05
nickchanokay no I can't stash the table in the driver data of cpupmu->plat_device #asahi-dev · 2025-01-11 08:30
nickchansomehow#asahi-dev · 2025-01-11 08:30
nickchannow I need a way to test the pmu#asahi-dev · 2025-01-11 08:09
nickchanokay that worked