• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __PFRUT_H__
8 #define __PFRUT_H__
9 #include <linux/ioctl.h>
10 #include <linux/types.h>
11 #define PFRUT_IOCTL_MAGIC 0xEE
12 #define PFRU_IOC_SET_REV _IOW(PFRUT_IOCTL_MAGIC, 0x01, unsigned int)
13 #define PFRU_IOC_STAGE _IOW(PFRUT_IOCTL_MAGIC, 0x02, unsigned int)
14 #define PFRU_IOC_ACTIVATE _IOW(PFRUT_IOCTL_MAGIC, 0x03, unsigned int)
15 #define PFRU_IOC_STAGE_ACTIVATE _IOW(PFRUT_IOCTL_MAGIC, 0x04, unsigned int)
16 #define PFRU_IOC_QUERY_CAP _IOR(PFRUT_IOCTL_MAGIC, 0x05, struct pfru_update_cap_info)
17 struct pfru_payload_hdr {
18   __u32 sig;
19   __u32 hdr_version;
20   __u32 hdr_size;
21   __u32 hw_ver;
22   __u32 rt_ver;
23   __u8 platform_id[16];
24 };
25 enum pfru_dsm_status {
26   DSM_SUCCEED = 0,
27   DSM_FUNC_NOT_SUPPORT = 1,
28   DSM_INVAL_INPUT = 2,
29   DSM_HARDWARE_ERR = 3,
30   DSM_RETRY_SUGGESTED = 4,
31   DSM_UNKNOWN = 5,
32   DSM_FUNC_SPEC_ERR = 6,
33 };
34 struct pfru_update_cap_info {
35   __u32 status;
36   __u32 update_cap;
37   __u8 code_type[16];
38   __u32 fw_version;
39   __u32 code_rt_version;
40   __u8 drv_type[16];
41   __u32 drv_rt_version;
42   __u32 drv_svn;
43   __u8 platform_id[16];
44   __u8 oem_id[16];
45   __u32 oem_info_len;
46 };
47 struct pfru_com_buf_info {
48   __u32 status;
49   __u32 ext_status;
50   __u64 addr_lo;
51   __u64 addr_hi;
52   __u32 buf_size;
53 };
54 struct pfru_updated_result {
55   __u32 status;
56   __u32 ext_status;
57   __u64 low_auth_time;
58   __u64 high_auth_time;
59   __u64 low_exec_time;
60   __u64 high_exec_time;
61 };
62 struct pfrt_log_data_info {
63   __u32 status;
64   __u32 ext_status;
65   __u64 chunk1_addr_lo;
66   __u64 chunk1_addr_hi;
67   __u64 chunk2_addr_lo;
68   __u64 chunk2_addr_hi;
69   __u32 max_data_size;
70   __u32 chunk1_size;
71   __u32 chunk2_size;
72   __u32 rollover_cnt;
73   __u32 reset_cnt;
74 };
75 struct pfrt_log_info {
76   __u32 log_level;
77   __u32 log_type;
78   __u32 log_revid;
79 };
80 #define PFRT_LOG_IOC_SET_INFO _IOW(PFRUT_IOCTL_MAGIC, 0x06, struct pfrt_log_info)
81 #define PFRT_LOG_IOC_GET_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x07, struct pfrt_log_info)
82 #define PFRT_LOG_IOC_GET_DATA_INFO _IOR(PFRUT_IOCTL_MAGIC, 0x08, struct pfrt_log_data_info)
83 #endif
84