class PowerLevel
Defined at line 41 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Kernel representation of `zx_processor_power_level_t` with useful accessors and option support.
Public Members
static const uint64_t kUserProcessingRateScale
Public Methods
ProcessingRate ToProcessingRate (uint64_t processing_rate)
TODO(eieio): Normalize relative to the max processing rate of all power levels.
Defined at line 58 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t FromProcessingRate (ProcessingRate processing_rate)
Defined at line 61 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void PowerLevel ()
Defined at line 65 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void PowerLevel (uint8_t level_index, const zx_processor_power_level_t & level)
Defined at line 66 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Type type ()
Power level type. Idle and Active power levels are orthogonal, that is, an entity may be idle
while keepings its active power level unchanged. This means that the actual power level of
an entity should be determined by the tuple
<Idle
Power Level*, Active Power Level>, where if
`Idle Power Level`is absent then that means that the entity is active and the active power
level should be used.
This situation happens for example, when a CPU transitions from an active power level A
(which may be interpreted as a known OPP or P-State) into an idle state, such as suspension,
idle thread or even powering it off.
Defined at line 91 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
ProcessingRate processing_rate ()
Processing rate when this power level is active. This is key to determining the available
bandwidth of the entity.
Defined at line 95 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t power_coefficient_nw ()
Relative to the system power consumption, determines how much power is being consumed at this
level. This allows determining if this power level should be a candidate when operating under
a given energy budget.
Defined at line 100 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t power_cost_nw_per_rate ()
Power cost of this power level, normalized by the rate of this power level.
Defined at line 103 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
ControlInterface control ()
ID of the interface handling transitions for TO this power level.
Defined at line 106 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t control_argument ()
Argument to be interpreted by the control interface in order to transition to this level.
The control interface is only aware of this arguments, and power levels are identified by
this argument.
Defined at line 112 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
bool TargetsCpus ()
This level may be transitioned in a per cpu basis, without affecting other entities in the
same power domain.
Defined at line 116 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
bool TargetsPowerDomain ()
This level may be transitioned in a per power domain basis, that is, all other entities in
the power domain will be transitioned together.
This means that underlying hardware elements are share and it is not possible to transition a
single member of the power domain.
Defined at line 125 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::string_view name ()
Name used to identify this power level, for diagnostic purposes.
Defined at line 130 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint8_t level ()
Power Level as understood from the original model perspective.
Defined at line 133 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Enumerations
enum Type
| Name | Value |
|---|---|
| kIdle | 0 |
| kActive | 1 |
Defined at line 43 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h