1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-09 00:33:33 -05:00

Compare commits

..

20 Commits

Author SHA1 Message Date
XMRig
4d8642a6dd v5.11.4 2020-06-23 11:23:04 +07:00
xmrig
30a7a2b412 Update CHANGELOG.md 2020-06-23 11:18:21 +07:00
XMRig
c2dd43cdc5 Merge branch 'dev' into v5 2020-06-23 11:15:25 +07:00
XMRig
416c9eff69 Fixed AMD GPU health readings on Linux. 2020-06-18 11:16:26 +07:00
XMRig
1b928e8bf1 #1728 Fixed x86 crash on Windows. 2020-06-10 23:09:11 +07:00
XMRig
e4779ab6ca v5.11.4-dev 2020-06-10 00:55:15 +07:00
XMRig
1c63a8e7c3 Merge branch 'master' into dev 2020-06-10 00:49:58 +07:00
xmrig
f42a100937 Merge pull request #1726 from SChernykh/dev
Fixed detection of AVX2/AVX512
2020-06-09 23:07:45 +07:00
SChernykh
2d2f3d4eb2 Fixed detection of AVX2/AVX512 2020-06-09 17:47:23 +02:00
xmrig
3472bd9f02 Merge pull request #1725 from SChernykh/dev
Disabled AVX-512F for Argon2
2020-06-09 19:16:38 +07:00
SChernykh
8c979d3bc7 Disabled AVX-512F for Argon2
See #1722
2020-06-09 13:53:14 +02:00
XMRig
12728649ff v5.11.3 2020-06-09 00:16:33 +07:00
XMRig
fa2461ba73 Merge branch 'dev' 2020-06-09 00:15:50 +07:00
xmrig
d30bf207e9 Update CHANGELOG.md 2020-06-08 02:00:22 +07:00
xmrig
2170b58b6f Merge pull request #1720 from SChernykh/dev
Fixed GCC 10.1 issues
2020-06-07 21:24:15 +07:00
SChernykh
75c57f7563 Fixed GCC 10.1 issues
- Fixed uninitialized `state->x` warning
- Fixed broken code with `-O3` or `-Ofast`
2020-06-07 16:23:17 +02:00
XMRig
5c5d841776 Merge branch 'noexecstack' of https://github.com/gentoo-monero/xmrig into dev 2020-06-07 20:11:37 +07:00
Matt Smith
a28bddcbdf Stop linker from making stack executable
Add .note.GNU-stack section to end of AstroBWT ASM.

Signed-off-by: Matt Smith <matt@offtopica.uk>
2020-06-07 13:57:37 +01:00
XMRig
e6e1028017 v5.11.3-dev 2020-05-23 12:02:32 +07:00
XMRig
5c4cdfd80c Merge branch 'master' into dev 2020-05-23 12:01:58 +07:00
7 changed files with 63 additions and 18 deletions

View File

