mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-22 05:31:11 +00:00
commit
b66c093c17
@ -32,7 +32,7 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons
|
||||
u32 tmp3;
|
||||
u32 tmp4;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
u32 in2 = append[2];
|
||||
@ -45,12 +45,18 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons
|
||||
tmp4 = hc_bytealign (in3, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
@ -139,7 +145,7 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3,
|
||||
u32 tmp3;
|
||||
u32 tmp4;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
u32 in2 = append[2];
|
||||
@ -153,12 +159,18 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3,
|
||||
tmp4 = hc_bytealign (in3, in4, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
@ -246,7 +258,7 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const
|
||||
u32 tmp1;
|
||||
u32 tmp2;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
|
||||
@ -255,12 +267,18 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const
|
||||
tmp2 = hc_bytealign (in1, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
|
@ -1664,18 +1664,18 @@ DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32
|
||||
|
||||
DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63)
|
||||
{
|
||||
const u32 s001 = (0x001 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s002 = (0x002 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s004 = (0x004 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s008 = (0x008 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s010 = (0x010 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s020 = (0x020 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s040 = (0x040 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s080 = (0x080 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s100 = (0x100 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s200 = (0x200 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s400 = (0x400 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s800 = (0x800 & SALT) ? 0xffffffff : 0;
|
||||
const u32 s001 = (0x001 & SALT) ? 1 : 0;
|
||||
const u32 s002 = (0x002 & SALT) ? 1 : 0;
|
||||
const u32 s004 = (0x004 & SALT) ? 1 : 0;
|
||||
const u32 s008 = (0x008 & SALT) ? 1 : 0;
|
||||
const u32 s010 = (0x010 & SALT) ? 1 : 0;
|
||||
const u32 s020 = (0x020 & SALT) ? 1 : 0;
|
||||
const u32 s040 = (0x040 & SALT) ? 1 : 0;
|
||||
const u32 s080 = (0x080 & SALT) ? 1 : 0;
|
||||
const u32 s100 = (0x100 & SALT) ? 1 : 0;
|
||||
const u32 s200 = (0x200 & SALT) ? 1 : 0;
|
||||
const u32 s400 = (0x400 & SALT) ? 1 : 0;
|
||||
const u32 s800 = (0x800 & SALT) ? 1 : 0;
|
||||
|
||||
KXX_DECL u32 k00, k01, k02, k03, k04, k05;
|
||||
KXX_DECL u32 k06, k07, k08, k09, k10, k11;
|
||||
|
@ -31,7 +31,7 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons
|
||||
u32 tmp3;
|
||||
u32 tmp4;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
u32 in2 = append[2];
|
||||
@ -44,12 +44,18 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons
|
||||
tmp4 = hc_bytealign (in3, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
@ -138,7 +144,7 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3,
|
||||
u32 tmp3;
|
||||
u32 tmp4;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
u32 in2 = append[2];
|
||||
@ -152,12 +158,18 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3,
|
||||
tmp4 = hc_bytealign (in3, in4, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
@ -245,7 +257,7 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const
|
||||
u32 tmp1;
|
||||
u32 tmp2;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
|
||||
@ -254,12 +266,18 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const
|
||||
tmp2 = hc_bytealign (in1, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
|
@ -2119,7 +2119,7 @@ DECLSPEC void append_salt (u32 *w0, u32 *w1, u32 *w2, const u32 *append, const u
|
||||
u32 tmp4;
|
||||
u32 tmp5;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
u32 in2 = append[2];
|
||||
@ -2134,12 +2134,18 @@ DECLSPEC void append_salt (u32 *w0, u32 *w1, u32 *w2, const u32 *append, const u
|
||||
tmp5 = hc_bytealign (in4, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
|
@ -28,7 +28,7 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons
|
||||
u32 tmp3;
|
||||
u32 tmp4;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
u32 in2 = append[2];
|
||||
@ -41,12 +41,18 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons
|
||||
tmp4 = hc_bytealign (in3, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
@ -135,7 +141,7 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3,
|
||||
u32 tmp3;
|
||||
u32 tmp4;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
u32 in2 = append[2];
|
||||
@ -149,12 +155,18 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3,
|
||||
tmp4 = hc_bytealign (in3, in4, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
@ -242,7 +254,7 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const
|
||||
u32 tmp1;
|
||||
u32 tmp2;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
|
||||
@ -251,12 +263,18 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const
|
||||
tmp2 = hc_bytealign (in1, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
const int offset_mod_4 = offset & 3;
|
||||
|
||||
const int offset_minus_4 = 4 - offset_mod_4;
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));
|
||||
#endif
|
||||
|
||||
u32 in0 = append[0];
|
||||
u32 in1 = append[1];
|
||||
|
@ -45,7 +45,7 @@ DECLSPEC u32 memcat16 (u32 *block, const u32 offset, const u32 *append, const u3
|
||||
u32 in2 = append[2];
|
||||
u32 in3 = append[3];
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
const u32 tmp0 = hc_bytealign_be ( 0, in0, offset);
|
||||
const u32 tmp1 = hc_bytealign_be (in0, in1, offset);
|
||||
const u32 tmp2 = hc_bytealign_be (in1, in2, offset);
|
||||
@ -53,8 +53,15 @@ DECLSPEC u32 memcat16 (u32 *block, const u32 offset, const u32 *append, const u3
|
||||
const u32 tmp4 = hc_bytealign_be (in3, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
const u32 tmp0 = hc_byte_perm_S (in0, 0, selector);
|
||||
const u32 tmp1 = hc_byte_perm_S (in1, in0, selector);
|
||||
@ -165,7 +172,7 @@ DECLSPEC u32 memcat16c (u32 *block, const u32 offset, const u32 *append, const u
|
||||
u32 in2 = append[2];
|
||||
u32 in3 = append[3];
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
const u32 tmp0 = hc_bytealign_be ( 0, in0, offset);
|
||||
const u32 tmp1 = hc_bytealign_be (in0, in1, offset);
|
||||
const u32 tmp2 = hc_bytealign_be (in1, in2, offset);
|
||||
@ -173,8 +180,15 @@ DECLSPEC u32 memcat16c (u32 *block, const u32 offset, const u32 *append, const u
|
||||
const u32 tmp4 = hc_bytealign_be (in3, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
const u32 tmp0 = hc_byte_perm_S (in0, 0, selector);
|
||||
const u32 tmp1 = hc_byte_perm_S (in1, in0, selector);
|
||||
@ -322,7 +336,7 @@ DECLSPEC u32 memcat16s (u32 *block, const u32 offset, const u32 *append, const u
|
||||
u32 in3 = append[3];
|
||||
u32 in4 = append[4];
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
const u32 tmp0 = hc_bytealign_be ( 0, in0, offset);
|
||||
const u32 tmp1 = hc_bytealign_be (in0, in1, offset);
|
||||
const u32 tmp2 = hc_bytealign_be (in1, in2, offset);
|
||||
@ -331,8 +345,15 @@ DECLSPEC u32 memcat16s (u32 *block, const u32 offset, const u32 *append, const u
|
||||
const u32 tmp5 = hc_bytealign_be (in4, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
const u32 tmp0 = hc_byte_perm_S (in0, 0, selector);
|
||||
const u32 tmp1 = hc_byte_perm_S (in1, in0, selector);
|
||||
@ -456,7 +477,7 @@ DECLSPEC u32 memcat16sc (u32 *block, const u32 offset, const u32 *append, const
|
||||
u32 in3 = append[3];
|
||||
u32 in4 = append[4];
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
const u32 tmp0 = hc_bytealign_be ( 0, in0, offset);
|
||||
const u32 tmp1 = hc_bytealign_be (in0, in1, offset);
|
||||
const u32 tmp2 = hc_bytealign_be (in1, in2, offset);
|
||||
@ -465,8 +486,15 @@ DECLSPEC u32 memcat16sc (u32 *block, const u32 offset, const u32 *append, const
|
||||
const u32 tmp5 = hc_bytealign_be (in4, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
const u32 tmp0 = hc_byte_perm_S (in0, 0, selector);
|
||||
const u32 tmp1 = hc_byte_perm_S (in1, in0, selector);
|
||||
@ -756,7 +784,7 @@ DECLSPEC u32 memcat20 (u32 *block, const u32 offset, const u32 *append, const u3
|
||||
u32 in2 = append[2];
|
||||
u32 in3 = append[3];
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
const u32 tmp0 = hc_bytealign_be_S ( 0, in0, offset);
|
||||
const u32 tmp1 = hc_bytealign_be_S (in0, in1, offset);
|
||||
const u32 tmp2 = hc_bytealign_be_S (in1, in2, offset);
|
||||
@ -764,8 +792,15 @@ DECLSPEC u32 memcat20 (u32 *block, const u32 offset, const u32 *append, const u3
|
||||
const u32 tmp4 = hc_bytealign_be_S (in3, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
const u32 tmp0 = hc_byte_perm_S (in0, 0, selector);
|
||||
const u32 tmp1 = hc_byte_perm_S (in1, in0, selector);
|
||||
@ -915,7 +950,7 @@ DECLSPEC u32 memcat20_x80 (u32 *block, const u32 offset, const u32 *append, cons
|
||||
u32 in3 = append[3];
|
||||
u32 in4 = 0x80000000;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
const u32 tmp0 = hc_bytealign_be_S ( 0, in0, offset);
|
||||
const u32 tmp1 = hc_bytealign_be_S (in0, in1, offset);
|
||||
const u32 tmp2 = hc_bytealign_be_S (in1, in2, offset);
|
||||
@ -923,8 +958,15 @@ DECLSPEC u32 memcat20_x80 (u32 *block, const u32 offset, const u32 *append, cons
|
||||
const u32 tmp4 = hc_bytealign_be_S (in3, in4, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
const u32 tmp0 = hc_byte_perm_S (in0, 0, selector);
|
||||
const u32 tmp1 = hc_byte_perm_S (in1, in0, selector);
|
||||
@ -1074,7 +1116,7 @@ DECLSPEC u32 memcat24 (u32 *block, const u32 offset, const u32 *append, const u3
|
||||
u32 in3 = append[3];
|
||||
u32 in4 = append[4];
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
const u32 tmp0 = hc_bytealign_be_S ( 0, in0, offset);
|
||||
const u32 tmp1 = hc_bytealign_be_S (in0, in1, offset);
|
||||
const u32 tmp2 = hc_bytealign_be_S (in1, in2, offset);
|
||||
@ -1083,8 +1125,15 @@ DECLSPEC u32 memcat24 (u32 *block, const u32 offset, const u32 *append, const u3
|
||||
const u32 tmp5 = hc_bytealign_be_S (in4, 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
const u32 tmp0 = hc_byte_perm_S (in0, 0, selector);
|
||||
const u32 tmp1 = hc_byte_perm_S (in1, in0, selector);
|
||||
|
@ -232,7 +232,7 @@ DECLSPEC void make_sc (u32 *sc, const u32 *pw, const u32 pw_len, const u32 *bl,
|
||||
|
||||
u32 i;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
for (i = 0; i < pd; i++) sc[idx++] = pw[i];
|
||||
sc[idx++] = pw[i]
|
||||
| hc_bytealign_be (bl[0], 0, pm4);
|
||||
@ -242,8 +242,15 @@ DECLSPEC void make_sc (u32 *sc, const u32 *pw, const u32 pw_len, const u32 *bl,
|
||||
sc[idx++] = hc_bytealign_be ( 0, sc[i - 1], pm4);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
int selector = (0x76543210 >> (pm4 * 4)) & 0xffff;
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((pm4 & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((pm4 & 3) * 8));
|
||||
#endif
|
||||
|
||||
for (i = 0; i < pd; i++) sc[idx++] = pw[i];
|
||||
sc[idx++] = pw[i]
|
||||
@ -263,16 +270,22 @@ DECLSPEC void make_pt_with_offset (u32 *pt, const u32 offset, const u32 *sc, con
|
||||
const u32 om = m % 4;
|
||||
const u32 od = m / 4;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
pt[0] = hc_bytealign_be (sc[od + 1], sc[od + 0], om);
|
||||
pt[1] = hc_bytealign_be (sc[od + 2], sc[od + 1], om);
|
||||
pt[2] = hc_bytealign_be (sc[od + 3], sc[od + 2], om);
|
||||
pt[3] = hc_bytealign_be (sc[od + 4], sc[od + 3], om);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
int selector = (0x76543210 >> (om * 4)) & 0xffff;
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((om & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((om & 3) * 8));
|
||||
#endif
|
||||
pt[0] = hc_byte_perm (sc[od + 0], sc[od + 1], selector);
|
||||
pt[1] = hc_byte_perm (sc[od + 1], sc[od + 2], selector);
|
||||
pt[2] = hc_byte_perm (sc[od + 2], sc[od + 3], selector);
|
||||
|
@ -42,13 +42,20 @@ DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, co
|
||||
u32 tmp0;
|
||||
u32 tmp1;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
tmp0 = hc_bytealign_be (0, append, func_len);
|
||||
tmp1 = hc_bytealign_be (append, 0, func_len);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((func_len & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((func_len & 3) * 8));
|
||||
#endif
|
||||
|
||||
tmp0 = hc_byte_perm (append, 0, selector);
|
||||
tmp1 = hc_byte_perm (0, append, selector);
|
||||
|
@ -37,13 +37,20 @@ DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, co
|
||||
u32 tmp0;
|
||||
u32 tmp1;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
tmp0 = hc_bytealign_be (0, append, func_len);
|
||||
tmp1 = hc_bytealign_be (append, 0, func_len);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((func_len & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((func_len & 3) * 8));
|
||||
#endif
|
||||
|
||||
tmp0 = hc_byte_perm (append, 0, selector);
|
||||
tmp1 = hc_byte_perm (0, append, selector);
|
||||
|
@ -51,7 +51,7 @@ DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry)
|
||||
u32x tmp15;
|
||||
u32x tmp16;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
tmp00 = hc_bytealign_be ( 0, carry[ 0], offset);
|
||||
tmp01 = hc_bytealign_be (carry[ 0], carry[ 1], offset);
|
||||
tmp02 = hc_bytealign_be (carry[ 1], carry[ 2], offset);
|
||||
@ -71,8 +71,15 @@ DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry)
|
||||
tmp16 = hc_bytealign_be (carry[15], 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
tmp00 = hc_byte_perm (carry[ 0], 0, selector);
|
||||
tmp01 = hc_byte_perm (carry[ 1], carry[ 0], selector);
|
||||
|
@ -49,7 +49,7 @@ DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry)
|
||||
u32x tmp15;
|
||||
u32x tmp16;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
tmp00 = hc_bytealign_be ( 0, carry[ 0], offset);
|
||||
tmp01 = hc_bytealign_be (carry[ 0], carry[ 1], offset);
|
||||
tmp02 = hc_bytealign_be (carry[ 1], carry[ 2], offset);
|
||||
@ -69,8 +69,15 @@ DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry)
|
||||
tmp16 = hc_bytealign_be (carry[15], 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
tmp00 = hc_byte_perm (carry[ 0], 0, selector);
|
||||
tmp01 = hc_byte_perm (carry[ 1], carry[ 0], selector);
|
||||
|
@ -48,7 +48,7 @@ DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry)
|
||||
u32x tmp15;
|
||||
u32x tmp16;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
tmp00 = hc_bytealign_be ( 0, carry[ 0], offset);
|
||||
tmp01 = hc_bytealign_be (carry[ 0], carry[ 1], offset);
|
||||
tmp02 = hc_bytealign_be (carry[ 1], carry[ 2], offset);
|
||||
@ -68,8 +68,15 @@ DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry)
|
||||
tmp16 = hc_bytealign_be (carry[15], 0, offset);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));
|
||||
#endif
|
||||
|
||||
tmp00 = hc_byte_perm (carry[ 0], 0, selector);
|
||||
tmp01 = hc_byte_perm (carry[ 1], carry[ 0], selector);
|
||||
|
@ -145,13 +145,20 @@ DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, co
|
||||
u32 tmp0;
|
||||
u32 tmp1;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
tmp0 = hc_bytealign_be (0, append, func_len);
|
||||
tmp1 = hc_bytealign_be (append, 0, func_len);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((func_len & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((func_len & 3) * 8));
|
||||
#endif
|
||||
|
||||
tmp0 = hc_byte_perm (append, 0, selector);
|
||||
tmp1 = hc_byte_perm (0, append, selector);
|
||||
|
@ -56,13 +56,20 @@ DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, co
|
||||
u32 tmp0;
|
||||
u32 tmp1;
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC
|
||||
tmp0 = hc_bytealign_be (0, append, func_len);
|
||||
tmp1 = hc_bytealign_be (append, 0, func_len);
|
||||
#endif
|
||||
|
||||
#ifdef IS_NV
|
||||
#if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV
|
||||
|
||||
#if defined IS_NV
|
||||
const int selector = (0x76543210 >> ((func_len & 3) * 4)) & 0xffff;
|
||||
#endif
|
||||
|
||||
#if (defined IS_AMD || defined IS_HIP)
|
||||
const int selector = l32_from_64_S (0x0706050403020100UL >> ((func_len & 3) * 8));
|
||||
#endif
|
||||
|
||||
tmp0 = hc_byte_perm (append, 0, selector);
|
||||
tmp1 = hc_byte_perm (0, append, selector);
|
||||
|
@ -19,6 +19,7 @@
|
||||
## Improvements
|
||||
##
|
||||
|
||||
- AMD GPUs: Add inline assembly code for md5crypt/sha256crypt, PDF 1.7, 7-Zip, RAR3, Samsung Android and Windows Phone 8+
|
||||
- Blake Kernels: Optimize BLAKE2B_ROUND() 64 bit rotates giving a 5% performance increase
|
||||
- Brain Session: Adds hashconfig specific opti_type and opts_type parameters to hashcat session computation to cover features like -O and -M
|
||||
- Kernel Threads: Use warp size / wavefront size query instead of hardcoded values as base for kernel threads
|
||||
@ -29,6 +30,7 @@
|
||||
## Technical
|
||||
##
|
||||
|
||||
- ADL: Updated support for AMD Display Library to 14.0, updated datatypes and added support for OverDrive 7 and 8 based GPUs
|
||||
- Commandline: Throw an error if separator character given by the user with -p option is not exactly 1 byte
|
||||
- Kernel Cache: Add kernel threads into hash computation which is later used in the kernel cache filename
|
||||
- HIP Kernels: Got rid of hip/hip_runtime.h dependancy to enable more easy integration of the HIP backend on Windows
|
||||
|
@ -13,228 +13,602 @@
|
||||
#include <windows.h>
|
||||
#endif // _WIN
|
||||
|
||||
// Values taken from display-library-14.0.zip
|
||||
|
||||
/**
|
||||
* Declarations from adl_sdk.h and subheaders
|
||||
* Declarations from adl_defines.h
|
||||
*/
|
||||
|
||||
/// ADL function completed successfully
|
||||
#define ADL_OK 0
|
||||
/// Generic Error. Most likely one or more of the Escape calls to the driver failed!
|
||||
#define ADL_ERR -1
|
||||
|
||||
/// Function not supported by the driver
|
||||
#define ADL_ERR_NOT_SUPPORTED -8
|
||||
|
||||
/// Defines the maximum string length
|
||||
#define ADL_MAX_PATH 256
|
||||
|
||||
//values for ADLFanSpeedValue.iSpeedType
|
||||
#define ADL_DL_FANCTRL_SPEED_TYPE_PERCENT 1
|
||||
#define ADL_DL_FANCTRL_SPEED_TYPE_RPM 2
|
||||
|
||||
//values for ADLFanSpeedValue.iFlags
|
||||
#define ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED 1
|
||||
|
||||
//Define Performance Metrics Log max sensors number
|
||||
#define ADL_PMLOG_MAX_SENSORS 256
|
||||
|
||||
/**
|
||||
* Declarations from adl_structures.h
|
||||
*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about the graphics adapter.
|
||||
///
|
||||
/// This structure is used to store various information about the graphics adapter. This
|
||||
/// information can be returned to the user. Alternatively, it can be used to access various driver calls to set
|
||||
/// or fetch various settings upon the user's request.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct AdapterInfo
|
||||
{
|
||||
/// \ALL_STRUCT_MEM
|
||||
|
||||
/// Size of the structure.
|
||||
int iSize;
|
||||
/// The ADL index handle. One GPU may be associated with one or two index handles
|
||||
int iAdapterIndex;
|
||||
/// The unique device ID associated with this adapter.
|
||||
char strUDID[ADL_MAX_PATH];
|
||||
/// The BUS number associated with this adapter.
|
||||
int iBusNumber;
|
||||
/// The driver number associated with this adapter.
|
||||
int iDeviceNumber;
|
||||
/// The function number.
|
||||
int iFunctionNumber;
|
||||
/// The vendor ID associated with this adapter.
|
||||
int iVendorID;
|
||||
/// Adapter name.
|
||||
char strAdapterName[ADL_MAX_PATH];
|
||||
/// Display name. For example, "\\\\Display0" for Windows or ":0:0" for Linux.
|
||||
char strDisplayName[ADL_MAX_PATH];
|
||||
/// Present or not; 1 if present and 0 if not present.It the logical adapter is present, the display name such as \\\\.\\Display1 can be found from OS
|
||||
int iPresent;
|
||||
|
||||
#if defined (_WIN32) || defined (_WIN64) || defined (__CYGWIN__)
|
||||
int iExist;
|
||||
char strDriverPath[ADL_MAX_PATH];
|
||||
char strDriverPathExt[ADL_MAX_PATH];
|
||||
char strPNPString[ADL_MAX_PATH];
|
||||
int iOSDisplayIndex;
|
||||
#endif /* (_WIN32) || (_WIN64) || (__CYGWIN__) */
|
||||
#if defined (_WIN32) || defined (_WIN64)
|
||||
/// \WIN_STRUCT_MEM
|
||||
|
||||
#if defined (__linux__)
|
||||
/// Exist or not; 1 is exist and 0 is not present.
|
||||
int iExist;
|
||||
/// Driver registry path.
|
||||
char strDriverPath[ADL_MAX_PATH];
|
||||
/// Driver registry path Ext for.
|
||||
char strDriverPathExt[ADL_MAX_PATH];
|
||||
/// PNP string from Windows.
|
||||
char strPNPString[ADL_MAX_PATH];
|
||||
/// It is generated from EnumDisplayDevices.
|
||||
int iOSDisplayIndex;
|
||||
#endif /* (_WIN32) || (_WIN64) */
|
||||
|
||||
#if defined (LINUX)
|
||||
/// \LNX_STRUCT_MEM
|
||||
|
||||
/// Internal X screen number from GPUMapInfo (DEPRICATED use XScreenInfo)
|
||||
int iXScreenNum;
|
||||
/// Internal driver index from GPUMapInfo
|
||||
int iDrvIndex;
|
||||
/// \deprecated Internal x config file screen identifier name. Use XScreenInfo instead.
|
||||
char strXScreenConfigName[ADL_MAX_PATH];
|
||||
#endif /* (__linux__) */
|
||||
|
||||
#endif /* (LINUX) */
|
||||
} AdapterInfo, *LPAdapterInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about thermal controller.
|
||||
///
|
||||
/// This structure is used to store information about thermal controller.
|
||||
/// This structure is used by ADL_PM_ThermalDevices_Enum.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLThermalControllerInfo
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Possible valies: \ref ADL_DL_THERMAL_DOMAIN_OTHER or \ref ADL_DL_THERMAL_DOMAIN_GPU.
|
||||
int iThermalDomain;
|
||||
/// GPU 0, 1, etc.
|
||||
int iDomainIndex;
|
||||
/// Possible valies: \ref ADL_DL_THERMAL_FLAG_INTERRUPT or \ref ADL_DL_THERMAL_FLAG_FANCONTROL
|
||||
int iFlags;
|
||||
} ADLThermalControllerInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about thermal controller temperature.
|
||||
///
|
||||
/// This structure is used to store information about thermal controller temperature.
|
||||
/// This structure is used by the ADL_PM_Temperature_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLTemperature
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Temperature in millidegrees Celsius.
|
||||
int iTemperature;
|
||||
} ADLTemperature;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about thermal controller fan speed.
|
||||
///
|
||||
/// This structure is used to store information about thermal controller fan speed.
|
||||
/// This structure is used by the ADL_PM_FanSpeedInfo_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLFanSpeedInfo
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// \ref define_fanctrl
|
||||
int iFlags;
|
||||
/// Minimum possible fan speed value in percents.
|
||||
int iMinPercent;
|
||||
/// Maximum possible fan speed value in percents.
|
||||
int iMaxPercent;
|
||||
/// Minimum possible fan speed value in RPM.
|
||||
int iMinRPM;
|
||||
/// Maximum possible fan speed value in RPM.
|
||||
int iMaxRPM;
|
||||
} ADLFanSpeedInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about fan speed reported by thermal controller.
|
||||
///
|
||||
/// This structure is used to store information about fan speed reported by thermal controller.
|
||||
/// This structure is used by the ADL_Overdrive5_FanSpeed_Get() and ADL_Overdrive5_FanSpeed_Set() functions.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLFanSpeedValue
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Possible valies: \ref ADL_DL_FANCTRL_SPEED_TYPE_PERCENT or \ref ADL_DL_FANCTRL_SPEED_TYPE_RPM
|
||||
int iSpeedType;
|
||||
/// Fan speed value
|
||||
int iFanSpeed;
|
||||
/// The only flag for now is: \ref ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED
|
||||
int iFlags;
|
||||
} ADLFanSpeedValue;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about the display device.
|
||||
///
|
||||
/// This structure is used to store display device information
|
||||
/// such as display index, type, name, connection status, mapped adapter and controller indexes,
|
||||
/// whether or not multiple VPUs are supported, local display connections or not (through Lasso), etc.
|
||||
/// This information can be returned to the user. Alternatively, it can be used to access various driver calls to set
|
||||
/// or fetch various display device related settings upon the user's request.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLDisplayID
|
||||
{
|
||||
/// The logical display index belonging to this adapter.
|
||||
int iDisplayLogicalIndex;
|
||||
|
||||
///\brief The physical display index.
|
||||
/// For example, display index 2 from adapter 2 can be used by current adapter 1.\n
|
||||
/// So current adapter may enumerate this adapter as logical display 7 but the physical display
|
||||
/// index is still 2.
|
||||
int iDisplayPhysicalIndex;
|
||||
|
||||
/// The persistent logical adapter index for the display.
|
||||
int iDisplayLogicalAdapterIndex;
|
||||
|
||||
///\brief The persistent physical adapter index for the display.
|
||||
/// It can be the current adapter or a non-local adapter. \n
|
||||
/// If this adapter index is different than the current adapter,
|
||||
/// the Display Non Local flag is set inside DisplayInfoValue.
|
||||
int iDisplayPhysicalAdapterIndex;
|
||||
} ADLDisplayID, *LPADLDisplayID;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about the display device.
|
||||
///
|
||||
/// This structure is used to store various information about the display device. This
|
||||
/// information can be returned to the user, or used to access various driver calls to set
|
||||
/// or fetch various display-device-related settings upon the user's request
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLDisplayInfo
|
||||
{
|
||||
/// The DisplayID structure
|
||||
ADLDisplayID displayID;
|
||||
|
||||
///\deprecated The controller index to which the display is mapped.\n Will not be used in the future\n
|
||||
int iDisplayControllerIndex;
|
||||
|
||||
/// The display's EDID name.
|
||||
char strDisplayName[ADL_MAX_PATH];
|
||||
|
||||
/// The display's manufacturer name.
|
||||
char strDisplayManufacturerName[ADL_MAX_PATH];
|
||||
|
||||
/// The Display type. For example: CRT, TV, CV, DFP.
|
||||
int iDisplayType;
|
||||
|
||||
/// The display output type. For example: HDMI, SVIDEO, COMPONMNET VIDEO.
|
||||
int iDisplayOutputType;
|
||||
|
||||
/// The connector type for the device.
|
||||
int iDisplayConnector;
|
||||
|
||||
///\brief The bit mask identifies the number of bits ADLDisplayInfo is currently using. \n
|
||||
/// It will be the sum all the bit definitions in ADL_DISPLAY_DISPLAYINFO_xxx.
|
||||
int iDisplayInfoMask;
|
||||
|
||||
/// The bit mask identifies the display status. \ref define_displayinfomask
|
||||
int iDisplayInfoValue;
|
||||
} ADLDisplayInfo, *LPADLDisplayInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// \brief Structure containing information about the BIOS.
|
||||
///
|
||||
/// This structure is used to store various information about the Chipset. This
|
||||
/// information can be returned to the user.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLBiosInfo
|
||||
{
|
||||
char strPartNumber[ADL_MAX_PATH];
|
||||
char strVersion[ADL_MAX_PATH];
|
||||
char strDate[ADL_MAX_PATH];
|
||||
char strPartNumber[ADL_MAX_PATH]; ///< Part number.
|
||||
char strVersion[ADL_MAX_PATH]; ///< Version number.
|
||||
char strDate[ADL_MAX_PATH]; ///< BIOS date in yyyy/mm/dd hh:mm format.
|
||||
} ADLBiosInfo, *LPADLBiosInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about current power management related activity.
|
||||
///
|
||||
/// This structure is used to store information about current power management related activity.
|
||||
/// This structure (Overdrive 5 interfaces) is used by the ADL_PM_CurrentActivity_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLPMActivity
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Current engine clock.
|
||||
int iEngineClock;
|
||||
/// Current memory clock.
|
||||
int iMemoryClock;
|
||||
/// Current core voltage.
|
||||
int iVddc;
|
||||
/// GPU utilization.
|
||||
int iActivityPercent;
|
||||
/// Performance level index.
|
||||
int iCurrentPerformanceLevel;
|
||||
/// Current PCIE bus speed.
|
||||
int iCurrentBusSpeed;
|
||||
/// Number of PCIE bus lanes.
|
||||
int iCurrentBusLanes;
|
||||
/// Maximum number of PCIE bus lanes.
|
||||
int iMaximumBusLanes;
|
||||
/// Reserved for future purposes.
|
||||
int iReserved;
|
||||
} ADLPMActivity;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing the range of Overdrive parameter.
|
||||
///
|
||||
/// This structure is used to store information about the range of Overdrive parameter.
|
||||
/// This structure is used by ADLODParameters.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODParameterRange
|
||||
{
|
||||
/// Minimum parameter value.
|
||||
int iMin;
|
||||
/// Maximum parameter value.
|
||||
int iMax;
|
||||
/// Parameter step value.
|
||||
int iStep;
|
||||
} ADLODParameterRange;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive parameters.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive parameters.
|
||||
/// This structure is used by the ADL_Overdrive5_ODParameters_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODParameters
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Number of standard performance states.
|
||||
int iNumberOfPerformanceLevels;
|
||||
/// Indicates whether the GPU is capable to measure its activity.
|
||||
int iActivityReportingSupported;
|
||||
/// Indicates whether the GPU supports discrete performance levels or performance range.
|
||||
int iDiscretePerformanceLevels;
|
||||
/// Reserved for future use.
|
||||
int iReserved;
|
||||
/// Engine clock range.
|
||||
ADLODParameterRange sEngineClock;
|
||||
/// Memory clock range.
|
||||
ADLODParameterRange sMemoryClock;
|
||||
/// Core voltage range.
|
||||
ADLODParameterRange sVddc;
|
||||
} ADLODParameters;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 fan speed information
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 fan speed information
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLOD6FanSpeedInfo
|
||||
{
|
||||
/// Contains a bitmap of the valid fan speed type flags. Possible values: \ref ADL_OD6_FANSPEED_TYPE_PERCENT, \ref ADL_OD6_FANSPEED_TYPE_RPM, \ref ADL_OD6_FANSPEED_USER_DEFINED
|
||||
int iSpeedType;
|
||||
/// Contains current fan speed in percent (if valid flag exists in iSpeedType)
|
||||
int iFanSpeedPercent;
|
||||
/// Contains current fan speed in RPM (if valid flag exists in iSpeedType)
|
||||
int iFanSpeedRPM;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6FanSpeedInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 fan speed value
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 fan speed value
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLOD6FanSpeedValue
|
||||
{
|
||||
/// Indicates the units of the fan speed. Possible values: \ref ADL_OD6_FANSPEED_TYPE_PERCENT, \ref ADL_OD6_FANSPEED_TYPE_RPM
|
||||
int iSpeedType;
|
||||
/// Fan speed value (units as indicated above)
|
||||
int iFanSpeed;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6FanSpeedValue;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about current Overdrive 6 performance status.
|
||||
///
|
||||
/// This structure is used to store information about current Overdrive 6 performance status.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLOD6CurrentStatus
|
||||
{
|
||||
/// Current engine clock in 10 KHz.
|
||||
int iEngineClock;
|
||||
/// Current memory clock in 10 KHz.
|
||||
int iMemoryClock;
|
||||
/// Current GPU activity in percent. This
|
||||
/// indicates how "busy" the GPU is.
|
||||
int iActivityPercent;
|
||||
/// Not used. Reserved for future use.
|
||||
int iCurrentPerformanceLevel;
|
||||
/// Current PCI-E bus speed
|
||||
int iCurrentBusSpeed;
|
||||
/// Current PCI-E bus # of lanes
|
||||
int iCurrentBusLanes;
|
||||
/// Maximum possible PCI-E bus # of lanes
|
||||
int iMaximumBusLanes;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6CurrentStatus;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 clock range
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 clock range
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLOD6ParameterRange
|
||||
{
|
||||
/// The starting value of the clock range
|
||||
int iMin;
|
||||
/// The ending value of the clock range
|
||||
int iMax;
|
||||
/// The minimum increment between clock values
|
||||
int iStep;
|
||||
|
||||
} ADLOD6ParameterRange;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 capabilities
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 capabilities
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLOD6Capabilities
|
||||
{
|
||||
/// Contains a bitmap of the OD6 capability flags. Possible values: \ref ADL_OD6_CAPABILITY_SCLK_CUSTOMIZATION,
|
||||
/// \ref ADL_OD6_CAPABILITY_MCLK_CUSTOMIZATION, \ref ADL_OD6_CAPABILITY_GPU_ACTIVITY_MONITOR
|
||||
int iCapabilities;
|
||||
/// Contains a bitmap indicating the power states
|
||||
/// supported by OD6. Currently only the performance state
|
||||
/// is supported. Possible Values: \ref ADL_OD6_SUPPORTEDSTATE_PERFORMANCE
|
||||
int iSupportedStates;
|
||||
/// Number of levels. OD6 will always use 2 levels, which describe
|
||||
/// the minimum to maximum clock ranges.
|
||||
/// The 1st level indicates the minimum clocks, and the 2nd level
|
||||
/// indicates the maximum clocks.
|
||||
int iNumberOfPerformanceLevels;
|
||||
/// Contains the hard limits of the sclk range. Overdrive
|
||||
/// clocks cannot be set outside this range.
|
||||
ADLOD6ParameterRange sEngineClockRange;
|
||||
/// Contains the hard limits of the mclk range. Overdrive
|
||||
/// clocks cannot be set outside this range.
|
||||
ADLOD6ParameterRange sMemoryClockRange;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6Capabilities;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive level.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive level.
|
||||
/// This structure is used by ADLODPerformanceLevels.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODPerformanceLevel
|
||||
{
|
||||
/// Engine clock.
|
||||
int iEngineClock;
|
||||
/// Memory clock.
|
||||
int iMemoryClock;
|
||||
/// Core voltage.
|
||||
int iVddc;
|
||||
} ADLODPerformanceLevel;
|
||||
|
||||
/*
|
||||
* Attention: we had to change this struct due to an out-of-bound problem mentioned here:
|
||||
* https://github.com/hashcat/hashcat/issues/244
|
||||
* the change: ADLODPerformanceLevel aLevels [1] -> ADLODPerformanceLevel aLevels [2]
|
||||
*/
|
||||
|
||||
typedef struct ADLODPerformanceLevels
|
||||
{
|
||||
int iSize;
|
||||
int iReserved;
|
||||
ADLODPerformanceLevel aLevels [2];
|
||||
} ADLODPerformanceLevels;
|
||||
|
||||
typedef struct ADLOD6FanSpeedInfo
|
||||
{
|
||||
int iSpeedType;
|
||||
int iFanSpeedPercent;
|
||||
int iFanSpeedRPM;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6FanSpeedInfo;
|
||||
|
||||
typedef struct ADLOD6FanSpeedValue
|
||||
{
|
||||
int iSpeedType;
|
||||
int iFanSpeed;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6FanSpeedValue;
|
||||
|
||||
typedef struct ADLOD6CurrentStatus
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 clock values.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 clock values.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLOD6PerformanceLevel
|
||||
{
|
||||
/// Engine (core) clock.
|
||||
int iEngineClock;
|
||||
/// Memory clock.
|
||||
int iMemoryClock;
|
||||
int iActivityPercent;
|
||||
int iCurrentPerformanceLevel;
|
||||
int iCurrentBusSpeed;
|
||||
int iCurrentBusLanes;
|
||||
int iMaximumBusLanes;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6CurrentStatus;
|
||||
|
||||
typedef struct ADLOD6ParameterRange
|
||||
{
|
||||
int iMin;
|
||||
int iMax;
|
||||
int iStep;
|
||||
} ADLOD6ParameterRange;
|
||||
|
||||
typedef struct ADLOD6Capabilities
|
||||
{
|
||||
int iCapabilities;
|
||||
int iSupportedStates;
|
||||
int iNumberOfPerformanceLevels;
|
||||
ADLOD6ParameterRange sEngineClockRange;
|
||||
ADLOD6ParameterRange sMemoryClockRange;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6Capabilities;
|
||||
|
||||
typedef struct ADLOD6PerformanceLevel
|
||||
{
|
||||
int iEngineClock;
|
||||
int iMemoryClock;
|
||||
} ADLOD6PerformanceLevel;
|
||||
|
||||
/*
|
||||
* Attention: we had to change this struct due to an out-of-bound problem mentioned here:
|
||||
* https://github.com/hashcat/hashcat/issues/244
|
||||
* the change: ADLOD6PerformanceLevel aLevels [1] -> ADLOD6PerformanceLevel aLevels [2]
|
||||
*/
|
||||
|
||||
typedef struct ADLOD6StateInfo
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 clocks.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 clocks. This is a
|
||||
/// variable-sized structure. iNumberOfPerformanceLevels indicate how many elements
|
||||
/// are contained in the aLevels array.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLOD6StateInfo
|
||||
{
|
||||
/// Number of levels. OD6 uses clock ranges instead of discrete performance levels.
|
||||
/// iNumberOfPerformanceLevels is always 2. The 1st level indicates the minimum clocks
|
||||
/// in the range. The 2nd level indicates the maximum clocks in the range.
|
||||
int iNumberOfPerformanceLevels;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
ADLOD6PerformanceLevel aLevels [2];
|
||||
|
||||
/// Variable-sized array of levels.
|
||||
/// The number of elements in the array is specified by iNumberofPerformanceLevels.
|
||||
ADLOD6PerformanceLevel aLevels [1];
|
||||
|
||||
} ADLOD6StateInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive performance levels.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive performance levels.
|
||||
/// This structure is used by the ADL_Overdrive5_ODPerformanceLevels_Get() and ADL_Overdrive5_ODPerformanceLevels_Set() functions.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODPerformanceLevels
|
||||
{
|
||||
/// Must be set to sizeof( \ref ADLODPerformanceLevels ) + sizeof( \ref ADLODPerformanceLevel ) * (ADLODParameters.iNumberOfPerformanceLevels - 1)
|
||||
int iSize;
|
||||
int iReserved;
|
||||
/// Array of performance state descriptors. Must have ADLODParameters.iNumberOfPerformanceLevels elements.
|
||||
ADLODPerformanceLevel aLevels [1];
|
||||
} ADLODPerformanceLevels;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Performance Metrics data
|
||||
///
|
||||
/// This structure is used to store information about Performance Metrics data output
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct _ADLSingleSensorData
|
||||
{
|
||||
int supported;
|
||||
int value;
|
||||
} ADLSingleSensorData;
|
||||
|
||||
typedef struct _ADLPMLogDataOutput
|
||||
{
|
||||
int size;
|
||||
ADLSingleSensorData sensors[ADL_PMLOG_MAX_SENSORS];
|
||||
}ADLPMLogDataOutput;
|
||||
|
||||
typedef enum _ADLSensorType
|
||||
{
|
||||
SENSOR_MAXTYPES = 0,
|
||||
PMLOG_CLK_GFXCLK = 1,
|
||||
PMLOG_CLK_MEMCLK = 2,
|
||||
PMLOG_CLK_SOCCLK = 3,
|
||||
PMLOG_CLK_UVDCLK1 = 4,
|
||||
PMLOG_CLK_UVDCLK2 = 5,
|
||||
PMLOG_CLK_VCECLK = 6,
|
||||
PMLOG_CLK_VCNCLK = 7,
|
||||
PMLOG_TEMPERATURE_EDGE = 8,
|
||||
PMLOG_TEMPERATURE_MEM = 9,
|
||||
PMLOG_TEMPERATURE_VRVDDC = 10,
|
||||
PMLOG_TEMPERATURE_VRMVDD = 11,
|
||||
PMLOG_TEMPERATURE_LIQUID = 12,
|
||||
PMLOG_TEMPERATURE_PLX = 13,
|
||||
PMLOG_FAN_RPM = 14,
|
||||
PMLOG_FAN_PERCENTAGE = 15,
|
||||
PMLOG_SOC_VOLTAGE = 16,
|
||||
PMLOG_SOC_POWER = 17,
|
||||
PMLOG_SOC_CURRENT = 18,
|
||||
PMLOG_INFO_ACTIVITY_GFX = 19,
|
||||
PMLOG_INFO_ACTIVITY_MEM = 20,
|
||||
PMLOG_GFX_VOLTAGE = 21,
|
||||
PMLOG_MEM_VOLTAGE = 22,
|
||||
PMLOG_ASIC_POWER = 23,
|
||||
PMLOG_TEMPERATURE_VRSOC = 24,
|
||||
PMLOG_TEMPERATURE_VRMVDD0 = 25,
|
||||
PMLOG_TEMPERATURE_VRMVDD1 = 26,
|
||||
PMLOG_TEMPERATURE_HOTSPOT = 27,
|
||||
PMLOG_TEMPERATURE_GFX = 28,
|
||||
PMLOG_TEMPERATURE_SOC = 29,
|
||||
PMLOG_GFX_POWER = 30,
|
||||
PMLOG_GFX_CURRENT = 31,
|
||||
PMLOG_TEMPERATURE_CPU = 32,
|
||||
PMLOG_CPU_POWER = 33,
|
||||
PMLOG_CLK_CPUCLK = 34,
|
||||
PMLOG_THROTTLER_STATUS = 35,
|
||||
PMLOG_CLK_VCN1CLK1 = 36,
|
||||
PMLOG_CLK_VCN1CLK2 = 37,
|
||||
PMLOG_SMART_POWERSHIFT_CPU = 38,
|
||||
PMLOG_SMART_POWERSHIFT_DGPU = 39,
|
||||
PMLOG_MAX_SENSORS_REAL
|
||||
} ADLSensorType;
|
||||
|
||||
/// \brief Handle to ADL client context.
|
||||
///
|
||||
/// ADL clients obtain context handle from initial call to \ref ADL2_Main_Control_Create.
|
||||
/// Clients have to pass the handle to each subsequent ADL call and finally destroy
|
||||
/// the context with call to \ref ADL2_Main_Control_Destroy
|
||||
/// \nosubgrouping
|
||||
typedef void *ADL_CONTEXT_HANDLE;
|
||||
|
||||
#if defined (__MSC_VER)
|
||||
#define ADL_API_CALL __cdecl
|
||||
#elif defined (_WIN32) || defined (__WIN32__)
|
||||
@ -251,62 +625,53 @@ typedef void* (ADL_API_CALL *ADL_MAIN_MALLOC_CALLBACK )( int );
|
||||
|
||||
typedef int HM_ADAPTER_ADL;
|
||||
|
||||
typedef struct struct_ADLOD6MemClockState
|
||||
{
|
||||
ADLOD6StateInfo state;
|
||||
ADLOD6PerformanceLevel level;
|
||||
|
||||
} ADLOD6MemClockState;
|
||||
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_DESTROY) (void);
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_CREATE) (ADL_MAIN_MALLOC_CALLBACK, int);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_NUMBEROFADAPTERS_GET) (int *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ADAPTERINFO_GET) (LPAdapterInfo, int);
|
||||
typedef int (ADL_API_CALL *ADL_DISPLAY_DISPLAYINFO_GET) (int, int *, ADLDisplayInfo **, int);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_TEMPERATURE_GET) (int, int, ADLTemperature *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TEMPERATURE_GET) (int, int *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_CURRENTACTIVITY_GET) (int, ADLPMActivity *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_THERMALDEVICES_ENUM) (int, int, ADLThermalControllerInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ID_GET) (int, int *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_VIDEOBIOSINFO_GET) (int, ADLBiosInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEEDINFO_GET) (int, int, ADLFanSpeedInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEED_GET) (int, int, ADLFanSpeedValue *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_FANSPEED_GET) (int, ADLOD6FanSpeedInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPARAMETERS_GET) (int, ADLODParameters *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET) (int, int, ADLODPerformanceLevels *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ACTIVE_GET ) ( int, int* );
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE_CAPS) (int, int *, int *, int *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CURRENTSTATUS_GET) (int, ADLOD6CurrentStatus *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_STATEINFO_GET) (int, int, ADLOD6MemClockState *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CAPABILITIES_GET) (int, ADLOD6Capabilities *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TARGETTEMPERATUREDATA_GET) (int, int *, int *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TARGETTEMPERATURERANGEINFO_GET) (int, ADLOD6ParameterRange *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ADAPTERINFO_GET ) ( LPAdapterInfo, int );
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_NUMBEROFADAPTERS_GET ) ( int* );
|
||||
typedef int (ADL_API_CALL *ADL_DISPLAY_DISPLAYINFO_GET ) ( int, int *, ADLDisplayInfo **, int );
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_CREATE )(ADL_MAIN_MALLOC_CALLBACK, int );
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_DESTROY )();
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_CURRENTACTIVITY_GET ) (int iAdapterIndex, ADLPMActivity *lpActivity);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEEDINFO_GET ) (int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedInfo *lpFanSpeedInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEED_GET ) (int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPARAMETERS_GET ) (int iAdapterIndex, ADLODParameters *lpOdParameters);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET ) (int iAdapterIndex, int iDefault, ADLODPerformanceLevels *lpOdPerformanceLevels);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_TEMPERATURE_GET ) (int iAdapterIndex, int iThermalControllerIndex, ADLTemperature *lpTemperature);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_THERMALDEVICES_ENUM ) (int iAdapterIndex, int iThermalControllerIndex, ADLThermalControllerInfo *lpThermalControllerInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CAPABILITIES_GET ) (int iAdapterIndex, ADLOD6Capabilities *lpODCapabilities);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CURRENTSTATUS_GET )(int iAdapterIndex, ADLOD6CurrentStatus *lpCurrentStatus);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_FANSPEED_GET )(int iAdapterIndex, ADLOD6FanSpeedInfo *lpFanSpeedInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_STATEINFO_GET )(int iAdapterIndex, int iStateType, ADLOD6StateInfo *lpStateInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TEMPERATURE_GET )(int iAdapterIndex, int *lpTemperature);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE_CAPS ) (int iAdapterIndex, int *iSupported, int *iEnabled, int *iVersion);
|
||||
typedef int (ADL_API_CALL *ADL2_OVERDRIVE_CAPS) (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int * iSupported, int * iEnabled, int * iVersion);
|
||||
typedef int (ADL_API_CALL *ADL2_NEW_QUERYPMLOGDATA_GET) (ADL_CONTEXT_HANDLE, int, ADLPMLogDataOutput*);
|
||||
|
||||
typedef struct hm_adl_lib
|
||||
{
|
||||
hc_dynlib_t lib;
|
||||
|
||||
ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy;
|
||||
ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create;
|
||||
ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get;
|
||||
ADL_ADAPTER_ACTIVE_GET ADL_Adapter_Active_Get;
|
||||
ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get;
|
||||
ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get;
|
||||
ADL_DISPLAY_DISPLAYINFO_GET ADL_Display_DisplayInfo_Get;
|
||||
ADL_ADAPTER_ID_GET ADL_Adapter_ID_Get;
|
||||
ADL_ADAPTER_VIDEOBIOSINFO_GET ADL_Adapter_VideoBiosInfo_Get;
|
||||
ADL_OVERDRIVE5_THERMALDEVICES_ENUM ADL_Overdrive5_ThermalDevices_Enum;
|
||||
ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get;
|
||||
ADL_OVERDRIVE6_TEMPERATURE_GET ADL_Overdrive6_Temperature_Get;
|
||||
ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create;
|
||||
ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy;
|
||||
ADL_OVERDRIVE5_CURRENTACTIVITY_GET ADL_Overdrive5_CurrentActivity_Get;
|
||||
ADL_OVERDRIVE5_FANSPEEDINFO_GET ADL_Overdrive5_FanSpeedInfo_Get;
|
||||
ADL_OVERDRIVE5_FANSPEED_GET ADL_Overdrive5_FanSpeed_Get;
|
||||
ADL_OVERDRIVE6_FANSPEED_GET ADL_Overdrive6_FanSpeed_Get;
|
||||
ADL_ADAPTER_ACTIVE_GET ADL_Adapter_Active_Get;
|
||||
ADL_OVERDRIVE_CAPS ADL_Overdrive_Caps;
|
||||
ADL_OVERDRIVE5_ODPARAMETERS_GET ADL_Overdrive5_ODParameters_Get;
|
||||
ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET ADL_Overdrive5_ODPerformanceLevels_Get;
|
||||
ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get;
|
||||
ADL_OVERDRIVE5_THERMALDEVICES_ENUM ADL_Overdrive5_ThermalDevices_Enum;
|
||||
ADL_OVERDRIVE6_CAPABILITIES_GET ADL_Overdrive6_Capabilities_Get;
|
||||
ADL_OVERDRIVE6_STATEINFO_GET ADL_Overdrive6_StateInfo_Get;
|
||||
ADL_OVERDRIVE6_CURRENTSTATUS_GET ADL_Overdrive6_CurrentStatus_Get;
|
||||
ADL_OVERDRIVE6_TARGETTEMPERATUREDATA_GET ADL_Overdrive6_TargetTemperatureData_Get;
|
||||
ADL_OVERDRIVE6_TARGETTEMPERATURERANGEINFO_GET ADL_Overdrive6_TargetTemperatureRangeInfo_Get;
|
||||
ADL_OVERDRIVE6_FANSPEED_GET ADL_Overdrive6_FanSpeed_Get;
|
||||
ADL_OVERDRIVE6_STATEINFO_GET ADL_Overdrive6_StateInfo_Get;
|
||||
ADL_OVERDRIVE6_TEMPERATURE_GET ADL_Overdrive6_Temperature_Get;
|
||||
ADL_OVERDRIVE_CAPS ADL_Overdrive_Caps;
|
||||
ADL2_OVERDRIVE_CAPS ADL2_Overdrive_Caps;
|
||||
ADL2_NEW_QUERYPMLOGDATA_GET ADL2_New_QueryPMLogData_Get;
|
||||
|
||||
} hm_adl_lib_t;
|
||||
|
||||
@ -326,6 +691,8 @@ int hm_ADL_Overdrive_CurrentActivity_Get (void *hashcat_ctx, int iAdapterIndex,
|
||||
int hm_ADL_Overdrive5_FanSpeed_Get (void *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Get (void *hashcat_ctx, int iAdapterIndex, ADLOD6FanSpeedInfo *lpFanSpeedInfo);
|
||||
int hm_ADL_Overdrive_Caps (void *hashcat_ctx, int iAdapterIndex, int *od_supported, int *od_enabled, int *od_version);
|
||||
int hm_ADL_Overdrive6_TargetTemperatureData_Get (void *hashcat_ctx, int iAdapterIndex, int *cur_temp, int *default_temp);
|
||||
int hm_ADL2_Overdrive_Caps (void *hashcat_ctx, int iAdapterIndex, int *od_supported, int *od_enabled, int *od_version);
|
||||
int hm_ADL2_New_QueryPMLogData_Get (void *hashcat_ctx, int iAdapterIndex, ADLPMLogDataOutput *lpDataOutput);
|
||||
|
||||
|
||||
#endif // _EXT_ADL_H
|
||||
|
@ -1798,8 +1798,6 @@ typedef struct hwmon_ctx
|
||||
|
||||
hm_attrs_t *hm_device;
|
||||
|
||||
ADLOD6MemClockState *od_clock_mem_status;
|
||||
|
||||
} hwmon_ctx_t;
|
||||
|
||||
#if defined (__APPLE__)
|
||||
|
@ -50,27 +50,27 @@ int adl_init (void *hashcat_ctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
HC_LOAD_FUNC(adl, ADL_Main_Control_Destroy, ADL_MAIN_CONTROL_DESTROY, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Main_Control_Create, ADL_MAIN_CONTROL_CREATE, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Adapter_NumberOfAdapters_Get, ADL_ADAPTER_NUMBEROFADAPTERS_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Adapter_Active_Get, ADL_ADAPTER_ACTIVE_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Adapter_AdapterInfo_Get, ADL_ADAPTER_ADAPTERINFO_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Adapter_NumberOfAdapters_Get, ADL_ADAPTER_NUMBEROFADAPTERS_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Display_DisplayInfo_Get, ADL_DISPLAY_DISPLAYINFO_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Adapter_ID_Get, ADL_ADAPTER_ID_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Adapter_VideoBiosInfo_Get, ADL_ADAPTER_VIDEOBIOSINFO_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_ThermalDevices_Enum, ADL_OVERDRIVE5_THERMALDEVICES_ENUM, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_Temperature_Get, ADL_OVERDRIVE5_TEMPERATURE_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_Temperature_Get, ADL_OVERDRIVE6_TEMPERATURE_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Main_Control_Create, ADL_MAIN_CONTROL_CREATE, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Main_Control_Destroy, ADL_MAIN_CONTROL_DESTROY, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_CurrentActivity_Get, ADL_OVERDRIVE5_CURRENTACTIVITY_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_FanSpeedInfo_Get, ADL_OVERDRIVE5_FANSPEEDINFO_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_FanSpeed_Get, ADL_OVERDRIVE5_FANSPEED_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_FanSpeed_Get, ADL_OVERDRIVE6_FANSPEED_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Adapter_Active_Get, ADL_ADAPTER_ACTIVE_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive_Caps, ADL_OVERDRIVE_CAPS, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_ODParameters_Get, ADL_OVERDRIVE5_ODPARAMETERS_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_ODPerformanceLevels_Get, ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_Temperature_Get, ADL_OVERDRIVE5_TEMPERATURE_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive5_ThermalDevices_Enum, ADL_OVERDRIVE5_THERMALDEVICES_ENUM, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_Capabilities_Get, ADL_OVERDRIVE6_CAPABILITIES_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_StateInfo_Get, ADL_OVERDRIVE6_STATEINFO_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_CurrentStatus_Get, ADL_OVERDRIVE6_CURRENTSTATUS_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_TargetTemperatureData_Get, ADL_OVERDRIVE6_TARGETTEMPERATUREDATA_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_TargetTemperatureRangeInfo_Get, ADL_OVERDRIVE6_TARGETTEMPERATURERANGEINFO_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_FanSpeed_Get, ADL_OVERDRIVE6_FANSPEED_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_StateInfo_Get, ADL_OVERDRIVE6_STATEINFO_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive6_Temperature_Get, ADL_OVERDRIVE6_TEMPERATURE_GET, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL_Overdrive_Caps, ADL_OVERDRIVE_CAPS, ADL, 0);
|
||||
HC_LOAD_FUNC(adl, ADL2_Overdrive_Caps, ADL2_OVERDRIVE_CAPS, ADL, 1);
|
||||
HC_LOAD_FUNC(adl, ADL2_New_QueryPMLogData_Get, ADL2_NEW_QUERYPMLOGDATA_GET, ADL, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -270,17 +270,42 @@ int hm_ADL_Overdrive_Caps (void *hashcat_ctx, int iAdapterIndex, int *od_support
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hm_ADL_Overdrive6_TargetTemperatureData_Get (void *hashcat_ctx, int iAdapterIndex, int *cur_temp, int *default_temp)
|
||||
int hm_ADL2_Overdrive_Caps (void *hashcat_ctx, int iAdapterIndex, int *iSupported, int *iEnabled, int *iVersion)
|
||||
{
|
||||
hwmon_ctx_t *hwmon_ctx = ((hashcat_ctx_t *) hashcat_ctx)->hwmon_ctx;
|
||||
|
||||
ADL_PTR *adl = (ADL_PTR *) hwmon_ctx->hm_adl;
|
||||
|
||||
const int ADL_rc = adl->ADL_Overdrive6_TargetTemperatureData_Get (iAdapterIndex, cur_temp, default_temp);
|
||||
// Not sure if that makes any sense...
|
||||
|
||||
if (adl->ADL2_Overdrive_Caps == NULL)
|
||||
{
|
||||
return hm_ADL_Overdrive_Caps (hashcat_ctx, iAdapterIndex, iSupported, iEnabled, iVersion);
|
||||
}
|
||||
|
||||
const int ADL_rc = adl->ADL2_Overdrive_Caps (NULL, iAdapterIndex, iSupported, iEnabled, iVersion);
|
||||
|
||||
if (ADL_rc != ADL_OK)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "ADL_Overdrive6_TargetTemperatureData_Get(): %d", ADL_rc);
|
||||
event_log_error (hashcat_ctx, "ADL2_Overdrive_Caps(): %d", ADL_rc);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hm_ADL2_New_QueryPMLogData_Get (void *hashcat_ctx, int iAdapterIndex, ADLPMLogDataOutput *lpDataOutput)
|
||||
{
|
||||
hwmon_ctx_t *hwmon_ctx = ((hashcat_ctx_t *) hashcat_ctx)->hwmon_ctx;
|
||||
|
||||
ADL_PTR *adl = (ADL_PTR *) hwmon_ctx->hm_adl;
|
||||
|
||||
const int ADL_rc = adl->ADL2_New_QueryPMLogData_Get (NULL, iAdapterIndex, lpDataOutput);
|
||||
|
||||
if (ADL_rc != ADL_OK)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "ADL2_New_QueryPMLogData_Get(): %d", ADL_rc);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
147
src/hwmon.c
147
src/hwmon.c
@ -109,19 +109,7 @@ int hm_get_threshold_slowdown_with_devices_idx (hashcat_ctx_t *hashcat_ctx, cons
|
||||
}
|
||||
else if (hwmon_ctx->hm_device[backend_device_idx].od_version == 6)
|
||||
{
|
||||
int CurrentValue = 0;
|
||||
int DefaultValue = 0;
|
||||
|
||||
if (hm_ADL_Overdrive6_TargetTemperatureData_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &CurrentValue, &DefaultValue) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].threshold_slowdown_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// the return value has never been tested since hm_ADL_Overdrive6_TargetTemperatureData_Get() never worked on any system. expect problems.
|
||||
|
||||
return DefaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -346,6 +334,22 @@ int hm_get_temperature_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
||||
|
||||
return Temperature / 1000;
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 8)
|
||||
{
|
||||
ADLPMLogDataOutput odlpDataOutput;
|
||||
|
||||
memset (&odlpDataOutput, 0, sizeof (ADLPMLogDataOutput));
|
||||
|
||||
if (hm_ADL2_New_QueryPMLogData_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &odlpDataOutput) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].temperature_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return odlpDataOutput.sensors[PMLOG_TEMPERATURE_EDGE].value;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_sysfs_amdgpu)
|
||||
@ -431,8 +435,37 @@ int hm_get_fanpolicy_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int bac
|
||||
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 6)
|
||||
{
|
||||
ADLOD6FanSpeedInfo lpFanSpeedInfo;
|
||||
|
||||
memset (&lpFanSpeedInfo, 0, sizeof (lpFanSpeedInfo));
|
||||
|
||||
if (hm_ADL_Overdrive6_FanSpeed_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &lpFanSpeedInfo) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].fanpolicy_get_supported = false;
|
||||
hwmon_ctx->hm_device[backend_device_idx].fanspeed_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 8)
|
||||
{
|
||||
ADLPMLogDataOutput odlpDataOutput;
|
||||
|
||||
memset (&odlpDataOutput, 0, sizeof (ADLPMLogDataOutput));
|
||||
|
||||
if (hm_ADL2_New_QueryPMLogData_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &odlpDataOutput) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].fanpolicy_get_supported = false;
|
||||
hwmon_ctx->hm_device[backend_device_idx].fanspeed_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return odlpDataOutput.sensors[PMLOG_FAN_PERCENTAGE].supported;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_sysfs_amdgpu)
|
||||
@ -542,6 +575,22 @@ int hm_get_fanspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
||||
|
||||
return faninfo.iFanSpeedPercent;
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 8)
|
||||
{
|
||||
ADLPMLogDataOutput odlpDataOutput;
|
||||
|
||||
memset (&odlpDataOutput, 0, sizeof (ADLPMLogDataOutput));
|
||||
|
||||
if (hm_ADL2_New_QueryPMLogData_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &odlpDataOutput) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].fanspeed_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return odlpDataOutput.sensors[PMLOG_FAN_PERCENTAGE].value;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_sysfs_amdgpu)
|
||||
@ -616,6 +665,8 @@ int hm_get_buslanes_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
||||
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD) || (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP))
|
||||
{
|
||||
if (hwmon_ctx->hm_adl)
|
||||
{
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 5)
|
||||
{
|
||||
ADLPMActivity PMActivity;
|
||||
|
||||
@ -631,6 +682,9 @@ int hm_get_buslanes_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int back
|
||||
return PMActivity.iCurrentBusLanes;
|
||||
}
|
||||
|
||||
// NO OD8
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_sysfs_amdgpu)
|
||||
{
|
||||
int lanes;
|
||||
@ -703,6 +757,8 @@ int hm_get_utilization_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
||||
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD) || (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP))
|
||||
{
|
||||
if (hwmon_ctx->hm_adl)
|
||||
{
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 5)
|
||||
{
|
||||
ADLPMActivity PMActivity;
|
||||
|
||||
@ -718,6 +774,23 @@ int hm_get_utilization_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
||||
return PMActivity.iActivityPercent;
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 8)
|
||||
{
|
||||
ADLPMLogDataOutput odlpDataOutput;
|
||||
|
||||
memset (&odlpDataOutput, 0, sizeof (ADLPMLogDataOutput));
|
||||
|
||||
if (hm_ADL2_New_QueryPMLogData_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &odlpDataOutput) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].utilization_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return odlpDataOutput.sensors[PMLOG_INFO_ACTIVITY_GFX].value;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_sysfs_amdgpu)
|
||||
{
|
||||
int util;
|
||||
@ -807,6 +880,8 @@ int hm_get_memoryspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
||||
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD) || (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP))
|
||||
{
|
||||
if (hwmon_ctx->hm_adl)
|
||||
{
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 5)
|
||||
{
|
||||
ADLPMActivity PMActivity;
|
||||
|
||||
@ -822,6 +897,23 @@ int hm_get_memoryspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int b
|
||||
return PMActivity.iMemoryClock / 100;
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 8)
|
||||
{
|
||||
ADLPMLogDataOutput odlpDataOutput;
|
||||
|
||||
memset (&odlpDataOutput, 0, sizeof (ADLPMLogDataOutput));
|
||||
|
||||
if (hm_ADL2_New_QueryPMLogData_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &odlpDataOutput) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].memoryspeed_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return odlpDataOutput.sensors[PMLOG_CLK_MEMCLK].value;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_sysfs_amdgpu)
|
||||
{
|
||||
int clockfreq;
|
||||
@ -894,6 +986,8 @@ int hm_get_corespeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int bac
|
||||
if ((backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD) || (backend_ctx->devices_param[backend_device_idx].opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP))
|
||||
{
|
||||
if (hwmon_ctx->hm_adl)
|
||||
{
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 5)
|
||||
{
|
||||
ADLPMActivity PMActivity;
|
||||
|
||||
@ -909,6 +1003,23 @@ int hm_get_corespeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int bac
|
||||
return PMActivity.iEngineClock / 100;
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_device[backend_device_idx].od_version == 8)
|
||||
{
|
||||
ADLPMLogDataOutput odlpDataOutput;
|
||||
|
||||
memset (&odlpDataOutput, 0, sizeof (ADLPMLogDataOutput));
|
||||
|
||||
if (hm_ADL2_New_QueryPMLogData_Get (hashcat_ctx, hwmon_ctx->hm_device[backend_device_idx].adl, &odlpDataOutput) == -1)
|
||||
{
|
||||
hwmon_ctx->hm_device[backend_device_idx].corespeed_get_supported = false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return odlpDataOutput.sensors[PMLOG_CLK_GFXCLK].value;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwmon_ctx->hm_sysfs_amdgpu)
|
||||
{
|
||||
int clockfreq;
|
||||
@ -1400,7 +1511,9 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
int od_enabled = 0;
|
||||
int od_version = 0;
|
||||
|
||||
hm_ADL_Overdrive_Caps (hashcat_ctx, lpAdapterInfo[i].iAdapterIndex, &od_supported, &od_enabled, &od_version);
|
||||
hm_ADL2_Overdrive_Caps (hashcat_ctx, lpAdapterInfo[i].iAdapterIndex, &od_supported, &od_enabled, &od_version);
|
||||
|
||||
if (od_version < 8) od_version = 5;
|
||||
|
||||
hm_adapters_adl[device_id].od_version = od_version;
|
||||
|
||||
@ -1534,12 +1647,6 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
hwmon_ctx->enabled = true;
|
||||
|
||||
/**
|
||||
* save buffer required for later restores
|
||||
*/
|
||||
|
||||
hwmon_ctx->od_clock_mem_status = (ADLOD6MemClockState *) hccalloc (backend_ctx->backend_devices_cnt, sizeof (ADLOD6MemClockState));
|
||||
|
||||
/**
|
||||
* HM devices: copy
|
||||
*/
|
||||
@ -1795,8 +1902,6 @@ void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
// free memory
|
||||
|
||||
hcfree (hwmon_ctx->od_clock_mem_status);
|
||||
|
||||
hcfree (hwmon_ctx->hm_device);
|
||||
|
||||
memset (hwmon_ctx, 0, sizeof (hwmon_ctx_t));
|
||||
|
@ -184,7 +184,11 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
{
|
||||
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
|
||||
{
|
||||
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u -D _unroll -fno-experimental-new-pass-manager", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
}
|
||||
else
|
||||
{
|
||||
hc_asprintf (&jit_build_options, "-D _unroll -fno-experimental-new-pass-manager");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user