Detecting RPi4 programatically
Posted: Mon Sep 09, 2019 11:29 am
Hi,
Is it possible to detect if an AArch64 image is running on an RPi3 or on an RPi4?
I have a feeling that I saw something similar here, using an ARM system register and comparing it's value against some magic constants. But no matter how hard I try, I simply can't find that post. It would help if I could remember something specific, but unfortunately I don't. Now I'm curious if it was just wishful dreaming on my part.
What came into my mind is that RPi4 can use a lot more memory than the RPi3. Maybe ID_AA64MMFR0 reports a wider memory bus on A72? Or is there any other system register that differs for sure?
Thanks
bzt
Is it possible to detect if an AArch64 image is running on an RPi3 or on an RPi4?
I have a feeling that I saw something similar here, using an ARM system register and comparing it's value against some magic constants. But no matter how hard I try, I simply can't find that post. It would help if I could remember something specific, but unfortunately I don't. Now I'm curious if it was just wishful dreaming on my part.
What came into my mind is that RPi4 can use a lot more memory than the RPi3. Maybe ID_AA64MMFR0 reports a wider memory bus on A72? Or is there any other system register that differs for sure?
Thanks
bzt