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