@@ -1,3 +1,11 @@
# v5.11.4
- [#1728](https://github.com/xmrig/xmrig/issues/1728) Fixed, 32 bit Windows builds was crash on start.
- Fixed AMD GPU health (temperatures/power/clocks/fans) readings on Linux.
# v5.11.3
- [#1718](https://github.com/xmrig/xmrig/pull/1718) Fixed, linker on Linux was marking entire executable as having an executable stack.
- [#1720](https://github.com/xmrig/xmrig/pull/1720) Fixed broken CryptoNight algorithms family with gcc 10.1.
# v5.11.2 # v5.11.2
- [#1664](https://github.com/xmrig/xmrig/pull/1664) Improved JSON config error reporting. - [#1664](https://github.com/xmrig/xmrig/pull/1664) Improved JSON config error reporting.
- [#1668](https://github.com/xmrig/xmrig/pull/1668) Optimized RandomX dataset initialization. - [#1668](https://github.com/xmrig/xmrig/pull/1668) Optimized RandomX dataset initialization.

View File

@@ -119,10 +119,24 @@ static inline int32_t get_masked(int32_t val, int32_t h, int32_t l)
} }
static inline uint64_t xgetbv()
{
#ifdef _MSC_VER
return _xgetbv(_XCR_XFEATURE_ENABLED_MASK);
#else
uint32_t eax_reg = 0;
uint32_t edx_reg = 0;
__asm__ __volatile__("xgetbv": "=a"(eax_reg), "=d"(edx_reg) : "c"(0) : "cc");
return (static_cast<uint64_t>(edx_reg) << 32) | eax_reg;
#endif
}
static inline bool has_xcr_avx2() { return (xgetbv() & 0x06) == 0x06; }
static inline bool has_xcr_avx512() { return (xgetbv() & 0xE6) == 0xE6; }
static inline bool has_osxsave() { return has_feature(PROCESSOR_INFO, ECX_Reg, 1 << 27); } static inline bool has_osxsave() { return has_feature(PROCESSOR_INFO, ECX_Reg, 1 << 27); }
static inline bool has_aes_ni() { return has_feature(PROCESSOR_INFO, ECX_Reg, 1 << 25); } static inline bool has_aes_ni() { return has_feature(PROCESSOR_INFO, ECX_Reg, 1 << 25); }
static inline bool has_avx2() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 5) && has_osxsave(); } static inline bool has_avx2() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 5) && has_osxsave() && has_xcr_avx2(); }
static inline bool has_avx512f() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 16) && has_osxsave(); } static inline bool has_avx512f() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 16) && has_osxsave() && has_xcr_avx512(); }
static inline bool has_bmi2() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 8); } static inline bool has_bmi2() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 8); }
static inline bool has_pdpe1gb() { return has_feature(PROCESSOR_EXT_INFO, EDX_Reg, 1 << 26); } static inline bool has_pdpe1gb() { return has_feature(PROCESSOR_EXT_INFO, EDX_Reg, 1 << 26); }
static inline bool has_sse2() { return has_feature(PROCESSOR_INFO, EDX_Reg, 1 << 26); } static inline bool has_sse2() { return has_feature(PROCESSOR_INFO, EDX_Reg, 1 << 26); }

View File

@@ -36,27 +36,29 @@ bool AdlLib::m_ready = false;
static const std::string kPrefix = "/sys/bus/pci/drivers/amdgpu/"; static const std::string kPrefix = "/sys/bus/pci/drivers/amdgpu/";
static inline bool sysfs_is_file(const char *path) static inline bool sysfs_is_file(const std::string &path)
{ {
struct stat sb; struct stat sb;
return stat(path, &sb) == 0 && ((sb.st_mode & S_IFMT) == S_IFREG); return stat(path.c_str(), &sb) == 0 && ((sb.st_mode & S_IFMT) == S_IFREG);
} }
static inline std::string sysfs_prefix(const PciTopology &topology) static inline bool sysfs_is_amdgpu(const std::string &path)
{ {
std::string path = kPrefix + "0000:" + topology.toString().data() + "/hwmon/hwmon"; if (!sysfs_is_file(path)) {
return false;
if (sysfs_is_file((path + "2/name").c_str())) {
return path + "2/";
} }
if (sysfs_is_file((path + "3/name").c_str())) { std::ifstream file(path);
return path + "3/"; if (!file.is_open()) {
return false;
} }
return {}; std::string name;
std::getline(file, name);
return name == "amdgpu";
} }
@@ -74,6 +76,21 @@ uint32_t sysfs_read(const std::string &path)
} }
static inline std::string sysfs_prefix(const PciTopology &topology)
{
const std::string path = kPrefix + "0000:" + topology.toString().data() + "/hwmon/hwmon";
for (uint32_t i = 1; i < 10; ++i) {
const std::string prefix = path + std::to_string(i) + "/";
if (sysfs_is_amdgpu(prefix + "name") && sysfs_read(prefix + "freq1_input")) {
return prefix;
}
}
return {};
}
} // namespace xmrig } // namespace xmrig

