Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: pfrut.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* Platform Firmware Runtime Update header
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright(c) 2021 Intel Corporation. All rights reserved.
[4] Fix | Delete
*/
[5] Fix | Delete
#ifndef __PFRUT_H__
[6] Fix | Delete
#define __PFRUT_H__
[7] Fix | Delete
[8] Fix | Delete
#include <linux/ioctl.h>
[9] Fix | Delete
#include <linux/types.h>
[10] Fix | Delete
[11] Fix | Delete
#define PFRUT_IOCTL_MAGIC 0xEE
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* PFRU_IOC_SET_REV - _IOW(PFRUT_IOCTL_MAGIC, 0x01, unsigned int)
[15] Fix | Delete
*
[16] Fix | Delete
* Return:
[17] Fix | Delete
* * 0 - success
[18] Fix | Delete
* * -EFAULT - fail to read the revision id
[19] Fix | Delete
* * -EINVAL - user provides an invalid revision id
[20] Fix | Delete
*
[21] Fix | Delete
* Set the Revision ID for Platform Firmware Runtime Update.
[22] Fix | Delete
*/
[23] Fix | Delete
#define PFRU_IOC_SET_REV _IOW(PFRUT_IOCTL_MAGIC, 0x01, unsigned int)
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* PFRU_IOC_STAGE - _IOW(PFRUT_IOCTL_MAGIC, 0x02, unsigned int)
[27] Fix | Delete
*
[28] Fix | Delete
* Return:
[29] Fix | Delete
* * 0 - success
[30] Fix | Delete
* * -EINVAL - stage phase returns invalid result
[31] Fix | Delete
*
[32] Fix | Delete
* Stage a capsule image from communication buffer and perform authentication.
[33] Fix | Delete
*/
[34] Fix | Delete
#define PFRU_IOC_STAGE _IOW(PFRUT_IOCTL_MAGIC, 0x02, unsigned int)
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* PFRU_IOC_ACTIVATE - _IOW(PFRUT_IOCTL_MAGIC, 0x03, unsigned int)
[38] Fix | Delete
*
[39] Fix | Delete
* Return:
[40] Fix | Delete
* * 0 - success
[41] Fix | Delete
* * -EINVAL - activate phase returns invalid result
[42] Fix | Delete
*
[43] Fix | Delete
* Activate a previously staged capsule image.
[44] Fix | Delete
*/
[45] Fix | Delete
#define PFRU_IOC_ACTIVATE _IOW(PFRUT_IOCTL_MAGIC, 0x03, unsigned int)
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* PFRU_IOC_STAGE_ACTIVATE - _IOW(PFRUT_IOCTL_MAGIC, 0x04, unsigned int)
[49] Fix | Delete
*
[50] Fix | Delete
* Return:
[51] Fix | Delete
* * 0 - success
[52] Fix | Delete
* * -EINVAL - stage/activate phase returns invalid result.
[53] Fix | Delete
*
[54] Fix | Delete
* Perform both stage and activation action.
[55] Fix | Delete
*/
[56] Fix | Delete
#define PFRU_IOC_STAGE_ACTIVATE _IOW(PFRUT_IOCTL_MAGIC, 0x04, unsigned int)
[57] Fix | Delete
[58] Fix | Delete
/**
[59] Fix | Delete
* PFRU_IOC_QUERY_CAP - _IOR(PFRUT_IOCTL_MAGIC, 0x05,
[60] Fix | Delete
* struct pfru_update_cap_info)
[61] Fix | Delete
*
[62] Fix | Delete
* Return:
[63] Fix | Delete
* * 0 - success
[64] Fix | Delete
* * -EINVAL - query phase returns invalid result
[65] Fix | Delete
* * -EFAULT - the result fails to be copied to userspace
[66] Fix | Delete
*
[67] Fix | Delete
* Retrieve information on the Platform Firmware Runtime Update capability.
[68] Fix | Delete
* The information is a struct pfru_update_cap_info.
[69] Fix | Delete
*/
[70] Fix | Delete
#define PFRU_IOC_QUERY_CAP _IOR(PFRUT_IOCTL_MAGIC, 0x05, struct pfru_update_cap_info)
[71] Fix | Delete
[72] Fix | Delete
/**
[73] Fix | Delete
* struct pfru_payload_hdr - Capsule file payload header.
[74] Fix | Delete
*
[75] Fix | Delete
* @sig: Signature of this capsule file.
[76] Fix | Delete
* @hdr_version: Revision of this header structure.
[77] Fix | Delete
* @hdr_size: Size of this header, including the OemHeader bytes.
[78] Fix | Delete
* @hw_ver: The supported firmware version.
[79] Fix | Delete
* @rt_ver: Version of the code injection image.
[80] Fix | Delete
* @platform_id: A platform specific GUID to specify the platform what
[81] Fix | Delete
* this capsule image support.
[82] Fix | Delete
*/
[83] Fix | Delete
struct pfru_payload_hdr {
[84] Fix | Delete
__u32 sig;
[85] Fix | Delete
__u32 hdr_version;
[86] Fix | Delete
__u32 hdr_size;
[87] Fix | Delete
__u32 hw_ver;
[88] Fix | Delete
__u32 rt_ver;
[89] Fix | Delete
__u8 platform_id[16];
[90] Fix | Delete
};
[91] Fix | Delete
[92] Fix | Delete
enum pfru_dsm_status {
[93] Fix | Delete
DSM_SUCCEED = 0,
[94] Fix | Delete
DSM_FUNC_NOT_SUPPORT = 1,
[95] Fix | Delete
DSM_INVAL_INPUT = 2,
[96] Fix | Delete
DSM_HARDWARE_ERR = 3,
[97] Fix | Delete
DSM_RETRY_SUGGESTED = 4,
[98] Fix | Delete
DSM_UNKNOWN = 5,
[99] Fix | Delete
DSM_FUNC_SPEC_ERR = 6,
[100] Fix | Delete
};
[101] Fix | Delete
[102] Fix | Delete
/**
[103] Fix | Delete
* struct pfru_update_cap_info - Runtime update capability information.
[104] Fix | Delete
*
[105] Fix | Delete
* @status: Indicator of whether this query succeed.
[106] Fix | Delete
* @update_cap: Bitmap to indicate whether the feature is supported.
[107] Fix | Delete
* @code_type: A buffer containing an image type GUID.
[108] Fix | Delete
* @fw_version: Platform firmware version.
[109] Fix | Delete
* @code_rt_version: Code injection runtime version for anti-rollback.
[110] Fix | Delete
* @drv_type: A buffer containing an image type GUID.
[111] Fix | Delete
* @drv_rt_version: The version of the driver update runtime code.
[112] Fix | Delete
* @drv_svn: The secure version number(SVN) of the driver update runtime code.
[113] Fix | Delete
* @platform_id: A buffer containing a platform ID GUID.
[114] Fix | Delete
* @oem_id: A buffer containing an OEM ID GUID.
[115] Fix | Delete
* @oem_info_len: Length of the buffer containing the vendor specific information.
[116] Fix | Delete
*/
[117] Fix | Delete
struct pfru_update_cap_info {
[118] Fix | Delete
__u32 status;
[119] Fix | Delete
__u32 update_cap;
[120] Fix | Delete
[121] Fix | Delete
__u8 code_type[16];
[122] Fix | Delete
__u32 fw_version;
[123] Fix | Delete
__u32 code_rt_version;
[124] Fix | Delete
[125] Fix | Delete
__u8 drv_type[16];
[126] Fix | Delete
__u32 drv_rt_version;
[127] Fix | Delete
__u32 drv_svn;
[128] Fix | Delete
[129] Fix | Delete
__u8 platform_id[16];
[130] Fix | Delete
__u8 oem_id[16];
[131] Fix | Delete
[132] Fix | Delete
__u32 oem_info_len;
[133] Fix | Delete
};
[134] Fix | Delete
[135] Fix | Delete
/**
[136] Fix | Delete
* struct pfru_com_buf_info - Communication buffer information.
[137] Fix | Delete
*
[138] Fix | Delete
* @status: Indicator of whether this query succeed.
[139] Fix | Delete
* @ext_status: Implementation specific query result.
[140] Fix | Delete
* @addr_lo: Low 32bit physical address of the communication buffer to hold
[141] Fix | Delete
* a runtime update package.
[142] Fix | Delete
* @addr_hi: High 32bit physical address of the communication buffer to hold
[143] Fix | Delete
* a runtime update package.
[144] Fix | Delete
* @buf_size: Maximum size in bytes of the communication buffer.
[145] Fix | Delete
*/
[146] Fix | Delete
struct pfru_com_buf_info {
[147] Fix | Delete
__u32 status;
[148] Fix | Delete
__u32 ext_status;
[149] Fix | Delete
__u64 addr_lo;
[150] Fix | Delete
__u64 addr_hi;
[151] Fix | Delete
__u32 buf_size;
[152] Fix | Delete
};
[153] Fix | Delete
[154] Fix | Delete
/**
[155] Fix | Delete
* struct pfru_updated_result - Platform firmware runtime update result information.
[156] Fix | Delete
* @status: Indicator of whether this update succeed.
[157] Fix | Delete
* @ext_status: Implementation specific update result.
[158] Fix | Delete
* @low_auth_time: Low 32bit value of image authentication time in nanosecond.
[159] Fix | Delete
* @high_auth_time: High 32bit value of image authentication time in nanosecond.
[160] Fix | Delete
* @low_exec_time: Low 32bit value of image execution time in nanosecond.
[161] Fix | Delete
* @high_exec_time: High 32bit value of image execution time in nanosecond.
[162] Fix | Delete
*/
[163] Fix | Delete
struct pfru_updated_result {
[164] Fix | Delete
__u32 status;
[165] Fix | Delete
__u32 ext_status;
[166] Fix | Delete
__u64 low_auth_time;
[167] Fix | Delete
__u64 high_auth_time;
[168] Fix | Delete
__u64 low_exec_time;
[169] Fix | Delete
__u64 high_exec_time;
[170] Fix | Delete
};
[171] Fix | Delete
[172] Fix | Delete
/**
[173] Fix | Delete
* struct pfrt_log_data_info - Log Data from telemetry service.
[174] Fix | Delete
* @status: Indicator of whether this update succeed.
[175] Fix | Delete
* @ext_status: Implementation specific update result.
[176] Fix | Delete
* @chunk1_addr_lo: Low 32bit physical address of the telemetry data chunk1
[177] Fix | Delete
* starting address.
[178] Fix | Delete
* @chunk1_addr_hi: High 32bit physical address of the telemetry data chunk1
[179] Fix | Delete
* starting address.
[180] Fix | Delete
* @chunk2_addr_lo: Low 32bit physical address of the telemetry data chunk2
[181] Fix | Delete
* starting address.
[182] Fix | Delete
* @chunk2_addr_hi: High 32bit physical address of the telemetry data chunk2
[183] Fix | Delete
* starting address.
[184] Fix | Delete
* @max_data_size: Maximum supported size of data of all data chunks combined.
[185] Fix | Delete
* @chunk1_size: Data size in bytes of the telemetry data chunk1 buffer.
[186] Fix | Delete
* @chunk2_size: Data size in bytes of the telemetry data chunk2 buffer.
[187] Fix | Delete
* @rollover_cnt: Number of times telemetry data buffer is overwritten
[188] Fix | Delete
* since telemetry buffer reset.
[189] Fix | Delete
* @reset_cnt: Number of times telemetry services resets that results in
[190] Fix | Delete
* rollover count and data chunk buffers are reset.
[191] Fix | Delete
*/
[192] Fix | Delete
struct pfrt_log_data_info {
[193] Fix | Delete
__u32 status;
[194] Fix | Delete
__u32 ext_status;
[195] Fix | Delete
__u64 chunk1_addr_lo;
[196] Fix | Delete
__u64 chunk1_addr_hi;
[197] Fix | Delete
__u64 chunk2_addr_lo;
[198] Fix | Delete
__u64 chunk2_addr_hi;
[199] Fix | Delete
__u32 max_data_size;
[200] Fix | Delete
__u32 chunk1_size;
[201] Fix | Delete
__u32 chunk2_size;
[202] Fix | Delete
__u32 rollover_cnt;
[203] Fix | Delete
__u32 reset_cnt;
[204] Fix | Delete
};
[205] Fix | Delete
[206] Fix | Delete
/**
[207] Fix | Delete
* struct pfrt_log_info - Telemetry log information.
[208] Fix | Delete
* @log_level: The telemetry log level.
[209] Fix | Delete
* @log_type: The telemetry log type(history and execution).
[210] Fix | Delete
* @log_revid: The telemetry log revision id.
[211] Fix | Delete
*/
[212] Fix | Delete
struct pfrt_log_info {
[213] Fix | Delete
__u32 log_level;
[214] Fix | Delete
__u32 log_type;
[215] Fix | Delete
__u32 log_revid;
[216] Fix | Delete
};
[217] Fix | Delete
[218] Fix | Delete
/**
[219] Fix | Delete
* PFRT_LOG_IOC_SET_INFO - _IOW(PFRUT_IOCTL_MAGIC, 0x06,
[220] Fix | Delete
* struct pfrt_log_info)
[221] Fix | Delete
*
[222] Fix | Delete
* Return:
[223] Fix | Delete
* * 0 - success
[224] Fix | Delete
* * -EFAULT - fail to get the setting parameter
[225] Fix | Delete
* * -EINVAL - fail to set the log level
[226] Fix | Delete
*
[227] Fix | Delete
* Set the PFRT log level and log type. The input information is
[228] Fix | Delete
* a struct pfrt_log_info.
[229] Fix | Delete
*/
[230] Fix | Delete
#define PFRT_LOG_IOC_SET_INFO _IOW(PFRUT_IOCTL_MAGIC, 0x06, struct pfrt_log_info)
[231] Fix | Delete
[232] Fix | Delete
/**
[233] Fix | Delete
* PFRT_LOG_IOC_GET_INFO - _IOR(PFRUT_IOCTL_MAGIC, 0x07,
[234] Fix | Delete
* struct pfrt_log_info)
[235] Fix | Delete
*
[236] Fix | Delete
* Return:
[237] Fix | Delete
* * 0 - success
[238] Fix | Delete
* * -EINVAL - fail to get the log level
[239] Fix | Delete
* * -EFAULT - fail to copy the result back to userspace
[240] Fix | Delete
*
[241] Fix | Delete
* Retrieve log level and log type of the telemetry. The information is
[242] Fix | Delete
* a struct pfrt_log_info.
[243] Fix | Delete
*/
[244] Fix | Delete
#define PFRT_LOG_IOC_GET_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x07, struct pfrt_log_info)
[245] Fix | Delete
[246] Fix | Delete
/**
[247] Fix | Delete
* PFRT_LOG_IOC_GET_DATA_INFO - _IOR(PFRUT_IOCTL_MAGIC, 0x08,
[248] Fix | Delete
* struct pfrt_log_data_info)
[249] Fix | Delete
*
[250] Fix | Delete
* Return:
[251] Fix | Delete
* * 0 - success
[252] Fix | Delete
* * -EINVAL - fail to get the log buffer information
[253] Fix | Delete
* * -EFAULT - fail to copy the log buffer information to userspace
[254] Fix | Delete
*
[255] Fix | Delete
* Retrieve data information about the telemetry. The information
[256] Fix | Delete
* is a struct pfrt_log_data_info.
[257] Fix | Delete
*/
[258] Fix | Delete
#define PFRT_LOG_IOC_GET_DATA_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x08, struct pfrt_log_data_info)
[259] Fix | Delete
[260] Fix | Delete
#endif /* __PFRUT_H__ */
[261] Fix | Delete
[262] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function