From 8592561b7a1dcaa00af695ebcebca2759b1afd16 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Thu, 12 Dec 2019 18:25:28 +0100 Subject: [PATCH] RandomX boost script for Linux --- scripts/randomx_boost.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/randomx_boost.sh diff --git a/scripts/randomx_boost.sh b/scripts/randomx_boost.sh new file mode 100644 index 00000000..ab37829a --- /dev/null +++ b/scripts/randomx_boost.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +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" +elif cat /proc/cpuinfo | grep "Intel" > /dev/null; + then + echo "Detected Intel" + wrmsr -a 0x1a4 6 + echo "MSR register values for Intel applied" +else + echo "No supported CPU detected" +fi