diff options
| author | Timothy Pearson <tpearson@raptorengineering.com> | 2018-06-02 14:44:30 -0500 |
|---|---|---|
| committer | Timothy Pearson <tpearson@raptorengineering.com> | 2018-06-03 04:51:36 -0500 |
| commit | 3e7dedf3f2ed30cdf38663d361bde2599102f149 (patch) | |
| tree | b9efb2eb4ef6cd099c03aa849de033a8a1a96bee /woferclock/woferclock_cpu | |
| parent | a9ae58c7402d14c018a29f956a545b49ff030363 (diff) | |
| download | vpdtools-3e7dedf3f2ed30cdf38663d361bde2599102f149.tar.gz vpdtools-3e7dedf3f2ed30cdf38663d361bde2599102f149.zip | |
Add WoFerClock utility
Diffstat (limited to 'woferclock/woferclock_cpu')
| -rwxr-xr-x | woferclock/woferclock_cpu | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/woferclock/woferclock_cpu b/woferclock/woferclock_cpu new file mode 100755 index 0000000..c5b669e --- /dev/null +++ b/woferclock/woferclock_cpu @@ -0,0 +1,138 @@ +#!/bin/bash +# +# Copyright (c) 2018 Raptor Engineering, LLC +# Released under the terms of the AGPL v3 +# +# Provided WITHOUT WARRANTY OF ANY KIND, to the +# maximum extent possible under law. Modify at +# your sole risk! + +set -e + +NEW_ULTRATURBO_MHZ=4200 + +echo "======================================================================" +echo "Welcome to WoFerClock!" +echo "" +echo "This program is free software, developed by Raptor Engineering, LLC" +echo "for use with the Talos II line of POWER9 machines:" +echo "" +echo "https://www.raptorcs.com/TALOSII" +echo "" +echo "======================================================================" +echo "WARNING" +echo "======================================================================" +echo "This program will alter the Vital Product Data (VPD) of your CPU(s)" +echo "" +echo "We strongly recommend you back up the original VPD image(s) in the" +echo "unlikely event the VPD of your CPU(s) is corrupted. These images" +echo "will be available in the vpd_backup directory after this program" +echo "has completed execution" +echo "" +echo "======================================================================" +echo "Raptor Engineering, LLC, Raptor Computing Systems, LLC, IBM, and" +echo "affiliated entities disclaim all liability resulting from the use" +echo "or misuse of this program. You accept all risk associated with" +echo "modification of clock and/or power data, including, without" +echo "restriction, hardware damage, data corruption, and/or loss of" +echo "business resulting from the use of this program." +echo "" +echo "CPU and/or mainboard damage incurred as a result of attempted" +echo "overclocking may void any and all warranty(s) for the damaged" +echo "component(s)." +echo "" +echo "======================================================================" +echo "Do you accept these terms and wish to proceed at your own risk? [y/N]" +echo "======================================================================" + +read -r -p "" INPUT +if [[ "$INPUT" != "Y" && "$INPUT" != "y" ]]; then + echo "Exiting..." + exit 1 +fi + +# Clean up possibly stale output files if present +rm -rf vpd_out + +echo "======================================================================" +echo "Targetting bucket 5 with a new Ultra Turbo frequency of ${NEW_ULTRATURBO_MHZ}MHz" +echo "======================================================================" +./list_i2c_busses + +echo "======================================================================" +read -r -p "MVPD I2C bus of your first CPU (typically 0, <ENTER> to skip): " I2C_BUS_0 + +if [[ "$I2C_BUS_0" != "" ]]; then + mkdir -p vpd_backup + echo -n "Reading VPD..." + set +e + ./read_vpd "${I2C_BUS_0}" 0x50 vpd_backup/cpu0.bin + RETCODE=$? + set -e + if [[ $RETCODE != 0 ]]; then + echo "Exiting..." + exit 1 + fi + echo "done!" + + mkdir -p vpd_out + echo "Modifying VPD" + ./copy_buckets ${NEW_ULTRATURBO_MHZ} `realpath vpd_backup` cpu0 vpd_out/cpu0 + echo "Done!" +fi + +echo "======================================================================" +./list_i2c_busses + +echo "======================================================================" +read -r -p "MVPD I2C bus of your second CPU (<ENTER> to skip): " I2C_BUS_1 + +if [[ "$I2C_BUS_1" != "" ]]; then + mkdir -p vpd_backup + echo -n "Reading VPD..." + set +e + ./read_vpd "${I2C_BUS_1}" 0x50 vpd_backup/cpu1.bin + RETCODE=$? + set -e + if [[ $RETCODE != 0 ]]; then + echo "Exiting..." + exit 1 + fi + echo "done!" + + mkdir -p vpd_out + echo "Modifying VPD" + ./copy_buckets ${NEW_ULTRATURBO_MHZ} `realpath vpd_backup` cpu1 vpd_out/cpu1 + echo "Done!" +fi + +echo "======================================================================" +echo "Ready to write new VPD image(s). Continue? [y/N]" +echo "======================================================================" + +read -r -p "" INPUT +if [[ "$INPUT" != "Y" && "$INPUT" != "y" ]]; then + echo "Exiting..." + exit 1 +fi + +if [[ "$I2C_BUS_0" != "" ]]; then + echo "Writing CPU 0 VPD..." + ./write_vpd "${I2C_BUS_0}" 0x50 vpd_out/cpu0.bin +fi + +if [[ "$I2C_BUS_1" != "" ]]; then + echo "Writing CPU 1 VPD" + ./write_vpd "${I2C_BUS_1}" 0x50 vpd_out/cpu1.bin +fi + +echo "======================================================================" +echo "VPD image(s) have been updated successfully!" +echo "" +echo "NOTE: Your system will continue to use the old clocking data until you" +echo "load the aggressive variant of the Talos II PNOR. If your system will" +echo "not IPL or is unstable at the higher clocks, reloading the stock PNOR" +echo "will restore your system back to the original clock speeds" +echo "" +echo "Thank you for using WoFerClock!" +echo "======================================================================" |

