XPm_DevIoctl2 - 2023.2 English

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2023-12-13
Version
2023.2 English

This function performs driver-like IOCTL functions on shared system devices.

There are multiple reasons for introducing a new API signature:

Note: This API is a new version of existing API XPm_DevIoctl API. It supports all the IOCTL functions supported by the old API and it adds support for a couple new ones. Users should migrate to using the new API signature in their applications. The older API will be deprecated and support for it may be removed in future releases.
  • The old API had fixed number of payload arguments, the new one supports variable length of payload buffer for forward compatibility
  • To maintain backwards compatibility for old API
  • For scalability reasons when support for "large payload" is introduced

Prototype

XStatus XPm_DevIoctl2(u32 DeviceId, pm_ioctl_id IoctlId, const u32 *Payload, u32 PayloadSize, u32 *const Response, u32 ResponseSize);

Parameters

The following table lists the XPm_DevIoctl2 function arguments.

Table 1. XPm_DevIoctl2 Arguments
Type Name Description
u32 DeviceId ID of the device
pm_ioctl_id IoctlId IOCTL function ID
const u32 * Payload Payload buffer
u32 *const Response Response buffer for Ioctl Response
u32 PayloadSize Payload buffer size
u32 ResponseSize Response buffer size

Returns

XST_SUCCESS if successful else XST_FAILURE or an error code or a reason code