mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 16:33:32 -05:00
Compare commits
13 Commits
v6.2.0-bet
...
v5.11.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d8642a6dd | ||
|
|
30a7a2b412 | ||
|
|
c2dd43cdc5 | ||
|
|
416c9eff69 | ||
|
|
1b928e8bf1 | ||
|
|
e4779ab6ca | ||
|
|
1c63a8e7c3 | ||
|
|
f42a100937 | ||
|
|
2d2f3d4eb2 | ||
|
|
3472bd9f02 | ||
|
|
8c979d3bc7 | ||
|
|
12728649ff | ||
|
|
fa2461ba73 |
@@ -1,3 +1,7 @@
|
|||||||
|
# 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
|
# v5.11.3
|
||||||
- [#1718](https://github.com/xmrig/xmrig/pull/1718) Fixed, linker on Linux was marking entire executable as having an executable stack.
|
- [#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.
|
- [#1720](https://github.com/xmrig/xmrig/pull/1720) Fixed broken CryptoNight algorithms family with gcc 10.1.
|
||||||
|
|||||||
@@ -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); }
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
@@ -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.3-dev"
|
#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 3
|
#define APP_VER_PATCH 4
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# if (_MSC_VER >= 1920)
|
# if (_MSC_VER >= 1920)
|
||||||
|
|||||||
Reference in New Issue
Block a user