[Top][All Lists]

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

Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on

From: Peter Maydell
Subject: Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type
Date: Mon, 13 Jun 2016 11:10:59 +0100

On 13 June 2016 at 10:43, Peter Maydell <address@hidden> wrote:
> On 13 June 2016 at 10:08,  <address@hidden> wrote:
>> +/*
>> + * based on the the cpu type emulated at runtime.
>> + */
>> +static uint32_t target_page_bits;
> The CPU page size is not specific to the 'virt' board, so this
> is the wrong place to do this. You should identify the
> page size in arm_cpu_realizefn() based on the set of feature
> bits the CPU has: anything with ARM_FEATURE_V7 has a 4K page
> table (this includes a lot of 32-bit CPUs).

Actually that should be "with ARM_FEATURE_V7 and not
ARM_FEATURE_MPU", or we'll break the PMSA code.

Note that you'll also need to handle systems where the
different CPUs in it disagree about the preferred target
page size -- the xlnx-ep108 board can have both
Cortex-A53 (prefers 4K) and Cortex-R5 (prefers 1K) CPUs in it.
"Use the smallest value required by any CPU on the board"
is probably the best approach.

-- PMM

reply via email to

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