isb\r
bx lr\r
\r
+ RVCT_ASM_EXPORT ArmGetPhysicalAddressBits\r
+ mrc p15, 0, r0, c0, c1, 4 ; MMFR0\r
+ and r0, r0, #0xf ; VMSA [3:0]\r
+ cmp r0, #5 ; >= 5 implies LPAE support\r
+ movlt r0, #32 ; 32 bits if no LPAE\r
+ movge r0, #40 ; 40 bits if LPAE\r
+ bx lr\r
+\r
END\r