OSDN Git Service

target/arm: Correct handling of PMCR_EL0.LC bit
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Feb 2020 17:51:12 +0000 (17:51 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 21 Feb 2020 16:07:01 +0000 (16:07 +0000)
commit62d96ff48510f4bf648ad12f5d3a5507227b026f
treeda22f0a73a142feb3004de737b575a1a11c9c80f
parenta1ed04dd79aabb9dbeeb5fa7d49f1a3de0357553
target/arm: Correct handling of PMCR_EL0.LC bit

The LC bit in the PMCR_EL0 register is supposed to be:
 * read/write
 * RES1 on an AArch64-only implementation
 * an architecturally UNKNOWN value on reset
(and use of LC==0 by software is deprecated).

We were implementing it incorrectly as read-only always zero,
though we do have all the code needed to test it and behave
accordingly.

Instead make it a read-write bit which resets to 1 always, which
satisfies all the architectural requirements above.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200214175116.9164-18-peter.maydell@linaro.org
target/arm/helper.c