mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-04-23 15:58:56 +00:00
525.53
This commit is contained in:
@@ -106,6 +106,243 @@ typedef struct NV2080_CTRL_BIOS_GET_INFO_V2_PARAMS {
|
||||
NV2080_CTRL_BIOS_INFO biosInfoList[NV2080_CTRL_BIOS_INFO_MAX_SIZE];
|
||||
} NV2080_CTRL_BIOS_GET_INFO_V2_PARAMS;
|
||||
|
||||
/*
|
||||
* NV2080_CTRL_BIOS_NBSI
|
||||
*
|
||||
* NV2080_CTRL_BIOS_NBSI_MAX_REG_STRING_LENGTH
|
||||
* This is the maximum length of a given registry string input (in characters).
|
||||
*
|
||||
* NV2080_CTRL_BIOS_NBSI_STRING_TYPE_ASCII
|
||||
* This is a value indicating the format of a registry string is ascii.
|
||||
* NV2080_CTRL_BIOS_NBSI_STRING_TYPE_UNICODE
|
||||
* This is a value indicating the format of a registry string is unicode.
|
||||
* NV2080_CTRL_BIOS_NBSI_STRING_TYPE_HASH
|
||||
* This is a value indicating a registry string is actually a pre-hashed value.
|
||||
*
|
||||
* NV2080_CTRL_BIOS_NBSI_REG_STRING
|
||||
* This is a structure used to store a registry string object.
|
||||
* The members are as follows:
|
||||
*
|
||||
* size
|
||||
* This is the size (in bytes) of the data contained in the string. If this
|
||||
* is greater than the maximum registry string length, an error will be
|
||||
* returned.
|
||||
* type
|
||||
* This is the type of data contained in the registry string. It can be either
|
||||
* ascii, unicode or a pre-hashed value.
|
||||
* value
|
||||
* This is the value of the string. Depending on the type, a different object
|
||||
* will be used to access the data.
|
||||
*/
|
||||
#define NV2080_CTRL_BIOS_NBSI_MAX_REG_STRING_LENGTH (0x00000100)
|
||||
|
||||
#define NV2080_CTRL_BIOS_NBSI_STRING_TYPE_ASCII (0x00000000)
|
||||
#define NV2080_CTRL_BIOS_NBSI_STRING_TYPE_UNICODE (0x00000001)
|
||||
#define NV2080_CTRL_BIOS_NBSI_STRING_TYPE_HASH (0x00000002)
|
||||
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_ROOT (0x00000000)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_RM (0x00000001)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_DISPLAYDRIVER (0x00000002)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_VIDEO (0x00000003)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_CPL (0x00000004)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_D3D (0x00000005)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_OGL (0x00000006)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_PMU (0x00000007)
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_MODE (0x00000008)
|
||||
// this should equal the last NBSI_MODULE plus 1.
|
||||
#define NV2080_CTRL_BIOS_NBSI_NUM_MODULES (0x00000009)
|
||||
|
||||
//
|
||||
// Never use this value! It's needed for DD/Video modules, but does not correspond
|
||||
// to a valid NBSI hive!
|
||||
//
|
||||
#define NV2080_CTRL_BIOS_NBSI_MODULE_UNKNOWN (0x80000000)
|
||||
|
||||
typedef struct NV2080_CTRL_BIOS_NBSI_REG_STRING {
|
||||
NvU32 size;
|
||||
NvU32 type;
|
||||
|
||||
union {
|
||||
NvU8 ascii[NV2080_CTRL_BIOS_NBSI_MAX_REG_STRING_LENGTH];
|
||||
NvU16 unicode[NV2080_CTRL_BIOS_NBSI_MAX_REG_STRING_LENGTH];
|
||||
NvU16 hash;
|
||||
} value;
|
||||
} NV2080_CTRL_BIOS_NBSI_REG_STRING;
|
||||
|
||||
|
||||
/*
|
||||
* NV2080_CTRL_CMD_BIOS_GET_NBSI
|
||||
*
|
||||
* module
|
||||
* This field specifies the given module per the MODULE_TYPES enum.
|
||||
* path
|
||||
* This field specifies the full path and registry node name for a
|
||||
* given NBSI object. This is a maximum of 255 unicode characters,
|
||||
* but may be provided as ascii or a pre-formed hash per the type
|
||||
* member. The size (in bytes) of the given string/hash should be
|
||||
* provided in the size member.
|
||||
*
|
||||
* NOTE: In the case of an incomplete path such as HKR, one may pass
|
||||
* in simply the root node. E.g.:
|
||||
* 1.) Normal case: HKLM\Path\Subpath
|
||||
* 2.) Unknown case: HKR
|
||||
* It is expected that all unknown/incomplete paths will be determined
|
||||
* prior to NBSI programming! There is otherwise NO WAY to match
|
||||
* the hash given by an incomplete path to that stored in NBSI!
|
||||
*
|
||||
* valueName
|
||||
* This field specifies the registry name for a given NBSI object.
|
||||
* This is a maximum of 255 unicode characters, but may be provided
|
||||
* in ascii or a pre-formed hash per the type member. The size (in bytes)
|
||||
* of the given string/hash should be provided in the size member.
|
||||
* retBuf
|
||||
* This field provides a pointer to a buffer into which the value
|
||||
* retrieved from NBSI may be returned
|
||||
* retSize
|
||||
* This field is an input/output. It specifies the maximum size of the
|
||||
* return buffer as an input, and the size of the returned data as an
|
||||
* output.
|
||||
* errorCode
|
||||
* This field is a return value. It gives an error code representing
|
||||
* failure to return a value (as opposed to failure of the call).
|
||||
* This obeys the following:
|
||||
*
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_SUCCESS
|
||||
* The call has returned complete and valid data.
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_OVERRIDE
|
||||
* The call returned complete and valid data which is expected to override
|
||||
* any stored registry settings.
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_INCOMPLETE
|
||||
* The call returned data, but the size of the return buffer was
|
||||
* insufficient to contain it. The value returned in retSize represents
|
||||
* the total size necessary (in bytes) to contain the data.
|
||||
* if the size was non-0, the buffer is filled with the object contents up
|
||||
* to that size. Can be used with retBufOffset to use multiple calls to get
|
||||
* tables of very large size.
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_NOT_FOUND
|
||||
* The call did not find a valid NBSI object for this key. This indicates
|
||||
* NBSI has no opinion and, more importantly, any data returned is identical
|
||||
* to data passed in.
|
||||
*
|
||||
* Possible return values are:
|
||||
* NV_OK
|
||||
* NV_ERR_INVALID_PARAM_STRUCT
|
||||
* NV_ERR_INVALID_ARGUMENT
|
||||
* NV_ERR_NOT_SUPPORTED
|
||||
*/
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_SUCCESS (0x00000000)
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_OVERRIDE (0x00000001)
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_BAD_HASH (0xFFFFFFFA)
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_APITEST_SUCCESS (0xFFFFFFFB)
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_BAD_TABLE (0xFFFFFFFC)
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_NO_TABLE (0xFFFFFFFD)
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_INCOMPLETE (0xFFFFFFFE)
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_NOT_FOUND (0xFFFFFFFF)
|
||||
|
||||
#define NV2080_CTRL_CMD_BIOS_GET_NBSI (0x20800803) /* finn: Evaluated from "(FINN_NV20_SUBDEVICE_0_BIOS_INTERFACE_ID << 8) | NV2080_CTRL_BIOS_GET_NBSI_PARAMS_MESSAGE_ID" */
|
||||
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_PARAMS_MESSAGE_ID (0x3U)
|
||||
|
||||
typedef struct NV2080_CTRL_BIOS_GET_NBSI_PARAMS {
|
||||
NvU32 module;
|
||||
NV2080_CTRL_BIOS_NBSI_REG_STRING path;
|
||||
NV2080_CTRL_BIOS_NBSI_REG_STRING valueName;
|
||||
NV_DECLARE_ALIGNED(NvP64 retBuf, 8);
|
||||
NvU32 retSize;
|
||||
NvU32 errorCode;
|
||||
} NV2080_CTRL_BIOS_GET_NBSI_PARAMS;
|
||||
|
||||
#define NV2080_CTRL_CMD_BIOS_GET_NBSI_V2 (0x2080080e) /* finn: Evaluated from "(FINN_NV20_SUBDEVICE_0_BIOS_INTERFACE_ID << 8) | NV2080_CTRL_BIOS_GET_NBSI_V2_PARAMS_MESSAGE_ID" */
|
||||
|
||||
#define NV2080_BIOS_GET_NBSI_MAX_RET_SIZE (0x100)
|
||||
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_V2_PARAMS_MESSAGE_ID (0xEU)
|
||||
|
||||
typedef struct NV2080_CTRL_BIOS_GET_NBSI_V2_PARAMS {
|
||||
NvU32 module;
|
||||
NV2080_CTRL_BIOS_NBSI_REG_STRING path;
|
||||
NV2080_CTRL_BIOS_NBSI_REG_STRING valueName;
|
||||
NvU8 retBuf[NV2080_BIOS_GET_NBSI_MAX_RET_SIZE];
|
||||
NvU32 retSize;
|
||||
NvU32 errorCode;
|
||||
} NV2080_CTRL_BIOS_GET_NBSI_V2_PARAMS;
|
||||
|
||||
/*
|
||||
* NV2080_CTRL_CMD_BIOS_GET_NBSI_OBJ
|
||||
*
|
||||
* globType
|
||||
* This field specifies the glob type wanted
|
||||
* 0xffff: APItest... returns NV2080_CTRL_BIOS_GET_NBSI_APITEST_SUCCESS
|
||||
* globIndex
|
||||
* Index for globType desired
|
||||
* 0 = best fit
|
||||
* 1..255 = actual index
|
||||
* globSource
|
||||
* Index to nbsi directory sources used when getting entire directory
|
||||
* 0 = registry
|
||||
* 1 = VBIOS
|
||||
* 2 = SBIOS
|
||||
* 3 = ACPI
|
||||
* retBufOffset
|
||||
* When making multiple calls to get the object (if retSize is too small)
|
||||
* offset into real object (0=start of object)
|
||||
* retBuf
|
||||
* This field provides a pointer to a buffer into which the object
|
||||
* retrieved from NBSI may be returned
|
||||
* retSize
|
||||
* This field is an input/output. It specifies the maximum size of the
|
||||
* return buffer as an input, and the size of the returned data as an
|
||||
* output.
|
||||
* totalObjSize
|
||||
* This field is an output, where the total size of the object being
|
||||
* retrieved is returned.
|
||||
* errorCode
|
||||
* This field is a return value. It gives an error code representing
|
||||
* failure to return a value (as opposed to failure of the call).
|
||||
* This obeys the following:
|
||||
*
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_SUCCESS
|
||||
* The call has returned complete and valid data.
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_OVERRIDE
|
||||
* The call returned complete and valid data which is expected to override
|
||||
* any stored registry settings.
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_INCOMPLETE
|
||||
* The call returned data, but the size of the return buffer was
|
||||
* insufficient to contain it. The value returned in retSize represents
|
||||
* the total size necessary (in bytes) to contain the data.
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_NOT_FOUND
|
||||
* The call did not find a valid NBSI object for this key. This indicates
|
||||
* NBSI has no opinion and, more importantly, any data returned is identical
|
||||
* to data passed in.
|
||||
*
|
||||
* Possible return values are:
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_SUCCESS
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_APITEST_NODIRACCESS
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_APITEST_SUCCESS
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_INCOMPLETE
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_BAD_TABLE
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_NO_TABLE
|
||||
* NV2080_CTRL_BIOS_GET_NBSI_NOT_FOUND
|
||||
*/
|
||||
#define NV2080_CTRL_CMD_BIOS_GET_NBSI_OBJ (0x20800806) /* finn: Evaluated from "(FINN_NV20_SUBDEVICE_0_BIOS_INTERFACE_ID << 8) | NV2080_CTRL_BIOS_GET_NBSI_OBJ_PARAMS_MESSAGE_ID" */
|
||||
|
||||
#define NV2080_CTRL_BIOS_GET_NBSI_OBJ_PARAMS_MESSAGE_ID (0x6U)
|
||||
|
||||
typedef struct NV2080_CTRL_BIOS_GET_NBSI_OBJ_PARAMS {
|
||||
NvU16 globType;
|
||||
NvU8 globIndex;
|
||||
NvU16 globSource;
|
||||
NvU32 retBufOffset;
|
||||
NV_DECLARE_ALIGNED(NvP64 retBuf, 8);
|
||||
NvU32 retSize;
|
||||
NvU32 totalObjSize;
|
||||
NvU32 errorCode;
|
||||
} NV2080_CTRL_BIOS_GET_NBSI_OBJ_PARAMS;
|
||||
|
||||
#define GLOB_TYPE_GET_NBSI_DIR 0xfffe
|
||||
#define GLOB_TYPE_APITEST 0xffff
|
||||
#define GLOB_TYPE_GET_NBSI_ACPI_RAW 0xfffd
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user