]> git.baikalelectronics.ru Git - arm-tf.git/commit
fix(pmu): add sensible default for MDCR_EL2
authorBoyan Karatotev <boyan.karatotev@arm.com>
Wed, 26 Oct 2022 14:10:39 +0000 (15:10 +0100)
committerBoyan Karatotev <boyan.karatotev@arm.com>
Fri, 11 Nov 2022 12:14:53 +0000 (12:14 +0000)
commit7f8561985778cbe5cdc7d57984c818119e87adaf
treef19afb6a5ad790e73033500544574ed90f37646d
parent36d18c542e1a9c444fc50e955b793fcf1428465e
fix(pmu): add sensible default for MDCR_EL2

When TF-A is set to save and restore EL2 registers it initially zeroes
all of them so that it does not leak any information. However,
MDCR_EL2.HPMN of 0 is poorly defined when FEAT_HPMN0 is not implemented.
Set it to its hardware reset value so that lower ELs don't inherit a
wrong value.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I8055005ef9b6eaafefa13b62a0b41289079fdd23
lib/el3_runtime/aarch64/context_mgmt.c