On 2 June 2015 at 10:25, Peter Crosthwaite <peter.crosthwa...@xilinx.com> wrote: > On Mon, Jun 1, 2015 at 11:44 AM, Peter Maydell <peter.mayd...@linaro.org> > wrote: >>> +static void cortex_r5_initfn(Object *obj) >>> +{ >>> + ARMCPU *cpu = ARM_CPU(obj); >>> + >>> + set_feature(&cpu->env, ARM_FEATURE_V7); >>> + set_feature(&cpu->env, ARM_FEATURE_THUMB_DIV); >> >> Should we have a feature bit for "this is an R profile >> core" ? For instance THUMB_DIV is mandatory for v7R >> and so we could infer it in cpu realize.
> So is this best done as rename of ARM_FEATURE_MPU? We can still set R > profile for ARMv5 MPU capable procs in much the same way we do with > "EL2" and "EL3" for preV8. So I originally suggested this because I read the bit in the R5 TRM that says that the MPU is optional. But looking more closely, I think that we would handle that by defining FEATURE_MPU but 0 regions. Bear in mind that FEATURE_MPU applies to M profile cores as well. So if we find ourselves saying "MPU but not M profile" a lot that might justify an R feature bit... But for now we don't need to add it I guess. -- PMM