blob: c026aace694c7dd01849fc7c8382588016bdeea5 [file] [log] [blame]
Christopher Ferris10a76e62022-06-08 13:31:52 -07001/****************************************************************************
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 _UAPI_ASM_X86_AMD_HSMP_H_
20#define _UAPI_ASM_X86_AMD_HSMP_H_
21#include <linux/types.h>
22#pragma pack(4)
23#define HSMP_MAX_MSG_LEN 8
24enum hsmp_message_ids {
25 HSMP_TEST = 1,
26 HSMP_GET_SMU_VER,
27 HSMP_GET_PROTO_VER,
28 HSMP_GET_SOCKET_POWER,
29 HSMP_SET_SOCKET_POWER_LIMIT,
30 HSMP_GET_SOCKET_POWER_LIMIT,
31 HSMP_GET_SOCKET_POWER_LIMIT_MAX,
32 HSMP_SET_BOOST_LIMIT,
33 HSMP_SET_BOOST_LIMIT_SOCKET,
34 HSMP_GET_BOOST_LIMIT,
35 HSMP_GET_PROC_HOT,
36 HSMP_SET_XGMI_LINK_WIDTH,
37 HSMP_SET_DF_PSTATE,
38 HSMP_SET_AUTO_DF_PSTATE,
39 HSMP_GET_FCLK_MCLK,
40 HSMP_GET_CCLK_THROTTLE_LIMIT,
41 HSMP_GET_C0_PERCENT,
42 HSMP_SET_NBIO_DPM_LEVEL,
Christopher Ferris80ae69d2022-08-02 16:32:21 -070043 HSMP_GET_NBIO_DPM_LEVEL,
44 HSMP_GET_DDR_BANDWIDTH,
Christopher Ferris10a76e62022-06-08 13:31:52 -070045 HSMP_GET_TEMP_MONITOR,
Christopher Ferris80ae69d2022-08-02 16:32:21 -070046 HSMP_GET_DIMM_TEMP_RANGE,
47 HSMP_GET_DIMM_POWER,
48 HSMP_GET_DIMM_THERMAL,
49 HSMP_GET_SOCKET_FREQ_LIMIT,
50 HSMP_GET_CCLK_CORE_LIMIT,
51 HSMP_GET_RAILS_SVI,
52 HSMP_GET_SOCKET_FMAX_FMIN,
53 HSMP_GET_IOLINK_BANDWITH,
54 HSMP_GET_XGMI_BANDWITH,
55 HSMP_SET_GMI3_WIDTH,
56 HSMP_SET_PCI_RATE,
57 HSMP_SET_POWER_MODE,
58 HSMP_SET_PSTATE_MAX_MIN,
Christopher Ferris10a76e62022-06-08 13:31:52 -070059 HSMP_MSG_ID_MAX,
60};
61struct hsmp_message {
62 __u32 msg_id;
63 __u16 num_args;
64 __u16 response_sz;
65 __u32 args[HSMP_MAX_MSG_LEN];
66 __u16 sock_ind;
67};
68enum hsmp_msg_type {
69 HSMP_RSVD = - 1,
70 HSMP_SET = 0,
71 HSMP_GET = 1,
72};
73struct hsmp_msg_desc {
74 int num_args;
75 int response_sz;
76 enum hsmp_msg_type type;
77};
78static const struct hsmp_msg_desc hsmp_msg_desc_table[] = {
79 {
80 0, 0, HSMP_RSVD
81 }
82 , {
83 1, 1, HSMP_GET
84 }
85 , {
86 0, 1, HSMP_GET
87 }
88 , {
89 0, 1, HSMP_GET
90 }
91 , {
92 0, 1, HSMP_GET
93 }
94 , {
95 1, 0, HSMP_SET
96 }
97 , {
98 0, 1, HSMP_GET
99 }
100 , {
101 0, 1, HSMP_GET
102 }
103 , {
104 1, 0, HSMP_SET
105 }
106 , {
107 1, 0, HSMP_SET
108 }
109 , {
110 1, 1, HSMP_GET
111 }
112 , {
113 0, 1, HSMP_GET
114 }
115 , {
116 1, 0, HSMP_SET
117 }
118 , {
119 1, 0, HSMP_SET
120 }
121 , {
122 0, 0, HSMP_SET
123 }
124 , {
125 0, 2, HSMP_GET
126 }
127 , {
128 0, 1, HSMP_GET
129 }
130 , {
131 0, 1, HSMP_GET
132 }
133 , {
134 1, 0, HSMP_SET
135 }
136 , {
Christopher Ferris80ae69d2022-08-02 16:32:21 -0700137 1, 1, HSMP_GET
Christopher Ferris10a76e62022-06-08 13:31:52 -0700138 }
139 , {
140 0, 1, HSMP_GET
141 }
142 , {
143 0, 1, HSMP_GET
144 }
Christopher Ferris80ae69d2022-08-02 16:32:21 -0700145 , {
146 1, 1, HSMP_GET
147 }
148 , {
149 1, 1, HSMP_GET
150 }
151 , {
152 1, 1, HSMP_GET
153 }
154 , {
155 0, 1, HSMP_GET
156 }
157 , {
158 1, 1, HSMP_GET
159 }
160 , {
161 0, 1, HSMP_GET
162 }
163 , {
164 0, 1, HSMP_GET
165 }
166 , {
167 1, 1, HSMP_GET
168 }
169 , {
170 1, 1, HSMP_GET
171 }
172 , {
173 1, 0, HSMP_SET
174 }
175 , {
176 1, 1, HSMP_SET
177 }
178 , {
179 1, 0, HSMP_SET
180 }
181 , {
182 1, 0, HSMP_SET
183 }
Christopher Ferris10a76e62022-06-08 13:31:52 -0700184 ,
185};
186#pragma pack()
187#define HSMP_BASE_IOCTL_NR 0xF8
188#define HSMP_IOCTL_CMD _IOWR(HSMP_BASE_IOCTL_NR, 0, struct hsmp_message)
189#endif