arm-trusted-firmware/plat/common
dp-arm 04c1db1e57 PSCI: Decouple PSCI stat residency calculation from PMF
This patch introduces the following three platform interfaces:

* void plat_psci_stat_accounting_start(const psci_power_state_t *state_info)

  This is an optional hook that platforms can implement in order
  to perform accounting before entering a low power state.  This
  typically involves capturing a timestamp.

* void plat_psci_stat_accounting_stop(const psci_power_state_t *state_info)

  This is an optional hook that platforms can implement in order
  to perform accounting after exiting from a low power state.  This
  typically involves capturing a timestamp.

* u_register_t plat_psci_stat_get_residency(unsigned int lvl,
	const psci_power_state_t *state_info,
	unsigned int last_cpu_index)

  This is an optional hook that platforms can implement in order
  to calculate the PSCI stat residency.

If any of these interfaces are overridden by the platform, it is
recommended that all of them are.

By default `ENABLE_PSCI_STAT` is disabled.  If `ENABLE_PSCI_STAT`
is set but `ENABLE_PMF` is not set then an alternative PSCI stat
collection backend must be provided.  If both are set, then default
weak definitions of these functions are provided, using PMF to
calculate the residency.

NOTE: Previously, platforms did not have to explicitly set
`ENABLE_PMF` since this was automatically done by the top-level
Makefile.

Change-Id: I17b47804dea68c77bc284df15ee1ccd66bc4b79b
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2017-02-13 14:33:06 +00:00
..
aarch32 AArch32: Miscellaneous fixes in the AArch32 code 2016-12-01 11:02:51 +00:00
aarch64 Fix comment of plat_reset_handler stub 2016-10-25 01:21:01 +09:00
tbbr tbbr: Simplify conditional 2017-01-31 10:55:04 +00:00
plat_bl1_common.c FWU: Pass client cookie to FWU_SMC_UPDATE_DONE 2015-12-15 14:33:25 +00:00
plat_gic.c Refactor fvp gic code to be a generic driver 2014-07-09 16:36:39 +01:00
plat_gicv2.c Prepare platforms to use refactored ARM GIC drivers 2015-12-09 09:56:53 +00:00
plat_gicv3.c Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
plat_psci_common.c PSCI: Decouple PSCI stat residency calculation from PMF 2017-02-13 14:33:06 +00:00