qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [Qemu-devel] [PATCH 02/13] arm: Add support for M profile


From: Peter Maydell
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH 02/13] arm: Add support for M profile CPUs having different MMU index semantics
Date: Tue, 30 May 2017 14:56:39 +0100

On 2 May 2017 at 23:23, Alistair Francis <address@hidden> wrote:
> On Tue, Apr 25, 2017 at 5:06 AM, Peter Maydell <address@hidden> wrote:
>> The M profile CPU's MPU has an awkward corner case which we
>> would like to implement with a different MMU index.
>>
>> We can avoid having to bump the number of MMU modes ARM
>> uses, because some of our existing MMU indexes are only
>> used by non-M-profile CPUs, so we can borrow one.
>> To avoid that getting too confusing, clean up the code
>> to try to keep the two meanings of the index separate.
>>
>> Instead of ARMMMUIdx enum values being identical to core QEMU
>> MMU index values, they are now the core index values with some
>> high bits set. Any particular CPU always uses the same high
>> bits (so eventually A profile cores and M profile cores will
>> use different bits). New functions arm_to_core_mmu_idx()
>> and core_to_arm_mmu_idx() convert between the two.
>>
>> In general core index values are stored in 'int' types, and
>> ARM values are stored in ARMMMUIdx types.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>
> This looks ok to me. I'm a little worried it will make SMMU or some
> ARMv9 (or whatever the next thing is) work more complicated as we have
> this.

Mmm, that's always a risk, but I think it will be pretty
easy to undo this if we need to.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]