ACPI Device Performance States
This page captures some of the new proposals to ACPI to support device performance states.
The changes have been prototyped with Linux kernel DVFS framework and have not yet been discussed on public forums yet.
Device Performance States
Device performance states support is implemented through two optional objects
Device Performance Control Object ( _DPC )
Device Performance States Object ( _DPS )
If the platform and device support multiple performance states then the above two objects should be implemented for the device.
Device Performance Control Object ( _DPC )
_DPC provides the binding to place the device in a specific performance state along with various metadata.
Arguments:
None
Returns:
A package containing performance control information for the device.
Package
{
NumEntries, // Integer
Revision, // Integer
NominalPerformance, // Integer or Buffer (Resource Descriptor)
NominalFrequency, // Integer or Buffer (Resource Descriptor)
DesiredPerformance, // Buffer (Resource Descriptor)
DeliveredPerformance, // Buffer (Resource Descriptor)
SustainedPerformance, // Buffer (Resource Descriptor)
PerformanceDomain, // Integer or Buffer (Resource Descriptor)
})
Element | Object Type | Description |
---|---|---|
Num Entries | Integer | Number of entries in the _DPC package |
Revision | Integer | Revision number |
Nominal Performance | Integer or Register Buffer | Performance level value that corresponds to the highest sustained performance level without considering any contraints. |
Nominal Frequency | Integer or Register Buffer | Base frequency (KHz) corresponding to the nominal performance level. |
Desired Performance | Register Buffer | Register to write the desired performance level. |
Delivered Performance | Register Buffer | Register to read to get the current delivered performance level. |
Sustained Performance | Register Buffer | This is an optional object providing OSPM the current maximum sustained performance level taking into account all known external constraints (power budgeting, thermal constraints, power source, etc.). A notify event will generated by the platform if the sustained performance changes. |
Performance Domain | Integer or Register Buffer | This is an optional object providing the performance domain identifier. OSPM can use this to coordinate performance states transition for devices in same performance domain. |
All _DPC registers can be in PCC, System Memory, System IO, or Functional Fixed Hardware address spaces.
Device Performance States Object ( _DPS )
_DPS defines all of the supported device performance states for the device.
Arguments:
None
Returns:
A variable-length Package containing a list of performance states sub-packages as described below
Package
{
P0,
P1,
...
Pn
})
Each performance state sub-Package contains the elements described below:
|
|
---|---|
Performance Level | Performance level provided on an abstract integer scale. The implementation can decide the scale it represents, it can be actual frequencies or in percentage of the maximum performance domain etc. However, the scales must be linear. |
Power | Power dissipation in Milliwatts |
Latency | Performance state transition latency in microseconds |
Example
Device(DDR1)
{
Name (_HID, "LIN0002") // _HID: Hardware ID
Name (_UID, One) // _UID: Unique ID
Method (_STA)
{
Return(0xF)
}
// Device performance states
Name (_DPS, Package()
{
/* performance level(abstract), power cost(mW), transition latency(us) */
Package(){25, 1800, 0},
Package(){100, 1800, 0},
Package(){750, 1800, 0}
})
Name (_DPC, Package ()
{
// Num Entries
9,
// Revision
0,
// Nominal Performance (abstract scale) - Highest sustained performance level
750,
// Nominal Frequency (KHz)
750000,
// Desired Performance Register
ResourceTemplate(){Register(FFixedHW, 0, 0, 0xFFFFFFFFC200000E)},
// Delivered Performance Register
ResourceTemplate(){Register(FFixedHW, 0, 0, 0xFFFFFFFFC200000F)},
// Sustained Performance Level Register (Optional) - Current max. perf considering all constraints
ResourceTemplate(){Register(FFixedHW, 0, 0, 0xFFFFFFFFC2000011)},
// Performance Domain Index (Optional)
1,
})
}
Linux Kernel Prototype
The changes are currently in the following merge request
https://gitlab.com/LinaroLtd/clientpc/linux/-/merge_requests/10
It contains following changes
Prototype implementation of device performance state framework
An example implementation of I.MX DDR DevFreq driver with ACPI device performance states
Bug fixes to Linux OPP framework
Note: The prototype uses a specific FFH address space for SMC calls and is not part of ARM FFH spec yet.