mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-13 10:02:50 -05:00
Added support for AMD specific MSR registers.
This commit is contained in:
@@ -88,7 +88,7 @@ static bool wrmsr_on_all_cpus(uint32_t reg, uint64_t value)
|
||||
free(namelist);
|
||||
|
||||
if (errors) {
|
||||
LOG_WARN(CLEAR "%s" YELLOW_BOLD_S "cannot set MSR 0x%04" PRIx32 " to 0x%04" PRIx64, rx_tag(), reg, value);
|
||||
LOG_WARN(CLEAR "%s" YELLOW_BOLD_S "cannot set MSR 0x%08" PRIx32 " to 0x%08" PRIx64, rx_tag(), reg, value);
|
||||
}
|
||||
|
||||
return errors == 0;
|
||||
@@ -100,7 +100,7 @@ static bool wrmsr_on_all_cpus(uint32_t reg, uint64_t value)
|
||||
|
||||
void xmrig::Rx::osInit(const RxConfig &config)
|
||||
{
|
||||
if (config.wrmsr() < 0 || Cpu::info()->vendor() != ICpuInfo::VENDOR_INTEL) {
|
||||
if (config.wrmsr() < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -110,5 +110,11 @@ void xmrig::Rx::osInit(const RxConfig &config)
|
||||
return;
|
||||
}
|
||||
|
||||
wrmsr_on_all_cpus(0x1a4, config.wrmsr());
|
||||
if (Cpu::info()->vendor() == ICpuInfo::VENDOR_AMD) {
|
||||
wrmsr_on_all_cpus(0xC0011022, 0x510000);
|
||||
wrmsr_on_all_cpus(0xC001102b, 0x1808cc16);
|
||||
}
|
||||
else if (Cpu::info()->vendor() == ICpuInfo::VENDOR_INTEL) {
|
||||
wrmsr_on_all_cpus(0x1a4, config.wrmsr());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user