]> git.baikalelectronics.ru Git - arm-tf.git/commit
cpus: denver: disable cycle counter when event counting is prohibited
authorVarun Wadekar <vwadekar@nvidia.com>
Sun, 24 May 2020 23:26:22 +0000 (16:26 -0700)
committerManish Pandey <manish.pandey2@arm.com>
Tue, 9 Jun 2020 19:54:29 +0000 (19:54 +0000)
commitc5c1af0db66fe09558f3158c5af3d5a7ca866140
tree20f0d1e6066bc1a136e41aea7fa7d44feb622cea
parent02383c28da9aedc215d336e512e29168056f3b79
cpus: denver: disable cycle counter when event counting is prohibited

The Denver CPUs implement support for PMUv3 for ARMv8.1 and expect the
PMCR_EL0 to be saved in non-secure context.

This patch disables cycle counter when event counting is prohibited
immediately on entering the secure world to avoid leaking useful
information about the PMU counters. The context saving code later
saves the value of PMCR_EL0 to the non-secure world context.

Verified with 'PMU Leakage' test suite.

 ******************************* Summary *******************************
 > Test suite 'PMU Leakage'
                                                                 Passed
 =================================
 Tests Skipped : 2
 Tests Passed  : 2
 Tests Failed  : 0
 Tests Crashed : 0
 Total tests   : 4
 =================================

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I3675e2b99b44ed23d86e29a5af1b496e80324875
lib/cpus/aarch64/denver.S