target/arm: Correctly implement Feat_DoubleLock
commitf94a6df5dd6a7d30436c551b16633767e382d9a0
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 7 Jul 2022 10:38:36 +0000 (7 11:38 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 7 Jul 2022 10:38:36 +0000 (7 11:38 +0100)
tree33f53bfd7c1aa88f32a3421834d21cbab63ef564
parent09754ca867f42d26c5f65350b4c08e958ec9a8da
target/arm: Correctly implement Feat_DoubleLock

The architecture defines the OS DoubleLock as a register which
(similarly to the OS Lock) suppresses debug events for use in CPU
powerdown sequences.  This functionality is required in Arm v7 and
v8.0; from v8.2 it becomes optional and in v9 it must not be
implemented.

Currently in QEMU we implement the OSDLR_EL1 register as a NOP.  This
is wrong both for the "feature implemented" and the "feature not
implemented" cases: if the feature is implemented then the DLK bit
should read as written and cause suppression of debug exceptions, and
if it is not implemented then the bit must be RAZ/WI.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.h
target/arm/debug_helper.c