Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | 7 (Reason code) |
Exit | |
---|---|
R0 | Current CPU speed, as an index |
The purpose of this call is to read the current CPU speed, as an index into the list of available speeds. To instead read the CPU speed as a MHz value, use Portable_Speed2 0.
Due to hardware restrictions or for performance reasons, most systems will only support a limited number of CPU clock rates. Portable_Speed2 4, Portable_Speed2 5, and Portable_Speed2 6 allow the user to enumerate the list of available clock rates. Index 0 is always the slowest available speed, and (return value of Portable_Speed2 4)-1 is always the highest available speed.
There is no direct method available to set the CPU speed to a desired value. Instead programs must use Portable_Speed2 2 (or Portable_Speed2 8) to set the desired ‘slow’ and ‘fast’ speeds, and then Portable_Speed to switch to the desired speed.