Hi, is there a way on ARM to find out on which physical CPU I'm currently running on?
I need this information for interrupt routing. (In Jailhouse) GIC's ITARGETSR expects physical CPU IDs. Of course I could statically provide this information, but I'd like to find it out during runtime. Reading the Multi Processor Affinity Register (MPIDR) [1] reports the "CPU ID". However, reading this register as a Jailhouse inmate always reports 0 for the primary boot CPU, regardless of the real physical CPU. Let's assume I have a quad-core system (e.g. Jetson TK1) and I assign the cpu_mask 0xc (phyical CPUs 2 and 3) to a cell, then reading MPIDR reports 0 for phys. CPU 2 and 1 for phys CPU 3. This means that I'm able to logically differentiate between CPUs, but I'm not able to dynamically reconfigure IRQ routing, as I need physical CPU IDs. Thanks Ralf PS: I guess this might also be the reason why we always assign "reg = <0x0>;" in Linux Inmate DTs to primary boot CPUs and the real physical IDs, e.g., "reg = <0x3>;" to secondary CPUs. (cf. configs/dts/inmate-jetson-tk1.dts), right? BTW: Who actually fills MPIDR? Do reads trap to the hypervisor? If not, why does the hardware fill it with some sort of 'virtual' CPU IDs? [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388e/CIHEBGFG.html -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
