Basic sysfs support to read temp and read/write fan speed for amd-gpu-pro
This commit is contained in:
@@ -31,6 +31,8 @@ int sort_by_stringptr (const void *p1, const void *p2);
|
||||
|
||||
int count_dictionaries (char **dictionary_files);
|
||||
|
||||
char *first_file_in_directory (const char *path);
|
||||
|
||||
char **scan_directory (hashcat_ctx_t *hashcat_ctx, const char *path);
|
||||
|
||||
int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *install_folder, MAYBE_UNUSED const char *shared_folder);
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef _HWMON_H
|
||||
#define _HWMON_H
|
||||
|
||||
@@ -19,6 +21,7 @@ int hm_get_throttle_with_device_id (hashcat_ctx_t *hashcat_ctx, const
|
||||
int hm_set_fanspeed_with_device_id_adl (hashcat_ctx_t *hashcat_ctx, const u32 device_id, const int fanspeed, const int fanpolicy);
|
||||
int hm_set_fanspeed_with_device_id_nvapi (hashcat_ctx_t *hashcat_ctx, const u32 device_id, const int fanspeed, const int fanpolicy);
|
||||
int hm_set_fanspeed_with_device_id_xnvctrl (hashcat_ctx_t *hashcat_ctx, const u32 device_id, const int fanspeed);
|
||||
int hm_set_fanspeed_with_device_id_sysfs (hashcat_ctx_t *hashcat_ctx, const u32 device_id, const int fanspeed);
|
||||
|
||||
int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
@@ -1046,6 +1046,7 @@ typedef struct opencl_ctx
|
||||
bool need_nvml;
|
||||
bool need_nvapi;
|
||||
bool need_xnvctrl;
|
||||
bool need_sysfs;
|
||||
|
||||
int force_jit_compilation;
|
||||
|
||||
@@ -1055,6 +1056,7 @@ typedef struct opencl_ctx
|
||||
#include "ext_nvapi.h"
|
||||
#include "ext_nvml.h"
|
||||
#include "ext_xnvctrl.h"
|
||||
#include "ext_sysfs.h"
|
||||
|
||||
typedef struct hm_attrs
|
||||
{
|
||||
@@ -1062,6 +1064,7 @@ typedef struct hm_attrs
|
||||
HM_ADAPTER_NVML nvml;
|
||||
HM_ADAPTER_NVAPI nvapi;
|
||||
HM_ADAPTER_XNVCTRL xnvctrl;
|
||||
HM_ADAPTER_SYSFS sysfs;
|
||||
|
||||
int od_version;
|
||||
|
||||
@@ -1078,6 +1081,7 @@ typedef struct hwmon_ctx
|
||||
void *hm_nvml;
|
||||
void *hm_nvapi;
|
||||
void *hm_xnvctrl;
|
||||
void *hm_sysfs;
|
||||
|
||||
hm_attrs_t *hm_device;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user