1 /* SPDX-License-Identifier: MIT */
3 * Copyright(c) 2022, Intel Corporation. All rights reserved.
6 #ifndef __INTEL_PXP_FW_INTERFACE_CMN_H__
7 #define __INTEL_PXP_FW_INTERFACE_CMN_H__
9 #include <linux/types.h>
11 #define PXP_APIVER(x, y) (((x) & 0xFFFF) << 16 | ((y) & 0xFFFF))
14 * there are a lot of status codes for PXP, but we only define the cross-API
15 * common ones that we actually can handle in the kernel driver. Other failure
16 * codes should be printed to error msg for debug.
19 PXP_STATUS_SUCCESS = 0x0,
20 PXP_STATUS_ERROR_API_VERSION = 0x1002,
21 PXP_STATUS_NOT_READY = 0x100e,
22 PXP_STATUS_PLATFCONFIG_KF1_NOVERIF = 0x101a,
23 PXP_STATUS_PLATFCONFIG_KF1_BAD = 0x101f,
24 PXP_STATUS_OP_NOT_PERMITTED = 0x4013
27 /* Common PXP FW message header */
28 struct pxp_cmd_header {
33 u32 stream_id; /* in */
34 #define PXP_CMDHDR_EXTDATA_SESSION_VALID GENMASK(0, 0)
35 #define PXP_CMDHDR_EXTDATA_APP_TYPE GENMASK(1, 1)
36 #define PXP_CMDHDR_EXTDATA_SESSION_ID GENMASK(17, 2)
38 /* Length of the message (excluding the header) */
42 #endif /* __INTEL_PXP_FW_INTERFACE_CMN_H__ */