| 742ca230 | 19-Aug-2021 |
Chris Kay <chris.kay@arm.com> |
feat(amu): enable per-core AMU auxiliary counters
This change makes AMU auxiliary counters configurable on a per-core basis, controlled by `ENABLE_AMU_AUXILIARY_COUNTERS`.
Auxiliary counters can be
feat(amu): enable per-core AMU auxiliary counters
This change makes AMU auxiliary counters configurable on a per-core basis, controlled by `ENABLE_AMU_AUXILIARY_COUNTERS`.
Auxiliary counters can be described via the `HW_CONFIG` device tree if the `ENABLE_AMU_FCONF` build option is enabled, or the platform must otherwise implement the `plat_amu_topology` function.
A new phandle property for `cpu` nodes (`amu`) has been introduced to the `HW_CONFIG` specification to allow CPUs to describe the view of their own AMU:
``` cpu0: cpu@0 { ...
amu = <&cpu0_amu>; }; ```
Multiple cores may share an `amu` handle if they implement the same set of auxiliary counters.
AMU counters are described for one or more AMUs through the use of a new `amus` node:
``` amus { cpu0_amu: amu-0 { #address-cells = <1>; #size-cells = <0>;
counter@0 { reg = <0>;
enable-at-el3; };
counter@n { reg = <n>;
... }; }; }; ```
This structure describes the **auxiliary** (group 1) AMU counters. Architected counters have architecturally-defined behaviour, and as such do not require DTB entries.
These `counter` nodes support two properties:
- The `reg` property represents the counter register index. - The presence of the `enable-at-el3` property determines whether the firmware should enable the counter prior to exiting EL3.
Change-Id: Ie43aee010518c5725a3b338a4899b0857caf4c28 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 81e2ff1f | 25-May-2021 |
Chris Kay <chris.kay@arm.com> |
refactor(amu): detect architected counters at runtime
This change removes the `AMU_GROUP0_COUNTERS_MASK` and `AMU_GROUP0_MAX_COUNTERS` preprocessor definitions, instead retrieving the number of grou
refactor(amu): detect architected counters at runtime
This change removes the `AMU_GROUP0_COUNTERS_MASK` and `AMU_GROUP0_MAX_COUNTERS` preprocessor definitions, instead retrieving the number of group 0 counters dynamically through `AMCGCR_EL0.CG0NC`.
Change-Id: I70e39c30fbd5df89b214276fac79cc8758a89f72 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 1fd685a7 | 25-May-2021 |
Chris Kay <chris.kay@arm.com> |
refactor(amu): conditionally compile auxiliary counter support
This change reduces preprocessor dependencies on the `AMU_GROUP1_NR_COUNTERS` and `AMU_GROUP1_COUNTERS_MASK` definitions, as these valu
refactor(amu): conditionally compile auxiliary counter support
This change reduces preprocessor dependencies on the `AMU_GROUP1_NR_COUNTERS` and `AMU_GROUP1_COUNTERS_MASK` definitions, as these values will eventually be discovered dynamically.
In their stead, we introduce the `ENABLE_AMU_AUXILIARY_COUNTERS` build option, which will enable support for dynamically detecting and enabling auxiliary AMU counters.
This substantially reduces the amount of memory used by platforms that know ahead of time that they do not have any auxiliary AMU counters.
Change-Id: I3d998aff44ed5489af4857e337e97634d06e3ea1 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| edea5c12 | 20-Feb-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
aarch32: Fix multiple bugs in amu_helpers.S
AArch32 uses odd-even pairs when passing 64-bit arguments to functions. For example in `amu_group0_cnt_write_internal()` the second argument is a uint64_
aarch32: Fix multiple bugs in amu_helpers.S
AArch32 uses odd-even pairs when passing 64-bit arguments to functions. For example in `amu_group0_cnt_write_internal()` the second argument is a uint64_t which is passed in r2 and r3.
In `amu_group1_set_evtype_internal()` the value that needs to be written to the system register is in r1 not in r0.
Change-Id: I20196268fdb1dc9ef6c4ebe61e761fba9623b3f2 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
show more ...
|
| b6eb3932 | 28-Nov-2017 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
AMU: Add hooks to save/restore AMU context
On some systems, the AMU counters might reset to 0 when a CPU powerdown happens. This behaviour conflicts with the intended use-case of AMU as lower ELs a
AMU: Add hooks to save/restore AMU context
On some systems, the AMU counters might reset to 0 when a CPU powerdown happens. This behaviour conflicts with the intended use-case of AMU as lower ELs are only expected to see non-decreasing counter values.
Change-Id: If25519965d4e6e47e09225d0e732947986cbb5ec Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
show more ...
|