ARM SPE on Nio 12L

Hi,
I am actually trying to get the Statistical Profiling Extension (SPE) to run on the NIO 12L with Ubuntu. The Cortex-A78 cores should have this feature (the corresponding bits in the ID_AA64DFR0_EL1 register are also set).

However, apart from passing kpti=off to the kernel and loading the corresponding kernel module (arm_spe_pmu), SPE must be also enabled in the Firmware, so I tried to add a SPE_PMU entry to the device tree, since arm_spe_0 is not available in /sys/bus/event_source/devices/. I simply used the examples given here: https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/spe-pmu.txt

So the devicetree entry looks like:

spe-pmu {
compatible = “arm,statistical-profiling-extension-v1”;
interrupts = <0x01 0x05 0x04>;
interrupt-parent = <0x01>;
};

The board boots correctly, however dmesg now shows arm_spe_pmu spe-pmu: IRQ index 0 not found during boot, which suggests, that the settings I used were somehow wrong or incomplete. Do I have do modify anything else in the devicetree, to get SPE enabled?

Edit: Since the genio1200-radxa-nio-12l.dtb devicetree uses PPI partitions and the interrupt field needs a fourth field (https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/arm%2Cgic-v3.txt), that links to the partition of the big cores, I added the phandle of the PPI partition of the big cores (0x16) to the Interrupt field, unfortunately the board then does not start anymore. I can see the grub entry via UART but then the screen is blank.

spe-pmu {
compatible = “arm,statistical-profiling-extension-v1”;
interrupts = <0x01 0x05 0x04 0x16>;
interrupt-parent = <0x01>;
};

OK, it seems, that it is not simply done by adding a SPE node in the device tree, the firmware has to be adapted as well.
When I add a SPE-node to the device tree and assign it to the interrupt partition of the cortex a78, the device does not boot. I assume that the problem is similar to the problem stated here (https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/).

As far as I understand now, the feature has to be activated in the firmware. Any help on this issue would be really great.

I cam’t really help, but I’m seeing the same basic issue in the 5B+. I can add the arm_spe_pmu module okay, and it loads, but the interrupt is missing, and therefore, the event sources aren’t set up. We really need someone who knows the hardware to guide us here.

I’ll try these on the 5B+ and see if they yield insights.