Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame] | 7 | #ifndef __PSP_DBC_USER_H__ |
| 8 | #define __PSP_DBC_USER_H__ |
| 9 | #include <linux/types.h> |
| 10 | #define DBC_NONCE_SIZE 16 |
| 11 | #define DBC_SIG_SIZE 32 |
| 12 | #define DBC_UID_SIZE 16 |
| 13 | struct dbc_user_nonce { |
| 14 | __u32 auth_needed; |
| 15 | __u8 nonce[DBC_NONCE_SIZE]; |
| 16 | __u8 signature[DBC_SIG_SIZE]; |
| 17 | } __attribute__((__packed__)); |
| 18 | struct dbc_user_setuid { |
| 19 | __u8 uid[DBC_UID_SIZE]; |
| 20 | __u8 signature[DBC_SIG_SIZE]; |
| 21 | } __attribute__((__packed__)); |
| 22 | struct dbc_user_param { |
| 23 | __u32 msg_index; |
| 24 | __u32 param; |
| 25 | __u8 signature[DBC_SIG_SIZE]; |
| 26 | } __attribute__((__packed__)); |
| 27 | #define DBC_IOC_TYPE 'D' |
| 28 | #define DBCIOCNONCE _IOWR(DBC_IOC_TYPE, 0x1, struct dbc_user_nonce) |
| 29 | #define DBCIOCUID _IOW(DBC_IOC_TYPE, 0x2, struct dbc_user_setuid) |
| 30 | #define DBCIOCPARAM _IOWR(DBC_IOC_TYPE, 0x3, struct dbc_user_param) |
| 31 | enum dbc_cmd_msg { |
| 32 | PARAM_GET_FMAX_CAP = 0x3, |
| 33 | PARAM_SET_FMAX_CAP = 0x4, |
| 34 | PARAM_GET_PWR_CAP = 0x5, |
| 35 | PARAM_SET_PWR_CAP = 0x6, |
| 36 | PARAM_GET_GFX_MODE = 0x7, |
| 37 | PARAM_SET_GFX_MODE = 0x8, |
| 38 | PARAM_GET_CURR_TEMP = 0x9, |
| 39 | PARAM_GET_FMAX_MAX = 0xA, |
| 40 | PARAM_GET_FMAX_MIN = 0xB, |
| 41 | PARAM_GET_SOC_PWR_MAX = 0xC, |
| 42 | PARAM_GET_SOC_PWR_MIN = 0xD, |
| 43 | PARAM_GET_SOC_PWR_CUR = 0xE, |
| 44 | }; |
| 45 | #endif |