class PowerLevel
Defined at line 91 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, uint64_t max_processing_rate)
Normalizes an integer processing rate relative to the maximum rate.
Defined at line 106 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t FromProcessingRate (ProcessingRate processing_rate, uint64_t max_processing_rate)
Defined at line 113 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void PowerLevel ()
Defined at line 118 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void PowerLevel (uint8_tlevel_index,const ProcessorPowerLevel &level,uint64_tmax_processing_rate)
Defined at line 119 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 155 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 159 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 164 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 167 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 170 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 176 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 180 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 189 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 194 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 197 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Enumerations
enum Type : _Bool
| Name | Value | Comments |
|---|---|---|
| kIdle | 0 |
Entity is not eligible for active work. |
| kActive | 1 |
Entity is eligible for work, but the rate at which work is completed is determined by the |
Defined at line 93 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h