zx_system_create_processor_power_level_transition_handler

Summary

Provides the kernel with a handle to a port where the scheduler can request power level transitions for individual power domains given a control interface.

This means for a specified interface, the provided control arguments will be provided such that the handler can execute the transition according to the power level information provided to the kernel.

Declaration

#include <zircon/syscalls-next.h>

zx_status_t zx_system_create_processor_power_level_transition_handler(
    zx_handle_t resource,
    uint64_t options,
    zx_handle_t* out_port);

Description

Enables energy-aware scheduling by providing the kernel with a mechanism for requesting OPP transitions. When the port is attached and the communication initiated the kernel will queue ZX_PKT_TYPE_OPP_TRANSITIONfor individual power domain transitions. At any point, there will be no more than a single queued transition for a power domain.

The other half of this operation, is acknowleding that such operation took place through zx_system_set_performance_info with ZX_POWER_DOMAIN_OPP_TRANSITION as a topic, more details in zx_system_set_performance_info documentation.

If the created port handle out_port is closed, then the kernel will operate without the ability to transitoin OPPs, that is, closing the handle is equivalent to "dettaching" the port.

resource must be of ZX_RSRC_KIND_SYSTEM kind and ZX_RSRC_SYSTEM_CPU_BASE base.

options must be 0.

control_interface tells the scheduler that this OPP trasition handler will execute requests for that interface.

out_port must ve a valid pointer. On success provides

Rights

resource must be handle with at least the following rights:

  • ZX_RIGHT_WRITE

Return value

On success ZX_OK will be returned and out_port will point to a new handle with the following rights:

  • ZX_RIGHT_TRANSFER
  • ZX_RIGHT_READ
  • ZX_RIGHT_WAIT

Errors

ZX_ERR_BAD_HANDLE if resource is not a valid handle.

ZX_ERR_WRONG_TYPE if resource is not handle to a resource object.

ZX_ERR_ACCESS_DENIED if resource does not have the minimal rights.

ZX_ERR_INVALID_ARGS if options is not zero, out_port is not a valid pointer or resource is not the appropiate kind or base.

ZX_ERR_NO_MEMORY if the operation failed due to lack of system memory.

See also