From 4cdea633bfa5dd600c269873b0bfdfd2cbb10c34 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Thu, 12 Nov 2020 15:55:27 +0100 Subject: [PATCH] Update randomx_boost.sh --- scripts/randomx_boost.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/randomx_boost.sh b/scripts/randomx_boost.sh index ecbcdb4e2..91a3cea8d 100755 --- a/scripts/randomx_boost.sh +++ b/scripts/randomx_boost.sh @@ -4,12 +4,22 @@ modprobe msr if cat /proc/cpuinfo | grep "AMD Ryzen" > /dev/null; then - echo "Detected Ryzen" - wrmsr -a 0xc0011022 0x510000 - wrmsr -a 0xc001102b 0x1808cc16 - wrmsr -a 0xc0011020 0 - wrmsr -a 0xc0011021 0x40 - echo "MSR register values for Ryzen applied" + if cat /proc/cpuinfo | grep "cpu family[[:space:]]:[[:space:]]25" > /dev/null; + then + echo "Detected Ryzen (Zen3)" + wrmsr -a 0xc0011020 0x4480000000000 + wrmsr -a 0xc0011021 0x1c000200000040 + wrmsr -a 0xc0011022 0xc000000401500000 + wrmsr -a 0xc001102b 0x2000cc14 + echo "MSR register values for Ryzen (Zen3) applied" + else + echo "Detected Ryzen (Zen1/Zen2)" + wrmsr -a 0xc0011020 0 + wrmsr -a 0xc0011021 0x40 + wrmsr -a 0xc0011022 0x1510000 + wrmsr -a 0xc001102b 0x2000cc16 + echo "MSR register values for Ryzen (Zen1/Zen2) applied" + fi elif cat /proc/cpuinfo | grep "Intel" > /dev/null; then echo "Detected Intel"