|
|
|
@ -1351,6 +1351,25 @@ int hm_get_threshold_slowdown_with_devices_idx (hashcat_ctx_t *hashcat_ctx, cons
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].threshold_slowdown_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
int target = 0;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetTemperatureThreshold (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, NVML_TEMPERATURE_THRESHOLD_SLOWDOWN, (unsigned int *) &target) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].threshold_slowdown_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return target;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1396,6 +1415,7 @@ int hm_get_threshold_slowdown_with_devices_idx (hashcat_ctx_t *hashcat_ctx, cons
|
|
|
|
|
return target;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].threshold_slowdown_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1411,6 +1431,25 @@ int hm_get_threshold_shutdown_with_devices_idx (hashcat_ctx_t *hashcat_ctx, cons
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].threshold_shutdown_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
int target = 0;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetTemperatureThreshold (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, NVML_TEMPERATURE_THRESHOLD_SHUTDOWN, (unsigned int *) &target) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].threshold_shutdown_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return target;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1444,6 +1483,7 @@ int hm_get_threshold_shutdown_with_devices_idx (hashcat_ctx_t *hashcat_ctx, cons
|
|
|
|
|
return target;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].threshold_shutdown_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1459,6 +1499,25 @@ int hm_get_temperature_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].temperature_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
int temperature = 0;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetTemperature (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, NVML_TEMPERATURE_GPU, (u32 *) &temperature) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].temperature_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return temperature;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1527,6 +1586,7 @@ int hm_get_temperature_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
|
|
|
|
return temperature;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].temperature_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1542,6 +1602,13 @@ int hm_get_fanpolicy_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int bac
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].fanpolicy_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1584,6 +1651,7 @@ int hm_get_fanpolicy_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int bac
|
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].fanpolicy_get_supported = false;
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].fanspeed_get_supported = false;
|
|
|
|
@ -1600,6 +1668,25 @@ int hm_get_fanspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].fanspeed_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
int speed = 0;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetFanSpeed (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, (u32 *) &speed) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].fanspeed_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return speed;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1674,6 +1761,7 @@ int hm_get_fanspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
|
|
|
|
return speed;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].fanspeed_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1689,6 +1777,25 @@ int hm_get_buslanes_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].buslanes_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
unsigned int currLinkWidth;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetCurrPcieLinkWidth (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, &currLinkWidth) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].buslanes_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return currLinkWidth;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1740,6 +1847,7 @@ int hm_get_buslanes_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
|
|
|
|
return currLinkWidth;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].buslanes_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1755,6 +1863,25 @@ int hm_get_utilization_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].utilization_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
nvmlUtilization_t utilization;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetUtilizationRates (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, &utilization) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].utilization_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return utilization.gpu;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1792,6 +1919,7 @@ int hm_get_utilization_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
|
|
|
|
return utilization.gpu;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].utilization_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1807,6 +1935,25 @@ int hm_get_memoryspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].memoryspeed_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
unsigned int clockfreq;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetClockInfo (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, NVML_CLOCK_MEM, &clockfreq) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].memoryspeed_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return clockfreq;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1858,6 +2005,7 @@ int hm_get_memoryspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
|
|
|
|
return clockfreq;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].memoryspeed_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1873,6 +2021,25 @@ int hm_get_corespeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int bac
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].corespeed_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
unsigned int clockfreq;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetClockInfo (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, NVML_CLOCK_SM, &clockfreq) == -1)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].corespeed_get_supported = false;
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return clockfreq;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1924,6 +2091,7 @@ int hm_get_corespeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int bac
|
|
|
|
|
return clockfreq;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].corespeed_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -1939,6 +2107,54 @@ int hm_get_throttle_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_device[backend_device_idx].throttle_get_supported == false) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
/* this is triggered by mask generator, too. therefore useless
|
|
|
|
|
unsigned long long clocksThrottleReasons = 0;
|
|
|
|
|
unsigned long long supportedThrottleReasons = 0;
|
|
|
|
|
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetCurrentClocksThrottleReasons (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, &clocksThrottleReasons) == -1) return -1;
|
|
|
|
|
if (hm_NVML_nvmlDeviceGetSupportedClocksThrottleReasons (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvml, &supportedThrottleReasons) == -1) return -1;
|
|
|
|
|
|
|
|
|
|
clocksThrottleReasons &= supportedThrottleReasons;
|
|
|
|
|
clocksThrottleReasons &= ~nvmlClocksThrottleReasonGpuIdle;
|
|
|
|
|
clocksThrottleReasons &= ~nvmlClocksThrottleReasonApplicationsClocksSetting;
|
|
|
|
|
clocksThrottleReasons &= ~nvmlClocksThrottleReasonUnknown;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->kernel_power_final)
|
|
|
|
|
{
|
|
|
|
|
clocksThrottleReasons &= ~nvmlClocksThrottleReasonHwSlowdown;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (clocksThrottleReasons != nvmlClocksThrottleReasonNone);
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_nvapi)
|
|
|
|
|
{
|
|
|
|
|
NV_GPU_PERF_POLICIES_INFO_PARAMS_V1 perfPolicies_info;
|
|
|
|
|
NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1 perfPolicies_status;
|
|
|
|
|
|
|
|
|
|
memset (&perfPolicies_info, 0, sizeof (NV_GPU_PERF_POLICIES_INFO_PARAMS_V1));
|
|
|
|
|
memset (&perfPolicies_status, 0, sizeof (NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1));
|
|
|
|
|
|
|
|
|
|
perfPolicies_info.version = MAKE_NVAPI_VERSION (NV_GPU_PERF_POLICIES_INFO_PARAMS_V1, 1);
|
|
|
|
|
perfPolicies_status.version = MAKE_NVAPI_VERSION (NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1, 1);
|
|
|
|
|
|
|
|
|
|
hm_NvAPI_GPU_GetPerfPoliciesInfo (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvapi, &perfPolicies_info);
|
|
|
|
|
|
|
|
|
|
perfPolicies_status.info_value = perfPolicies_info.info_value;
|
|
|
|
|
|
|
|
|
|
hm_NvAPI_GPU_GetPerfPoliciesStatus (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].nvapi, &perfPolicies_status);
|
|
|
|
|
|
|
|
|
|
return perfPolicies_status.throttle & 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) return -1;
|
|
|
|
|
|
|
|
|
|
if (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
@ -1990,6 +2206,7 @@ int hm_get_throttle_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
|
|
|
|
return perfPolicies_status.throttle & 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_device_idx].throttle_get_supported = false;
|
|
|
|
|
|
|
|
|
@ -2011,7 +2228,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
if (user_options->example_hashes == true) return 0;
|
|
|
|
|
if (user_options->keyspace == true) return 0;
|
|
|
|
|
if (user_options->left == true) return 0;
|
|
|
|
|
if (user_options->opencl_info == true) return 0;
|
|
|
|
|
if (user_options->backend_info == true) return 0;
|
|
|
|
|
if (user_options->show == true) return 0;
|
|
|
|
|
if (user_options->stdout_flag == true) return 0;
|
|
|
|
|
if (user_options->usage == true) return 0;
|
|
|
|
@ -2108,6 +2325,38 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
if (device_param->skipped == true) continue;
|
|
|
|
|
|
|
|
|
|
if (device_param->is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < tmp_in; i++)
|
|
|
|
|
{
|
|
|
|
|
nvmlPciInfo_t pci;
|
|
|
|
|
|
|
|
|
|
int rc = hm_NVML_nvmlDeviceGetPciInfo (hashcat_ctx, nvmlGPUHandle[i], &pci);
|
|
|
|
|
|
|
|
|
|
if (rc == -1) continue;
|
|
|
|
|
|
|
|
|
|
if ((device_param->pcie_bus == pci.bus)
|
|
|
|
|
&& (device_param->pcie_device == (pci.device >> 3))
|
|
|
|
|
&& (device_param->pcie_function == (pci.device & 7)))
|
|
|
|
|
{
|
|
|
|
|
const u32 device_id = device_param->device_id;
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvml[device_id].nvml = nvmlGPUHandle[i];
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvml[device_id].buslanes_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].corespeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].fanspeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].memoryspeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].temperature_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].threshold_shutdown_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].threshold_slowdown_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].utilization_get_supported = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
|
|
|
|
|
|
|
|
|
if (device_param->opencl_device_vendor_id != VENDOR_ID_NV) continue;
|
|
|
|
@ -2124,18 +2373,19 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
&& (device_param->pcie_device == (pci.device >> 3))
|
|
|
|
|
&& (device_param->pcie_function == (pci.device & 7)))
|
|
|
|
|
{
|
|
|
|
|
const u32 platform_devices_id = device_param->opencl_platform_devices_id;
|
|
|
|
|
const u32 device_id = device_param->device_id;
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].nvml = nvmlGPUHandle[i];
|
|
|
|
|
hm_adapters_nvml[device_id].nvml = nvmlGPUHandle[i];
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].buslanes_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].corespeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].fanspeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].memoryspeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].temperature_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].threshold_shutdown_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].threshold_slowdown_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[platform_devices_id].utilization_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].buslanes_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].corespeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].fanspeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].memoryspeed_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].temperature_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].threshold_shutdown_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].threshold_slowdown_get_supported = true;
|
|
|
|
|
hm_adapters_nvml[device_id].utilization_get_supported = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2158,6 +2408,37 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
if (device_param->skipped == true) continue;
|
|
|
|
|
|
|
|
|
|
if (device_param->is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < tmp_in; i++)
|
|
|
|
|
{
|
|
|
|
|
NvU32 BusId = 0;
|
|
|
|
|
NvU32 BusSlotId = 0;
|
|
|
|
|
|
|
|
|
|
int rc1 = hm_NvAPI_GPU_GetBusId (hashcat_ctx, nvGPUHandle[i], &BusId);
|
|
|
|
|
|
|
|
|
|
if (rc1 == -1) continue;
|
|
|
|
|
|
|
|
|
|
int rc2 = hm_NvAPI_GPU_GetBusSlotId (hashcat_ctx, nvGPUHandle[i], &BusSlotId);
|
|
|
|
|
|
|
|
|
|
if (rc2 == -1) continue;
|
|
|
|
|
|
|
|
|
|
if ((device_param->pcie_bus == BusId)
|
|
|
|
|
&& (device_param->pcie_device == (BusSlotId >> 3))
|
|
|
|
|
&& (device_param->pcie_function == (BusSlotId & 7)))
|
|
|
|
|
{
|
|
|
|
|
const u32 device_id = device_param->device_id;
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvapi[device_id].nvapi = nvGPUHandle[i];
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvapi[device_id].fanpolicy_get_supported = true;
|
|
|
|
|
hm_adapters_nvapi[device_id].throttle_get_supported = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
|
|
|
|
|
|
|
|
|
if (device_param->opencl_device_vendor_id != VENDOR_ID_NV) continue;
|
|
|
|
@ -2179,12 +2460,13 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
&& (device_param->pcie_device == (BusSlotId >> 3))
|
|
|
|
|
&& (device_param->pcie_function == (BusSlotId & 7)))
|
|
|
|
|
{
|
|
|
|
|
const u32 platform_devices_id = device_param->opencl_platform_devices_id;
|
|
|
|
|
const u32 device_id = device_param->device_id;
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvapi[platform_devices_id].nvapi = nvGPUHandle[i];
|
|
|
|
|
hm_adapters_nvapi[device_id].nvapi = nvGPUHandle[i];
|
|
|
|
|
|
|
|
|
|
hm_adapters_nvapi[platform_devices_id].fanpolicy_get_supported = true;
|
|
|
|
|
hm_adapters_nvapi[platform_devices_id].throttle_get_supported = true;
|
|
|
|
|
hm_adapters_nvapi[device_id].fanpolicy_get_supported = true;
|
|
|
|
|
hm_adapters_nvapi[device_id].throttle_get_supported = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2227,6 +2509,13 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
if (device_param->skipped == true) continue;
|
|
|
|
|
|
|
|
|
|
if (device_param->is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
// nothing to do
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
|
|
|
|
|
|
|
|
|
if (device_param->opencl_device_vendor_id != VENDOR_ID_AMD) continue;
|
|
|
|
@ -2237,7 +2526,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
&& (device_param->pcie_device == (lpAdapterInfo[i].iDeviceNumber >> 3))
|
|
|
|
|
&& (device_param->pcie_function == (lpAdapterInfo[i].iDeviceNumber & 7)))
|
|
|
|
|
{
|
|
|
|
|
const u32 platform_devices_id = device_param->opencl_platform_devices_id;
|
|
|
|
|
const u32 device_id = device_param->device_id;
|
|
|
|
|
|
|
|
|
|
int od_supported = 0;
|
|
|
|
|
int od_enabled = 0;
|
|
|
|
@ -2245,18 +2534,19 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
hm_ADL_Overdrive_Caps (hashcat_ctx, lpAdapterInfo[i].iAdapterIndex, &od_supported, &od_enabled, &od_version);
|
|
|
|
|
|
|
|
|
|
hm_adapters_adl[platform_devices_id].od_version = od_version;
|
|
|
|
|
hm_adapters_adl[device_id].od_version = od_version;
|
|
|
|
|
|
|
|
|
|
hm_adapters_adl[platform_devices_id].adl = lpAdapterInfo[i].iAdapterIndex;
|
|
|
|
|
hm_adapters_adl[device_id].adl = lpAdapterInfo[i].iAdapterIndex;
|
|
|
|
|
|
|
|
|
|
hm_adapters_adl[platform_devices_id].buslanes_get_supported = true;
|
|
|
|
|
hm_adapters_adl[platform_devices_id].corespeed_get_supported = true;
|
|
|
|
|
hm_adapters_adl[platform_devices_id].fanspeed_get_supported = true;
|
|
|
|
|
hm_adapters_adl[platform_devices_id].fanpolicy_get_supported = true;
|
|
|
|
|
hm_adapters_adl[platform_devices_id].memoryspeed_get_supported = true;
|
|
|
|
|
hm_adapters_adl[platform_devices_id].temperature_get_supported = true;
|
|
|
|
|
hm_adapters_adl[platform_devices_id].threshold_slowdown_get_supported = true;
|
|
|
|
|
hm_adapters_adl[platform_devices_id].utilization_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].buslanes_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].corespeed_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].fanspeed_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].fanpolicy_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].memoryspeed_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].temperature_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].threshold_slowdown_get_supported = true;
|
|
|
|
|
hm_adapters_adl[device_id].utilization_get_supported = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2275,6 +2565,13 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
|
|
|
|
|
|
|
|
|
|
if (device_param->is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
// nothing to do
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
|
|
|
|
|
|
|
|
|
hm_adapters_sysfs[hm_adapters_id].sysfs = backend_devices_idx; // ????
|
|
|
|
@ -2290,6 +2587,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_adl == NULL && hwmon_ctx->hm_nvml == NULL && hwmon_ctx->hm_sysfs == NULL)
|
|
|
|
|
{
|
|
|
|
@ -2320,46 +2618,85 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
if (device_param->skipped == true) continue;
|
|
|
|
|
|
|
|
|
|
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
|
|
|
|
const u32 device_id = device_param->device_id;
|
|
|
|
|
|
|
|
|
|
const u32 platform_devices_id = device_param->opencl_platform_devices_id;
|
|
|
|
|
if (device_param->is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].adl = 0;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].sysfs = 0;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvapi = hm_adapters_nvapi[device_id].nvapi;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvml = hm_adapters_nvml[device_id].nvml;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].od_version = 0;
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_nvml[device_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_nvml[device_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_nvml[device_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_nvml[device_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_nvml[device_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_nvml[device_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_nvml[device_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_nvml[device_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_nvml[device_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_nvml[device_id].utilization_get_supported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_nvapi)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_nvapi[device_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_nvapi[device_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_nvapi[device_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_nvapi[device_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_nvapi[device_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_nvapi[device_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_nvapi[device_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_nvapi[device_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_nvapi[device_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_nvapi[device_id].utilization_get_supported;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (device_param->is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
|
|
|
|
|
|
|
|
|
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].adl = hm_adapters_adl[platform_devices_id].adl;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].sysfs = hm_adapters_sysfs[platform_devices_id].sysfs;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].adl = hm_adapters_adl[device_id].adl;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].sysfs = hm_adapters_sysfs[device_id].sysfs;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvapi = 0;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvml = 0;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].od_version = 0;
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_adl)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].od_version = hm_adapters_adl[platform_devices_id].od_version;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].od_version = hm_adapters_adl[device_id].od_version;
|
|
|
|
|
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_adl[platform_devices_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_adl[platform_devices_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_adl[platform_devices_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_adl[platform_devices_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_adl[platform_devices_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_adl[platform_devices_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_adl[platform_devices_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_adl[platform_devices_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_adl[platform_devices_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_adl[platform_devices_id].utilization_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_adl[device_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_adl[device_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_adl[device_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_adl[device_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_adl[device_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_adl[device_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_adl[device_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_adl[device_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_adl[device_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_adl[device_id].utilization_get_supported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_sysfs)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_sysfs[platform_devices_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_sysfs[platform_devices_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_sysfs[platform_devices_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_sysfs[platform_devices_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_sysfs[platform_devices_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_sysfs[platform_devices_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_sysfs[platform_devices_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_sysfs[platform_devices_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_sysfs[platform_devices_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_sysfs[platform_devices_id].utilization_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_sysfs[device_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_sysfs[device_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_sysfs[device_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_sysfs[device_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_sysfs[device_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_sysfs[device_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_sysfs[device_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_sysfs[device_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_sysfs[device_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_sysfs[device_id].utilization_get_supported;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2367,36 +2704,37 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].adl = 0;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].sysfs = 0;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvapi = hm_adapters_nvapi[platform_devices_id].nvapi;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvml = hm_adapters_nvml[platform_devices_id].nvml;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvapi = hm_adapters_nvapi[device_id].nvapi;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].nvml = hm_adapters_nvml[device_id].nvml;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].od_version = 0;
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_nvml)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_nvml[platform_devices_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_nvml[platform_devices_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_nvml[platform_devices_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_nvml[platform_devices_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_nvml[platform_devices_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_nvml[platform_devices_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_nvml[platform_devices_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_nvml[platform_devices_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_nvml[platform_devices_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_nvml[platform_devices_id].utilization_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_nvml[device_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_nvml[device_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_nvml[device_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_nvml[device_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_nvml[device_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_nvml[device_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_nvml[device_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_nvml[device_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_nvml[device_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_nvml[device_id].utilization_get_supported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hwmon_ctx->hm_nvapi)
|
|
|
|
|
{
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_nvapi[platform_devices_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_nvapi[platform_devices_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_nvapi[platform_devices_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_nvapi[platform_devices_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_nvapi[platform_devices_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_nvapi[platform_devices_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_nvapi[platform_devices_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_nvapi[platform_devices_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_nvapi[platform_devices_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_nvapi[platform_devices_id].utilization_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].buslanes_get_supported |= hm_adapters_nvapi[device_id].buslanes_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].corespeed_get_supported |= hm_adapters_nvapi[device_id].corespeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanspeed_get_supported |= hm_adapters_nvapi[device_id].fanspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].fanpolicy_get_supported |= hm_adapters_nvapi[device_id].fanpolicy_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].memoryspeed_get_supported |= hm_adapters_nvapi[device_id].memoryspeed_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].temperature_get_supported |= hm_adapters_nvapi[device_id].temperature_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_shutdown_get_supported |= hm_adapters_nvapi[device_id].threshold_shutdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].threshold_slowdown_get_supported |= hm_adapters_nvapi[device_id].threshold_slowdown_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].throttle_get_supported |= hm_adapters_nvapi[device_id].throttle_get_supported;
|
|
|
|
|
hwmon_ctx->hm_device[backend_devices_idx].utilization_get_supported |= hm_adapters_nvapi[device_id].utilization_get_supported;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|