| Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef __PFRUT_H__ | 
|  | 20 | #define __PFRUT_H__ | 
|  | 21 | #include <linux/ioctl.h> | 
|  | 22 | #include <linux/types.h> | 
|  | 23 | #define PFRUT_IOCTL_MAGIC 0xEE | 
|  | 24 | #define PFRU_IOC_SET_REV _IOW(PFRUT_IOCTL_MAGIC, 0x01, unsigned int) | 
|  | 25 | #define PFRU_IOC_STAGE _IOW(PFRUT_IOCTL_MAGIC, 0x02, unsigned int) | 
|  | 26 | #define PFRU_IOC_ACTIVATE _IOW(PFRUT_IOCTL_MAGIC, 0x03, unsigned int) | 
|  | 27 | #define PFRU_IOC_STAGE_ACTIVATE _IOW(PFRUT_IOCTL_MAGIC, 0x04, unsigned int) | 
|  | 28 | #define PFRU_IOC_QUERY_CAP _IOR(PFRUT_IOCTL_MAGIC, 0x05, struct pfru_update_cap_info) | 
|  | 29 | struct pfru_payload_hdr { | 
|  | 30 | __u32 sig; | 
|  | 31 | __u32 hdr_version; | 
|  | 32 | __u32 hdr_size; | 
|  | 33 | __u32 hw_ver; | 
|  | 34 | __u32 rt_ver; | 
|  | 35 | __u8 platform_id[16]; | 
|  | 36 | }; | 
|  | 37 | enum pfru_dsm_status { | 
|  | 38 | DSM_SUCCEED = 0, | 
|  | 39 | DSM_FUNC_NOT_SUPPORT = 1, | 
|  | 40 | DSM_INVAL_INPUT = 2, | 
|  | 41 | DSM_HARDWARE_ERR = 3, | 
|  | 42 | DSM_RETRY_SUGGESTED = 4, | 
|  | 43 | DSM_UNKNOWN = 5, | 
|  | 44 | DSM_FUNC_SPEC_ERR = 6, | 
|  | 45 | }; | 
|  | 46 | struct pfru_update_cap_info { | 
|  | 47 | __u32 status; | 
|  | 48 | __u32 update_cap; | 
|  | 49 | __u8 code_type[16]; | 
|  | 50 | __u32 fw_version; | 
|  | 51 | __u32 code_rt_version; | 
|  | 52 | __u8 drv_type[16]; | 
|  | 53 | __u32 drv_rt_version; | 
|  | 54 | __u32 drv_svn; | 
|  | 55 | __u8 platform_id[16]; | 
|  | 56 | __u8 oem_id[16]; | 
|  | 57 | __u32 oem_info_len; | 
|  | 58 | }; | 
|  | 59 | struct pfru_com_buf_info { | 
|  | 60 | __u32 status; | 
|  | 61 | __u32 ext_status; | 
|  | 62 | __u64 addr_lo; | 
|  | 63 | __u64 addr_hi; | 
|  | 64 | __u32 buf_size; | 
|  | 65 | }; | 
|  | 66 | struct pfru_updated_result { | 
|  | 67 | __u32 status; | 
|  | 68 | __u32 ext_status; | 
|  | 69 | __u64 low_auth_time; | 
|  | 70 | __u64 high_auth_time; | 
|  | 71 | __u64 low_exec_time; | 
|  | 72 | __u64 high_exec_time; | 
|  | 73 | }; | 
|  | 74 | struct pfrt_log_data_info { | 
|  | 75 | __u32 status; | 
|  | 76 | __u32 ext_status; | 
|  | 77 | __u64 chunk1_addr_lo; | 
|  | 78 | __u64 chunk1_addr_hi; | 
|  | 79 | __u64 chunk2_addr_lo; | 
|  | 80 | __u64 chunk2_addr_hi; | 
|  | 81 | __u32 max_data_size; | 
|  | 82 | __u32 chunk1_size; | 
|  | 83 | __u32 chunk2_size; | 
|  | 84 | __u32 rollover_cnt; | 
|  | 85 | __u32 reset_cnt; | 
|  | 86 | }; | 
|  | 87 | struct pfrt_log_info { | 
|  | 88 | __u32 log_level; | 
|  | 89 | __u32 log_type; | 
|  | 90 | __u32 log_revid; | 
|  | 91 | }; | 
|  | 92 | #define PFRT_LOG_IOC_SET_INFO _IOW(PFRUT_IOCTL_MAGIC, 0x06, struct pfrt_log_info) | 
|  | 93 | #define PFRT_LOG_IOC_GET_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x07, struct pfrt_log_info) | 
|  | 94 | #define PFRT_LOG_IOC_GET_DATA_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x08, struct pfrt_log_data_info) | 
|  | 95 | #endif |