View File

@@ -34,7 +34,7 @@
static inline OSVERSIONINFOEX winOsVersion() static inline OSVERSIONINFOEX winOsVersion()
{ {
using RtlGetVersionFunction = NTSTATUS (*)(LPOSVERSIONINFO); typedef NTSTATUS (NTAPI *RtlGetVersionFunction)(LPOSVERSIONINFO);
OSVERSIONINFOEX result = { sizeof(OSVERSIONINFOEX), 0, 0, 0, 0, {'\0'}, 0, 0, 0, 0, 0}; OSVERSIONINFOEX result = { sizeof(OSVERSIONINFOEX), 0, 0, 0, 0, {'\0'}, 0, 0, 0, 0, 0};
HMODULE ntdll = GetModuleHandleW(L"ntdll.dll"); HMODULE ntdll = GetModuleHandleW(L"ntdll.dll");

View File

@@ -51,3 +51,7 @@ KeccakF1600_AVX2_ASM:
lea r10,[rip+rndc] lea r10,[rip+rndc]
#include "sha3_256_keccakf1600_avx2.inc" #include "sha3_256_keccakf1600_avx2.inc"
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif

View File

@@ -213,16 +213,17 @@ static void E8(hashState *state)
/*The compression function F8 */ /*The compression function F8 */
static void F8(hashState *state) static void F8(hashState *state)
{ {
uint64 i; uint64_t* x = (uint64_t*)state->x;
const uint64_t* buf = (uint64*)state->buffer;
/*xor the 512-bit message with the fist half of the 1024-bit hash state*/ /*xor the 512-bit message with the fist half of the 1024-bit hash state*/
for (i = 0; i < 8; i++) state->x[i >> 1][i & 1] ^= ((uint64*)state->buffer)[i]; for (int i = 0; i < 8; ++i) x[i] ^= buf[i];
/*the bijective function E8 */ /*the bijective function E8 */
E8(state); E8(state);
/*xor the 512-bit message with the second half of the 1024-bit hash state*/ /*xor the 512-bit message with the second half of the 1024-bit hash state*/
for (i = 0; i < 8; i++) state->x[(8+i) >> 1][(8+i) & 1] ^= ((uint64*)state->buffer)[i]; for (int i = 0; i < 8; ++i) x[i + 8] ^= buf[i];
} }
/*before hashing a message, initialize the hash state as H0 */ /*before hashing a message, initialize the hash state as H0 */
@@ -240,6 +241,7 @@ static HashReturn Init(hashState *state, int hashbitlen)
case 224: memcpy(state->x,JH224_H0,128); break; case 224: memcpy(state->x,JH224_H0,128); break;
case 256: memcpy(state->x,JH256_H0,128); break; case 256: memcpy(state->x,JH256_H0,128); break;
case 384: memcpy(state->x,JH384_H0,128); break; case 384: memcpy(state->x,JH384_H0,128); break;
default:
case 512: memcpy(state->x,JH512_H0,128); break; case 512: memcpy(state->x,JH512_H0,128); break;
} }

View File

@@ -28,7 +28,7 @@
#define APP_ID "xmrig" #define APP_ID "xmrig"
#define APP_NAME "XMRig" #define APP_NAME "XMRig"
#define APP_DESC "XMRig miner" #define APP_DESC "XMRig miner"
#define APP_VERSION "5.11.2" #define APP_VERSION "5.11.4"
#define APP_DOMAIN "xmrig.com" #define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com" #define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com"
@@ -36,7 +36,7 @@
#define APP_VER_MAJOR 5 #define APP_VER_MAJOR 5
#define APP_VER_MINOR 11 #define APP_VER_MINOR 11
#define APP_VER_PATCH 2 #define APP_VER_PATCH 4
#ifdef _MSC_VER #ifdef _MSC_VER
# if (_MSC_VER >= 1920) # if (_MSC_VER >= 1920)