blob: 4b5e3f4439d5a48c26efb8bbf1595e63e54e375a [file] [log] [blame]
Christopher Ferris67d1e5e2023-10-31 13:36:37 -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 __PSP_DBC_USER_H__
20#define __PSP_DBC_USER_H__
21#include <linux/types.h>
22#define DBC_NONCE_SIZE 16
23#define DBC_SIG_SIZE 32
24#define DBC_UID_SIZE 16
25struct dbc_user_nonce {
26 __u32 auth_needed;
27 __u8 nonce[DBC_NONCE_SIZE];
28 __u8 signature[DBC_SIG_SIZE];
29} __attribute__((__packed__));
30struct dbc_user_setuid {
31 __u8 uid[DBC_UID_SIZE];
32 __u8 signature[DBC_SIG_SIZE];
33} __attribute__((__packed__));
34struct dbc_user_param {
35 __u32 msg_index;
36 __u32 param;
37 __u8 signature[DBC_SIG_SIZE];
38} __attribute__((__packed__));
39#define DBC_IOC_TYPE 'D'
40#define DBCIOCNONCE _IOWR(DBC_IOC_TYPE, 0x1, struct dbc_user_nonce)
41#define DBCIOCUID _IOW(DBC_IOC_TYPE, 0x2, struct dbc_user_setuid)
42#define DBCIOCPARAM _IOWR(DBC_IOC_TYPE, 0x3, struct dbc_user_param)
43enum dbc_cmd_msg {
44 PARAM_GET_FMAX_CAP = 0x3,
45 PARAM_SET_FMAX_CAP = 0x4,
46 PARAM_GET_PWR_CAP = 0x5,
47 PARAM_SET_PWR_CAP = 0x6,
48 PARAM_GET_GFX_MODE = 0x7,
49 PARAM_SET_GFX_MODE = 0x8,
50 PARAM_GET_CURR_TEMP = 0x9,
51 PARAM_GET_FMAX_MAX = 0xA,
52 PARAM_GET_FMAX_MIN = 0xB,
53 PARAM_GET_SOC_PWR_MAX = 0xC,
54 PARAM_GET_SOC_PWR_MIN = 0xD,
55 PARAM_GET_SOC_PWR_CUR = 0xE,
56};
57#endif