1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-10-16 06:17:34 +00:00

Remove device-specific prochot

This commit is contained in:
Steffo 2024-05-20 02:12:59 +02:00
parent f4454554a8
commit 73676c860e
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -1,27 +0,0 @@
function prochot
if not fish_is_root_user
echo_error "This script must be ran as root."
end
set_color yellow
echo "Disabling BD_PROCHOT..."
set -g reg (rdmsr 0x1FC)
echo_progress "CPU register reads: "
echo_highlight "$reg"
echo
set -g nval (math -b hex "bitand(0x$reg, 0xFFFFFFFE)")
echo_progress "New value should be: "
echo_highlight "$nval"
echo
echo_progress "Writing to the CPU register..."
echo
wrmsr 0x1FC $nval
echo_progress "Turned off BD_PROCHOT!"
end